/* =========================
   Super Admin Dashboard
========================= */

.super-admin-dashboard {
  display: grid;
  gap: 24px;
}

.super-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(244, 180, 0, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255, 213, 79, 0.10), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #fffdf5 100%);
  border: 1px solid rgba(244, 180, 0, 0.16);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.super-hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(244, 180, 0, 0.06);
  pointer-events: none;
}

.super-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(244, 180, 0, 0.12);
  color: #8a6500;
  border: 1px solid rgba(244, 180, 0, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.super-hero__title {
  font-size: clamp(1.65rem, 2.5vw, 2.45rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
  color: #111827;
}

.super-hero__text {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 760px;
  line-height: 1.7;
  margin-bottom: 0;
}

.super-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.super-chip {
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.super-filter-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(244, 180, 0, 0.12);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.executive-kpi {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  min-height: 100%;
}

.executive-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-2));
}

.executive-kpi--warning::before {
  background: linear-gradient(90deg, #ffc107, #ffda6a);
}

.executive-kpi--danger::before {
  background: linear-gradient(90deg, #dc3545, #ff8f9a);
}

.executive-kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.executive-kpi__icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(244, 180, 0, 0.18), rgba(255, 213, 79, 0.10));
  border: 1px solid rgba(244, 180, 0, 0.16);
  color: #8a6500;
  font-size: 1.1rem;
  flex: 0 0 50px;
}

.executive-kpi__label {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.executive-kpi__value {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #111827;
}

.executive-kpi__meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.super-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: 100%;
}

.super-panel__header {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  background:
    linear-gradient(180deg, rgba(248, 249, 250, 0.9), rgba(255, 255, 255, 1));
}

.super-panel__eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #b78103;
  margin-bottom: 0.28rem;
}

.super-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.super-panel__body {
  padding: 1.15rem;
}

.super-stat-list {
  display: grid;
  gap: 0;
}

.super-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.super-stat-row:last-child {
  border-bottom: 0;
}

.super-stat-row span {
  color: #4b5563;
  font-weight: 600;
  font-size: 0.92rem;
}

.super-stat-row strong {
  color: #111827;
  font-size: 0.96rem;
  font-weight: 800;
}

.super-stat-row--emphasis span,
.super-stat-row--emphasis strong {
  font-weight: 900;
}

.super-stat-row--profit strong {
  color: #198754;
}

.super-stat-row--warning strong {
  color: #b78103;
}

.super-stat-row--danger strong {
  color: #dc3545;
}

.super-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.super-section-head__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.super-section-head__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.command-grid {
  display: grid;
  gap: 24px;
}

.command-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.branch-premium-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(244, 180, 0, 0.10), transparent 26%),
    #fff;
  box-shadow: var(--shadow-sm);
  padding: 1.15rem;
  height: 100%;
}

.branch-premium-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(244, 180, 0, 0.05);
  pointer-events: none;
}

.branch-premium-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.branch-premium-card__name {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.branch-premium-card__code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(244, 180, 0, 0.10);
  color: #8a6500;
  font-size: 0.74rem;
  font-weight: 800;
}

.branch-premium-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.branch-premium-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.branch-premium-card__metric {
  padding: 12px;
  border-radius: var(--radius-md);
  background: #f8f9fa;
  border: 1px solid #edf0f2;
}

.branch-premium-card__metric span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.branch-premium-card__metric strong {
  display: block;
  font-size: 0.98rem;
  color: #111827;
  font-weight: 800;
}

.fin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.fin-pill--success {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.fin-pill--warning {
  background: rgba(255, 193, 7, 0.14);
  color: #b78103;
}

.fin-pill--danger {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

.summary-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--border-color);
  background: rgba(248, 249, 250, 0.7);
  font-weight: 800;
}

.summary-total-bar strong {
  font-size: 1rem;
}

.super-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.super-mini-card {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #f8f9fa;
}

.super-mini-card__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.super-mini-card__value {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.super-progress-wrap {
  margin-bottom: 16px;
}

.super-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.super-chart-card .card-body {
  min-height: 320px;
}

.super-chart-canvas {
  position: relative;
  height: 260px;
}

html[data-theme="dark"] .super-hero,
html[data-theme="dark"] .super-panel,
html[data-theme="dark"] .executive-kpi,
html[data-theme="dark"] .branch-premium-card,
html[data-theme="dark"] .super-filter-panel {
  background: var(--panel-dark);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .super-hero__title,
html[data-theme="dark"] .executive-kpi__value,
html[data-theme="dark"] .super-panel__title,
html[data-theme="dark"] .branch-premium-card__name,
html[data-theme="dark"] .branch-premium-card__metric strong,
html[data-theme="dark"] .super-stat-row strong,
html[data-theme="dark"] .super-mini-card__value {
  color: #fff;
}

html[data-theme="dark"] .super-chip,
html[data-theme="dark"] .branch-premium-card__metric,
html[data-theme="dark"] .super-mini-card,
html[data-theme="dark"] .summary-total-bar {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .super-panel__header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .super-stat-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 991.98px) {
  .super-hero {
    padding: 22px;
  }

  .branch-premium-card__grid,
  .super-mini-grid {
    grid-template-columns: 1fr;
  }
}
:root {
  --brand-primary: #f4b400;
  --brand-primary-2: #ffd54f;
  --brand-primary-3: #ffecb3;
  --brand-dark: #1f1412;
  --brand-dark-2: #151011;

  --app-bg: #f5f7fb;
  --app-bg-dark: #0f172a;
  --panel-dark: #111827;
  --panel-dark-2: #1f2937;

  --sidebar-width: 280px;
  --sidebar-collapsed-width: 88px;
  --topbar-height: 68px;

  --border-color: #e9ecef;
  --text-muted: #6c757d;
  --sidebar-text: rgba(255, 255, 255, 0.78);
  --sidebar-muted: rgba(255, 255, 255, 0.45);
  --sidebar-hover: rgba(255, 255, 255, 0.08);

  --radius-sm: 14px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);

  --transition: 0.25s ease;
}

/* =========================
   Base
========================= */

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--app-bg);
  color: #212529;
  transition: background var(--transition), color var(--transition);
}

a {
  text-decoration: none;
}

code {
  color: #8a6500;
}

.admin-app {
  min-height: 100vh;
}

.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1035;
  display: none;
}

/* =========================
   Shared surfaces
========================= */

.app-surface,
.content-panel,
.dashboard-card,
.app-form-section,
.app-modal,
.app-offcanvas,
.app-offcanvas-footer {
  background: #fff;
  border: 1px solid var(--border-color);
  color: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.content-panel,
.dashboard-card,
.app-form-section {
  border-radius: var(--radius-lg);
}

.content-panel,
.dashboard-card {
  box-shadow: var(--shadow-sm);
}

.dashboard-card:hover {
  border-color: rgba(244, 180, 0, 0.22);
}

.app-surface-muted,
.activity-item,
.mini-stack-item,
.app-choice {
  background: #f8f9fa;
}

.text-muted,
.app-text-muted {
  color: var(--text-muted) !important;
}

/* =========================
   Buttons
========================= */

.btn-brand {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  border: 0;
  color: #2b1a07;
  font-weight: 700;
}

.btn-brand:hover,
.btn-brand:focus {
  color: #2b1a07;
  opacity: 0.96;
}

.page-actions .btn {
  min-height: 42px;
}

/* =========================
   Layout
========================= */

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background:
    radial-gradient(circle at top, rgba(244, 180, 0, 0.10), transparent 24%),
    linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-dark-2) 100%);
  color: #fff;
  z-index: 1040;
  overflow: hidden;
  box-shadow: 18px 0 40px rgba(0, 0, 0, 0.18);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transition: width var(--transition), transform var(--transition);
}

.admin-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.admin-sidebar__scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 10px 14px 14px;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.admin-sidebar__brand {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar__logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #2b1a07;
  font-weight: 800;
  flex: 0 0 42px;
  box-shadow: 0 10px 24px rgba(244, 180, 0, 0.28);
}

.admin-sidebar__brand-text {
  min-width: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.admin-sidebar__brand-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-sidebar__brand-text small {
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
}

.admin-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition), border-color var(--transition);
}

.admin-content {
  flex: 1;
  padding: 24px;
}

.admin-footer {
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
  transition: background var(--transition), border-color var(--transition);
}

/* =========================
   Sidebar nav
========================= */

.sidebar-section-title {
  padding: 14px 10px 8px;
  color: var(--sidebar-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: opacity var(--transition), transform var(--transition);
}

.sidebar-menu,
.sidebar-submenu,
.sidebar-subsubmenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu {
  display: grid;
  gap: 8px;
}

.sidebar-item {
  position: relative;
}

.sidebar-link,
.sidebar-submenu-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.sidebar-link:hover,
.sidebar-submenu-link:hover,
.sidebar-submenu a:hover,
.sidebar-subsubmenu a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #2b1a07;
  box-shadow: 0 12px 24px rgba(244, 180, 0, 0.22);
}

.sidebar-link-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.sidebar-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 40px;
}

.sidebar-link.active .sidebar-icon {
  background: rgba(33, 18, 18, 0.08);
  border-color: rgba(33, 18, 18, 0.08);
}

.sidebar-label,
.sidebar-arrow,
.sidebar-submenu,
.sidebar-subsubmenu {
  transition: opacity var(--transition), transform var(--transition);
}

.sidebar-arrow {
  font-size: 0.8rem;
  opacity: 0.8;
}

.sidebar-item.open > .sidebar-link .sidebar-arrow,
.sidebar-subitem.open > .sidebar-submenu-link .sidebar-arrow {
  transform: rotate(90deg);
}

.sidebar-submenu-wrap,
.sidebar-subsubmenu-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition), opacity var(--transition);
  opacity: 0;
}

.sidebar-item.open > .sidebar-submenu-wrap,
.sidebar-subitem.open > .sidebar-subsubmenu-wrap {
  grid-template-rows: 1fr;
  opacity: 1;
}

.sidebar-submenu-inner,
.sidebar-subsubmenu-inner {
  overflow: hidden;
}

.sidebar-submenu {
  margin: 6px 0 0 52px;
  padding-left: 12px;
  border-left: 1px dashed rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 6px;
}

.sidebar-subsubmenu {
  margin: 6px 0 0 14px;
  padding-left: 12px;
  border-left: 1px dashed rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 6px;
}

.sidebar-submenu a,
.sidebar-subsubmenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.74);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.sidebar-submenu a.active,
.sidebar-subsubmenu a.active,
.sidebar-submenu-link.active {
  background: rgba(244, 180, 0, 0.16);
  color: #ffe08a;
}

.sidebar-submenu-link {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.sidebar-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #111;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  pointer-events: none;
  z-index: 30;
}
.sidebar-menu,
.sidebar-item,
.sidebar-link,
.sidebar-link-main,
.sidebar-submenu-wrap,
.sidebar-submenu-inner,
.sidebar-submenu,
.sidebar-subsubmenu-wrap,
.sidebar-subsubmenu-inner,
.sidebar-subsubmenu {
  min-width: 0;
}

.sidebar-submenu,
.sidebar-subsubmenu {
  overflow-x: hidden;
}

/* =========================
   Topbar
========================= */

.topbar-actions {
  position: relative;
}

.topbar-icon-btn,
.topbar-profile-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.topbar-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #2b1a07;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(244, 180, 0, 0.25);
}

.topbar-dropdown {
  position: relative;
}

.topbar-dropdown-toggle {
  cursor: pointer;
}

.topbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
  z-index: 1060;
}

.topbar-dropdown:hover .topbar-dropdown-menu,
.topbar-dropdown:focus-within .topbar-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.topbar-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.35rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.topbar-notification-menu {
  width: 340px;
  max-width: min(92vw, 340px);
}

.topbar-notification-list {
  display: grid;
  gap: 0.35rem;
}

.topbar-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: inherit;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.2s ease;
}

.topbar-notification-item:hover,
.topbar-menu-link:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.topbar-notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-profile-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background var(--transition);
}

.topbar-profile-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 180, 0, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.topbar-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #2b1a07;
  font-weight: 800;
  font-size: 0.85rem;
}

.topbar-profile-avatar--lg {
  width: 46px;
  height: 46px;
  font-size: 1rem;
}

.topbar-profile-menu {
  width: 260px;
}

.topbar-profile-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem;
}

.topbar-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  color: inherit;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

/* =========================
   Content
========================= */

.page-title {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-muted);
  max-width: 720px;
}

.content-panel {
  padding: 24px;
}

.dashboard-card {
  padding: 1.25rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: -22px;
  right: -22px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(244, 180, 0, 0.10);
}

.metric-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric-label {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.metric-value {
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(244, 180, 0, 0.18), rgba(244, 180, 0, 0.08));
  border: 1px solid rgba(244, 180, 0, 0.16);
  font-size: 1.1rem;
}

.metric-meta {
  position: relative;
  z-index: 1;
  font-size: 0.86rem;
  font-weight: 600;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(244, 180, 0, 0.12);
  border: 1px solid rgba(244, 180, 0, 0.16);
  color: #8a6500;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-widget {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(244, 180, 0, 0.10), transparent 30%),
    #fff;
}

.hero-widget__content {
  max-width: 700px;
}

.hero-widget__title {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}

.hero-widget__text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.activity-list,
.mini-stack,
.app-form-sidebar {
  display: grid;
  gap: 0.85rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, background 0.2s ease;
}

.activity-item:hover {
  transform: translateY(-1px);
}

.activity-icon,
.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
}

.activity-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.activity-content strong {
  font-size: 0.94rem;
  margin-bottom: 0.2rem;
}

.activity-content small,
.mini-stack-item small {
  color: var(--text-muted);
}

.activity-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.app-progress {
  height: 10px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}

.app-progress .progress-bar {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-2));
  border-radius: inherit;
}

.mini-stack-item {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mini-stack-item strong {
  font-size: 0.92rem;
}

.app-alert {
  border: 1px solid rgba(244, 180, 0, 0.22);
  border-radius: var(--radius-md);
}

.alert-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(244, 180, 0, 0.14);
  color: #8a6500;
}

/* =========================
   Data components
========================= */

.data-card-header,
.data-card-footer {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.data-card-footer {
  border-bottom: 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.data-toolbar {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: rgba(248, 249, 250, 0.75);
}

.data-toolbar-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 2;
}

.data-search-input {
  padding-left: 2.5rem;
}

.app-tabs {
  gap: 0.5rem;
  border-bottom: 0;
}

.app-tabs .nav-link {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-muted);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  transition: all 0.2s ease;
}

.app-tabs .nav-link:hover {
  color: #212529;
  border-color: rgba(244, 180, 0, 0.22);
}

.app-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #2b1a07;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(244, 180, 0, 0.16);
}

.app-table {
  min-width: 900px;
}

.app-table thead th {
  background: #f8f9fa;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
  padding: 0.95rem 1rem;
  white-space: nowrap;
}

.app-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.app-table tbody tr:hover {
  background: rgba(244, 180, 0, 0.04);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-active {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
  border-color: rgba(25, 135, 84, 0.14);
}

.status-pending {
  background: rgba(255, 193, 7, 0.14);
  color: #b78103;
  border-color: rgba(255, 193, 7, 0.16);
}

.status-closed {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.14);
}

.app-accordion .accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.85rem;
  background: #fff;
}

.app-accordion .accordion-button {
  font-weight: 700;
  box-shadow: none;
  border: 0;
  padding: 1rem 1.1rem;
}

.app-accordion .accordion-button:not(.collapsed) {
  background: rgba(244, 180, 0, 0.08);
  color: #2b1a07;
}

.app-accordion .accordion-button:focus {
  box-shadow: none;
}

.app-accordion .accordion-body {
  color: var(--text-muted);
  line-height: 1.7;
}

.pagination .page-link {
  color: var(--text-muted);
  border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  border-color: transparent;
  color: #2b1a07;
  font-weight: 700;
}

/* =========================
   Forms / modal / offcanvas
========================= */

.form-label {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 46px;
  border-radius: var(--radius-sm);
  border-color: var(--border-color);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(244, 180, 0, 0.35);
  box-shadow: 0 0 0 0.25rem rgba(244, 180, 0, 0.12);
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.input-group > .form-control,
.input-group > .form-select,
.input-group > .input-group-text {
  border-radius: var(--radius-sm);
}

.input-group > :not(:first-child) {
  margin-left: 0.5rem;
}

.app-form-section {
  padding: 1rem;
}

.app-form-section + .app-form-section {
  margin-top: 1rem;
}

.app-form-section__header {
  margin-bottom: 1rem;
}

.app-form-section__header h6 {
  font-weight: 800;
}

.app-form-section__header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.app-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.app-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.app-choice:hover {
  border-color: rgba(244, 180, 0, 0.25);
  transform: translateY(-1px);
}

.app-choice .form-check-input {
  margin-top: 0;
}

.app-modal {
  border: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.app-modal-header,
.app-modal-footer {
  border-color: var(--border-color);
  padding: 1rem 1.25rem;
}

.app-modal-body,
.app-offcanvas-body {
  padding: 1.25rem;
  background: #f8fafc;
}

.app-offcanvas {
  width: min(92vw, 430px) !important;
  border-left: 1px solid var(--border-color);
}

.app-offcanvas-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.app-offcanvas-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-backdrop.show,
.offcanvas-backdrop.show {
  opacity: 0.35;
}

/* =========================
   Collapsed sidebar
========================= */

html[data-sidebar="collapsed"] .admin-sidebar {
  width: var(--sidebar-collapsed-width);
}

html[data-sidebar="collapsed"] .admin-main {
  margin-left: var(--sidebar-collapsed-width);
}

html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .admin-sidebar__brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .admin-sidebar__brand-text,
html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-section-title,
html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-label,
html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-arrow,
html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-submenu-wrap,
html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-subsubmenu-wrap {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-8px);
}

html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-link {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-link-main {
  justify-content: center;
  flex: 0 0 auto;
}

html[data-sidebar="collapsed"] .admin-sidebar:not(.is-hovered) .sidebar-item:hover .sidebar-tooltip {
  opacity: 1;
  visibility: visible;
}

html[data-sidebar="collapsed"] .admin-sidebar.is-hovered {
  width: var(--sidebar-width);
}

/* =========================
   Dark mode
========================= */

html[data-theme="dark"] body {
  background: var(--app-bg-dark);
  color: #e5e7eb;
}

html[data-theme="dark"] .admin-header {
  background: rgba(15, 23, 42, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .admin-footer,
html[data-theme="dark"] .topbar-dropdown-menu,
html[data-theme="dark"] .app-surface,
html[data-theme="dark"] .content-panel,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .app-form-section,
html[data-theme="dark"] .app-modal,
html[data-theme="dark"] .app-offcanvas,
html[data-theme="dark"] .app-offcanvas-footer {
  background: var(--panel-dark);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .app-surface-muted,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .mini-stack-item,
html[data-theme="dark"] .app-choice,
html[data-theme="dark"] .data-toolbar,
html[data-theme="dark"] .app-table thead th,
html[data-theme="dark"] .app-accordion .accordion-item,
html[data-theme="dark"] .app-modal-body,
html[data-theme="dark"] .app-offcanvas-body {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .hero-widget__text,
html[data-theme="dark"] .activity-content small,
html[data-theme="dark"] .activity-time,
html[data-theme="dark"] .mini-stack-item small,
html[data-theme="dark"] .app-form-section__header p,
html[data-theme="dark"] .app-accordion .accordion-body,
html[data-theme="dark"] .data-toolbar-search-icon,
html[data-theme="dark"] .breadcrumb-item,
html[data-theme="dark"] .breadcrumb-item a {
  color: #9ca3af !important;
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .topbar-profile-btn,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .pagination .page-link,
html[data-theme="dark"] .app-tabs .nav-link {
  background: var(--panel-dark-2);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .form-control::placeholder {
  color: #9ca3af;
}

html[data-theme="dark"] .topbar-notification-item:hover,
html[data-theme="dark"] .topbar-menu-link:hover,
html[data-theme="dark"] .app-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .dropdown-divider,
html[data-theme="dark"] .topbar-dropdown-header,
html[data-theme="dark"] .data-card-header,
html[data-theme="dark"] .data-toolbar,
html[data-theme="dark"] .data-card-footer,
html[data-theme="dark"] .app-table thead th,
html[data-theme="dark"] .app-table tbody td,
html[data-theme="dark"] .app-accordion .accordion-item {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .hero-widget {
  background:
    radial-gradient(circle at top right, rgba(244, 180, 0, 0.10), transparent 30%),
    var(--panel-dark);
}

html[data-theme="dark"] .section-badge {
  color: #ffe08a;
  background: rgba(244, 180, 0, 0.16);
  border-color: rgba(244, 180, 0, 0.18);
}

html[data-theme="dark"] .app-tabs .nav-link:hover {
  color: #e5e7eb;
}

html[data-theme="dark"] .app-accordion .accordion-button {
  background: var(--panel-dark);
  color: #e5e7eb;
}

html[data-theme="dark"] .app-accordion .accordion-button:not(.collapsed) {
  background: rgba(244, 180, 0, 0.12);
  color: #ffe08a;
}

html[data-theme="dark"] .alert-warning.app-alert {
  background: rgba(244, 180, 0, 0.10);
  color: #ffe08a;
  border-color: rgba(244, 180, 0, 0.18);
}

html[data-theme="dark"] .alert-info {
  background: rgba(13, 202, 240, 0.12);
  color: #9eeaf9;
  border-color: rgba(13, 202, 240, 0.2);
}

html[data-theme="dark"] code {
  color: #ffd54f;
}

/* =========================
   Responsive
========================= */

@media (max-width: 991.98px) {
  .admin-sidebar {
    width: min(86vw, 320px) !important;
    transform: translateX(-100%);
  }

  .admin-sidebar.mobile-show {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0 !important;
  }

  .admin-overlay.show {
    display: block;
  }

  .sidebar-tooltip {
    display: none !important;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-footer {
    padding: 14px 16px;
  }
}
/* =========================
   Shared custom scrollbar
========================= */

.admin-sidebar__scroll,
.app-modal-body,
.app-offcanvas-body,
.table-responsive {
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 180, 0, 0.45) transparent;
}

.admin-sidebar__scroll::-webkit-scrollbar,
.app-modal-body::-webkit-scrollbar,
.app-offcanvas-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.admin-sidebar__scroll::-webkit-scrollbar-track,
.app-modal-body::-webkit-scrollbar-track,
.app-offcanvas-body::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.admin-sidebar__scroll::-webkit-scrollbar-thumb,
.app-modal-body::-webkit-scrollbar-thumb,
.app-offcanvas-body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 180, 0, 0.65), rgba(255, 213, 79, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.admin-sidebar__scroll::-webkit-scrollbar-thumb:hover,
.app-modal-body::-webkit-scrollbar-thumb:hover,
.app-offcanvas-body::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(244, 180, 0, 0.9), rgba(255, 213, 79, 0.75));
  background-clip: padding-box;
}

/* =========================
   Better sidebar active states
========================= */

.sidebar-item.open > .sidebar-link,
.sidebar-subitem.open > .sidebar-submenu-link {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-submenu-link.active {
  background: rgba(244, 180, 0, 0.14);
  color: #ffe08a;
}

.sidebar-item.open > .sidebar-link .sidebar-icon,
.sidebar-subitem.open > .sidebar-submenu-link .sidebar-icon {
  border-color: rgba(255, 255, 255, 0.12);
}

/* =========================
   Table dark mode fix
========================= */

.table-responsive {
  background: transparent;
}

.app-table {
  color: inherit;
}

.app-table tbody tr {
  background: transparent;
}

.app-table .dropdown-menu {
  border-radius: var(--radius-md);
}

html[data-theme="dark"] .table-responsive {
  background: var(--panel-dark);
}

html[data-theme="dark"] .app-table {
  color: #e5e7eb;
}

html[data-theme="dark"] .app-table tbody tr {
  background: transparent;
}

html[data-theme="dark"] .app-table tbody td,
html[data-theme="dark"] .app-table tbody td small,
html[data-theme="dark"] .app-table tbody td .fw-semibold {
  color: #e5e7eb !important;
}

html[data-theme="dark"] .app-table thead th {
  background: rgba(255, 255, 255, 0.04);
  color: #9ca3af;
}

html[data-theme="dark"] .app-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

html[data-theme="dark"] .app-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .data-card-tabs,
html[data-theme="dark"] .tab-content,
html[data-theme="dark"] .tab-pane {
  background: var(--panel-dark);
}

html[data-theme="dark"] .dropdown-menu {
  background: var(--panel-dark-2);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .dropdown-item {
  color: #e5e7eb;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

html[data-theme="dark"] .form-check-input {
  background-color: var(--panel-dark-2);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

html[data-theme="dark"] .status-active {
  background: rgba(25, 135, 84, 0.18);
  color: #67d39c;
  border-color: rgba(25, 135, 84, 0.22);
}

html[data-theme="dark"] .status-pending {
  background: rgba(255, 193, 7, 0.18);
  color: #ffd76a;
  border-color: rgba(255, 193, 7, 0.22);
}

html[data-theme="dark"] .status-closed {
  background: rgba(220, 53, 69, 0.18);
  color: #ff8f9a;
  border-color: rgba(220, 53, 69, 0.22);
}
/* =========================
   Table dark mode fix
========================= */

.table-responsive {
  background: transparent;
}

.app-table {
  color: inherit;
}

.app-table tbody tr {
  background: transparent;
}

.app-table .dropdown-menu {
  border-radius: var(--radius-md);
}

html[data-theme="dark"] .table-responsive {
  background: var(--panel-dark);
}

html[data-theme="dark"] .app-table {
  color: #e5e7eb;
  --bs-table-color: #e5e7eb;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  --bs-table-striped-color: #e5e7eb;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.015);
  --bs-table-hover-color: #ffffff;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
  --bs-table-active-color: #ffffff;
  --bs-table-active-bg: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .app-table tbody tr {
  background: transparent;
}

html[data-theme="dark"] .app-table tbody td,
html[data-theme="dark"] .app-table tbody td small,
html[data-theme="dark"] .app-table tbody td .fw-semibold {
  color: #e5e7eb !important;
}

html[data-theme="dark"] .app-table thead th {
  background: rgba(255, 255, 255, 0.04);
  color: #9ca3af;
}

html[data-theme="dark"] .app-table > :not(caption) > * > * {
  background-color: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .app-table .btn-light {
  background: var(--panel-dark-2);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .app-table .btn-light:hover,
html[data-theme="dark"] .app-table .btn-light:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .app-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

html[data-theme="dark"] .app-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}
/* =========================
   Preloader
========================= */

body.is-loading {
  overflow: hidden;
}

.app-preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(244, 180, 0, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(31, 20, 18, 0.98) 0%, rgba(21, 16, 17, 0.98) 100%);
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.app-preloader__logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #2b1a07;
  font-size: 1.8rem;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(244, 180, 0, 0.22);
}

.app-preloader__spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--brand-primary-2);
  animation: appPreloaderSpin 0.9s linear infinite;
}

.app-preloader__text {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

@keyframes appPreloaderSpin {
  to {
    transform: rotate(360deg);
  }
}
/* =========================
   Network Status Screen
========================= */

.network-status-screen {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(244, 180, 0, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(20, 15, 16, 0.98) 0%, rgba(12, 10, 11, 0.98) 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.network-status-screen.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.network-status-screen__content {
  width: 100%;
  max-width: 480px;
  text-align: center;
  padding: 36px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.network-status-screen__icon {
  width: 86px;
  height: 86px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #2b1a07;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  box-shadow: 0 18px 40px rgba(244, 180, 0, 0.24);
}

.network-status-screen__title {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 800;
}

.network-status-screen__text {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.6;
}
.waiter-card-ui {
  width: 100%;
  max-width: 315px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.waiter-card-ui__cover {
  position: relative;
  height: 84px;
  background: linear-gradient(135deg, var(--brand-primary-3), var(--brand-primary));
}

.waiter-card-ui__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.18));
}

.waiter-card-ui__body {
  position: relative;
  padding: 0 16px 16px;
}

.waiter-card-ui__avatar-wrap {
  display: flex;
  justify-content: center;
  margin-top: -38px;
  margin-bottom: 10px;
}

.waiter-card-ui__avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #d7d7d7, #bcbcbc);
  color: #8d8d8d;
  font-size: 2rem;
  box-shadow: var(--shadow-sm);
}

.waiter-card-ui__identity {
  text-align: center;
  margin-bottom: 14px;
}

.waiter-card-ui__name {
  margin: 0 0 4px;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.waiter-card-ui__code {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 10px;
}

.waiter-card-ui__role {
  min-height: 32px;
  padding-inline: 0.85rem;
  font-size: 0.78rem;
}

.waiter-soft-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.waiter-soft-box--summary {
  background: linear-gradient(180deg, #fbf7fd 0%, #f7f2f8 100%);
}

.waiter-soft-box--table {
  background: #fcfaf3;
  min-height: 108px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.waiter-soft-box__row,
.waiter-table-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.waiter-soft-box__title,
.waiter-table-box__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.waiter-soft-box__meta,
.waiter-table-box__meta {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.waiter-soft-box__amount {
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: #111827;
}

.waiter-stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fbfbfc;
  margin-bottom: 12px;
}

.waiter-stats-card__item {
  text-align: center;
  padding: 14px 8px;
}

.waiter-stats-card__item + .waiter-stats-card__item {
  border-left: 1px solid var(--border-color);
}

.waiter-stats-card__item strong {
  display: block;
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 6px;
  font-weight: 800;
  color: #2f5bd2;
}

.waiter-stats-card__item span {
  font-size: 0.83rem;
  font-weight: 600;
  color: #8a6e4f;
}

.waiter-status-badge {
  min-width: 62px;
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
  border-color: rgba(25, 135, 84, 0.12);
}

.waiter-card-ui__action {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  box-shadow: none;
}

.waiter-card-ui__action i {
  font-size: 0.9rem;
}

@media (max-width: 380px) {
  .waiter-card-ui {
    max-width: 100%;
  }

  .waiter-card-ui__name {
    font-size: 1.18rem;
  }

  .waiter-soft-box__amount {
    font-size: 1.35rem;
  }
}
.waiter-orders-board {
  padding: 18px;
}

.waiter-orders-board__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.waiter-orders-stat {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.waiter-orders-stat--highlight {
  background: linear-gradient(180deg, #f8eeb8 0%, #f5e6a3 100%);
  border-color: rgba(244, 180, 0, 0.55);
}

.waiter-orders-stat__label {
  font-size: 0.94rem;
  font-weight: 700;
  color: #7a6248;
  margin-bottom: 10px;
}

.waiter-orders-stat__value {
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
}

.waiter-orders-stat__meta {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.waiter-orders-panel {
  padding: 16px;
  border-radius: var(--radius-xl);
}

.waiter-orders-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.waiter-orders-panel__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.waiter-orders-panel__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.waiter-orders-search {
  position: relative;
  width: min(100%, 275px);
  flex-shrink: 0;
}

.waiter-orders-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.waiter-orders-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.75rem 1rem 0.75rem 2.7rem;
  color: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.waiter-orders-search input:focus {
  border-color: rgba(244, 180, 0, 0.35);
  box-shadow: 0 0 0 0.25rem rgba(244, 180, 0, 0.12);
}

.waiter-orders-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.waiter-orders-tab {
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #fff;
  color: #2b1a07;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.waiter-orders-tab.active {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(244, 180, 0, 0.16);
}

.waiter-orders-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 16px;
}

.waiter-orders-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.waiter-orders-card__title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 800;
}

.waiter-orders-card__meta {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 600;
}

.waiter-orders-status {
  min-width: 96px;
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.12);
}

.waiter-orders-items {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.waiter-orders-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 110px 110px 110px;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: #fff;
}

.waiter-orders-item + .waiter-orders-item {
  border-top: 1px solid var(--border-color);
}

.waiter-orders-item--soft {
  background: #f8f5e8;
}

.waiter-orders-item__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.waiter-orders-item__meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.waiter-orders-item__qty,
.waiter-orders-item__price {
  font-size: 0.96rem;
  font-weight: 800;
  color: #111827;
  text-align: center;
}

.waiter-orders-item__badge-wrap {
  display: flex;
  justify-content: flex-end;
}

.waiter-orders-item__badge {
  min-width: 96px;
  background: #f8f9fa;
  color: #6b7280;
  border-color: var(--border-color);
}

.waiter-orders-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #7a6248;
}

.waiter-orders-summary strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
}

.waiter-orders-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.waiter-orders-btn {
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #fff;
  color: #111827;
  font-weight: 800;
}

.waiter-orders-btn--accent {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  border-color: transparent;
  color: #2b1a07;
}

.waiter-orders-btn--dark {
  background: linear-gradient(180deg, #2d120f 0%, #1f0d0c 100%);
  border-color: transparent;
  color: #fff;
}

@media (max-width: 991.98px) {
  .waiter-orders-board__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .waiter-orders-panel__top {
    flex-direction: column;
  }

  .waiter-orders-search {
    width: 100%;
  }

  .waiter-orders-item {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .waiter-orders-item__qty,
  .waiter-orders-item__price {
    text-align: left;
  }

  .waiter-orders-item__badge-wrap {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .waiter-orders-board {
    padding: 14px;
  }

  .waiter-orders-board__stats {
    grid-template-columns: 1fr;
  }
}
.waiter-card-ui {
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.waiter-card-ui__cover {
  height: 110px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.waiter-card-ui__avatar {
  background: #e9e9e9;
  color: #9b9b9b;
  font-size: 2.1rem;
}

.waiter-card-ui__name {
  color: #111827;
}

.waiter-card-ui__code {
  font-weight: 500;
}

.waiter-card-ui__role {
  background: #fff8df;
  border-color: #fff1bb;
  color: #d39a14;
  min-height: 28px;
  padding: 0.28rem 0.8rem;
  font-size: 0.76rem;
}

.waiter-soft-box--summary {
  background: #fbf3fc;
  border: 1px solid #f1e4f4;
}

.waiter-soft-box__amount {
  font-size: 1.05rem;
}

.waiter-stats-card {
  background: #fff;
}

.waiter-stats-card__item strong {
  color: #111827;
  font-size: 1.05rem;
}

.waiter-stats-card__item span {
  color: var(--text-muted);
  font-weight: 500;
}

.waiter-card-ui__action {
  background: #fffbea;
  border: 1px solid #f9efbf;
  color: #d39a14;
  font-weight: 500;
}

.waiter-card-ui__action:hover {
  background: #fff7d6;
  color: #c58c09;
}