html {
  font-size: 14px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f6f8fb;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.app-shell {
  flex: 1 0 auto;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

main[role="main"] {
  padding-top: 0.5rem;
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}

.brand-text {
  letter-spacing: 0.2px;
  color: #111827 !important;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.navbar {
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}

.navbar .nav-link {
  color: #374151 !important;
  font-weight: 500;
}

.navbar .nav-link:hover {
  color: #111827 !important;
}

.user-nav-link {
  font-weight: 600;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.card-header {
  border-bottom: 1px solid #eef2f7;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.table {
  margin-bottom: 0;
}

.table> :not(caption)>*>* {
  padding: 0.95rem 1rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(37, 99, 235, 0.03);
}

.btn {
  border-radius: 10px;
  font-weight: 500;
}

.btn-primary {
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.alert {
  border-radius: 14px;
}

.status-alert {
  border: none;
}

.pagination {
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 2rem !important;
}

.pagination .page-link {
  border-radius: 10px !important;
  color: #374151;
  border-color: #d1d5db;
  min-width: 42px;
  text-align: center;
}

.pagination .page-item.active .page-link {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.badge {
  padding: 0.5em 0.7em;
  border-radius: 999px;
  font-weight: 600;
}

.footer {
  flex-shrink: 0;
  background: #ffffff;
  position: relative;
  z-index: 1;
  margin-top: auto;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.03);
  padding-bottom: env(safe-area-inset-bottom);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #111827;
}

.text-muted {
  color: #6b7280 !important;
}

.border.rounded-3 {
  border-color: #e5e7eb !important;
  background: #fff;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: #d1d5db;
  min-height: 44px;
}

.form-control:focus,
.form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

textarea.form-control {
  min-height: 120px;
}

.empty-state {
  padding: 2.25rem;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  color: #6b7280;
}

.empty-state-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eff6ff;
  font-size: 1.5rem;
}

.onboarding-page {
  padding-bottom: 2rem;
}

.onboarding-actions {
  margin-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 767.98px) {
  .app-shell {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
  }

  main[role="main"] {
    padding-bottom: calc(8rem + env(safe-area-inset-bottom));
  }

  .card-body {
    padding-bottom: 1.25rem;
  }

  .table-responsive {
    margin-bottom: 1rem;
  }

  .onboarding-page {
    padding-bottom: 4rem;
  }

  .onboarding-actions {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}