/* Srusti Media & Publicity: visual language carried over from the Srusti ERP (SIMS).
   Navy #334D98 accent, DM Sans, white bordered cards on a pale page. Weights capped at 600. */
:root {
  --accent: #334D98;
  --accent-dark: #1e2e5b;
  --accent-light: #C6CEE3;
  --accent-subtle: #eef1f9;
  --accent-glow: rgba(51, 77, 152, 0.18);
  --sky: #1ea7d8;
  --page-bg: #f0f6f6;
  --card-bg: #ffffff;
  --card-border: #e6e9f2;
  --text-primary: #111827;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --green: #15803d; --green-bg: #dcfce7; --green-fg: #14532d;
  --amber: #b45309; --amber-bg: #fef3c7; --amber-fg: #78350f;
  --red: #dc2626; --red-bg: #fee2e2; --red-fg: #7f1d1d;
  --blue-bg: #dbeafe; --blue-fg: #1e3a8a;
  --grey-bg: #f1f5f9; --grey-fg: #475569;
  --sidebar-w: 236px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased;
       background: var(--page-bg); min-height: 100vh; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
a { text-decoration: none; color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text-primary); }
p { margin: 0 0 8px; }
b, strong, th { font-weight: 600; }
small, .muted { color: var(--text-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: .01em; }

/* ---- forms ---- */
input, select, textarea { border: 1.5px solid var(--card-border); border-radius: 10px; font-family: inherit; font-size: 13px;
  padding: 9px 12px; color: var(--text-primary); background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=file] { padding: 7px 10px; background: var(--accent-subtle); }
select:not([multiple]) { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px; }
select[multiple] { min-height: 120px; }
textarea { min-height: 84px; resize: vertical; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-help { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding-top: 6px; }
.errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--red); font-size: 12px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600; border: none; cursor: pointer; font-family: inherit; line-height: 1.2; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--text-secondary); border: 1.5px solid var(--card-border); }
.btn-outline:hover { border-color: var(--accent-light); color: var(--accent-dark); background: var(--accent-subtle); }
.btn-success { background: var(--green); color: #fff; }
.btn-warn { background: #fff7ed; color: var(--amber); border: 1.5px solid #fed7aa; }
.btn-danger { background: #fef2f2; color: var(--red); border: 1.5px solid #fecaca; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- shell ---- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--card-border); position: sticky; top: 0;
  height: 100vh; overflow-y: auto; flex-shrink: 0; padding-bottom: 24px; }
.sb-logo { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 14px; border-bottom: 1px solid var(--card-border); }
.sb-logo img { height: 34px; width: auto; object-fit: contain; object-position: left; }
.sb-logo span { font-size: 12px; font-weight: 600; color: var(--accent-dark); letter-spacing: .02em; }
.sb-section { padding: 16px 18px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.sb-link { display: flex; align-items: center; gap: 10px; margin: 1px 10px; padding: 8px 11px; border-radius: 9px; font-size: 13px;
  font-weight: 500; color: var(--text-secondary); }
.sb-link:hover, .sb-link.active { background: var(--accent-subtle); color: var(--accent-dark); }
.sb-link.active { font-weight: 600; }
.sb-link i { width: 16px; text-align: center; color: var(--accent); font-size: 13px; }
.sb-link .seg { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--text-muted); border: 1px solid var(--card-border);
  border-radius: 5px; padding: 0 5px; }
.sb-link kbd.seg { font-family: inherit; }
.sb-link.active kbd.seg { background: var(--accent); border-color: var(--accent); color: #fff; }
.sb-keys { margin: 18px 12px 0; padding: 10px 12px; border: 1px dashed var(--card-border); border-radius: 10px; font-size: 11px;
  color: var(--text-muted); line-height: 1.9; }
.sb-keys-h { font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }
.sb-keys-h i { color: var(--accent); margin-right: 4px; }
.sb-keys kbd { display: inline-block; min-width: 18px; text-align: center; font-family: inherit; font-size: 10.5px; font-weight: 600;
  color: var(--text-secondary); background: #fff; border: 1px solid var(--card-border); border-bottom-width: 2px; border-radius: 5px; padding: 0 4px; line-height: 16px; }
.sb-link .count { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 0 7px; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--card-border); height: 58px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 20; gap: 12px; }
.topbar-title { font-size: 13px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title .crumb { color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9px; color: var(--text-secondary); border: 1.5px solid var(--card-border); background: #fff; }
.icon-btn:hover { background: var(--accent-subtle); color: var(--accent-dark); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600;
  min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border: 1.5px solid var(--card-border); border-radius: 999px; color: var(--text-secondary); }
.user-chip:hover { background: var(--accent-subtle); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip .nm { font-size: 12.5px; font-weight: 600; color: var(--text-primary); line-height: 1.1; }
.user-chip .rl { font-size: 11px; color: var(--text-muted); line-height: 1.1; }
.page-head { padding: 22px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 14px 24px 0; flex-wrap: wrap; }
.tab { padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); border: 1.5px solid transparent; }
.tab:hover { background: #fff; border-color: var(--card-border); color: var(--accent-dark); }
.tab.active { background: #fff; border-color: var(--accent-light); color: var(--accent-dark); font-weight: 600; }
.content { padding: 18px 24px 48px; }
.footer-note { padding: 0 24px 24px; font-size: 11.5px; color: var(--text-muted); }

/* ---- cards ---- */
.card { background: var(--card-bg); border: 1.5px solid var(--card-border); border-radius: 14px; margin-bottom: 16px; }
.card-pad { padding: 18px 20px; }
.card-header { padding: 13px 18px; border-bottom: 1px solid var(--card-border); display: flex; align-items: center;
  justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--accent); }
.card-sub { font-size: 12px; color: var(--text-muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.grid-2 > .card, .grid-3 > .card, .grid-main > * > .card:last-child { margin-bottom: 0; }

/* ---- dashboard stat cards: fixed 4-up grid, uniform height ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { margin: 0; background: var(--card-bg); border: 1.5px solid var(--card-border); border-radius: 14px; padding: 15px 17px 14px; display: flex;
  flex-direction: column; gap: 6px; color: var(--text-secondary); min-height: 128px; position: relative; transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--accent-light); box-shadow: 0 4px 16px rgba(51,77,152,.08); color: var(--text-secondary); }
.stat-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stat-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-subtle); color: var(--accent); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; font-size: 13px; }
.stat-l { font-size: 12.5px; font-weight: 500; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.stat-go { font-size: 11px; color: var(--accent-light); opacity: 0; transition: opacity .15s; }
.stat:hover .stat-go { opacity: 1; }
.stat-n { font-size: 26px; font-weight: 600; color: var(--text-primary); line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-s { font-size: 12px; color: var(--text-muted); margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .progress { height: 6px; }
.stat.tone-alert .stat-ic { background: var(--red-bg); color: var(--red); } .stat.tone-alert .stat-n { color: var(--red); }
.stat.tone-warn .stat-ic { background: var(--amber-bg); color: var(--amber); }
.stat.tone-good .stat-ic { background: var(--green-bg); color: var(--green); }
.seg-list { padding: 4px 0; }
.seg-row { display: flex; align-items: center; gap: 12px; padding: 9px 16px; color: var(--text-secondary); border-bottom: 1px solid #f1f3f8; }
.seg-row:last-child { border-bottom: none; }
.seg-row:hover { background: var(--accent-subtle); color: var(--text-secondary); }
.seg-k { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: inherit; font-size: 11.5px;
  font-weight: 600; color: var(--accent-dark); background: #fff; border: 1px solid var(--accent-light); border-bottom-width: 2px; border-radius: 6px; }
.seg-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seg-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.seg-sub { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg-v { font-size: 15px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg-row.tone-alert .seg-v { color: var(--red); } .seg-row.tone-warn .seg-v { color: var(--amber); }
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } .stat { min-height: 0; } }

/* ---- KPI tiles ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card-bg); border: 1.5px solid var(--card-border); border-radius: 14px; padding: 15px 17px; display: flex; gap: 12px; align-items: flex-start; }
.kpi .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-subtle); color: var(--accent); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.kpi .n { font-size: 21px; font-weight: 600; color: var(--text-primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.kpi .d { font-size: 11.5px; margin-top: 3px; font-weight: 600; }
.kpi.alert .ic { background: var(--red-bg); color: var(--red); }
.kpi.warn .ic { background: var(--amber-bg); color: var(--amber); }
.kpi.good .ic { background: var(--green-bg); color: var(--green); }
a.kpi:hover { border-color: var(--accent-light); }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--text-muted); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
  padding: 10px 12px; border-bottom: 1.5px solid var(--card-border); white-space: nowrap; background: #fbfcfe; }
table.dtable td { padding: 10px 12px; border-bottom: 1px solid var(--card-border); vertical-align: middle; }
table.dtable tbody tr:hover td { background: var(--accent-subtle); }
table.dtable td.num, table.dtable th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dtable tr.total td { background: #f6f8fc; font-weight: 600; color: var(--text-primary); border-top: 1.5px solid var(--accent-light); }
table.dtable tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
table.dtable a.rowlink { font-weight: 600; color: var(--text-primary); }
table.dtable a.rowlink:hover { color: var(--accent); }
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th { width: 38%; text-align: left; font-weight: 500; color: var(--text-muted); padding: 8px 0; vertical-align: top; border-bottom: 1px solid #f1f3f8; }
table.kv td { padding: 8px 0 8px 12px; color: var(--text-primary); border-bottom: 1px solid #f1f3f8; word-break: break-word; }
.fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px; }
.field { padding: 10px 0; border-bottom: 1px solid #f1f3f8; }
.field .k { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.field .v { font-size: 13.5px; color: var(--text-primary); margin-top: 2px; word-break: break-word; white-space: pre-line; }
.field.wide { grid-column: 1 / -1; }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-neutral { background: var(--accent-subtle); color: var(--accent-dark); }
.badge-green { background: var(--green-bg); color: var(--green-fg); }
.badge-amber { background: var(--amber-bg); color: var(--amber-fg); }
.badge-red { background: var(--red-bg); color: var(--red-fg); }
.badge-blue { background: var(--blue-bg); color: var(--blue-fg); }
.badge-grey { background: var(--grey-bg); color: var(--grey-fg); }
.badge-outline { background: #fff; color: var(--text-secondary); border: 1px solid var(--card-border); }
.code-chip { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--accent-subtle);
  color: var(--accent-dark); border: 1px solid var(--accent-light); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }

/* ---- filter bar ---- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--card-border); align-items: center; }
.filter-bar input[type=search], .filter-bar input[type=text] { max-width: 260px; }
.filter-bar select, .filter-bar input[type=date] { width: auto; min-width: 140px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 12.5px; color: var(--text-muted); gap: 10px; flex-wrap: wrap; }

/* ---- misc ---- */
.alert { border-radius: 12px; padding: 11px 15px; font-size: 13px; margin-bottom: 14px; border: 1.5px solid var(--card-border); background: #fff;
  display: flex; gap: 10px; align-items: flex-start; }
.alert-success { border-color: #86efac; background: #f0fdf4; color: var(--green-fg); }
.alert-error { border-color: #fca5a5; background: #fef2f2; color: var(--red-fg); }
.alert-warning { border-color: #fcd34d; background: #fffbeb; color: var(--amber-fg); }
.alert-info { border-color: var(--accent-light); background: var(--accent-subtle); color: var(--accent-dark); }
.empty-state { text-align: center; padding: 34px 16px; color: var(--text-muted); font-size: 13px; }
.empty-state i { font-size: 26px; color: var(--accent-light); display: block; margin-bottom: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 12.5px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-light); }
.timeline li::after { content: ''; position: absolute; left: 8.5px; top: 16px; bottom: 0; width: 1px; background: var(--card-border); }
.timeline li:last-child::after { display: none; }
.timeline li.ok::before { background: var(--green); } .timeline li.bad::before { background: var(--red); } .timeline li.wait::before { background: #f59e0b; }
.timeline .t { color: var(--text-primary); font-weight: 600; }
.timeline .m { color: var(--text-muted); font-size: 11.5px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 9px; align-items: center; padding: 6px 0; font-size: 13px; }
.checklist .fa-circle-check { color: var(--green); } .checklist .fa-circle-xmark { color: var(--red); }
.progress { height: 8px; background: var(--grey-bg); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.progress.warn > span { background: #f59e0b; } .progress.bad > span { background: var(--red); } .progress.good > span { background: var(--green); }
.swatch { width: 100%; height: 86px; border-radius: 10px; border: 1px solid var(--card-border); }
.chart-box { position: relative; height: 280px; padding: 12px 16px 16px; }
.chart-box.tall { height: 340px; } .chart-box.short { height: 220px; }
.section-gap { height: 4px; }
.insight { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--card-border); }
.insight:last-child { border-bottom: none; }
.insight .ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
.insight.good .ic { background: var(--green-bg); color: var(--green); }
.insight.bad .ic { background: var(--red-bg); color: var(--red); }
.insight.warn .ic { background: var(--amber-bg); color: var(--amber); }
.insight.info .ic { background: var(--accent-subtle); color: var(--accent); }
.insight .h { font-weight: 600; color: var(--text-primary); font-size: 13.5px; }
.insight .b { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.insight .e { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--card-border); border-left: 1px solid var(--card-border); }
.cal-grid .dow { font-size: 11px; text-transform: uppercase; color: var(--text-muted); padding: 8px; font-weight: 600; background: #fbfcfe;
  border-right: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.cal-grid .day { min-height: 104px; padding: 6px; border-right: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); font-size: 11.5px; background: #fff; }
.cal-grid .day.out { background: #fafbfc; color: #cbd5e1; }
.cal-grid .day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-grid .dn { font-weight: 600; font-size: 12px; color: var(--text-primary); margin-bottom: 4px; }
.cal-item { display: block; padding: 3px 6px; border-radius: 6px; margin-bottom: 3px; background: var(--accent-subtle); color: var(--accent-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.cal-item.done { background: var(--green-bg); color: var(--green-fg); }
.cal-item.late { background: var(--red-bg); color: var(--red-fg); }
.cal-item.wait { background: var(--amber-bg); color: var(--amber-fg); }
.cal-item.pub { background: #e0f2fe; color: #075985; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.dd-matrix select { min-width: 120px; padding: 6px 30px 6px 9px; font-size: 12px; }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--card-border); }
.notif.unread { background: #f8faff; }
.notif .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-subtle); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---- login ---- */
.login-body { display: flex; min-height: 100vh; }
.login-left { width: 44%; background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dark) 60%, #1e2e5b 100%); display: flex;
  flex-direction: column; align-items: center; justify-content: center; padding: 60px 48px; position: relative; overflow: hidden; }
.login-left::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 15% 15%, rgba(255,255,255,.10) 0%, transparent 45%),
  radial-gradient(circle at 85% 85%, rgba(255,255,255,.06) 0%, transparent 40%); }
.login-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 40px 40px; }
.login-circle { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.10); }
.login-panel { position: relative; z-index: 1; width: 100%; max-width: 360px; }
.login-feature { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.85); font-size: 13px; margin-bottom: 14px; }
.login-feature .dotc { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 12px; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.login-card { background: #fff; border-radius: 24px; padding: 44px 42px; width: 100%; max-width: 420px;
  box-shadow: 0 8px 40px rgba(51,77,152,.12), 0 2px 8px rgba(51,77,152,.06); border: 1.5px solid #eeecee; }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: var(--accent-dark); margin-bottom: 7px; }
.login-card input[type=text], .login-card input[type=password] { padding: 13px 16px; background: var(--accent-subtle); border-color: #D6D0D6;
  border-radius: 12px; font-size: 15px; }
.login-card input:focus { background: #fff; }
.login-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; font-weight: 600;
  font-size: 15px; border: none; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; }
.login-btn:hover { box-shadow: 0 8px 24px rgba(51,77,152,.35); transform: translateY(-1px); }

/* ---- responsive ---- */
.mb-hamburger { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px;
  border: 1.5px solid var(--card-border); background: #fff; color: var(--text-secondary); font-size: 15px; cursor: pointer; padding: 0; }
.mb-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 190; }
.mb-overlay.show { display: block; }
@media (max-width: 1100px) { .grid-main, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 1024px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; width: min(82vw, 270px); z-index: 200; transform: translateX(-102%); transition: transform .22s ease; }
  .sidebar.mb-open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .mb-hamburger { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .page-head { padding: 16px 16px 0; } .tabs { padding: 12px 16px 0; } .content { padding: 14px 16px 32px; }
  .grid-2 { grid-template-columns: 1fr; }
  .user-chip .who { display: none; }
}
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 17px; }
  .login-left { display: none; }
  .login-right { padding: 24px 16px; } .login-card { padding: 32px 24px; }
  table.dtable th, table.dtable td { white-space: nowrap; }
  .cal-grid .day { min-height: 70px; }
  .cal-item { font-size: 10px; }
  input, select, textarea { font-size: 16px; }
}
@media print {
  .sidebar, .topbar, .tabs, .page-actions, .filter-bar, .pager, .no-print { display: none !important; }
  body { background: #fff; } .card { border-color: #ddd; break-inside: avoid; }
}
