/* Edge Music – team app */
:root {
  --bg: #f6f4f0; --panel: #ffffff; --panel-2: #fbfaf7; --line: #e7e2d9; --line-2: #d8d1c4;
  --ink: #1b1822; --ink-2: #4a4554; --muted: #7b7584; --accent: #b07a12; --accent-ink: #ffffff; --accent-soft: #f6ead0;
  --plum: #5b3d8f; --ok: #237a4b; --ok-soft: #e1f2e7; --warn: #a35d00; --warn-soft: #fbecd6; --bad: #b3261e; --bad-soft: #fbe3e1; --info: #2b5fa8; --info-soft: #e2ecf9;
  --nav: #17141d; --nav-ink: #e9e5ef; --nav-muted: #9a93a6; --nav-hi: #2a2533;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 16, 28, .06), 0 4px 16px rgba(20, 16, 28, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #121016; --panel: #1b1821; --panel-2: #201c27; --line: #2d2836; --line-2: #3a3445; --ink: #efebf4; --ink-2: #c9c3d3; --muted: #918a9d; --accent: #e0a63a; --accent-ink: #1b1306; --accent-soft: #3a2c12; --ok: #59c287; --ok-soft: #1b3326; --warn: #e5a04a; --warn-soft: #3a2a13; --bad: #f07a71; --bad-soft: #3d1c1a; --info: #7aa7ea; --info-soft: #1b2a40; --nav: #0d0b10; --nav-hi: #221e29; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #121016; --panel: #1b1821; --panel-2: #201c27; --line: #2d2836; --line-2: #3a3445; --ink: #efebf4; --ink-2: #c9c3d3; --muted: #918a9d; --accent: #e0a63a; --accent-ink: #1b1306; --accent-soft: #3a2c12; --ok: #59c287; --ok-soft: #1b3326; --warn: #e5a04a; --warn-soft: #3a2a13; --bad: #f07a71; --bad-soft: #3d1c1a; --info: #7aa7ea; --info-soft: #1b2a40; --nav: #0d0b10; --nav-hi: #221e29; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; }
p { margin: 0 0 .75em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.brand .logo { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #17141d 0 18%, #e0a63a 19% 23%, #17141d 24% 30%, #c48a1b 31% 100%); flex: none; }
.brand small { display: block; font-weight: 400; color: var(--nav-muted); font-size: .75rem; letter-spacing: 0; }
.nav { display: flex; flex-direction: column; padding: 6px 8px 16px; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--nav-ink); font-size: .93rem; }
.nav a svg { width: 18px; height: 18px; opacity: .8; flex: none; }
.nav a:hover { background: var(--nav-hi); text-decoration: none; }
.nav a.on { background: var(--nav-hi); color: #fff; box-shadow: inset 3px 0 0 #e0a63a; }
.nav a .count { margin-left: auto; background: #e0a63a; color: #1b1306; border-radius: 99px; font-size: .72rem; padding: 0 7px; font-weight: 700; }
.nav .sep { height: 1px; background: #2a2533; margin: 8px 10px; }
.side .me { margin-top: auto; padding: 12px 14px; border-top: 1px solid #2a2533; font-size: .85rem; display: flex; align-items: center; gap: 8px; }
.side .me button { color: var(--nav-muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; }
.top .title { font-weight: 650; font-size: 1.02rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .menu-btn { display: none; }
.page { padding: 22px 24px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { flex: 1; min-width: 220px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: .9rem; margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons & inputs */
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; background: var(--ink); color: var(--panel); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1.2; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: 5px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: inherit; cursor: pointer; display: inline-flex; position: relative; }
.icon-btn:hover { background: var(--panel-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); font-weight: 400; }
.field.wide { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.searchbar input, .searchbar select { width: auto; min-width: 150px; }
.searchbar input[type=search] { flex: 1; min-width: 180px; }

/* ---------- panels, cards, kpis */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 14px; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2 > svg, .page-head h1 > svg { width: 18px; height: 18px; flex: none; }
.card h2 .more { margin-left: auto; font-size: .82rem; font-weight: 500; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side-r { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.grid > .card + .card { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); }
.kpi .k { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 1.45rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); } .kpi.ok .v { color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 30px 12px; }
.empty .btn { margin-top: 10px; }
.list { display: flex; flex-direction: column; }
.list > .li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.list > .li:last-child { border-bottom: 0; }
.li .main-t { font-weight: 600; }
.li .sub-t { font-size: .84rem; color: var(--muted); }
.li.link { cursor: pointer; }
.li.link:hover { background: var(--panel-2); }
.datebox { width: 46px; flex: none; text-align: center; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); padding: 4px 0; line-height: 1.05; }
.datebox .d { font-weight: 800; font-size: 1.15rem; }
.datebox .m { font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; background-size: cover; background-position: center; }
.avatar.lg { width: 86px; height: 86px; font-size: 1.8rem; }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok, .badge.confirmed, .badge.advanced, .badge.paid, .badge.signed, .badge.sent-ok, .badge.released, .badge.posted, .badge.settled, .badge.collected, .badge.shipped { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn, .badge.hold, .badge.offer, .badge.part-paid, .badge.partially-signed, .badge.accepted, .badge.planning, .badge.imported, .badge.pending, .badge.queued, .badge.manual, .badge.new { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad, .badge.overdue, .badge.cancelled, .badge.void, .badge.failed, .badge.declined, .badge.rejected, .badge.refunded { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info, .badge.enquiry, .badge.performed, .badge.sent, .badge.delivered, .badge.draft, .badge.packed { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* ---------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel-2); }
table.t tfoot td { font-weight: 700; background: var(--panel-2); }
.card .table-wrap { border: 0; border-radius: 0; margin: 0 -16px -16px; }
.card .table-wrap table.t th:first-child, .card .table-wrap table.t td:first-child { padding-left: 16px; }

/* ---------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 13px; color: var(--muted); font-weight: 600; font-size: .9rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs .on { color: var(--ink); border-bottom-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 6px 12px; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: var(--panel); }

/* ---------- insights */
.insight { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); align-items: flex-start; }
.insight + .insight { margin-top: 8px; }
.insight .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.insight .ic svg { width: 14px; height: 14px; }
.insight.urgent .ic { background: var(--bad-soft); color: var(--bad); }
.insight.warn .ic { background: var(--warn-soft); color: var(--warn); }
.insight.info .ic { background: var(--info-soft); color: var(--info); }
.insight.good .ic { background: var(--ok-soft); color: var(--ok); }
.insight .t { font-weight: 650; font-size: .92rem; }
.insight .b { font-size: .84rem; color: var(--muted); }
.insight.link { cursor: pointer; }
.insight.link:hover { border-color: var(--line-2); }

/* ---------- pipeline & calendar */
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pipeline a { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; color: var(--ink); text-decoration: none; }
.pipeline a:hover { border-color: var(--accent); }
.pipeline .n { font-size: 1.3rem; font-weight: 800; }
.pipeline .l { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.cal .dow { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.cal .day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; font-size: .8rem; min-width: 0; cursor: pointer; }
.cal .day:hover { background: var(--panel-2); }
.cal .day.other { background: var(--bg); color: var(--muted); }
.cal .day.today .dn { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 6px; }
.cal .dn { font-weight: 700; font-size: .78rem; display: inline-block; margin-bottom: 2px; }
.cal .ev { display: block; border-radius: 5px; padding: 2px 5px; margin-bottom: 2px; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; text-decoration: none !important; border-left: 3px solid rgba(0,0,0,.25); }
.cal .ev.hold, .cal .ev.enquiry, .cal .ev.offer { opacity: .62; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.cal .ev.cancelled, .cal .ev.declined { text-decoration: line-through !important; opacity: .4; }

/* ---------- detail layout */
.detail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.detail-head .grow h1 { margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: .9rem; }
.checklist .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.checklist .done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .tick svg { width: 12px; height: 12px; }
.checklist .done span { color: var(--muted); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.alert { padding: 10px 12px; border-radius: 8px; font-size: .9rem; display: flex; gap: 8px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert + .alert { margin-top: 6px; }
.money-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .9rem; }
.money-line.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 99px; padding: 3px 10px; font-size: .82rem; background: var(--panel); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 6px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b span { font-size: .68rem; color: var(--muted); }
.feeguide { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: .88rem; }
.feeguide .range { font-size: 1.1rem; font-weight: 800; }
.doc-html { font-size: .92rem; line-height: 1.6; }
.doc-html h1 { font-size: 1.3rem; } .doc-html h2 { font-size: 1.02rem; margin-top: 1.1em; }
.doc-html table { border-collapse: collapse; width: 100%; } .doc-html td, .doc-html th { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.sig-pad { width: 100%; height: 160px; border: 1px dashed var(--line-2); border-radius: 8px; background: #fff; touch-action: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .th { width: 88px; height: 88px; border-radius: 8px; background: var(--panel-2) center/cover; border: 1px solid var(--line); position: relative; }
.thumbs .th button { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }
.answer { white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: .92rem; }

/* ---------- overlays */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 12, 20, .5); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.modal { background: var(--panel); border-radius: 12px; width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { width: min(920px, 100%); }
.modal header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 8px; }
.modal header h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.modal .body { padding: 16px 18px; overflow-y: auto; }
.modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; pointer-events: none; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 36px); }
.toast { background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: 8px; font-size: .9rem; box-shadow: var(--shadow); animation: fade .15s ease; max-width: 420px; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); z-index: 90; box-shadow: -10px 0 40px rgba(0,0,0,.2); display: flex; flex-direction: column; }
.drawer header { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; flex: 1; }
.drawer .body { overflow-y: auto; padding: 8px 16px; }
.notif { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif.unread .t::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.notif .t { font-weight: 600; font-size: .9rem; }
.notif .b { font-size: .84rem; color: var(--muted); white-space: pre-line; }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, #3a2c12 0, transparent 60%), var(--nav); }
.login .box { background: var(--panel); border-radius: 14px; padding: 28px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login .box.wide { width: min(640px, 100%); }
.login .brand { color: var(--ink); padding: 0 0 18px; }
.login h1 { font-size: 1.3rem; }

/* ---------- mobile */
.bottom-nav { display: none; }
@media (max-width: 1100px) { .grid.side-r { grid-template-columns: 1fr; } .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 80; transform: translateX(-100%); transition: transform .18s ease; }
  .shell.nav-open .side { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.4); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; }
  .top { padding: 10px 14px; }
  .top .menu-btn { display: inline-flex; }
  .page { padding: 16px 16px 90px; }
  .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cal .day { min-height: 64px; padding: 2px; }
  .cal .ev { font-size: .66rem; padding: 1px 3px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: .68rem; color: var(--muted); font-weight: 600; text-decoration: none; }
  .bottom-nav a svg { width: 21px; height: 21px; }
  .bottom-nav a.on { color: var(--accent); }
  .toasts { bottom: 74px; }
  .modal-bg { place-items: end center; padding: 0; }
  .modal { border-radius: 14px 14px 0 0; max-height: 92vh; }
  .hide-sm { display: none !important; }
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  table.t.cards td { border: 0; padding: 2px 12px; }
  table.t.cards td.num { text-align: left; }
  table.t.cards td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .8rem; }
}
@media print { .side, .top, .bottom-nav, .actions, .noprint { display: none !important; } .shell { display: block; } .page { padding: 0; } .card { box-shadow: none; } }
