/* ============================================================ GeniResearch CRM */
:root {
  --navy-900: #0b1b33;
  --navy-800: #12274a;
  --navy-700: #1b3763;
  --navy-600: #27497d;
  --gold-600: #b8860b;
  --gold-500: #d4a017;
  --gold-400: #e8bd45;
  --gold-100: #fdf5e0;

  --ink:      #16202e;
  --ink-2:    #47566b;
  --ink-3:    #7c8899;
  --line:     #e3e8ef;
  --line-2:   #eef1f6;
  --bg:       #f5f7fa;
  --card:     #ffffff;

  --ok:      #0f8a4d;  --ok-bg:   #e6f6ed;
  --warn:    #b26a00;  --warn-bg: #fff3e0;
  --bad:     #c0392b;  --bad-bg:  #fdecea;
  --info:    #1e5fa8;  --info-bg: #e8f1fb;
  --mute-bg: #eef1f6;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,32,46,.06), 0 4px 16px rgba(16,32,46,.06);
  --sidebar: 236px;
  --font: "Segoe UI", Inter, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6e0; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b6c0ce; }

/* ------------------------------------------------------------------ login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--navy-900) 0%, var(--navy-700) 55%, #24406e 100%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 14px;
  padding: 34px 32px; box-shadow: 0 24px 60px rgba(0,0,0,.34);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .mark {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px;
  background: linear-gradient(140deg, var(--gold-500), var(--gold-600));
  display: grid; place-items: center; color: var(--navy-900);
  font-weight: 800; font-size: 21px; letter-spacing: -.5px;
}
.login-brand h1 { font-size: 19px; color: var(--navy-900); }
.login-brand p { margin: 5px 0 0; color: var(--ink-3); font-size: 12.5px; }

/* ----------------------------------------------------------------- layout */
.app { display: none; min-height: 100vh; }
.app.ready { display: block; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  background: var(--navy-900); color: #c9d4e4; display: flex; flex-direction: column;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 17px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand .mark {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--gold-500), var(--gold-600));
  display: grid; place-items: center; color: var(--navy-900); font-weight: 800; font-size: 13px;
}
.sidebar .brand b { color: #fff; font-size: 14px; display: block; line-height: 1.25; }
.sidebar .brand span { font-size: 10.5px; color: #8fa3bf; letter-spacing: .06em; text-transform: uppercase; }

.nav { padding: 10px 10px; flex: 1; overflow-y: auto; }
.nav .group { padding: 14px 10px 6px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: #6d81a0; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px;
  color: #c2cfe2; font-size: 13.5px; margin-bottom: 2px; text-decoration: none;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav a.active { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav a svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .85; }
.nav .pill {
  margin-left: auto; background: var(--bad); color: #fff; font-size: 10.5px;
  padding: 1px 7px; border-radius: 10px; font-weight: 700;
}
.nav .pill.amber { background: var(--gold-500); color: var(--navy-900); }

.me { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.me .av {
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy-600); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto;
}
.me .who { min-width: 0; flex: 1; }
.me .who b { color: #fff; font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 10.5px; color: #8fa3bf; text-transform: capitalize; }
.me button {
  background: none; border: 0; color: #8fa3bf; cursor: pointer; padding: 5px; border-radius: 6px; display: grid;
}
.me button:hover { color: #fff; background: rgba(255,255,255,.08); }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding: 0 22px; height: 58px; display: flex; align-items: center; gap: 14px;
}
.topbar h2 { font-size: 16px; }
.topbar .spacer { flex: 1; }
.content { padding: 20px 22px 44px; flex: 1; }

/* --------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 550;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: .12s;
}
.btn:hover { background: #f7f9fc; border-color: #d3dae4; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-800); border-color: var(--navy-800); }
.btn-gold { background: var(--gold-500); border-color: var(--gold-600); color: var(--navy-900); font-weight: 650; }
.btn-gold:hover { background: var(--gold-400); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #a5352a; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(39,73,125,.12); }
textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8899' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; padding-right: 30px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; margin-bottom: 9px; }
.check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--navy-700); flex: 0 0 auto; }

.search-box { position: relative; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.search-box input { padding-left: 32px; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { padding: 14px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.card-head h3 { font-size: 13.5px; }
.card-head .sub { font-size: 11.5px; color: var(--ink-3); }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

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

/* -------------------------------------------------------------- kpi tiles */
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--navy-600); }
.kpi.gold::before { background: var(--gold-500); }
.kpi.green::before { background: var(--ok); }
.kpi.red::before { background: var(--bad); }
.kpi.amber::before { background: var(--warn); }
.kpi .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 650; }
.kpi .val { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin: 3px 0 1px; }
.kpi .foot { font-size: 11.5px; color: var(--ink-2); }
.kpi.clickable { cursor: pointer; transition: .12s; }
.kpi.clickable:hover { border-color: var(--navy-600); transform: translateY(-1px); }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 650; padding: 9px 12px;
  border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; position: sticky; top: 0;
}
table.tbl th.sortable { cursor: pointer; user-select: none; }
table.tbl th.sortable:hover { color: var(--navy-700); }
table.tbl th .arrow { color: var(--gold-600); }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafbfd; }
table.tbl tbody tr.sel { background: var(--gold-100); }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .nowrap { white-space: nowrap; }
.tbl-name { font-weight: 600; color: var(--ink); }
.tbl-sub { font-size: 11.5px; color: var(--ink-3); }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty svg { width: 38px; height: 38px; opacity: .35; margin-bottom: 10px; }
.empty h4 { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }

/* ------------------------------------------------------------------- tags */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 650; background: var(--mute-bg); color: var(--ink-2); white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.gold { background: var(--gold-100); color: var(--gold-600); }
.tag.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }

.av-sm {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--navy-700), var(--navy-600));
  color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.role-opt { align-items: flex-start; transition: .12s; }
.role-opt:hover { background: var(--line-2); }

/* ------------------------------------------------- regulatory summary table */
.rep-lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.rep-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 13px; }

.sebi-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.sebi-tbl th {
  background: #bf8f2a; color: #fff; font-weight: 700; text-align: center;
  padding: 12px 14px; border: 1px solid #a87c22; font-size: 13.5px;
}
.sebi-tbl td { padding: 12px 14px; border: 1px solid var(--line); text-align: center; }
.sebi-tbl td.desc { color: #1f4e79; }
.sebi-tbl td.op { color: #b03a2e; font-weight: 600; }
.sebi-tbl td.val { font-variant-numeric: tabular-nums; font-weight: 600; }
.sebi-tbl tbody tr:nth-child(even) { background: #fcfcfd; }
.sebi-tbl tbody tr.total td { font-weight: 700; background: var(--gold-100); }
/* ------------------------------------------------- call recording on a note */
.rec-box {
  margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper-sunk, #fafbfd);
}
.rec-box audio { width: 100%; height: 34px; display: block; }
.rec-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  margin-top: 7px; font-size: 11.5px; color: var(--ink-3);
}
.rec-meta a { font-size: 11.5px; }
.rec-box.locked { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.hy-btn { flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 11px; line-height: 1.25; }
.hy-btn small { font-size: 10.5px; opacity: .7; font-variant-numeric: tabular-nums; }
.hy-btn.btn-primary small { opacity: .85; }

.sebi-tbl th.sortable { cursor: pointer; user-select: none; }
.sebi-tbl th.sortable:hover { background: #a87c22; }
.sebi-tbl th .arrow { opacity: .65; font-size: 11px; }

@media (max-width: 760px) {
  .sebi-tbl { font-size: 12.5px; }
  .sebi-tbl th, .sebi-tbl td { padding: 8px 6px; }
}
@media print { .no-print { display: none !important; } }

/* ----------------------------------------------------------------- filter */
.filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.filters .search-box { flex: 1 1 230px; min-width: 190px; }
.filters select { width: auto; min-width: 125px; flex: 0 0 auto; }
.filters .btn { flex: 0 0 auto; }

.pager { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.pager .spacer { flex: 1; }

/* ----------------------------------------------------------------- modals */
.overlay {
  position: fixed; inset: 0; background: rgba(11,27,51,.5); backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1120px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { font-size: 15px; }
.modal-head .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 20px; max-height: calc(100vh - 210px); overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; background: #fafbfd; border-radius: 0 0 12px 12px; }

/* --------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--navy-900); color: #fff; padding: 11px 15px; border-radius: 9px;
  font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.28); max-width: 380px;
  display: flex; gap: 9px; align-items: flex-start; animation: rise .18s ease-out;
}
.toast.ok { background: #12603a; }
.toast.bad { background: #8e2b21; }
.toast.warn { background: #8a5200; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* --------------------------------------------------------------- details */
.detail-head { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.detail-head .av {
  width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--navy-700), var(--navy-600));
  color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 700;
}
.detail-head h2 { font-size: 19px; }
.meta-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.meta-list .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; }
.meta-list .v { font-size: 13.5px; margin-top: 2px; word-break: break-word; }

.plan-card { border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px; }
.plan-card.on { border-color: #b7e0c8; background: #f4fbf7; }
.plan-card.off { background: #fafbfd; }
.plan-card .p-name { font-size: 12.5px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.plan-card .p-tier { font-size: 18px; font-weight: 700; margin: 5px 0 2px; letter-spacing: -.01em; }
.plan-card .p-dates { font-size: 11.5px; color: var(--ink-3); }

/* -------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid var(--navy-600);
}
.tl-item.c-call::before { border-color: var(--info); }
.tl-item.c-whatsapp::before { border-color: #25a55c; }
.tl-item.c-email::before { border-color: var(--gold-600); }
.tl-item.c-sms::before { border-color: #7a5bc4; }
.tl-item.c-meeting::before { border-color: #c2557a; }
.tl-item.c-note::before { border-color: var(--ink-3); }
.tl-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.tl-body { margin-top: 5px; font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.tl-foot { margin-top: 5px; font-size: 11.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- charts */
.chart { width: 100%; display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 11.5px; color: var(--ink-2); }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 46px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px; }
.bar-track { background: var(--line-2); border-radius: 4px; height: 9px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--navy-600); }

/* ---------------------------------------------------------------- import */
.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 40px 20px; text-align: center;
  background: #fafbfd; cursor: pointer; transition: .15s;
}
.drop:hover, .drop.over { border-color: var(--gold-500); background: var(--gold-100); }
.drop svg { width: 40px; height: 40px; color: var(--ink-3); margin-bottom: 10px; }
.drop h4 { font-size: 14.5px; margin-bottom: 4px; }
.drop p { margin: 0; font-size: 12.5px; color: var(--ink-3); }

.diff-add { color: var(--ok); }
.diff-del { color: var(--bad); text-decoration: line-through; }
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); padding: 0 16px; }
.tabs button {
  border: 0; background: none; padding: 10px 13px; font-size: 13px; font-weight: 600;
  color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--navy-700); border-bottom-color: var(--gold-500); }

.note-box { background: var(--info-bg); border: 1px solid #cfe1f6; border-radius: 8px; padding: 11px 13px; font-size: 12.5px; color: #164a83; }
.note-box.warn { background: var(--warn-bg); border-color: #f5dcb3; color: #8a5200; }
.note-box.bad { background: var(--bad-bg); border-color: #f5c9c4; color: #9e2f24; }

.spinner {
  width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--navy-600);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; }

.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:14px}.mt-3{margin-top:20px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:14px}.mb-3{margin-bottom:20px}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 236px; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex !important; }
  .g-5, .g-4, .g-3, .g-2 { grid-template-columns: minmax(0,1fr); }
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .scrim { position: fixed; inset: 0; background: rgba(11,27,51,.45); z-index: 35; }
}
.menu-btn { display: none; }
@media print {
  .sidebar, .topbar, .filters, .pager, .btn { display: none !important; }
  .main { margin-left: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

/* Permission switches on the Roles & permissions screen. A changed grant gets
   a gold dot, so an admin can see at a glance what they have moved away from
   the defaults without comparing against documentation. */
.permsw { position: relative; display: inline-block; cursor: pointer; }
.permsw input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--gold-500); }
.permsw .dotchg {
  position: absolute; top: -3px; right: -6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-500);
}

/* A settled, good-news box - the counterpart to .warn and .bad above. */
.note-box.ok { background: var(--ok-bg); border-color: #bfe6cf; color: #0b6437; }

/* A quiet divider between sections inside a dialog. */
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ------------------------------------------------------------- attendance */
/* The month grid: one narrow column per day, so a month fits without scrolling
   on a desktop and scrolls inside its own wrapper on anything smaller. */
.attgrid th, .attgrid td { padding: 5px 4px; }
.attgrid .attc { width: 22px; min-width: 22px; text-align: center; font-size: 11px; padding: 5px 0; }
.attc.att-ok   { background: var(--ok-bg);   color: var(--ok);   font-weight: 700; }
.attc.att-bad  { background: var(--bad-bg);  color: var(--bad);  font-weight: 700; }
.attc.att-info { background: var(--info-bg); color: var(--info); font-weight: 700; }
.attc.att-mute { background: var(--mute-bg); color: var(--ink-3); }
.att-key { display: inline-block; width: 16px; text-align: center; border-radius: 3px; }
.att-key.att-ok   { background: var(--ok-bg);   color: var(--ok); }
.att-key.att-bad  { background: var(--bad-bg);  color: var(--bad); }
.att-key.att-info { background: var(--info-bg); color: var(--info); }
.att-key.att-mute { background: var(--mute-bg); color: var(--ink-3); }
