/* =====================================================================
   Ogha Health EMR — Stylesheet
   Built by Mosur Technosolutions Pvt. Ltd.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --teal-900: #0B4A55;
  --teal-700: #0F6E7E;
  --teal-600: #10788A;
  --teal-100: #E3F2F4;
  --teal-50:  #F2F9FA;

  --ink:      #0F172A;
  --ink-2:    #334155;
  --muted:    #64748B;
  --muted-2:  #94A3B8;

  --line:     #E2E8F0;
  --line-2:   #EEF2F6;
  --bg:       #FFFFFF;
  --bg-soft:  #F8FAFC;

  --green:    #16A34A;
  --green-bg: #DCFCE7;
  --red:      #DC2626;
  --red-bg:   #FEE2E2;
  --amber:    #D97706;
  --amber-bg: #FEF3C7;
  --blue:     #2563EB;
  --blue-bg:  #DBEAFE;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow:    0 4px 16px rgba(15,23,42,.07);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.18);

  --sidebar-w: 240px;
  --topbar-h:  62px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
button { font-family: inherit; }

/* ---------------- LAYOUT ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}

.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sidebar-brand img { height: 26px; width: auto; }
.sidebar-brand .brand-text {
  font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.2px;
}

.nav { flex: 1; overflow-y: auto; padding: 12px 12px 6px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: var(--r-sm);
  color: var(--ink-2); font-weight: 500; font-size: 14px;
  cursor: pointer; transition: background .15s, color .15s;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-soft); }
.nav-item.active { background: var(--teal-100); color: var(--teal-900); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; }

.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; }
.nav-group-toggle .chev { transition: transform .2s; width: 15px; height: 15px; }
.nav-group.open .chev { transform: rotate(180deg); }

.nav-sub { display: none; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-group.open .nav-sub { display: block; }
.nav-sub .nav-item { font-size: 13px; padding: 8px 10px; }
.nav-sub .nav-item svg { width: 15px; height: 15px; }

.sidebar-footer { border-top: 1px solid var(--line); flex-shrink: 0; }
.powered {
  padding: 12px 18px; font-size: 11px; font-weight: 700;
  letter-spacing: .8px; color: var(--muted-2);
  display: flex; align-items: center; gap: 8px;
}
.powered strong { color: var(--teal-700); letter-spacing: 0; font-size: 12px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  cursor: pointer; position: relative;
}
.user-chip:hover { background: var(--bg-soft); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-100); color: var(--teal-700);
  display: grid; place-items: center; flex-shrink: 0;
}
.user-chip .u-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip .u-role { font-size: 11px; color: var(--muted); }

.user-menu {
  position: absolute; bottom: calc(100% + 6px); left: 10px; right: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 60;
}
.user-menu.open { display: block; }
.user-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.user-menu-head .n { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.user-menu-head .em { font-size: 12px; color: var(--muted); margin-top: 2px; }
.badge-admin {
  background: var(--teal-100); color: var(--teal-700);
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  letter-spacing: .4px;
}
.user-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.user-menu a:hover { background: var(--bg-soft); }
.user-menu a.danger { color: var(--red); }
.user-menu a svg { width: 16px; height: 16px; }

/* ---------------- MAIN ---------------- */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  position: sticky; top: 0; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); z-index: 30;
}
.topbar .icon-btn { border: 1px solid var(--line); }
.topbar .welcome { font-size: 14px; font-weight: 600; }
.topbar .divider { width: 1px; height: 22px; background: var(--line); }

.content { padding: 26px 24px 60px; max-width: 1400px; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.page-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--teal-100); color: var(--teal-700);
  display: grid; place-items: center; flex-shrink: 0;
}
.page-icon svg { width: 20px; height: 20px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.page-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }

/* ---------------- BUTTONS ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  white-space: nowrap; line-height: 1.2;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-900); }
.btn-primary:disabled { background: #8FBDC4; cursor: not-allowed; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { background: var(--bg-soft); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: #fff; border-color: #FCA5A5; color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-sm svg { width: 14px; height: 14px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  transition: background .15s;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.plain { border: none; }

/* ---------------- FORMS ---------------- */
.field { margin-bottom: 15px; }
.field label,
.form-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}
.form-label .req { color: var(--red); }

.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13.5px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(16,120,138,.12);
}
.input::placeholder { color: var(--muted-2); }
textarea.input { resize: vertical; min-height: 76px; }
select.input { appearance: none; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }

.phone-group { display: flex; }
.phone-group select {
  width: 82px; border-radius: var(--r-sm) 0 0 var(--r-sm);
  border-right: none; flex-shrink: 0;
}
.phone-group input { border-radius: 0 var(--r-sm) var(--r-sm) 0; flex: 1; }

.search-wrap { position: relative; flex: 1; max-width: 430px; }
.search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted-2); pointer-events: none;
}
.search-wrap .input { padding-left: 36px; }

.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button {
  padding: 8px 14px; border: none; background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--teal-100); color: var(--teal-900); font-weight: 600; }
.seg button svg { width: 14px; height: 14px; }

.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-opt {
  padding: 9px 18px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.pill-opt.active { border-color: var(--teal-600); background: var(--teal-50); color: var(--teal-900); font-weight: 600; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---------------- CARDS / TABLES ---------------- */
.card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }

.table-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl thead th {
  background: var(--bg-soft); text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl tbody td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--teal-50); }
.cell-strong { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.tbl-actions { display: flex; gap: 6px; justify-content: flex-end; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; background: var(--teal-100); color: var(--teal-900);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chip-outline { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }

.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}
.st-scheduled  { background: var(--blue-bg);  color: #1D4ED8; }
.st-checked_in { background: var(--teal-100); color: var(--teal-900); }
.st-completed  { background: var(--green-bg); color: #15803D; }
.st-cancelled  { background: var(--red-bg);   color: #B91C1C; }
.st-no_show    { background: #F1F5F9;         color: var(--muted); }
.st-rescheduled{ background: var(--amber-bg); color: #B45309; }
.st-pending    { background: var(--red-bg);   color: #B91C1C; }
.st-partial    { background: var(--amber-bg); color: #B45309; }
.st-paid       { background: var(--green-bg); color: #15803D; }
.st-refunded   { background: #F1F5F9;         color: var(--muted); }
.st-active     { background: var(--green-bg); color: #15803D; }
.st-inactive   { background: #F1F5F9;         color: var(--muted); }

.price-tag {
  background: var(--green-bg); color: #15803D;
  padding: 4px 10px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 600; display: inline-block;
}
.hours-tag {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 4px 9px; font-size: 12px; color: var(--ink-2); display: inline-block;
}

/* ---------------- EMPTY / LOADING ---------------- */
.empty { text-align: center; padding: 70px 20px; }
.empty-icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: var(--r); background: var(--teal-50); color: var(--teal-600);
  display: grid; place-items: center;
}
.empty-icon svg { width: 28px; height: 28px; }
.empty h3 { margin: 0 0 5px; font-size: 16px; font-weight: 700; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; }

.loading { text-align: center; padding: 50px; color: var(--muted); font-size: 13px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 12px;
  border: 2.5px solid var(--line); border-top-color: var(--teal-700);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- MODALS ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(2px);
}
.modal-backdrop.open { display: flex; }

.modal {
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 620px;
  max-height: 90vh; display: flex; flex-direction: column;
  animation: modalIn .2s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal.sm { max-width: 440px; }
.modal.lg { max-width: 780px; }

.modal-head {
  padding: 20px 22px 16px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: flex-start; gap: 12px; flex-shrink: 0;
}
.modal-head .m-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--teal-100); color: var(--teal-700);
  display: grid; place-items: center; flex-shrink: 0;
}
.modal-head .m-icon svg { width: 18px; height: 18px; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-head .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  color: var(--teal-700); text-transform: uppercase; margin-bottom: 3px;
}
.modal-head .spacer { flex: 1; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); flex-shrink: 0;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-close svg { width: 15px; height: 15px; }

.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  background: var(--bg-soft); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-shrink: 0;
}
.modal-foot .spacer { flex: 1; }
.modal-foot .total-label { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.modal-foot .total-value { font-size: 20px; font-weight: 700; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.step.active { background: var(--teal-100); color: var(--teal-900); font-weight: 600; }
.step .num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--line); color: var(--muted);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.step.active .num { background: var(--teal-700); color: #fff; }
.step-arrow { color: var(--muted-2); }
.step-pane { display: none; }
.step-pane.active { display: block; }

/* fieldset panel */
.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--bg-soft); margin-bottom: 15px; }
.panel-title { font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.panel-note { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* colour swatches */
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; margin-bottom: 10px; }
.swatch { width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-preview { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line); flex-shrink: 0; }

/* slot list */
.slot-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: #fff; margin-bottom: 7px; font-size: 13px;
}
.slot-row button { border: none; background: none; cursor: pointer; color: var(--muted); padding: 3px; }
.slot-row button:hover { color: var(--red); }

/* line items */
.line-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: #fff; margin-bottom: 8px;
}
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 13.5px; }
.line-item .li-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.line-item .li-amt { font-weight: 600; font-size: 13.5px; white-space: nowrap; }

/* ---------------- REPORTING ---------------- */
.section-label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 26px 0 3px; }
.section-note { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; background: #fff; position: relative; overflow: hidden;
}
.metric .m-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.metric .m-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.metric .m-value { font-size: 27px; font-weight: 700; letter-spacing: -.8px; margin-top: 5px; line-height: 1.1; }
.metric .m-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; }
.metric .m-icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--teal-50); color: var(--teal-600);
  display: grid; place-items: center; flex-shrink: 0;
}
.metric .m-icon svg { width: 16px; height: 16px; }
.metric.green .m-icon { background: var(--green-bg); color: var(--green); }
.metric.red   .m-icon { background: var(--red-bg);   color: var(--red); }
.metric.amber .m-icon { background: var(--amber-bg); color: var(--amber); }
.metric .m-bar { height: 3px; background: var(--line-2); border-radius: 3px; margin-top: 11px; overflow: hidden; }
.metric .m-bar span { display: block; height: 100%; background: var(--teal-600); border-radius: 3px; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; background: #fff; }
.chart-card h4 { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.chart-card .c-sub { font-size: 12.5px; color: var(--muted); margin: 3px 0 14px; }
.chart-box { height: 210px; position: relative; }

.rank-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border: 1px solid var(--line);
  border-radius: var(--r-sm); margin-bottom: 8px; font-size: 13.5px;
}
.rank-row .r-name { font-weight: 600; }
.rank-row .r-val { color: var(--teal-700); font-weight: 600; font-size: 12.5px; }

.range-tabs { display: flex; gap: 6px; }
.range-tabs button {
  padding: 8px 15px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.range-tabs button.active { background: var(--teal-700); border-color: var(--teal-700); color: #fff; font-weight: 600; }

.leader-highlight { border-left: 3px solid var(--teal-700); }

/* ---------------- TOAST ---------------- */
#toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 17px;
  border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastIn .22s ease-out; max-width: 380px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
.toast.ok  { background: #14532D; }
.toast.err { background: #7F1D1D; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------------- LOGIN ---------------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--teal-50) 0%, #fff 55%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 32px;
}
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.login-card .brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--teal-700); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
}
.login-card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.login-foot { text-align: center; margin-top: 20px; font-size: 11.5px; color: var(--muted-2); letter-spacing: .3px; }
.alert {
  padding: 10px 13px; border-radius: var(--r-sm); font-size: 13px;
  margin-bottom: 15px; display: flex; align-items: center; gap: 8px;
}
.alert-err { background: var(--red-bg); color: #991B1B; }
.alert-ok  { background: var(--green-bg); color: #14532D; }

/* ---------------- RESPONSIVE ---------------- */
.sidebar-overlay { display: none; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .charts  { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .sidebar-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(15,23,42,.4); z-index: 35; opacity: 0;
    pointer-events: none; transition: opacity .25s;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .metrics { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 50px; }
  .topbar { padding: 0 16px; }
  .table-scroll { overflow-x: auto; }
  .table-scroll table { min-width: 720px; }
}

@media print {
  .sidebar, .topbar, .toolbar, .tbl-actions { display: none !important; }
  .main { margin-left: 0; }
}
