/* Halawi Slate - application styles */
:root {
  --violet: #9b3df5; --magenta: #c84fb4; --coral: #ea6a5a;
  --grad: linear-gradient(100deg, #9b3df5 0%, #c84fb4 55%, #ea6a5a 100%);
  --bg: #0a0a0c; --bg-1: #0d0d11; --bg-2: #121217; --bg-3: #17171e; --bg-4: #1d1d26;
  --glass: rgba(255,255,255,.028); --glass-2: rgba(255,255,255,.045); --glass-3: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.075); --line-2: rgba(255,255,255,.12); --line-3: rgba(255,255,255,.18);
  --text: #eeedf3; --text-2: #cbc5d4; --muted: #9c95a8; --dim: #6f6979;
  --ok: #3fb68b; --warn: #e8a33d; --bad: #ef5b62; --info: #7b93ff;
  --accent: #b46cff; --accent-bg: rgba(155,61,245,.14); --accent-line: rgba(155,61,245,.45);
  --focus: 0 0 0 2px rgba(180,108,255,.65);
  --r: 10px; --r-sm: 7px; --r-lg: 14px;
  --shadow: 0 10px 40px -12px rgba(0,0,0,.65), 0 2px 8px rgba(0,0,0,.35);
  --sb-w: 248px; --top-h: 54px;
  --f-ui: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-data: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f6f5f9; --bg-1: #ffffff; --bg-2: #ffffff; --bg-3: #f1eff6; --bg-4: #e9e6f0;
  --glass: rgba(20,10,40,.025); --glass-2: rgba(20,10,40,.04); --glass-3: rgba(20,10,40,.07);
  --line: rgba(20,10,40,.09); --line-2: rgba(20,10,40,.14); --line-3: rgba(20,10,40,.22);
  --text: #17141f; --text-2: #3b3547; --muted: #6a6377; --dim: #958fa1;
  --accent: #8b35ec; --accent-bg: rgba(139,53,236,.09); --accent-line: rgba(139,53,236,.4);
  --shadow: 0 12px 40px -14px rgba(30,10,60,.25), 0 2px 8px rgba(30,10,60,.08);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--f-data); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(900px 500px at 85% -10%, rgba(155,61,245,.10), transparent 60%), radial-gradient(700px 400px at -10% 110%, rgba(234,106,90,.06), transparent 60%); }
html[data-theme="light"] body::before { opacity: .6; }
h1, h2, h3, h4 { font-family: var(--f-ui); font-weight: 600; letter-spacing: -.01em; margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .grow { flex: 1; } .r { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: var(--f-mono); font-size: 12.5px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--bg-3); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }
::selection { background: rgba(155,61,245,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(127,120,140,.28); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(127,120,140,.45); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- shell ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sb-w) 1fr; height: 100vh; height: 100dvh; transition: grid-template-columns .22s ease; }
.app.sb-collapsed { --sb-w: 64px; }
.sidebar { background: var(--bg-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.sb-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; min-height: var(--top-h); }
.sb-logo { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none !important; }
.sb-logo img { height: 18px; width: auto; display: block; }
.sb-logo .sb-name { font-family: var(--f-ui); font-weight: 600; font-size: 15px; letter-spacing: .02em; color: var(--text); white-space: nowrap; }
.sb-logo .sb-name em { font-style: normal; color: var(--muted); font-weight: 400; }
.sb-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 4px 18px -6px rgba(155,61,245,.7); }
.sb-mark .ic { width: 16px; height: 16px; }
.sb-proj { margin: 4px 10px 8px; padding: 9px 10px; border: 1px solid var(--line); background: var(--glass); border-radius: var(--r); display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; text-align: left; width: calc(100% - 20px); }
.sb-proj:hover { border-color: var(--line-2); background: var(--glass-2); }
.sb-proj .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sb-proj .t { min-width: 0; flex: 1; }
.sb-proj .t b { display: block; font: 500 13px/1.25 var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-proj .t small { color: var(--muted); font-size: 11.5px; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 12px; }
.sb-grp { font: 500 10.5px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 14px 10px 6px; white-space: nowrap; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font: 400 13.5px/1.2 var(--f-ui); text-decoration: none !important; position: relative; white-space: nowrap; margin: 1px 0; }
.sb-link:hover { background: var(--glass-2); color: var(--text); }
.sb-link.on { background: var(--accent-bg); color: var(--text); }
.sb-link.on::before { content: ''; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.sb-link.on .ic { color: var(--accent); }
.sb-link .kbd-hint { margin-left: auto; font-size: 10.5px; color: var(--dim); font-family: var(--f-mono); }
.sb-link .cnt { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--glass-2); padding: 1px 7px; border-radius: 20px; }
.sb-foot { border-top: 1px solid var(--line); padding: 8px; }
.sb-backup { margin: 4px 2px 6px; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); font-size: 12px; color: var(--muted); }
.sb-backup b { color: var(--text); font-weight: 500; font-family: var(--f-ui); font-size: 12.5px; }
.sb-backup.due { border-color: rgba(232,163,61,.45); background: rgba(232,163,61,.07); }
.sb-backup .btn { margin-top: 8px; width: 100%; justify-content: center; }
.sb-legal { display: flex; gap: 10px; padding: 6px 10px 2px; font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.sb-legal a { color: var(--dim); }
.app.sb-collapsed .sb-name, .app.sb-collapsed .sb-proj .t, .app.sb-collapsed .sb-grp, .app.sb-collapsed .sb-link span, .app.sb-collapsed .sb-link .kbd-hint, .app.sb-collapsed .sb-link .cnt, .app.sb-collapsed .sb-backup, .app.sb-collapsed .sb-legal, .app.sb-collapsed .sb-logo img { display: none; }
.app.sb-collapsed .sb-link { justify-content: center; padding: 9px 0; }
.app.sb-collapsed .sb-proj { justify-content: center; padding: 9px 0; }
.app.sb-collapsed .sb-grp { display: block; height: 10px; padding: 0; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; z-index: 20; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font: 400 13.5px var(--f-ui); color: var(--muted); }
.crumbs a { color: var(--muted); white-space: nowrap; }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .sep { color: var(--dim); }
.crumbs .sep .ic { width: 13px; height: 13px; }
.crumbs b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-ind { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 5px 10px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); white-space: nowrap; cursor: default; }
.save-ind i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(63,182,139,.15); }
.save-ind.dirty i { background: var(--warn); box-shadow: 0 0 0 3px rgba(232,163,61,.15); }
.save-ind.saving i { background: var(--info); animation: pulse 1s infinite; }
.save-ind.error { color: var(--bad); border-color: rgba(239,91,98,.5); }
.save-ind.error i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.cmdk-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; min-width: 210px; border: 1px solid var(--line); background: var(--glass); border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 13px; }
.cmdk-btn:hover { border-color: var(--line-2); color: var(--text-2); }
.cmdk-btn kbd { margin-left: auto; }
kbd { font: 500 11px/1 var(--f-mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--muted); white-space: nowrap; }
.content { flex: 1; overflow: auto; min-height: 0; position: relative; }
.page { padding: 22px 26px 60px; max-width: 1680px; margin: 0 auto; animation: fadeUp .28s ease both; }
.page--wide { max-width: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-hd { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-hd .eyebrow { margin-bottom: 4px; }
.page-hd h1 { font-size: 24px; line-height: 1.2; font-weight: 600; }
.page-hd p { margin: 4px 0 0; color: var(--muted); max-width: 760px; }
.page-hd .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { font: 500 11px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }

/* ---------- buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text); font: 500 13px/1 var(--f-ui); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; text-decoration: none !important; }
.btn:hover { background: var(--glass-3); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: linear-gradient(100deg, #8f37ee, #b146c9 60%, #d75f78); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -8px rgba(155,61,245,.75), inset 0 1px 0 rgba(255,255,255,.18); }
.btn--primary:hover { filter: brightness(1.08); background: linear-gradient(100deg, #8f37ee, #b146c9 60%, #d75f78); border-color: transparent; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--glass-2); border-color: var(--line); color: var(--text); }
.btn--danger { background: rgba(239,91,98,.14); border-color: rgba(239,91,98,.45); color: #ff8d92; }
html[data-theme="light"] .btn--danger { color: #c62f37; }
.btn--danger:hover { background: rgba(239,91,98,.24); border-color: rgba(239,91,98,.6); }
.btn.danger, .ctx-i.danger { color: #ff8d92; }
html[data-theme="light"] .btn.danger, html[data-theme="light"] .ctx-i.danger { color: #c62f37; }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 6px; }
.btn--sm .ic { width: 14px; height: 14px; }
.btn--lg { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; flex: none; position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--glass-2); color: var(--text); border-color: var(--line); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn--sm { width: 26px; height: 26px; }
.icon-btn--sm .ic { width: 14px; height: 14px; }
.icon-btn .pip { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; border-radius: 10px; background: var(--coral); color: #fff; font: 600 9.5px/15px var(--f-ui); padding: 0 4px; text-align: center; }
.input { width: 100%; height: 36px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 400 13.5px var(--f-data); transition: border-color .15s, box-shadow .15s; }
html[data-theme="light"] .input { background: #fff; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; min-height: 64px; }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c95a8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(155,61,245,.18); }
.input--sm { height: 30px; font-size: 12.5px; padding: 0 9px; }
select.input--sm { padding-right: 26px; background-position: right 8px center; }
.input--color { padding: 3px; width: 54px; }
input[type="date"].input, input[type="time"].input { font-variant-numeric: tabular-nums; }
::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
html[data-theme="light"] ::-webkit-calendar-picker-indicator { filter: none; }
.search-in { position: relative; display: flex; align-items: center; }
.search-in .ic { position: absolute; left: 9px; color: var(--dim); width: 14px; height: 14px; pointer-events: none; }
.search-in .input { padding-left: 29px; min-width: 200px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-l { font: 500 12px/1.2 var(--f-ui); color: var(--text-2); letter-spacing: .01em; }
.field-l em { font-style: normal; color: var(--dim); font-weight: 400; }
.field-h { color: var(--dim); font-size: 11.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; }
.form-grid .field--full { grid-column: 1 / -1; }
.form-sec { grid-column: 1 / -1; font: 500 11px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; height: 36px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 34px; height: 20px; border-radius: 20px; background: var(--glass-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch input:checked + span { background: var(--violet); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.switch em { font-style: normal; color: var(--text-2); font-size: 13px; }
input[type="checkbox"] { accent-color: var(--violet); width: 15px; height: 15px; cursor: pointer; }
input[type="range"] { accent-color: var(--violet); }

/* ---------- panels / cards ---------- */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; min-width: 0; }
.panel-hd { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-hd h3 { font-size: 14px; font-weight: 500; }
.panel-hd .acts { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.panel-bd { padding: 16px; }
.panel-bd--flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi { padding: 15px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); position: relative; overflow: hidden; min-width: 0; }
.kpi .l { font: 500 11px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .l .ic { width: 13px; height: 13px; }
.kpi .v { font: 600 26px/1.15 var(--f-ui); margin-top: 10px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .bar { margin-top: 10px; }
.kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); } .kpi.ok .v { color: var(--ok); }
.kpi::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(155,61,245,.5), transparent); opacity: .5; }
.bar { height: 6px; border-radius: 6px; background: var(--glass-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width .4s ease; }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--warn); } .bar.bad > i { background: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 20px; font: 500 11.5px/1 var(--f-ui); white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge--n { background: var(--glass-2); color: var(--muted); border-color: var(--line); }
.badge--ok { background: rgba(63,182,139,.12); color: #5fd3a8; border-color: rgba(63,182,139,.25); }
.badge--warn { background: rgba(232,163,61,.12); color: #f2b85e; border-color: rgba(232,163,61,.25); }
.badge--bad { background: rgba(239,91,98,.12); color: #ff8389; border-color: rgba(239,91,98,.28); }
.badge--info { background: rgba(123,147,255,.12); color: #9eb0ff; border-color: rgba(123,147,255,.25); }
.badge--accent { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
html[data-theme="light"] .badge--ok { color: #1d8a61; } html[data-theme="light"] .badge--warn { color: #a86a0c; } html[data-theme="light"] .badge--bad { color: #c62f37; } html[data-theme="light"] .badge--info { color: #3c55d0; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; margin: 1px 4px 1px 0; border-radius: 6px; background: var(--glass-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chip button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--dim); display: grid; }
.chip button:hover { color: var(--bad); }
.chip button .ic { width: 12px; height: 12px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.overdue { color: var(--bad); font-weight: 500; }
.lnk { display: inline-flex; align-items: center; gap: 4px; }
.lnk .ic { width: 13px; height: 13px; }
.tick { color: var(--ok); }
.callout { display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--glass-2); align-items: flex-start; flex-wrap: wrap; }
.callout > .ic { margin-top: 2px; width: 18px; height: 18px; }
.callout > div { flex: 1; min-width: 200px; }
.callout--warn { border-color: rgba(232,163,61,.4); background: rgba(232,163,61,.07); } .callout--warn > .ic { color: var(--warn); }
.callout--accent { border-color: var(--accent-line); background: var(--accent-bg); } .callout--accent > .ic { color: var(--accent); }
.callout--bad { border-color: rgba(239,91,98,.45); background: rgba(239,91,98,.07); } .callout--bad > .ic { color: var(--bad); }
.callout b { font-family: var(--f-ui); font-weight: 500; }
.callout p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.callout .acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 0; background: none; cursor: pointer; color: var(--muted); font: 400 13.5px var(--f-ui); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--violet); }
.tab .ic { width: 15px; height: 15px; }
.tab-c { font-size: 11px; background: var(--glass-2); color: var(--muted); padding: 1px 7px; border-radius: 20px; }
.seg { display: inline-flex; padding: 3px; background: var(--glass-2); border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--muted); font: 500 12.5px var(--f-ui); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--bg-4); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html[data-theme="light"] .seg button.on { background: #fff; }
.seg button .ic { width: 14px; height: 14px; }

/* ---------- data table ---------- */
.dt { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--glass); overflow: hidden; }
.dt-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dt-bar .input--sm { width: auto; }
.dt-sel { display: flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid var(--line); font-size: 12.5px; color: var(--accent); }
.dt-sel[hidden] { display: none; }
.dt-sel span { margin-right: 4px; }
.dt-count { font-size: 12px; }
.dt-scroll { overflow: auto; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--bg-2); text-align: left; font: 500 11.5px/1 var(--f-ui); color: var(--muted); letter-spacing: .02em; padding: 0 10px; height: 36px; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; user-select: none; }
.tbl th:hover { color: var(--text); }
.tbl th .sort-ic { width: 12px; height: 12px; opacity: 0; margin-left: 4px; transition: transform .15s; }
.tbl th.sorted-asc .sort-ic { opacity: 1; transform: rotate(180deg); }
.tbl th.sorted-desc .sort-ic { opacity: 1; }
.tbl th.r { text-align: right; }
.tbl td { height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--glass-2); }
.tbl tbody tr.selected td { background: var(--accent-bg); }
.tbl tbody tr.flash td { animation: flash 1.6s ease; }
@keyframes flash { 0%, 30% { background: rgba(155,61,245,.22); } }
.tbl td.ed { cursor: text; }
.tbl td.ed:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.tbl td.ed:focus { box-shadow: inset 0 0 0 2px var(--accent-line); outline: none; border-radius: 0; }
.tbl td.editing { padding: 0; overflow: visible; box-shadow: inset 0 0 0 2px var(--violet); }
.cell-in { width: 100%; height: 37px; border: 0; background: var(--bg-3); color: var(--text); padding: 0 10px; font: inherit; outline: none; }
textarea.cell-in { height: 80px; position: absolute; z-index: 5; width: 320px; padding: 8px 10px; box-shadow: var(--shadow); border: 1px solid var(--accent-line); border-radius: 6px; }
.tbl td.dt-cb, .tbl th.dt-cb { padding: 0 0 0 12px; text-overflow: clip; cursor: default; }
.tbl td.dt-grip { padding: 0; color: var(--dim); cursor: grab; text-align: center; text-overflow: clip; }
.tbl td.dt-grip .ic { width: 14px; height: 14px; }
.tbl td.dt-act { padding: 0 6px; text-align: right; text-overflow: clip; }
.tbl tr.dragging td { opacity: .4; }
.tbl tr.drop-before td { box-shadow: inset 0 2px 0 var(--violet); }
.tbl tr.drop-after td { box-shadow: inset 0 -2px 0 var(--violet); }
.tbl tfoot td { position: sticky; bottom: 0; background: var(--bg-2); border-top: 1px solid var(--line-2); border-bottom: 0; font-family: var(--f-ui); }
.tbl tr.spacer td { padding: 0; border: 0; height: auto; }
.tbl tr.row-muted td { color: var(--dim); }
.tbl tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tbl.simple th { cursor: default; position: static; }
.tbl.simple td { white-space: normal; height: auto; padding: 8px 10px; }
.dt-empty:empty { display: none; }
.empty { text-align: center; padding: 46px 20px; max-width: 520px; margin: 0 auto; }
.empty--sm { padding: 26px 20px; color: var(--muted); }
.empty-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent); }
.empty-ic .ic { width: 24px; height: 24px; }
.empty h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }

/* ---------- toasts / modals / menus / drawer ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 440px; padding: 10px 10px 10px 13px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 11px; box-shadow: var(--shadow); font-size: 13px; animation: toastIn .25s cubic-bezier(.2,.9,.3,1.2); }
.toast.out { animation: toastOut .22s ease forwards; }
.toast-ic { color: var(--info); display: grid; }
.toast--success .toast-ic { color: var(--ok); } .toast--warn .toast-ic { color: var(--warn); } .toast--error .toast-ic { color: var(--bad); }
.toast--error { border-color: rgba(239,91,98,.45); }
.toast-msg { flex: 1; }
.toast-x { border: 0; background: none; color: var(--dim); cursor: pointer; display: grid; padding: 3px; border-radius: 5px; }
.toast-x:hover { color: var(--text); background: var(--glass-2); }
.toast-x .ic { width: 14px; height: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.modal-wrap { position: fixed; inset: 0; z-index: 200; background: rgba(5,5,8,.62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; animation: fade .18s ease; }
html[data-theme="light"] .modal-wrap { background: rgba(30,20,50,.35); }
.modal-wrap.out { animation: fade .18s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); animation: pop .22s cubic-bezier(.2,.9,.3,1.15); overflow: hidden; }
.modal--sm { max-width: 440px; } .modal--lg { max-width: 860px; } .modal--xl { max-width: 1120px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-hd { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.modal-hd h2 { font-size: 17px; font-weight: 600; flex: 1; }
.modal-bd { padding: 4px 18px 18px; overflow: auto; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--glass); flex-wrap: wrap; }
.ctx { position: fixed; z-index: 400; min-width: 210px; max-height: 70vh; overflow: auto; padding: 5px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 11px; box-shadow: var(--shadow); animation: pop .14s ease; }
.ctx-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border: 0; background: none; border-radius: 7px; cursor: pointer; font: 400 13px var(--f-ui); text-align: left; color: var(--text-2); }
.ctx-i:hover, .ctx-i:focus { background: var(--glass-3); color: var(--text); outline: none; }
.ctx-i:disabled { opacity: .4; cursor: default; }
.ctx-i kbd { margin-left: auto; }
.ctx-i .ic { width: 15px; height: 15px; color: var(--muted); }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 2px; }
.ctx-hd { font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 8px 9px 4px; }
#drawer-host { position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; pointer-events: none; }
.drawer { pointer-events: auto; position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px -30px rgba(0,0,0,.7); display: flex; flex-direction: column; animation: slideIn .24s cubic-bezier(.2,.9,.3,1); }
.drawer.out { animation: slideIn .2s ease reverse forwards; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-hd { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.drawer-hd > div:first-child { flex: 1; min-width: 0; }
.drawer-hd h2 { font-size: 17px; margin-top: 6px; overflow-wrap: anywhere; }
.drawer-bd { flex: 1; overflow: auto; padding: 18px; }
.drawer-ft { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.drawer-ft .btn:first-child { margin-right: auto; }

/* ---------- command palette ---------- */
.cmdk { position: fixed; inset: 0; z-index: 250; background: rgba(5,5,8,.55); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade .15s; }
.cmdk-box { width: min(660px, calc(100vw - 24px)); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 40px 100px -20px rgba(0,0,0,.85); overflow: hidden; animation: pop .18s ease; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-in .ic { color: var(--muted); width: 18px; height: 18px; }
.cmdk-in input { flex: 1; height: 54px; border: 0; background: none; color: var(--text); font: 400 16px var(--f-ui); outline: none; }
.cmdk-list { max-height: 420px; overflow: auto; padding: 6px; }
.cmdk-grp { font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 10px 10px 5px; }
.cmdk-i { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.cmdk-i .ic { color: var(--muted); }
.cmdk-i .sub { color: var(--dim); font-size: 12px; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.cmdk-i kbd { margin-left: auto; }
.cmdk-i.on { background: var(--accent-bg); color: var(--text); }
.cmdk-i.on .ic { color: var(--accent); }
.cmdk-ft { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); flex-wrap: wrap; }

/* ---------- dashboard ---------- */
.hero { padding: 26px 26px 22px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(155,61,245,.10), rgba(200,79,180,.05) 50%, rgba(234,106,90,.06)), var(--glass); position: relative; overflow: hidden; margin-bottom: 20px; }
.hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(155,61,245,.22), transparent 65%); pointer-events: none; }
.hero h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.hero p { color: var(--text-2); margin: 6px 0 16px; max-width: 640px; }
.hero .row { position: relative; z-index: 1; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { position: relative; border: 1px solid var(--line); background: var(--glass); border-radius: var(--r-lg); padding: 16px; cursor: pointer; transition: border-color .18s, transform .18s, background .18s, box-shadow .18s; display: flex; flex-direction: column; gap: 12px; min-height: 196px; text-align: left; }
.pcard:hover { border-color: var(--line-3); background: var(--glass-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard .stripe { position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 0 0 2px 2px; }
.pcard-hd { display: flex; align-items: flex-start; gap: 10px; }
.pcard-hd > div { min-width: 0; flex: 1; }
.pcard-hd h3 { font-size: 16px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.pcard-hd small { color: var(--muted); font-size: 12px; }
.pcard-hd .icon-btn { margin-top: -4px; margin-right: -6px; }
.pcard .logline { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; margin: 0; }
.pcard .meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; margin-top: auto; }
.pcard .meta b { color: var(--text); font-weight: 500; font-family: var(--f-ui); }
.phase-dots { display: flex; gap: 4px; }
.phase-dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--glass-3); }
.phase-dots i.done { background: rgba(155,61,245,.6); } .phase-dots i.cur { background: var(--grad); }
.pcard.archived { opacity: .6; }
.plist .tbl td { cursor: pointer; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl { border: 1px solid var(--line-2); background: var(--glass); border-radius: 12px; padding: 13px; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 6px; }
.tpl:hover { border-color: var(--line-3); background: var(--glass-2); }
.tpl.on { border-color: var(--violet); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--violet) inset; }
.tpl b { font: 500 13.5px var(--f-ui); display: flex; align-items: center; gap: 8px; }
.tpl b .ic { color: var(--accent); }
.tpl small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input--sm { width: auto; }

/* ---------- overview ---------- */
.phases { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.phase { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; text-align: left; transition: border-color .15s; min-width: 0; }
.phase:hover { border-color: var(--line-2); }
.phase.cur { border-color: var(--accent-line); background: var(--accent-bg); }
.phase .n { font: 500 12.5px var(--f-ui); display: flex; justify-content: space-between; gap: 6px; }
.phase .n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase .d { font-size: 11.5px; color: var(--muted); margin: 3px 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.spec-list > div { background: var(--bg-2); padding: 10px 12px; min-width: 0; }
.spec-list small { display: block; font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.spec-list b { display: block; font-weight: 500; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.activity li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--dim); font-size: 11.5px; white-space: nowrap; min-width: 78px; }
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; border-radius: 6px; }
.alert-list li:hover { background: var(--glass-2); }
.alert-list li:last-child { border-bottom: 0; }
.alert-list .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.alert-list .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.alert-list .when.overdue { color: var(--bad); }
.alert-list .sev { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--info); }
.alert-list .sev.overdue { background: var(--bad); }
.alert-list .k { font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); min-width: 76px; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--violet) calc(var(--p) * 1%), var(--glass-3) 0); display: grid; place-items: center; flex: none; }
.ring::before { content: attr(data-v); width: 50px; height: 50px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font: 600 14px var(--f-ui); }
.logline-big { font: 400 17px/1.5 var(--f-ui); color: var(--text); margin: 0; }

/* ---------- script / breakdown ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 16px; align-items: start; }
.split--3 { grid-template-columns: 290px minmax(0,1fr); }
.bd-panel { position: sticky; top: 0; }
.bd-cats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.bd-cat { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px 8px; background: var(--glass); min-width: 0; }
.bd-cat h4 { font: 500 11.5px var(--f-ui); display: flex; align-items: center; gap: 7px; color: var(--text-2); margin-bottom: 6px; }
.bd-cat h4 i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.bd-cat .chips { display: flex; flex-wrap: wrap; gap: 3px; min-height: 4px; }
.bd-add { width: 100%; height: 26px; border: 1px dashed var(--line-2); background: transparent; color: var(--text); border-radius: 6px; padding: 0 8px; font-size: 12px; margin-top: 4px; }
.bd-add:focus { outline: none; border-color: var(--accent-line); border-style: solid; }
.script-view { font-family: 'Courier Prime', 'Courier New', Courier, monospace; font-size: 13.5px; line-height: 1.55; background: #fbfaf7; color: #1a1a1a; padding: 22px 30px; border-radius: 10px; white-space: pre-wrap; max-height: 460px; overflow: auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); user-select: text; margin: 0; }
.script-view mark { border-radius: 2px; padding: 0 1px; color: inherit; }
.tagbar { position: fixed; z-index: 260; display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; padding: 6px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); animation: pop .12s ease; }
.tagbar button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--glass); border-radius: 6px; padding: 4px 7px; font-size: 11.5px; cursor: pointer; color: var(--text-2); }
.tagbar button:hover { border-color: var(--line-3); color: var(--text); }
.tagbar button i { width: 8px; height: 8px; border-radius: 2px; }
.sc-num { font: 600 13px var(--f-ui); }

/* ---------- stripboard ---------- */
.strip-wrap { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; align-items: start; }
.board { display: flex; flex-direction: column; gap: 14px; }
.day { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--glass); }
.day-hd { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--glass-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.day-hd h3 { font-size: 14px; font-weight: 600; white-space: nowrap; }
.day-hd .date { font-size: 12.5px; color: var(--text-2); }
.day-hd .stats { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.day-hd .stats b { color: var(--text); font-weight: 500; font-family: var(--f-ui); }
.strips { min-height: 44px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.strips.over { background: var(--accent-bg); box-shadow: inset 0 0 0 1px var(--accent-line); }
.strips .hint { color: var(--dim); font-size: 12px; text-align: center; padding: 10px; border: 1px dashed var(--line-2); border-radius: 6px; }
.strip { display: grid; grid-template-columns: 20px 52px 64px minmax(120px, 1.4fr) 58px 54px minmax(90px, 1fr) 28px; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 4px; border-radius: 6px; font-size: 12.5px; cursor: grab; border: 1px solid rgba(0,0,0,.18); position: relative; user-select: none; color: #141414; }
.strip:focus-visible { box-shadow: 0 0 0 2px var(--violet); }
.strip > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.strip .g { color: rgba(0,0,0,.4); display: grid; place-items: center; }
.strip .g .ic { width: 14px; height: 14px; }
.strip .n { font: 700 13px var(--f-ui); }
.strip .ie { font: 600 11px var(--f-ui); letter-spacing: .03em; }
.strip .set { font-weight: 600; }
.strip .cast { font-size: 11.5px; opacity: .85; }
.strip .x { background: none; border: 0; cursor: pointer; color: inherit; opacity: .5; display: grid; place-items: center; padding: 3px; border-radius: 4px; }
.strip .x:hover { opacity: 1; background: rgba(0,0,0,.12); }
.strip .x .ic { width: 14px; height: 14px; }
.strip.int-day { background: #ecebe4; }
.strip.ext-day { background: #f0d460; }
.strip.int-night { background: #6f8fe0; color: #fff; }
.strip.ext-night { background: #4aa577; color: #fff; }
.strip.int-dawn, .strip.ext-dawn { background: #f2a9c0; }
.strip.int-dusk, .strip.ext-dusk { background: #f0a560; }
.strip.int-night .g, .strip.ext-night .g { color: rgba(255,255,255,.55); }
.strip.omitted { opacity: .45; text-decoration: line-through; }
.strip.dragging, .strip-banner.dragging { opacity: .35; }
.strip.drop-before::before, .strip.drop-after::after, .strip-banner.drop-before::before, .strip-banner.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.strip.drop-before::before, .strip-banner.drop-before::before { top: -3px; } .strip.drop-after::after, .strip-banner.drop-after::after { bottom: -3px; }
.strip-banner { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 6px; background: #1c1c22; color: #f1f1f1; font: 600 11.5px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; cursor: grab; border: 1px solid var(--line-2); position: relative; }
html[data-theme="light"] .strip-banner { background: #2a2733; }
.strip-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-banner.move { background: repeating-linear-gradient(135deg, #2a2230, #2a2230 8px, #241d29 8px, #241d29 16px); color: #f2b85e; }
.strip-banner .x { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; display: grid; }
.strip-banner .x .ic { width: 13px; height: 13px; }
.day-end { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: #0b0b0e; color: #d8d6de; font: 600 11.5px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; border-top: 1px solid var(--line); flex-wrap: wrap; }
html[data-theme="light"] .day-end { background: #1d1a24; }
.day-end span:last-child { margin-left: auto; }
.boneyard { position: sticky; top: 0; }
.boneyard .strips { max-height: calc(100vh - 300px); overflow: auto; }
.boneyard .strip { grid-template-columns: 18px 40px 50px minmax(60px, 1fr) 54px 40px; }
.boneyard .strip .cast, .boneyard .strip .tm, .boneyard .strip .x { display: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 11px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.cal-h { background: var(--bg-2); padding: 8px; font: 500 11px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); text-align: center; }
.cal-d { background: var(--bg-1); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d.other { opacity: .45; }
.cal-d.today .num { background: var(--violet); color: #fff; border-radius: 20px; padding: 0 7px; }
.cal-d .num { font: 500 12px var(--f-ui); color: var(--muted); align-self: flex-start; margin-bottom: 2px; }
.cal-ev { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid; background: var(--glass-2); color: var(--text-2); }
.cal-ev.shoot { border-color: var(--magenta); background: rgba(200,79,180,.14); color: var(--text); font-weight: 500; }
.cal-ev.task { border-color: var(--info); } .cal-ev.mile { border-color: var(--coral); } .cal-ev.fest { border-color: var(--ok); } .cal-ev.phase { border-color: var(--violet); }

/* gantt */
.gantt { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--glass); }
.gantt-in { display: grid; grid-template-columns: 270px minmax(0,1fr); }
.gantt-left { border-right: 1px solid var(--line); }
.gantt-left .hd { height: 44px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 10px; font: 500 11px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); background: var(--bg-2); }
.gantt-row-l { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.gantt-row-l b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.gantt-row-l small { color: var(--dim); font-size: 11px; white-space: nowrap; }
.gantt-right { overflow-x: auto; position: relative; }
.gantt-scale { display: flex; height: 44px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.gantt-scale div { flex: none; border-left: 1px solid var(--line); font-size: 11px; color: var(--muted); padding: 5px 6px; white-space: nowrap; overflow: hidden; }
.gantt-scale div b { display: block; color: var(--text-2); font-weight: 500; font-family: var(--f-ui); }
.gantt-body { position: relative; }
.gantt-row { height: 38px; border-bottom: 1px solid var(--line); position: relative; }
.gantt-bar { position: absolute; top: 9px; height: 20px; border-radius: 6px; cursor: grab; box-shadow: 0 4px 14px -6px rgba(0,0,0,.6); display: flex; align-items: center; padding: 0 8px; font: 500 11px var(--f-ui); color: #fff; white-space: nowrap; overflow: hidden; min-width: 6px; z-index: 3; }
.gantt-bar .prog { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.22); pointer-events: none; }
.gantt-bar span { position: relative; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gantt-bar .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.gantt-ms { position: absolute; top: 12px; width: 14px; height: 14px; margin-left: -7px; transform: rotate(45deg); background: var(--coral); border-radius: 3px; cursor: grab; box-shadow: 0 0 0 3px rgba(234,106,90,.2); z-index: 3; }
.gantt-ms-l { position: absolute; top: 11px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; pointer-events: none; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--coral); opacity: .7; pointer-events: none; z-index: 4; }
.gantt-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 2; }
.gantt-wk { position: absolute; top: 0; bottom: 0; background: var(--glass); pointer-events: none; }
.gantt-shoot { position: absolute; top: 0; bottom: 0; background: rgba(200,79,180,.08); border-left: 1px dashed rgba(200,79,180,.35); pointer-events: none; }

/* ---------- shots / storyboard ---------- */
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.frame { border: 1px solid var(--line); border-radius: 12px; background: var(--glass); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.frame:hover { border-color: var(--line-3); }
.frame.dragging { opacity: .4; }
.frame.drop-before { box-shadow: -3px 0 0 var(--violet); } .frame.drop-after { box-shadow: 3px 0 0 var(--violet); }
.frame-img { aspect-ratio: 16 / 9; background: #0e0e12; position: relative; display: grid; place-items: center; overflow: hidden; cursor: grab; }
.frame-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame-img svg.ph { width: 100%; height: 100%; display: block; }
.frame-img .ovl { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.frame:hover .ovl, .frame:focus-within .ovl { opacity: 1; }
.frame-img .ovl .icon-btn { background: rgba(10,10,12,.78); color: #fff; }
.frame-img .no { position: absolute; left: 8px; top: 8px; font: 600 12px var(--f-ui); background: rgba(10,10,12,.78); color: #fff; padding: 2px 8px; border-radius: 5px; }
.frame-img .st { position: absolute; right: 8px; top: 8px; }
.frame-bd { padding: 10px 12px 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.frame-bd .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.frame-bd textarea { width: 100%; border: 1px solid transparent; background: transparent; color: var(--text-2); font: inherit; resize: none; padding: 4px; border-radius: 6px; min-height: 48px; }
.frame-bd textarea:hover { border-color: var(--line); }
.frame-bd textarea:focus { outline: none; border-color: var(--accent-line); background: var(--bg-3); }
.scene-pick { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 220px); overflow: auto; padding: 6px; }
.scene-pick button { display: flex; align-items: center; gap: 9px; text-align: left; border: 0; background: none; padding: 7px 9px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-size: 12.5px; min-width: 0; }
.scene-pick button:hover { background: var(--glass-2); }
.scene-pick button.on { background: var(--accent-bg); color: var(--text); }
.scene-pick button span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.scene-pick button small { color: var(--dim); }
.ie-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.25); display: inline-block; }
.ie-dot.int-day { background: #ecebe4; } .ie-dot.ext-day { background: #f0d460; } .ie-dot.int-night { background: #6f8fe0; } .ie-dot.ext-night { background: #4aa577; } .ie-dot.int-dawn, .ie-dot.ext-dawn { background: #f2a9c0; } .ie-dot.int-dusk, .ie-dot.ext-dusk { background: #f0a560; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(218px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--glass); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); }
.kcol-hd { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--line); font: 500 13px var(--f-ui); }
.kcol-hd .cnt { color: var(--muted); font-size: 12px; background: var(--glass-2); padding: 1px 7px; border-radius: 20px; }
.kcol-hd button { margin-left: auto; }
.kcol-bd { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 80px; flex: 1; }
.kcol-bd.over { background: var(--accent-bg); }
.kcard { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: grab; transition: border-color .15s, box-shadow .15s; font-size: 13px; position: relative; }
.kcard:hover { border-color: var(--line-3); box-shadow: 0 6px 20px -10px rgba(0,0,0,.5); }
.kcard.dragging { opacity: .4; }
.kcard.overdue { box-shadow: inset 3px 0 0 var(--bad); }
.kcard h4 { font: 500 13px/1.35 var(--f-ui); margin-bottom: 7px; overflow-wrap: anywhere; }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.kcard .meta .ic { width: 12px; height: 12px; }
.kcard .meta span { display: inline-flex; align-items: center; gap: 4px; }
.kcard .bar { margin-top: 8px; height: 4px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 10px var(--f-ui); color: #fff; background: linear-gradient(135deg, #7c3bd6, #c84fb4); flex: none; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.checklist li input[type="text"] { flex: 1; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; padding: 5px 6px; border-radius: 6px; }
.checklist li input[type="text"]:focus { background: var(--bg-3); outline: none; border-color: var(--accent-line); }
.checklist li.done input[type="text"] { text-decoration: line-through; color: var(--dim); }

/* ---------- budget ---------- */
.topsheet { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.topsheet th { text-align: left; font: 500 11px var(--f-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.topsheet th.r, .topsheet td.r { text-align: right; }
.topsheet td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.topsheet tr.sec td { font: 600 11.5px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); background: var(--glass); padding-top: 13px; }
.topsheet tr.sub td { font-weight: 600; font-family: var(--f-ui); background: var(--glass-2); }
.topsheet tr.grand td { font: 600 16px var(--f-ui); border-top: 2px solid var(--line-3); padding: 14px 12px; }
.topsheet tr.acc { cursor: pointer; }
.topsheet tr.acc:hover td { background: var(--glass-2); }
.topsheet .neg { color: var(--bad); } .topsheet .pos { color: var(--ok); }
.acct-list { display: flex; flex-direction: column; padding: 6px; max-height: calc(100vh - 250px); overflow: auto; }
.acct-list .sec { font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 10px 8px 4px; }
.acct-list button { display: flex; gap: 8px; align-items: center; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 12.5px; }
.acct-list button:hover { background: var(--glass-2); }
.acct-list button.on { background: var(--accent-bg); color: var(--text); }
.acct-list button .c { font-family: var(--f-mono); font-size: 11.5px; color: var(--dim); width: 36px; flex: none; }
.acct-list button .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-list button .v { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; flex: 1; min-width: 0; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: 180px minmax(0,1fr) 120px; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar .trk { height: 10px; background: var(--glass-3); border-radius: 5px; position: relative; overflow: hidden; }
.hbar .trk i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.hbar .trk i.est { background: rgba(155,61,245,.35); } .hbar .trk i.act { background: var(--grad); height: 4px; top: 3px; }
.hbar .trk i.act.over { background: var(--bad); }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- paper (print preview) ---------- */
.paper-wrap { background: #2c2c33; border-radius: 14px; padding: 28px; overflow: auto; }
html[data-theme="light"] .paper-wrap { background: #d9d6e0; }
.paper { background: #fff; color: #111; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 12mm; box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); }
.paper.landscape { width: 297mm; min-height: 210mm; }

/* ---------- misc ---------- */
.kbd-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 26px; }
.kbd-grid div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kbd-grid div span:last-child { display: flex; gap: 4px; }
.kbd-grid h4 { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-top: 14px; font-weight: 500; }
.notif { position: fixed; z-index: 120; top: 50px; right: 70px; width: 390px; max-width: calc(100vw - 20px); max-height: 72vh; overflow: auto; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); animation: pop .16s ease; }
.notif-hd { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font: 500 13.5px var(--f-ui); position: sticky; top: 0; background: var(--bg-3); }
.notif .alert-list { padding: 4px 8px 8px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 8px 16px; font-size: 13px; border-bottom: 1px solid rgba(232,163,61,.3); background: linear-gradient(90deg, rgba(232,163,61,.13), rgba(232,163,61,.03)); color: var(--text); flex: none; flex-wrap: wrap; }
.banner > .ic { color: var(--warn); }
.banner.accent { border-bottom-color: var(--accent-line); background: linear-gradient(90deg, rgba(155,61,245,.16), rgba(200,79,180,.04)); }
.banner.accent > .ic { color: var(--accent); }
.banner.bad { border-bottom-color: rgba(239,91,98,.4); background: linear-gradient(90deg, rgba(239,91,98,.16), rgba(239,91,98,.03)); }
.banner.bad > .ic { color: var(--bad); }
.banner .acts { margin-left: auto; display: flex; gap: 6px; }
.tour-spot { position: fixed; z-index: 270; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(5,5,8,.68), 0 0 0 2px var(--violet); transition: all .3s cubic-bezier(.2,.9,.3,1); pointer-events: none; }
.tour-card { position: fixed; z-index: 271; width: 340px; max-width: calc(100vw - 20px); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); animation: pop .2s ease; }
.tour-card h3 { font-size: 15px; margin: 6px 0; }
.tour-card p { margin: 0 0 14px; color: var(--text-2); font-size: 13px; }
.tour-card .row { justify-content: space-between; }
.big-callout { display: flex; gap: 14px; padding: 16px; border-radius: 12px; background: linear-gradient(120deg, rgba(155,61,245,.16), rgba(234,106,90,.09)); border: 1px solid var(--accent-line); margin-bottom: 14px; }
.big-callout > .ic { width: 26px; height: 26px; color: var(--accent); flex: none; }
.big-callout b { font: 600 15px var(--f-ui); display: block; margin-bottom: 2px; }
.big-callout p { margin: 0; color: var(--text-2); font-size: 13px; }
.first-run ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.first-run ul li { margin: 5px 0; }
.snap-list { list-style: none; padding: 0; margin: 0; }
.snap-list li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.snap-list li .t { flex: 1; min-width: 160px; }
.snap-list li .t b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snap-list li .t small { color: var(--muted); }
.drop-zone { border: 1.5px dashed var(--line-3); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; cursor: pointer; display: block; width: 100%; background: none; }
.drop-zone.over, .drop-zone:hover { border-color: var(--violet); background: var(--accent-bg); color: var(--text); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos figure { margin: 0; position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figure button { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.65); color: #fff; }
.dood-wrap { overflow: auto; max-height: calc(100vh - 260px); border: 1px solid var(--line); border-radius: 12px; }
.dood { border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 100%; }
.dood th, .dood td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px 8px; text-align: center; white-space: nowrap; }
.dood th { font: 500 11px var(--f-ui); color: var(--muted); background: var(--bg-2); position: sticky; top: 0; z-index: 2; }
.dood td.l, .dood th.l { text-align: left; position: sticky; left: 0; background: var(--bg-2); z-index: 1; }
.dood th.l { z-index: 3; }
.dood td.c-SW, .dood td.c-SWF { background: rgba(63,182,139,.18); color: #6fe0b5; font-weight: 600; }
.dood td.c-W { background: rgba(155,61,245,.16); color: var(--accent); font-weight: 600; }
.dood td.c-WF { background: rgba(234,106,90,.18); color: #ff9a8c; font-weight: 600; }
.dood td.c-H { background: rgba(232,163,61,.12); color: #f2b85e; }
.mini-stat { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.mini-stat b { color: var(--text); font-family: var(--f-ui); font-weight: 500; margin-left: 4px; }
.footer-note { text-align: center; color: var(--dim); font-size: 12px; padding: 26px 0 0; }
.footer-note a { color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); cursor: pointer; font-size: 13px; }
.check-card:hover { border-color: var(--line-2); }
.check-card.on { border-color: rgba(63,182,139,.4); background: rgba(63,182,139,.07); }
.check-card input { margin-top: 2px; }
.check-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.mobile-only { display: none !important; }
#print-root { display: none; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 500; background: var(--bg); transition: opacity .3s; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); font: 400 13px var(--f-ui); }
.boot-bar { width: 140px; height: 2px; border-radius: 2px; background: var(--glass-3); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--grad); animation: boot 1s ease-in-out infinite; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
noscript .nojs { position: fixed; inset: 0; display: grid; place-items: center; background: #0a0a0c; color: #eee; z-index: 999; padding: 30px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split { grid-template-columns: minmax(0,1fr) 360px; }
  .strip-wrap { grid-template-columns: minmax(0,1fr) 290px; }
}
@media (max-width: 1060px) {
  .g-main, .split, .strip-wrap, .split--3 { grid-template-columns: minmax(0,1fr); }
  .bd-panel, .boneyard { position: static; }
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cmdk-btn { min-width: 0; } .cmdk-btn span, .cmdk-btn kbd { display: none; }
  .phases { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .scene-pick { max-height: 240px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 180; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .app.sb-open .sidebar { transform: none; }
  .app.sb-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 170; }
  .app.sb-collapsed .sb-name, .app.sb-collapsed .sb-proj .t, .app.sb-collapsed .sb-link span, .app.sb-collapsed .sb-backup, .app.sb-collapsed .sb-legal, .app.sb-collapsed .sb-logo img { display: revert; }
  .app.sb-collapsed .sb-grp { display: block; height: auto; padding: 14px 10px 6px; }
  .app.sb-collapsed .sb-link { justify-content: flex-start; padding: 7px 10px; }
  .app.sb-collapsed .sb-proj { justify-content: flex-start; padding: 9px 10px; }
  .mobile-only { display: inline-grid !important; }
  .desk-only { display: none !important; }
  .page { padding: 16px 14px 70px; }
  .page-hd h1 { font-size: 20px; }
  .page-hd .acts { margin-left: 0; width: 100%; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0,1fr); }
  .kpis.g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .crumbs .hide-sm { display: none; }
  .save-ind span { display: none; }
  .save-ind { padding: 6px 7px; }
  .phases { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bd-cats { grid-template-columns: minmax(0,1fr); }
  .strip { grid-template-columns: 16px 38px 44px minmax(70px,1fr) 46px 40px 24px; }
  .strip .cast, .strip .tm { display: none; }
  .gantt-in { grid-template-columns: 140px minmax(0,1fr); }
  .kbd-grid { grid-template-columns: minmax(0,1fr); }
  .hbar { grid-template-columns: 100px minmax(0,1fr) 90px; }
  .paper-wrap { padding: 10px; }
  .hero { padding: 18px; } .hero h1 { font-size: 22px; }
  .notif { right: 10px; }
  .dt-scroll { max-height: calc(100dvh - 210px); }
  .search-in .input { min-width: 130px; }
  .topbar .hide-sm { display: none; }
  .split--3 .panel:first-child { max-height: 300px; overflow: auto; }
}
@media (max-width: 480px) {
  .kpi .v { font-size: 21px; }
  .proj-grid { grid-template-columns: minmax(0,1fr); }
  .topbar { gap: 4px; padding: 0 8px; }
  .modal-wrap { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
/* location cards */
.lcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lcard .cover { aspect-ratio: 16/9; background: var(--bg-3); position: relative; overflow: hidden; }
.lcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lcard .cover .ph-loc { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); background: linear-gradient(135deg, rgba(155,61,245,.10), rgba(234,106,90,.06)); }
.lcard .cover .ph-loc .ic { width: 30px; height: 30px; }
.lcard .cover .badge { position: absolute; top: 10px; left: 10px; backdrop-filter: blur(6px); background: rgba(10,10,12,.7); }
.lcard .lbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lcard h3 { font-size: 15.5px; font-weight: 500; }
.lcard .addr { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tbl td.c, .tbl th.c { text-align: center; }
.kcard .ini { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font: 600 10px/22px var(--f-ui); justify-content: center; border: 1px solid var(--accent-line); }
.kquick { margin-top: 2px; background: transparent; border-style: dashed; }
.kquick:focus { background: var(--bg-3); border-style: solid; }
td .overdue, .overdue { color: var(--bad); }
.stepper { display: flex; gap: 0; align-items: flex-start; }
.stepper .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; min-width: 0; }
.stepper .st::before { content: ''; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line-2); z-index: 0; }
.stepper .st:first-child::before { display: none; }
.stepper .st.done::before, .stepper .st.cur::before { background: var(--grad); }
.stepper .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--f-ui); background: var(--bg-3); border: 1px solid var(--line-2); color: var(--muted); position: relative; z-index: 1; }
.stepper .n .ic { width: 14px; height: 14px; }
.stepper .done .n { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
.stepper .cur .n { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px var(--accent-bg); }
.stepper b { font: 500 11.5px var(--f-ui); color: var(--muted); }
.stepper .cur b { color: var(--text); }
/* search results */
.sr-grp { font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 12px 16px 6px; border-top: 1px solid var(--line); }
.sr-grp:first-child { border-top: 0; }
.sr { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--text); text-align: left; padding: 9px 16px; cursor: pointer; font: inherit; }
.sr:hover, .sr:focus-visible { background: var(--glass-2); outline: none; }
.sr > .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sr > .ic:last-child { margin-left: auto; color: var(--dim); }
.sr .t { min-width: 0; flex: 1; }
.sr .t b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr .t small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: rgba(155,61,245,.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.dense .tbl td { height: 31px; font-size: 12.5px; padding: 0 8px; }
.cs-times td { padding: 6px 4px !important; }
.cs-times input[type="time"] { padding: 0 4px; font-size: 12px; min-width: 0; width: 100%; }
.cs-times input[type="time"]::-webkit-calendar-picker-indicator { display: none; }

.banner .bt-short { display: none; }
@media (max-width: 640px) {
  .banner { padding: 6px 12px; gap: 8px; font-size: 12px; flex-wrap: nowrap; }
  .banner .bt-long { display: none; }
  .banner .bt-short { display: inline; flex: 1; min-width: 0; }
  .banner .acts .btn--ghost { display: none; }
}
