:root {
  --fi-mobile-gutter: 1rem;
}

* {
  box-sizing: border-box;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.table {
  width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.d-flex.mobile-column {
  flex-direction: column !important;
  gap: 0.75rem;
}

@media (max-width: 992px) {
  .fi-mobile-fullwidth {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 1rem;
    padding: 0;
    margin: 0;
  }

  .container,
  .main-card,
  .login-card,
  .card,
  .modal-content,
  .header-bar,
  .fi-mobile-padding,
  .admin-section,
  .fi-dashboard-section {
    padding-left: var(--fi-mobile-gutter);
    padding-right: var(--fi-mobile-gutter);
  }

  .navbar .navbar-brand,
  .navbar .navbar-nav,
  .navbar .navbar-collapse {
    width: 100%;
    text-align: center;
  }

  form.d-flex,
  .d-flex.mobile-column,
  .fi-stack-on-mobile {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  form.d-flex > *,
  .fi-stack-on-mobile > * {
    margin: 0 0 0.75rem 0 !important;
    width: 100% !important;
  }

  .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  table th,
  table td {
    white-space: nowrap;
  }

  .card,
  .login-card,
  .main-card,
  .fi-section {
    margin-top: 1.5rem;
  }

  .btn,
  input,
  select,
  textarea {
    font-size: 1rem !important;
  }

  .header-bar {
    line-height: 1.4;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 0.95rem;
  }

  h1,
  h2,
  h3,
  h4 {
    font-size: 1.25rem;
  }

  .btn,
  input,
  select,
  textarea {
    font-size: 1rem !important;
  }
}
