:root {
  --app-bg: #f3f6fb;
  --app-surface: #ffffff;
  --app-border: #dbe3ef;
  --app-text: #12233d;
  --app-muted: #5d6f8c;
  --app-primary: #0d6efd;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  color: var(--app-text);
  background: linear-gradient(180deg, #eef4ff 0%, #f7f9fd 45%, #f3f6fb 100%);
  margin-bottom: 60px;
}

.container {
  max-width: 1080px;
}

.navbar {
  border-radius: 0 0 16px 16px;
  background-color: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(8px);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.card {
  border: 1px solid var(--app-border);
  border-radius: 14px;
}

.btn {
  border-radius: 10px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.25rem rgba(13, 110, 253, 0.28);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.mobile-tabbar {
  display: none;
}

.app-install-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1050;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.28);
}

.global-offline-btn {
  position: fixed;
  right: 1rem;
  top: 0.85rem;
  z-index: 1090;
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.28);
  font-weight: 700;
  border-radius: 999px;
}

@media (max-width: 767.98px) {
  body {
    margin-bottom: 98px;
  }

  header {
    display: none !important;
  }

  .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  main {
    padding-bottom: 0.5rem;
  }

  .card {
    border-radius: 12px;
  }

  .table-responsive {
    border-radius: 12px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    padding: 0.15rem;
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    padding: 0.6rem 0.7rem calc(0.6rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
  }

  .app-install-btn {
    right: 0.7rem;
    bottom: calc(4.9rem + env(safe-area-inset-bottom));
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
  }

  .global-offline-btn {
    right: 0.65rem;
    top: 0.65rem;
    font-size: 0.82rem;
    padding: 0.45rem 0.7rem;
  }

  .mobile-tabbar a {
    text-decoration: none;
    color: var(--app-muted);
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 0.25rem;
    transition: all 0.15s ease;
  }

  .mobile-tabbar a.active {
    color: #ffffff;
    background: var(--app-primary);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.24);
  }

  .footer {
    display: none;
  }
}
