/* ═══════════════════════════════════════════════
   NexBill v5 — Theme
   ═══════════════════════════════════════════════ */
:root {
  /* DashboardKit palette */
  --pc-primary:      #7267ef;
  --pc-primary-rgb:  114,103,239;
  --pc-success:      #17c666;
  --pc-info:         #3ec9d6;
  --pc-warning:      #ffa21d;
  --pc-danger:       #ea4d4d;
  --pc-dark:         #1c232f;
  --pc-sidebar-bg:   #1c232f;
  --pc-sidebar-w:    260px;
  --pc-header-h:     60px;
  --pc-border:       #e9edf4;
  --pc-body-bg:      #f0f2f8;

  /* Light tints */
  --bg-lp:  #f1f0fd;
  --bg-ls:  #e8f9f0;
  --bg-li:  #e5f7f8;
  --bg-lw:  #fff6e8;
  --bg-ld:  #fdeded;

  /* Bootstrap overrides */
  --bs-primary:      #7267ef;
  --bs-primary-rgb:  114,103,239;
  --bs-body-bg:      #f0f2f8;
  --bs-body-font-size: 0.8125rem;
  --bs-border-color: #e9edf4;

  /* Legacy NexBill compat */
  --nb-blue:        #7267ef;
  --nb-blue-hover:  #5a52c9;
  --nb-blue-light:  #f1f0fd;
  --nb-sidebar-w:   260px;
  --nb-header-h:    60px;
}

* { box-sizing: border-box; }
body {
  font-family: -apple-system,'Segoe UI',Roboto,sans-serif;
  background: var(--pc-body-bg);
  color: #1c232f;
  margin: 0;
}
a { color: var(--pc-primary); }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.pc-sidebar {
  width: var(--pc-sidebar-w);
  background: var(--pc-sidebar-bg);
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 1000;
  display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.navbar-wrapper {
  display: flex; flex-direction: column; height: 100%;
}

/* Logo */
.m-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.b-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.b-mark {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.b-title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.3px; }

/* Nav scroll area */
.navbar-content {
  flex: 1; overflow-y: auto; padding: 10px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent;
}
.navbar-content::-webkit-scrollbar { width: 3px; }
.navbar-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }

/* Nav list */
.pc-navbar { list-style: none; padding: 0; margin: 0; }

/* Section caption */
.pc-item.pc-caption { padding: 14px 22px 4px; cursor: default; }
.pc-item.pc-caption label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.35); text-transform: uppercase; margin: 0;
}

/* Nav link */
.pc-item { margin: 0; }
.pc-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 22px; font-size: 13px; color: #ced4dc;
  text-decoration: none; transition: all .15s;
  border-left: 3px solid transparent;
}
.pc-link:hover {
  background: rgba(255,255,255,.05);
  color: #fff; text-decoration: none;
}
.pc-item.active > .pc-link {
  background: rgba(114,103,239,.18);
  color: #fff; border-left-color: var(--pc-primary);
}
.pc-micon {
  width: 20px; text-align: center; flex-shrink: 0;
  color: inherit; display: flex; align-items: center; justify-content: center;
}
.pc-badge {
  margin-left: auto; background: var(--pc-danger);
  color: #fff; font-size: 9px; padding: 1px 6px;
  border-radius: 10px; font-weight: 700;
}

/* Upgrade box */
.pc-upgrade-box {
  margin: 12px 14px 16px;
  background: linear-gradient(135deg,rgba(114,103,239,.35) 0%,rgba(114,103,239,.15) 100%);
  border: 1px solid rgba(114,103,239,.4);
  border-radius: 10px; padding: 16px; flex-shrink: 0;
}
.pc-upgrade-title { font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.pc-upgrade-sub   { font-size: 11px; color: rgba(255,255,255,.55); margin: 0 0 12px; line-height: 1.5; }
.btn-upgrade {
  background: var(--pc-primary); color: #fff; border: none;
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  display: inline-block; text-decoration: none; transition: background .15s;
}
.btn-upgrade:hover { background: var(--nb-blue-hover); color: #fff; }

/* Sidebar overlay (mobile) */
.pc-sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 999;
}

/* ══════════════════════════════════════
   MAIN CONTAINER
══════════════════════════════════════ */
.pc-container {
  margin-left: var(--pc-sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ══════════════════════════════════════
   TOPBAR / HEADER
══════════════════════════════════════ */
.pc-header {
  height: var(--pc-header-h);
  background: #fff;
  border-bottom: 1px solid var(--pc-border);
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
}
.header-wrapper {
  display: flex; align-items: center; width: 100%; padding: 0 24px; gap: 16px;
}
.pc-hamburger {
  background: none; border: none; padding: 4px 6px; color: #1c232f; cursor: pointer;
}
.nb-domain-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.pc-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--pc-border); border-radius: 20px;
  background: #fff; cursor: pointer; transition: background .12s;
}
.pc-user-btn:hover { background: #f8f9fa; }
.nb-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.nb-user-name { font-size: 12px; font-weight: 600; color: #1c232f; }
.nb-sidebar-mark-color { background: var(--pc-primary); }

/* User dropdown */
.pc-user-dropdown {
  min-width: 220px; border-radius: 10px;
  border: 1px solid var(--pc-border);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 6px;
}
.pc-user-info {
  padding: 10px 12px; border-bottom: 1px solid var(--pc-border); margin-bottom: 4px;
}
.pc-user-info .nb-dropdown-name  { font-size: 13px; font-weight: 600; color: #1c232f; }
.pc-user-info .nb-dropdown-email { font-size: 11px; color: #8898aa; margin-top: 2px; }
.pc-user-dropdown .dropdown-item {
  font-size: 12px; border-radius: 6px; padding: 7px 10px;
  display: flex; align-items: center; color: #4e5d6c;
}
.pc-user-dropdown .dropdown-item:hover { background: #f0f2f8; }
.pc-user-dropdown .dropdown-item.text-danger { color: #ea4d4d !important; }
.pc-user-dropdown .dropdown-item.text-danger:hover { background: #fdeded; }

/* ══════════════════════════════════════
   PAGE CONTENT
══════════════════════════════════════ */
.pc-content {
  padding: 20px 24px; flex: 1;
}

/* Breadcrumb */
.page-header { margin-bottom: 20px; }
.page-block   { background: transparent; }
.breadcrumb { background: transparent; padding: 0; margin: 0; }
.breadcrumb-item a { color: #8898aa; font-size: 12px; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--pc-primary); }
.breadcrumb-item.active { font-size: 12px; color: #4e5d6c; }
.breadcrumb-item + .breadcrumb-item::before { color: #c5cdd4; }

/* ══════════════════════════════════════
   CARDS (DashboardKit style)
══════════════════════════════════════ */
.card {
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px -1px rgba(0,0,0,.1);
  margin-bottom: 20px;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--pc-border);
  padding: 16px 20px;
}
.card-header h5 { font-size: 14px; font-weight: 600; color: #1c232f; margin: 0; }
.card-body { padding: 20px; }
.card-footer {
  background: transparent;
  border-top: 1px solid var(--pc-border);
  padding: 14px 20px;
}

/* ── FLAT CARD (6-KPI grid) ── */
.flat-card { border-radius: 8px; }
.flat-card .row-table {
  display: flex; flex-wrap: wrap;
}
.flat-card .card-body {
  flex: 0 0 33.333%; max-width: 33.333%;
  padding: 18px 20px;
}
.flat-card .card-body.br { border-right: 1px solid var(--pc-border); }
.flat-card .card-body.bb { border-bottom: 1px solid var(--pc-border); }
.flat-card h4 { font-size: 20px; font-weight: 700; color: #1c232f; margin: 0; }
.flat-card span { font-size: 11px; color: #8898aa; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* KPI icon */
.kpi-icon {
  width: 42px; height: 42px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Light tint backgrounds */
.bg-light-primary { background: var(--bg-lp) !important; }
.bg-light-success { background: var(--bg-ls) !important; }
.bg-light-info    { background: var(--bg-li) !important; }
.bg-light-warning { background: var(--bg-lw) !important; }
.bg-light-danger  { background: var(--bg-ld) !important; }

/* ── SUPPORT-BAR CARD (area/bar chart) ── */
.support-bar .card-body { padding: 20px 20px 0; }
.support-bar .card-body h6 { font-size: 12px; font-weight: 600; color: #8898aa; text-transform: uppercase; letter-spacing: .06em; }
.support-bar .card-body h3 { font-size: 26px; font-weight: 700; color: #1c232f; }
.support-footer { background: var(--pc-primary); border-radius: 0 0 8px 8px; }
.support-footer h6 { font-size: 14px; font-weight: 700; color: #fff; margin: 0; }
.support-footer span { font-size: 10px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .05em; }

/* ── PROD-P-CARD (small stat) ── */
.prod-p-card { border-radius: 8px; }
.prod-p-card .card-body { padding: 18px 20px; }
.prod-p-card p { font-size: 12px; color: #8898aa; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.prod-p-card h3 { font-size: 22px; font-weight: 700; color: #1c232f; margin: 0; }
.pp-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── TABLE CARD ── */
.table-card .card-header { padding: 14px 20px; }
.nb-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.nb-table th {
  background: #f8f9fb; padding: 10px 16px;
  text-align: left; color: #8898aa; font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--pc-border); white-space: nowrap;
}
.nb-table td {
  padding: 10px 16px; border-bottom: 1px solid #f4f6f9; color: #4e5d6c;
}
.nb-table tr:last-child td { border-bottom: none; }
.nb-table tr:hover td { background: #f8f9fb; }
.nb-table .hi { color: var(--pc-primary); font-weight: 500; }
.nb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.nb-table .fw  { font-weight: 600; }

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.nb-badge { display: inline-flex; padding: 2px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.nb-badge-blue   { background: var(--bg-lp); color: var(--pc-primary); }
.nb-badge-green  { background: var(--bg-ls); color: var(--pc-success); }
.nb-badge-amber  { background: var(--bg-lw); color: var(--pc-warning); }
.nb-badge-red    { background: var(--bg-ld); color: var(--pc-danger); }
.nb-badge-gray   { background: #f0f2f8; color: #4e5d6c; }
.nb-badge-purple { background: var(--bg-lp); color: var(--pc-primary); }
.nb-badge-teal   { background: var(--bg-li); color: var(--pc-info); }

/* ══════════════════════════════════════
   FORMS & BUTTONS
══════════════════════════════════════ */
.nb-form-label { font-size: 12px; font-weight: 600; color: #4e5d6c; margin-bottom: 4px; display: block; }
.nb-form-control { font-size: 13px; border-color: var(--pc-border); border-radius: 6px; }
.nb-form-control:focus { border-color: var(--pc-primary); box-shadow: 0 0 0 3px rgba(114,103,239,.12); }
.nb-form-hint { font-size: 11px; color: #8898aa; margin-top: 3px; }

.btn-nb-primary {
  background: var(--pc-primary); border-color: var(--pc-primary);
  color: #fff; font-size: 13px; border-radius: 6px;
}
.btn-nb-primary:hover { background: var(--nb-blue-hover); border-color: var(--nb-blue-hover); color: #fff; }
.btn-nb-outline {
  background: #fff; border-color: var(--pc-border); color: #4e5d6c; font-size: 13px; border-radius: 6px;
}
.btn-nb-outline:hover { background: #f0f2f8; }
.btn-outline-primary {
  border-color: var(--pc-primary); color: var(--pc-primary); font-size: 12px; border-radius: 6px;
}
.btn-outline-primary:hover { background: var(--pc-primary); color: #fff; }

/* ══════════════════════════════════════
   QUICK ACTIONS (legacy, other pages)
══════════════════════════════════════ */
.nb-quick-actions {
  background: #fff; border-bottom: 1px solid var(--pc-border);
  padding: 8px 24px; display: flex; gap: 6px; flex-wrap: wrap;
}
.nb-qa-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--pc-border); background: #fff;
  color: #4e5d6c; cursor: pointer; text-decoration: none; transition: all .12s; white-space: nowrap;
}
.nb-qa-btn:hover { background: #f0f2f8; text-decoration: none; color: #1c232f; }
.nb-qa-btn.primary { background: var(--pc-primary); color: #fff; border-color: var(--pc-primary); }
.nb-qa-btn.primary:hover { background: var(--nb-blue-hover); color: #fff; }
.nb-qa-btn.success { background: var(--bg-ls); color: var(--pc-success); border-color: #a7f3d0; }
.nb-qa-btn.warning { background: var(--bg-lw); color: var(--pc-warning); border-color: #fcd34d; }

/* ══════════════════════════════════════
   LEGACY PAGE LAYOUT (other pages)
══════════════════════════════════════ */
.nb-app { display: flex; min-height: 100vh; }
.nb-main { margin-left: var(--pc-sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.nb-topbar {
  height: var(--pc-header-h); background: #fff;
  border-bottom: 1px solid var(--pc-border);
  display: flex; align-items: center; padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
}
.nb-topbar-title { font-size: 14px; font-weight: 600; flex: 1; }
.nb-content { padding: 20px 24px; flex: 1; }

/* Legacy sidebar (other pages) */
.nb-sidebar {
  width: var(--pc-sidebar-w); background: var(--pc-sidebar-bg);
  border-right: 1px solid rgba(255,255,255,.04);
  position: fixed; top: 0; left: 0; height: 100vh;
  display: flex; flex-direction: column; z-index: 200; overflow: hidden;
}
.nb-sidebar-logo {
  padding: 18px 22px 16px; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}
.nb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nb-brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--pc-primary); display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.nb-brand-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.nb-brand-tier { font-size: 10px; color: rgba(255,255,255,.35); display: block; margin-top: 1px; }
.nb-sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.nb-sidebar-nav::-webkit-scrollbar { width: 3px; }
.nb-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }
.nb-nav-section { font-size: 10px; color: rgba(255,255,255,.35); padding: 14px 22px 3px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.nb-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 22px; font-size: 13px; color: #ced4dc;
  border-left: 3px solid transparent; cursor: pointer;
  transition: all .12s; text-decoration: none; white-space: nowrap;
}
.nb-nav-item:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.nb-nav-item.active { color: #fff; border-left-color: var(--pc-primary); background: rgba(114,103,239,.18); font-weight: 500; }
.nb-nav-icon { width: 20px; text-align: center; font-size: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nb-nav-badge { margin-left: auto; background: var(--pc-danger); color: #fff; font-size: 9px; padding: 1px 6px; border-radius: 10px; font-weight: 700; }
.nb-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px; border: 1px solid var(--pc-border);
  border-radius: 20px; background: #fff; cursor: pointer; transition: background .12s;
}
.nb-user-btn:hover { background: #f0f2f8; }

/* ══════════════════════════════════════
   METRIC CARDS (legacy pages)
══════════════════════════════════════ */
.nb-metric {
  background: #fff; border: 0; border-radius: 8px;
  box-shadow: 0 2px 6px -1px rgba(0,0,0,.1);
  border-top: 3px solid var(--pc-primary); padding: 16px; height: 100%;
}
.nb-metric-label { font-size: 11px; color: #8898aa; font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.nb-metric-value { font-size: 22px; font-weight: 700; color: #1c232f; }
.nb-metric-sub   { font-size: 11px; margin-top: 4px; color: #8898aa; }
.text-success-nb { color: var(--pc-success) !important; }
.text-danger-nb  { color: var(--pc-danger) !important; }
.text-warning-nb { color: var(--pc-warning) !important; }

/* ══════════════════════════════════════
   LEGACY CARDS (other pages)
══════════════════════════════════════ */
.nb-card { background: #fff; border: 0; border-radius: 8px; box-shadow: 0 2px 6px -1px rgba(0,0,0,.1); margin-bottom: 20px; }
.nb-card-header { padding: 14px 20px; border-bottom: 1px solid var(--pc-border); display: flex; align-items: center; justify-content: space-between; }
.nb-card-title  { font-size: 13px; font-weight: 600; color: #4e5d6c; margin: 0; }
.nb-card-body   { padding: 16px 20px; }
.nb-card-link   { font-size: 11px; color: var(--pc-primary); text-decoration: none; }
.nb-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.nb-page-title  { font-size: 20px; font-weight: 700; color: #1c232f; }
.nb-page-sub    { font-size: 12px; color: #8898aa; margin-top: 3px; }
.nb-bank-card {
  display: flex; align-items: center; gap: 10px;
  background: #f8f9fb; border: 1px solid var(--pc-border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 6px;
}
.nb-bank-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--bg-lp); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.nb-bank-name { font-size: 12px; font-weight: 600; }
.nb-bank-acno { font-size: 10px; color: #8898aa; }
.nb-bank-bal  { font-size: 14px; font-weight: 700; }

/* ══════════════════════════════════════
   MODE CARDS (delivery/payment settings)
══════════════════════════════════════ */
.nb-mode-card { border: 1.5px solid var(--pc-border); border-radius: 8px; padding: 16px; cursor: pointer; transition: all .15s; }
.nb-mode-card:hover { border-color: var(--pc-primary); }
.nb-mode-card.selected { border-color: var(--pc-primary); background: var(--bg-lp); }
.nb-mode-card .mode-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.nb-mode-card .mode-desc  { font-size: 12px; color: #8898aa; }

/* ══════════════════════════════════════
   LOADING / SKELETON / TOAST
══════════════════════════════════════ */
.nb-loader {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; color: #8898aa; font-size: 13px; gap: 10px;
}
.nb-skeleton {
  background: linear-gradient(90deg,#e9edf4 25%,#d4d9e6 50%,#e9edf4 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; display: block;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.nb-toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.nb-toast {
  background: #fff; border: 1px solid var(--pc-border); border-radius: 10px;
  padding: 12px 16px; min-width: 260px; max-width: 360px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); animation: slideIn .2s ease; font-size: 13px;
}
.nb-toast.success { border-left: 3px solid var(--pc-success); }
.nb-toast.error   { border-left: 3px solid var(--pc-danger); }
.nb-toast.info    { border-left: 3px solid var(--pc-primary); }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }

/* ══════════════════════════════════════
   INVOICE PRINT
══════════════════════════════════════ */
.inv-print-header { border-bottom: 2.5px solid var(--pc-primary); padding-bottom: 16px; margin-bottom: 16px; }
.inv-totals-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; border-bottom: 1px solid #f4f6f9; }
.inv-totals-row.grand { font-size: 15px; font-weight: 700; border-top: 2px solid var(--pc-border); margin-top: 6px; padding-top: 10px; }

/* ══════════════════════════════════════
   DASHBOARD — NEW LAYOUT COMPONENTS
══════════════════════════════════════ */

/* Topbar */
.nb-hamburger {
  background: none; border: none; padding: 4px 6px;
  color: #4e5d6c; cursor: pointer; border-radius: 6px;
}
.nb-hamburger:hover { background: #f0f2f8; }
.nb-topbar-date { font-size: 11px; color: #9AA5BE; }

/* User pill (Bootstrap dropdown trigger) */
.nb-user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--pc-border); border-radius: 22px;
  background: #fff; cursor: pointer; transition: background .12s;
  outline: none !important;
}
.nb-user-pill:hover, .nb-user-pill:focus { background: #f8f9fa; border-color: #d0d5dd; }

/* User dropdown */
.nb-user-dropdown {
  min-width: 230px; border-radius: 10px;
  border: 1px solid var(--pc-border);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  padding: 6px; margin-top: 6px !important;
}
.nb-ud-header {
  padding: 10px 12px 12px; border-bottom: 1px solid #F1F3F8; margin-bottom: 4px;
}
.nb-ud-name  { font-size: 13px; font-weight: 700; color: #1c232f; }
.nb-ud-email { font-size: 11px; color: #8898aa; margin-top: 2px; }
.nb-ud-role  { font-size: 10px; color: #adb5bd; margin-top: 2px; }
.nb-ud-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; padding: 8px 12px; border-radius: 6px; color: #4e5d6c;
}
.nb-ud-item:hover { background: #f5f6fa; color: #1c232f; }
.nb-ud-danger { color: #e63946 !important; }
.nb-ud-danger:hover { background: #fdeef0 !important; }

/* Welcome bar */
.nb-welcome {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.nb-welcome-title { font-size: 22px; font-weight: 700; color: #1c232f; margin: 0 0 3px; }
.nb-welcome-sub   { font-size: 13px; color: #8898aa; margin: 0; }

/* Buttons */
.nb-btn-primary {
  background: #4361ee; border: none; color: #fff; border-radius: 7px;
  font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
}
.nb-btn-primary:hover { background: #3451d1; color: #fff; }
.nb-btn-ghost {
  background: #fff; border: 1px solid var(--pc-border); color: #4e5d6c;
  border-radius: 7px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px;
}
.nb-btn-ghost:hover { background: #f5f6fa; color: #1c232f; }

/* Stat cards */
.nb-stat-card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid var(--pc-border);
  border-top: 3px solid var(--accent, #4361ee);
  padding: 16px; height: 100%;
  transition: box-shadow .15s;
}
.nb-stat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); }
.nb-stat-icon {
  width: 40px; height: 40px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.nb-stat-label { font-size: 11px; font-weight: 600; color: #8898aa; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.nb-stat-value { font-size: 22px; font-weight: 700; color: #1c232f; }
.nb-stat-sub   { font-size: 11px; color: #8898aa; margin-top: 3px; }

/* Cards — clean dashboard style */
.nb-card-sub    { font-size: 11px; color: #8898aa; margin-top: 1px; }
.nb-link-sm     { font-size: 12px; color: #4361ee; text-decoration: none; white-space: nowrap; }
.nb-link-sm:hover { text-decoration: underline; }
.nb-tbl-btn {
  font-size: 11px; color: #4361ee; border: 1px solid #d0d8ff;
  border-radius: 5px; padding: 2px 10px; text-decoration: none; white-space: nowrap;
}
.nb-tbl-btn:hover { background: #eef0fd; }

/* Balance items */
.nb-balance-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #F5F6FA;
}
.nb-bi-left  { display: flex; align-items: center; gap: 10px; }
.nb-bi-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.nb-bi-label { font-size: 12px; font-weight: 600; color: #1c232f; }
.nb-bi-action { font-size: 11px; color: #4361ee; text-decoration: none; display: block; margin-top: 1px; }
.nb-bi-action:hover { text-decoration: underline; }
.nb-bi-val   { font-size: 14px; font-weight: 700; }

/* Quick action grid */
.nb-qa-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.nb-qa-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: 8px; border: 1px solid var(--pc-border);
  background: #fff; text-decoration: none; color: #4e5d6c;
  font-size: 11px; font-weight: 500; text-align: center;
  transition: all .15s;
}
.nb-qa-tile:hover { border-color: #4361ee; color: #4361ee; box-shadow: 0 2px 8px rgba(67,97,238,.12); text-decoration: none; }
.nb-qa-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════
   SIDEBAR — dashboard page uses nb-sidebar class
══════════════════════════════════════ */
.nb-sidebar {
  width: var(--nb-sidebar-w);
  background: var(--pc-sidebar-bg);
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 200;
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .25s;
}
.nb-sidebar-inner {
  display: flex; flex-direction: column; height: 100%;
}
.nb-main {
  margin-left: var(--nb-sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}
.nb-topbar {
  height: var(--pc-header-h); background: #fff;
  border-bottom: 1px solid var(--pc-border);
  display: flex; align-items: center; padding: 0 24px; gap: 14px;
  position: sticky; top: 0; z-index: 100;
}
.nb-topbar-title { font-size: 15px; font-weight: 700; color: #1c232f; }
.nb-content { padding: 22px 24px; flex: 1; background: var(--pc-body-bg); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1200px) {
  .flat-card .card-body { flex: 0 0 33.333%; max-width: 33.333%; }
}
@media (max-width: 768px) {
  .nb-sidebar { transform: translateX(-100%); }
  .nb-sidebar.mobile-open { transform: translateX(0); }
  .pc-sidebar { transform: translateX(-100%); }
  .pc-sidebar.mobile-open { transform: translateX(0); }
  .pc-sidebar-overlay.show { display: block; }
  .pc-container { margin-left: 0; }
  .nb-main { margin-left: 0; }
  .flat-card .card-body { flex: 0 0 50%; max-width: 50%; }
  .pc-content { padding: 16px; }
  .nb-content { padding: 16px; }
}
@media (max-width: 480px) {
  .flat-card .card-body { flex: 0 0 100%; max-width: 100%; border-right: none !important; }
  .nb-qa-grid { grid-template-columns: repeat(3, 1fr); }
}

@media print {
  .nb-sidebar, .pc-sidebar, .nb-topbar, .pc-header, .nb-quick-actions, .no-print { display: none !important; }
  .pc-container { margin-left: 0; }
  .nb-main { margin-left: 0; }
}
