/* Shared authenticated shell. Keep page-specific layouts and actions intact. */
:root {
  --bs-font-sans-serif: Inter, "Noto Sans Devanagari", system-ui, sans-serif;
  --nx-navy: #112746;
  --nx-blue: #126188;
  --nx-blue-dark: #0d496e;
  --nx-orange: #ed8a39;
  --nx-ink: #20334f;
  --nx-muted: #718099;
  --nx-line: #e2e9f1;
  --nx-surface: #ffffff;
  --nx-shadow: 0 12px 34px rgba(22, 45, 75, .075);
}

html { -webkit-font-smoothing: antialiased; }
body.g-sidenav-show {
  font-family: Inter, "Noto Sans Devanagari", system-ui, sans-serif !important;
  color: var(--nx-ink);
  background: radial-gradient(circle at 90% 0%, rgba(214, 232, 245, .64), transparent 34%),
              linear-gradient(145deg, #f8fafc 0%, #f1f5fa 100%) !important;
  letter-spacing: -.012em;
}
body.g-sidenav-show button,
body.g-sidenav-show input,
body.g-sidenav-show select,
body.g-sidenav-show textarea { font-family: inherit; }
body.g-sidenav-show .main-content :is(h1, h2, h3, h4, h5, h6, p, small, label, table, th, td, a, button, .btn, .badge, .form-control, .form-select) {
  font-family: Inter, "Noto Sans Devanagari", system-ui, sans-serif !important;
}
body.g-sidenav-show :is(.navbar, .nav-link, .dropdown-menu, .table, .form-control, .form-select, .btn, .modal, .card, .badge, .select2-container) {
  font-family: Inter, "Noto Sans Devanagari", system-ui, sans-serif !important;
}
body.g-sidenav-show h1,
body.g-sidenav-show h2,
body.g-sidenav-show h3,
body.g-sidenav-show h4,
body.g-sidenav-show h5,
body.g-sidenav-show h6 { color: var(--nx-navy); font-weight: 800; letter-spacing: -.035em; }
body.g-sidenav-show .text-muted { color: var(--nx-muted) !important; }

/* Sidebar */
body.g-sidenav-show #sidenav-main {
  border: 1px solid rgba(208, 221, 235, .88) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: 0 18px 50px rgba(22, 45, 75, .13) !important;
}
body.g-sidenav-show #sidenav-main .sidenav-header {
  background: linear-gradient(155deg, #fff 10%, #f2f7fc 100%) !important;
  border-bottom: 1px solid var(--nx-line) !important;
}
body.g-sidenav-show #sidenav-main .navbar-brand img { max-height: 112px !important; object-fit: contain; }
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link {
  color: #475b75 !important;
  border-radius: 12px !important;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link:hover {
  color: var(--nx-blue-dark) !important;
  background: #eaf3fa !important;
  transform: translateX(2px);
}
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link.active,
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link.active:hover {
  color: #fff !important;
  background: linear-gradient(115deg, #11345b 0%, #12698f 100%) !important;
  background-image: linear-gradient(115deg, #11345b 0%, #12698f 100%) !important;
  box-shadow: 0 8px 18px rgba(18, 83, 126, .22) !important;
  transform: none;
}
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link.active .nav-link-text,
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link.active i { color: #fff !important; }
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link .icon {
  background: #f0f5fa !important;
  border: 1px solid #e2eaf3;
  box-shadow: none !important;
}
body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link.active .icon {
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .22);
}
body.g-sidenav-show #sidenav-main .custom-navbar {
  background: #f3f7fb !important;
  border-color: #dce8f3 !important;
  border-left-color: var(--nx-orange) !important;
}
body.g-sidenav-show #sidenav-main .custom-navbar .nav-link:hover { color: var(--nx-blue) !important; background: #e9f2f9 !important; }
body.g-sidenav-show #sidenav-main .wallet-mini-card {
  background: linear-gradient(135deg, #eef5fc, #fff8f1) !important;
  border-color: #dfeaf4 !important;
}
body.g-sidenav-show #sidenav-main .wallet-mini-card .value { color: var(--nx-blue-dark) !important; }

/* Header */
body.g-sidenav-show .premium-topbar {
  background: rgba(255, 255, 255, .96) !important;
  border: 1px solid #dce7f1 !important;
  border-radius: 19px !important;
  box-shadow: var(--nx-shadow) !important;
  padding-block: 7px;
}
body.g-sidenav-show .nx-page-heading { min-width: 180px; }
body.g-sidenav-show .nx-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #a36433;
  font-size: .61rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.g-sidenav-show .premium-topbar .page-title {
  color: var(--nx-navy) !important;
  font-size: 1.18rem !important;
  line-height: 1.25;
}
body.g-sidenav-show .premium-topbar .breadcrumb { font-size: .76rem; }
body.g-sidenav-show .premium-topbar .breadcrumb-item.active { color: var(--nx-blue) !important; font-weight: 700; }
body.g-sidenav-show .premium-topbar .collection-shortcut,
body.g-sidenav-show .premium-topbar .btn-primary {
  background: linear-gradient(115deg, #143a62, #176c97) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(17, 78, 124, .22) !important;
}
body.g-sidenav-show .premium-topbar .wallet-chip {
  background: #f7fafd !important;
  border-color: #dde8f3 !important;
  border-radius: 11px;
}
body.g-sidenav-show .premium-topbar .wallet-chip.collection { background: #fff6ed !important; border-color: #f4dbc6 !important; }
body.g-sidenav-show .premium-topbar .wallet-chip strong { color: var(--nx-navy) !important; }
body.g-sidenav-show .premium-topbar .wallet-chip i,
body.g-sidenav-show .premium-topbar .profile-name { color: var(--nx-blue) !important; }
body.g-sidenav-show .premium-topbar .bell-icon { background: #edf5fa !important; }
body.g-sidenav-show .premium-topbar .bell-icon i { color: var(--nx-blue) !important; }
body.g-sidenav-show .premium-topbar .profile-capsule { border-color: #dae6f1; box-shadow: 0 5px 15px rgba(22, 45, 75, .07); }
body.g-sidenav-show .premium-topbar .dropdown-menu { border-color: var(--nx-line); box-shadow: 0 20px 38px rgba(22, 45, 75, .16) !important; }

/* Compact, single-line command bar. */
body.g-sidenav-show .premium-topbar .nx-header-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  padding: 6px 14px !important;
}
body.g-sidenav-show .premium-topbar .nx-page-heading { min-width: 0; }
body.g-sidenav-show .premium-topbar .nx-page-heading .page-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.g-sidenav-show .premium-topbar .nx-mobile-menu { display: none; }
body.g-sidenav-show .premium-topbar .nx-header-tools {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: auto;
  margin: 0 !important;
  padding: 0;
  border: 0;
}
body.g-sidenav-show .premium-topbar .nx-header-action { margin-right: 0; }
body.g-sidenav-show .premium-topbar .nx-header-action .collection-shortcut {
  margin: 0;
  padding: 7px 14px !important;
}
body.g-sidenav-show .premium-topbar .nx-header-wallets {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  margin-left: 4px;
}
body.g-sidenav-show .premium-topbar .nx-header-wallets .wallet-chip {
  margin: 0;
  padding: 6px 9px !important;
}
body.g-sidenav-show .premium-topbar .nx-header-tools > .navbar-nav {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  margin-left: 2px;
}
body.g-sidenav-show .premium-topbar .nx-header-tools > .navbar-nav > .nav-item { margin: 0; }
body.g-sidenav-show .premium-topbar .profile-capsule { margin: 0; }
body.g-sidenav-show .premium-topbar .profile-capsule { padding: 3px 7px 3px 3px !important; }
body.g-sidenav-show .premium-topbar .profile-capsule img { width: 30px !important; height: 30px !important; }

@media (min-width: 768px) and (max-width: 1450px) {
  body.g-sidenav-show .premium-topbar .profile-capsule .profile-name { display: none !important; }
  body.g-sidenav-show .premium-topbar .profile-capsule img { margin-right: 0 !important; }
  body.g-sidenav-show .premium-topbar .nx-header-action .collection-shortcut { padding-inline: 14px !important; }
}

@media (max-width: 1199.98px) {
  body.g-sidenav-show .premium-topbar .nx-header-inner { grid-template-columns: minmax(0, 1fr) auto auto; }
  body.g-sidenav-show .premium-topbar .nx-page-heading { grid-column: 1; grid-row: 1; }
  body.g-sidenav-show .premium-topbar .nx-mobile-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    grid-row: 1;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 10px;
    background: #eef5fa;
    color: var(--nx-navy);
  }
  body.g-sidenav-show .premium-topbar .nx-header-tools { grid-column: 2; grid-row: 1; }
}

@media (min-width: 768px) and (max-width: 980px) {
  body.g-sidenav-show .premium-topbar .nx-header-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  body.g-sidenav-show .premium-topbar .nx-mobile-menu { grid-column: 2; }
  body.g-sidenav-show .premium-topbar .nx-header-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 767.98px) {
  body.g-sidenav-show .premium-topbar .nx-header-inner { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 12px !important; }
  body.g-sidenav-show .premium-topbar .nx-mobile-menu { grid-column: 2; }
  body.g-sidenav-show .premium-topbar .nx-header-tools {
    display: none !important;
  }
  body.g-sidenav-show .premium-topbar .page-title { font-size: 1rem !important; }
}

/* Main page surfaces */
body.g-sidenav-show .main-content > .container-fluid,
body.g-sidenav-show .main-content > .container { padding-bottom: 12px; }
body.g-sidenav-show .main-content .card:not(.support-card),
body.g-sidenav-show .main-content .modal-content {
  border: 1px solid var(--nx-line);
  border-radius: 17px;
  box-shadow: var(--nx-shadow);
}
body.g-sidenav-show .main-content .card-header:not(.bg-gradient-primary) {
  border-bottom: 1px solid var(--nx-line);
  border-radius: 17px 17px 0 0;
}
body.g-sidenav-show .main-content .card-body { color: var(--nx-ink); }
body.g-sidenav-show .main-content .form-label { color: #435774; font-size: .82rem; font-weight: 700; }
body.g-sidenav-show .main-content .form-control,
body.g-sidenav-show .main-content .form-select,
body.g-sidenav-show .main-content .select2-container--default .select2-selection--single {
  border: 1px solid #d7e2ed !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(22, 45, 75, .025);
}
body.g-sidenav-show .main-content .form-control:focus,
body.g-sidenav-show .main-content .form-select:focus {
  border-color: #79abc9 !important;
  box-shadow: 0 0 0 3px rgba(27, 110, 157, .13) !important;
}
body.g-sidenav-show .main-content .form-control::placeholder { color: #99a7b9; }
body.g-sidenav-show .main-content .table { color: var(--nx-ink); }
body.g-sidenav-show .main-content .table thead th {
  color: #566985;
  background: #f2f6fa;
  border-bottom-color: #dce7f1;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
body.g-sidenav-show .main-content .table tbody tr:hover { background-color: #f7fafd; }
body.g-sidenav-show .main-content .btn { border-radius: 10px; font-weight: 700; }
body.g-sidenav-show .main-content .btn-primary,
body.g-sidenav-show .main-content .bg-gradient-primary {
  background: linear-gradient(115deg, #143a62, #176c97) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(17, 78, 124, .16);
}
body.g-sidenav-show .main-content .btn-primary:hover,
body.g-sidenav-show .main-content .bg-gradient-primary:hover { filter: brightness(1.08); }
body.g-sidenav-show .main-content .btn-info { background: #1886ad !important; border-color: #1886ad !important; color: #fff !important; }
body.g-sidenav-show .main-content .badge { border-radius: 7px; font-weight: 800; letter-spacing: .015em; }
body.g-sidenav-show .main-content .alert { border-radius: 12px; border: 1px solid rgba(22, 45, 75, .07); }
body.g-sidenav-show .main-content .modal-content { overflow: hidden; }

/* Footer */
body.g-sidenav-show > .main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto !important;
  max-height: none !important;
}
.nx-footer { margin: auto 16px 24px; padding-top: 18px; flex: 0 0 auto; }
.nx-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid #dce7f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 24px rgba(22, 45, 75, .045);
}
.nx-footer-brand { display: flex; align-items: center; gap: 10px; }
.nx-footer-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #13395f, #197ca5);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(18, 93, 139, .2);
}
.nx-footer-brand strong { display: block; color: var(--nx-navy); font-size: .75rem; line-height: 1.3; }
.nx-footer-brand small { display: block; color: var(--nx-muted); font-size: .63rem; letter-spacing: .04em; }
.nx-footer-meta { display: flex; align-items: center; gap: 12px; color: var(--nx-muted); font-size: .7rem; font-weight: 600; }
.nx-footer-separator { width: 3px; height: 3px; border-radius: 50%; background: var(--nx-orange); }

@media (max-width: 767.98px) {
  body.g-sidenav-show .premium-topbar { margin-inline: 10px !important; }
  body.g-sidenav-show .premium-topbar .page-title { font-size: 1rem !important; }
  .nx-footer { margin-inline: 10px; }
  .nx-footer-inner { align-items: flex-start; flex-direction: column; gap: 10px; }
  .nx-footer-meta { flex-wrap: wrap; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  body.g-sidenav-show #sidenav-main .navbar-nav > .nav-item > .nav-link { transition: none; }
}
