/* ==========================================================================
   Mitra Clinic — staff workspace
   Sits on top of Bootstrap 3 (grid, modals, dropdowns) and re-skins it.
   ========================================================================== */

:root {
  --ink: #0f2230;
  --ink-2: #3d4d59;
  --muted: #6b7a85;
  --faint: #93a0a8;
  --line: #e7eae8;
  --line-2: #d9dfdb;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --mist: #eef4f1;
  --mist-2: #e2ede8;

  --brand: #0f6e69;
  --brand-600: #0b5a56;
  --brand-700: #08443f;
  --brand-50: #e7f2ef;
  --sand: #b8956a;
  --sand-50: #f6efe5;

  --ok: #1f7a4d;   --ok-50: #e6f3ec;
  --warn: #9a6512; --warn-50: #fbf1de;
  --bad: #b4372c;  --bad-50: #fbeceb;
  --info: #285a8f; --info-50: #e9f0f8;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 34, 48, .05);
  --shadow: 0 12px 32px -14px rgba(15, 34, 48, .22), 0 2px 6px rgba(15, 34, 48, .04);
  --sidebar: 252px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:hover, a:focus { color: var(--brand-700); text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--sans); color: var(--ink); letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-50); }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; }
.mono, .num { font-variant-numeric: tabular-nums; }

/* Shell ------------------------------------------------------------------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 1040;
  background: var(--ink); color: #b3c1c9; display: flex; flex-direction: column;
  padding: 20px 14px; overflow-y: auto; transition: transform .25s ease;
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; color: #fff; }
.sb-brand:hover, .sb-brand:focus { color: #fff; }
.sb-brand img { width: 40px; height: 40px; border-radius: 11px; background: #fff; padding: 5px; object-fit: contain; flex: none; }
.sb-brand b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.12rem; line-height: 1.1; }
.sb-brand small { display: block; font-size: .72rem; color: #7f939e; letter-spacing: .04em; }
.sb-group { margin-top: 14px; }
.sb-label { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6c808b; padding: 0 12px 8px; }
.sb-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #c3cfd5; font-weight: 500; font-size: .92rem; margin-bottom: 2px; transition: background .15s ease, color .15s ease;
}
.sb-link i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .85; }
.sb-link:hover, .sb-link:focus { background: rgba(255,255,255,.06); color: #fff; }
.sb-link.active { background: rgba(255,255,255,.09); color: #fff; }
.sb-link.active i { color: #8fd1c9; opacity: 1; }
.sb-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 8px 6px 4px 10px; }
.sb-user-text { flex: 1; min-width: 0; }
.sb-user-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-signout { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #9fb0ba; font-size: 1.1rem; flex: none; transition: background .15s ease, color .15s ease; }
.sb-signout:hover, .sb-signout:focus { background: rgba(255,255,255,.08); color: #fff; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: #23414f; color: #dff1ee; font-weight: 600; font-size: .85rem; text-transform: uppercase;
}
.sb-user b { display: block; color: #fff; font-weight: 600; font-size: .9rem; line-height: 1.2; }
.sb-user small { color: #7f939e; text-transform: capitalize; font-size: .78rem; }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1030; height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 32px; background: rgba(246,245,241,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.quick-search { position: relative; flex: 1; max-width: 420px; }
.quick-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.quick-search input {
  width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  padding: 0 16px 0 40px; font-size: .9rem; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.quick-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,110,105,.12); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.today-chip { font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.content { padding: 28px 32px 48px; flex: 1; width: 100%; max-width: 1480px; }
.app-foot { padding: 18px 32px 28px; font-size: .8rem; color: var(--faint); }

.scrim { display: none; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,34,48,.4); z-index: 1035; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .today-chip { display: none; }
  .content { padding: 20px 16px 40px; }
  .app-foot { padding: 16px; }
}

/* Page header -------------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: 1.95rem; margin: 2px 0 4px; letter-spacing: -0.02em; }
.page-head p { margin: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; font-size: .8rem; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }

/* Cards -------------------------------------------------------------------- */
.card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.card-head, .panel > .panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: transparent;
  font-weight: 600; font-size: .98rem; color: var(--ink); border-radius: var(--radius) var(--radius) 0 0;
}
.card-head h2, .card-head h3 { font-size: 1rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
.card-head h2 i, .card-head h3 i { color: var(--brand); }
.card-head .sub { font-size: .82rem; color: var(--muted); font-weight: 400; }
.card-body, .panel > .panel-body { padding: 20px; }
.card-body.flush { padding: 0; }
.panel-default > .panel-heading { background: transparent; color: var(--ink); border-color: var(--line); }
.panel-default { border-color: var(--line); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.grid-side-l { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
.grid > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 20px; }
@media (max-width: 1199px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-side, .grid-side-l { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .page-head h1 { font-size: 1.6rem; } }

/* Stats -------------------------------------------------------------------- */
.stat { padding: 20px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: .95rem; }
.stat-value { font-family: var(--serif); font-weight: 500; font-size: 2.2rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.stat-meta b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat a.stretched { position: absolute; inset: 0; border-radius: inherit; }
.card.stat:hover { box-shadow: var(--shadow); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  border-radius: 999px; font-weight: 600; font-size: .88rem; padding: 9px 18px; line-height: 1.3;
  border: 1px solid transparent; box-shadow: none !important; transition: background .15s ease, border-color .15s ease, color .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn i { font-size: 1em; }
.btn-sm { padding: 6px 13px; font-size: .82rem; }
.btn-lg { padding: 13px 24px; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }
.btn-primary, .btn-success { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-success:hover, .btn-success:focus, .btn-success:active,
.btn-primary:active:focus, .btn-success:active:focus { background: var(--brand-600) !important; border-color: var(--brand-600) !important; color: #fff; }
.btn-default { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-default:hover, .btn-default:focus, .btn-default:active { background: var(--mist) !important; border-color: var(--line-2) !important; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--mist); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #efc9c5; }
.btn-danger:hover, .btn-danger:focus { background: var(--bad-50) !important; color: var(--bad) !important; border-color: #e6b3ae !important; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

/* Forms -------------------------------------------------------------------- */
label, .control-label { font-size: .8rem; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.control-label span, label span.hint { display: block; font-weight: 400; font-size: .74rem; color: var(--faint); }
.form-control {
  height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: #fcfcfa;
  box-shadow: none; font-size: .92rem; color: var(--ink); padding: 8px 12px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea.form-control { height: auto; min-height: 80px; line-height: 1.5; }
.form-control:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(15,110,105,.12); }
.form-control[readonly] { background: var(--mist); }
input[type=file].form-control { padding: 7px 10px; height: auto; }
.has-error .form-control { border-color: var(--bad); }
.has-error .help-block, .has-error .control-label { color: var(--bad); }
.field { margin-bottom: 16px; }
.field-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.field-grid > .field { grid-column: span 12; }
.field-grid > .c-3 { grid-column: span 3; } .field-grid > .c-4 { grid-column: span 4; } .field-grid > .c-6 { grid-column: span 6; } .field-grid > .c-8 { grid-column: span 8; }
@media (max-width: 767px) { .field-grid > .field { grid-column: span 12 !important; } }
.form-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }
.form-section { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 8px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form .form-control { width: auto; }
.search-group { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 3px 3px 6px; gap: 4px; }
.search-group select, .search-group input { border: 0; background: transparent; height: 34px; font-size: .88rem; color: var(--ink); padding: 0 8px; }
.search-group select { border-right: 1px solid var(--line); border-radius: 0; padding-right: 12px; cursor: pointer; }
.search-group input { min-width: 180px; }
.search-group input:focus, .search-group select:focus { outline: none; }
.search-group .btn { padding: 7px 14px; }
.checkbox label { font-size: .88rem; color: var(--ink-2); }

/* Tables ------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { margin: 0; font-size: .89rem; color: var(--ink-2); }
.table > thead > tr > th, .table > thead > tr > td {
  border-bottom: 1px solid var(--line) !important; border-top: 0 !important; background: #fafaf8;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 11px 16px; white-space: nowrap; vertical-align: middle;
}
.table > tbody > tr > td { border-top: 1px solid var(--line); padding: 13px 16px; vertical-align: middle; }
.table > tbody > tr:first-child > td { border-top: 0; }
.table > tbody > tr:hover > td { background: #fafbf9; }
.table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
.table .strong, .table td b { color: var(--ink); font-weight: 600; }
.table .actions { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { width: 34px; height: 34px; background: var(--mist-2); color: var(--brand-700); font-size: .78rem; }
.who b { display: block; color: var(--ink); font-weight: 600; line-height: 1.25; }
.who small { color: var(--muted); font-size: .78rem; }
.who a:hover b { color: var(--brand); }
.empty-row { text-align: center; padding: 40px 16px !important; color: var(--muted); }
.empty-row i { display: block; font-size: 1.6rem; color: var(--line-2); margin-bottom: 8px; }

/* Status pills ------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--mist); color: var(--ink-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.no-dot::before { display: none; }
.pill-confirmed { background: var(--info-50); color: var(--info); }
.pill-completed { background: var(--ok-50); color: var(--ok); }
.pill-cancelled { background: var(--bad-50); color: var(--bad); }
.pill-brand { background: var(--brand-50); color: var(--brand-700); }
.pill-warn { background: var(--warn-50); color: var(--warn); }
.label { border-radius: 999px; font-weight: 600; padding: .3em .8em; }

/* Pagination --------------------------------------------------------------- */
.pager-wrap { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.pager-wrap:empty { display: none; }
.pagination { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pagination > li > a, .pagination > li > span {
  border: 1px solid var(--line) !important; border-radius: 999px !important; min-width: 36px; height: 36px; padding: 0 10px;
  display: grid; place-items: center; color: var(--ink-2); background: var(--surface); margin: 0; font-size: .85rem;
}
.pagination > li > a:hover { background: var(--mist); color: var(--ink); }
.pagination > .active > span, .pagination > .active > span:hover { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff; }
.pagination > .disabled > span { opacity: .45; background: var(--surface); }

/* Modals ------------------------------------------------------------------- */
.modal-backdrop.in { opacity: .45; background: var(--ink); }
.modal-content { border: 0; border-radius: var(--radius-lg); box-shadow: 0 30px 80px -20px rgba(15,34,48,.45); overflow: hidden; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-header::before, .modal-header::after { display: none; }
.modal-title { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; order: 0; }
.modal-header .close { order: 1; opacity: .5; font-size: 1.6rem; font-weight: 400; margin: 0; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--line); background: #fafaf8; display: flex; justify-content: flex-end; gap: 8px; }
.modal-footer::before, .modal-footer::after { display: none; }
.modal-footer .btn + .btn { margin-left: 0; }
@media (min-width: 768px) { .modal-dialog { margin-top: 64px; } }

/* Dropdowns ---------------------------------------------------------------- */
.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.dropdown-menu > li > a { border-radius: 8px; padding: 8px 12px; font-size: .88rem; }

/* Flash -------------------------------------------------------------------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 2000; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow);
  font-size: .9rem; font-weight: 500; animation: toast-in .3s ease, toast-out .4s ease 4.5s forwards;
}
.toast i { color: #8fd1c9; font-size: 1.1rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); visibility: hidden; } }
.alert { border-radius: 12px; border: 0; font-size: .9rem; }
.alert-success { background: var(--ok-50); color: var(--ok); }
.alert-danger { background: var(--bad-50); color: var(--bad); }

/* Lists --------------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { color: var(--ink); margin: 0; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); width: 76px; flex: none; font-size: .88rem; }
.list .grow b { display: block; color: var(--ink); font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .grow small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.list > li.past { opacity: .55; }
.list-empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.list-empty i { display: block; font-size: 1.8rem; color: var(--line-2); margin-bottom: 8px; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.check-list li:first-child { border-top: 0; padding-top: 0; }
.check-list span { color: var(--muted); }
.check-list b { color: var(--ink); font-weight: 600; text-align: right; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.file-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: .82rem; overflow: hidden; }
.file-tile i { font-size: 1.3rem; color: var(--bad); flex: none; }
.file-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-tile:hover { border-color: var(--brand); color: var(--ink); }

.tile-link { display: flex; flex-direction: column; gap: 12px; padding: 22px; color: var(--ink); height: 100%; }
.tile-link i.big { font-size: 1.6rem; color: var(--brand); }
.tile-link b { font-size: 1rem; }
.tile-link span { color: var(--muted); font-size: .86rem; }
.card:hover > .tile-link { color: var(--ink); }
.card.hoverable:hover { box-shadow: var(--shadow); border-color: transparent; }

.year-tabs { display: inline-flex; background: var(--mist); border-radius: 999px; padding: 3px; gap: 2px; }
.year-tabs a { padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.year-tabs a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Third-party ------------------------------------------------------------- */
.select2-container--default .select2-selection--single { height: 40px; border-radius: 10px; border-color: var(--line-2); }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; }
.note-editor.note-frame { border-radius: 12px; border-color: var(--line-2); overflow: hidden; }

/* ==========================================================================
   Auth (login / password)
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.auth-art {
  position: relative; overflow: hidden; color: #d2e2e0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 90% at 0% 0%, #13505a 0%, var(--ink) 60%);
}
.auth-art::after {
  content: ""; position: absolute; right: -180px; bottom: -180px; width: 560px; height: 560px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.02);
}
.auth-art .sb-brand { padding: 0; }
.auth-quote { position: relative; z-index: 1; max-width: 460px; }
.auth-quote h2 { font-family: var(--serif); font-weight: 400; color: #fff; font-size: 2.5rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
.auth-quote h2 em { color: #8fd1c9; }
.auth-quote p { color: #9fb3bb; font-size: 1rem; margin: 0; }
.auth-points { position: relative; z-index: 1; display: flex; gap: 24px; flex-wrap: wrap; font-size: .85rem; color: #9fb3bb; }
.auth-points span { display: inline-flex; align-items: center; gap: 8px; }
.auth-points i { color: #8fd1c9; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box .mobile-brand { display: none; }
.auth-box h1 { font-family: var(--serif); font-weight: 500; font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-box > p { color: var(--muted); margin: 0 0 28px; }
.auth-box .field label { font-size: .84rem; }
.auth-box .form-control { height: 46px; font-size: 1rem; border-radius: 12px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .form-control { padding-left: 40px; }
.input-icon .reveal-pw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.input-icon .reveal-pw:hover { background: var(--mist); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 22px; font-size: .86rem; }
.auth-row label { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink-2); font-size: .86rem; cursor: pointer; }
.auth-row input[type=checkbox] { margin: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.auth-err { display: flex; gap: 8px; align-items: flex-start; background: var(--bad-50); color: var(--bad); padding: 11px 14px; border-radius: 10px; font-size: .86rem; margin-bottom: 18px; }
.auth-foot { margin-top: 28px; font-size: .84rem; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-box .mobile-brand { display: flex; margin-bottom: 32px; color: var(--ink); }
  .auth-box .mobile-brand small { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  .sidebar, .topbar, .app-foot, .page-actions, .no-print { display: none !important; }
  .main { margin: 0; } .content { padding: 0; } body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* Grid children must be allowed to shrink so wide tables scroll inside their card */
.grid > * { min-width: 0; }
@media (max-width: 1199px) { .grid-side, .grid-side-l { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .page-actions { width: 100%; }
  .search-group { width: 100%; }
  .search-group input { min-width: 0; flex: 1; }
}
@media (max-width: 1199px) { .dash-main .stack.queue { order: -1; } }
@media (max-width: 767px) {
  .grid-4.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-4.stats .stat { padding: 16px; }
  .grid-4.stats .stat-value { font-size: 1.7rem; }
  .grid-4.stats .stat-meta { font-size: .74rem; }
  .year-tabs { max-width: 100%; overflow-x: auto; }
}
