:root {
  --navH: 72px;
  --sbW: 280px;
  --sbWc: 88px;
  --pageMax: 1180px;
  --brand: #1d4e89;
  --brand-dark: #153a68;
  --brand-soft: #eaf1fb;
  --ink: #18324d;
  --muted: #6d7d90;
  --line: #d9e3ee;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbfe;
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 6px 18px rgba(18, 42, 66, 0.06);
  --shadow-md: 0 12px 30px rgba(18, 42, 66, 0.10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.app-body {
  padding-top: var(--navH);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-weight: 700;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

.page-shell {
  max-width: var(--pageMax);
  margin: 0 auto;
}

.app-navbar {
  min-height: var(--navH);
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 100%);
  box-shadow: 0 8px 24px rgba(16, 38, 61, 0.14);
}

.app-nav-shell {
  min-height: var(--navH);
  align-items: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
}

.brand-lockup:hover {
  color: #fff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
  min-width: 0;
  max-width: 320px;
}

.brand-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.brand-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav-list {
  gap: 0.15rem;
}

.app-nav-list .nav-link {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
}

.app-nav-list .nav-link:hover,
.app-nav-list .nav-link:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}

.app-userbar {
  flex-wrap: wrap;
}

.nav-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.85rem;
}

.nav-status-chip i {
  font-size: 0.5rem;
  color: #73df9d;
}

.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.45rem !important;
  border-radius: 999px;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.nav-user-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
}

.nav-user-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-user-copy strong,
.nav-user-copy small {
  color: #fff;
}

.nav-user-copy small {
  opacity: 0.8;
}

.dropdown-menu-modern {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem;
  box-shadow: var(--shadow-md);
}

.dropdown-menu-modern .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
}

.dropdown-menu-modern .dropdown-item:hover {
  background: #f1f6fb;
}

.btn {
  border-radius: 8px;
  font-weight: 600;
}

.btn-sm {
  border-radius: 7px;
}

.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-outline-primary {
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline-primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.page-hero .btn-light,
.dashboard-hero .btn-light {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.page-hero .btn-light:hover,
.dashboard-hero .btn-light:hover,
.page-hero .btn-outline-light:hover,
.dashboard-hero .btn-outline-light:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.page-hero .btn-outline-light,
.dashboard-hero .btn-outline-light {
  background: #fff;
  border-color: var(--line);
  color: var(--brand);
}

.alert {
  border-radius: 12px;
  border: 1px solid transparent;
}

.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding: 0.55rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #97a6b5;
}

.card,
.content-panel,
.surface-card,
.page-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 1rem 1.25rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.card-body {
  padding: 1.25rem;
}

.content-panel,
.surface-card {
  padding: 1.25rem;
}

.page-hero,
.dashboard-hero {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0.85rem 0 0.35rem;
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
}

.hero-subtitle,
.panel-subtitle,
.mini-note,
.section-copy,
.text-muted,
.form-text {
  color: var(--muted) !important;
}

.hero-subtitle {
  max-width: 760px;
  margin: 0;
}

.hero-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hero-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.panel-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-title {
  margin: 0;
  font-size: 1.2rem;
}

.metric-card {
  height: 100%;
  padding: 1.2rem;
  border-radius: 14px;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.metric-card.primary {
  background: linear-gradient(135deg, #1d4e89, #2a65ab);
}

.metric-card.warning {
  background: linear-gradient(135deg, #be8912, #dca016);
}

.metric-card.success {
  background: linear-gradient(135deg, #198754, #23a165);
}

.metric-card.danger {
  background: linear-gradient(135deg, #c53f4f, #d95363);
}

.metric-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.metric-value {
  margin-top: 0.3rem;
  font-size: 1.95rem;
  font-weight: 700;
}

.metric-caption {
  margin-top: 0.35rem;
  opacity: 0.88;
}

.icon-badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  color: var(--ink);
}

.quick-action-card .action-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.step-card {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.step-pill,
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
}

.app-actions,
.app-actions-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-actions-end {
  justify-content: flex-end;
}

.info-list {
  display: grid;
  gap: 0.15rem;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  gap: 0.75rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid #ecf1f6;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-label {
  color: #56697d;
  font-weight: 600;
}

.table {
  margin-bottom: 0;
  color: var(--ink);
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom-color: #e8eef5;
}

.table thead th,
.table-light th,
.table-primary th,
.table-info th,
.table-danger th {
  background: #f3f7fb !important;
  color: #39516c !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-responsive {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.badge {
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
}

.form-control,
.form-select {
  min-height: 46px;
  border: 1px solid #ced8e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea.form-control {
  min-height: 110px;
}

.form-control:focus,
.form-select:focus {
  border-color: #8fb1d5;
  box-shadow: 0 0 0 0.2rem rgba(29, 78, 137, 0.12);
}

.form-label {
  color: #284663;
  font-weight: 600;
}

.progress {
  height: 12px !important;
  background: #e7edf4;
  border-radius: 999px;
}

.progress-bar {
  border-radius: 999px;
}

.list-group-item {
  background: transparent;
  border-left: 0;
  border-right: 0;
  padding: 1rem 0.25rem;
}

.admin-shell {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  min-height: calc(100vh - var(--navH));
  width: 100%;
  max-width: 100%;
  padding: 1.25rem;
}

.admin-sidebar-wrap {
  width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
}

.sidebar {
  position: sticky;
  top: calc(var(--navH) + 1.25rem);
  width: 280px;
  max-width: 280px;
  height: calc(100vh - var(--navH) - 2.5rem);
  padding: 0;
  background: transparent !important;
}

.admin-sidebar-inner {
  height: 100%;
  padding: 1rem;
  background: #182d44;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
}

.sidebar-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-kicker,
.sidebar-section-label,
.sidebar-spotlight-label {
  display: inline-block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-topbar h5,
.sidebar-spotlight,
.sidebar .nav-link {
  color: #fff;
}

.sidebar-toggle-btn {
  border-radius: 8px;
}

.sidebar-spotlight {
  margin: 1rem 0 1.1rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  white-space: normal;
  overflow-wrap: anywhere;
}

.sidebar-spotlight strong,
.sidebar-spotlight small {
  display: block;
}

.sidebar-spotlight small {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-section + .sidebar-section {
  margin-top: 1rem;
}

.admin-sidebar .sb-ico {
  width: 20px;
  flex: 0 0 20px;
  text-align: center;
}

.sidebar .nav-link {
  margin: 0.15rem 0;
  padding: 0.68rem 0.8rem;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.94) !important;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar .collapse .nav-link {
  font-size: 0.93rem;
}

.admin-content {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

body.sidebar-collapsed .admin-shell {
  display: flex;
}

body.sidebar-collapsed .admin-sidebar-wrap {
  width: 88px;
  max-width: 88px;
  flex-basis: 88px;
}

body.sidebar-collapsed .sidebar {
  width: 88px;
  max-width: 88px;
}

body.sidebar-collapsed .admin-sidebar .sb-text,
body.sidebar-collapsed .admin-sidebar .sb-caret,
body.sidebar-collapsed .admin-sidebar .sidebar-kicker,
body.sidebar-collapsed .admin-sidebar .sidebar-section-label,
body.sidebar-collapsed .admin-sidebar .sidebar-spotlight-label {
  display: none !important;
}

body.sidebar-collapsed .admin-sidebar .nav-link {
  justify-content: center;
}

body.sidebar-collapsed .admin-sidebar ul.collapse {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.nav-tabs {
  gap: 0.45rem;
  border-bottom: 0;
}

.nav-tabs .nav-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.page-link {
  color: var(--brand);
  border-radius: 8px;
}

.page-item.active .page-link {
  background: var(--brand);
  border-color: var(--brand);
}

.modal-content {
  border: 1px solid var(--line);
  border-radius: 16px;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.empty-state i {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 2.6rem;
  color: #9eb0c2;
}

.auth-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.support-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 1199.98px) {
  .navbar-collapse {
    padding-top: 0.75rem;
  }

  .app-userbar {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  .admin-shell {
    display: block;
    gap: 1rem;
    padding: 1rem;
  }

  .admin-sidebar-wrap,
  .sidebar {
    width: 100%;
    max-width: 100%;
  }

  .admin-sidebar-wrap {
    max-width: 100%;
    flex-basis: auto;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar-inner {
    height: auto;
  }

  body.sidebar-collapsed .admin-sidebar .sb-text,
  body.sidebar-collapsed .admin-sidebar .sb-caret,
  body.sidebar-collapsed .admin-sidebar .sidebar-kicker,
  body.sidebar-collapsed .admin-sidebar .sidebar-section-label,
  body.sidebar-collapsed .admin-sidebar .sidebar-spotlight-label {
    display: inline !important;
  }

  body.sidebar-collapsed .admin-sidebar .nav-link {
    justify-content: flex-start;
  }

  .auth-two-col,
  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .hero-meta,
  .hero-actions,
  .app-actions,
  .app-actions-end {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .app-actions .btn,
  .app-actions a,
  .app-actions button,
  .app-actions-end .btn {
    width: 100%;
  }

  .container,
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-hero,
  .dashboard-hero,
  .content-panel,
  .surface-card,
  .card-body,
  .card-header {
    padding: 1rem;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .nav-user-copy small {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media print {
  .no-print,
  .app-navbar,
  .sidebar,
  .admin-sidebar-wrap {
    display: none !important;
  }

  body.app-body {
    padding-top: 0;
    background: #fff;
  }

  .admin-shell {
    display: block;
    padding: 0;
  }
}
