/* =========================================================
   Espace staff — DA alignée sur jay-dc.com
   Noir / blanc, Geist + Geist Mono, bordures fines, coins 2px
   ========================================================= */

:root,
[data-theme="dark"] {
  --deep: #050505;
  --panel: #0a0a0a;
  --panel-2: #0f0f0f;
  --ink: #f2f5f2;
  --muted: #a7b0aa;
  --muted-2: #717a74;
  --accent: #ffffff;
  --accent-ink: #050505;
  --accent-soft: #ffffff1a;
  --line: #ffffff1f;
  --line-strong: #ffffff3d;
  --hover: #ffffff0b;
  --ok: #d8f5df;
  --warn: #f5e6c8;
  --bad: #f5c8c8;
  --shadow: 0 14px 42px #00000055;
}

[data-theme="light"] {
  --deep: #f3f3f1;
  --panel: #ffffff;
  --panel-2: #f8f8f6;
  --ink: #0a0a0a;
  --muted: #555b57;
  --muted-2: #8a908c;
  --accent: #0a0a0a;
  --accent-ink: #ffffff;
  --accent-soft: #0000000f;
  --line: #00000017;
  --line-strong: #00000038;
  --hover: #00000008;
  --ok: #1f6b35;
  --warn: #7a5a12;
  --bad: #8f2424;
  --shadow: 0 14px 42px #00000014;
}

[data-text="small"] { font-size: 13px; }
[data-text="normal"] { font-size: 14px; }
[data-text="large"] { font-size: 16px; }
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after {
  transition: none !important;
  animation: none !important;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: "Geist", Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 14px 14px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.brand { display: block; padding: 0 4px 4px; border-bottom: 1px solid var(--line); }
/* Logo blanc sur fond noir : "screen" rend le noir transparent en thème sombre,
   inversion + "multiply" le rend noir sur fond clair en thème clair. */
.logo {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1.5; object-fit: cover; object-position: 50% 52%;
  mix-blend-mode: screen;
}
[data-theme="light"] .logo { filter: invert(1); mix-blend-mode: multiply; }
.logo-lock { width: min(320px, 80vw); margin-bottom: 8px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line-strong); border-radius: 2px;
  font: 700 11px/1 "Geist Mono", monospace; letter-spacing: .04em;
}
.brand-copy { display: grid; gap: 3px; padding-left: 12px; border-left: 1px solid var(--line-strong); }
.brand-copy strong { font-size: 10.5px; letter-spacing: .12em; white-space: nowrap; }
.brand-copy small { font-size: 8px; letter-spacing: .35em; color: var(--muted); }

.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 14px; height: 14px; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 32px;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
  font-size: 12px; outline: none; transition: border-color .2s;
}
.search input:focus { border-color: var(--line-strong); }
.search input::placeholder { color: var(--muted-2); }
.search-results {
  position: absolute; z-index: 50; top: 44px; left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 2px;
  box-shadow: var(--shadow); max-height: 340px; overflow-y: auto; padding: 6px;
}
.search-results a { display: grid; gap: 2px; padding: 8px 10px; border-radius: 2px; }
.search-results a:hover, .search-results a.active { background: var(--hover); }
.search-results small { font: 500 9px/1 "Geist Mono", monospace; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.search-results .empty { padding: 10px; font-size: 12px; color: var(--muted); }

.nav { display: grid; gap: 2px; }
.nav-label {
  padding: 14px 10px 6px;
  font: 550 9px/1 "Geist Mono", monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2);
}
.nav a, .nav button {
  display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 2px;
  background: none; cursor: pointer; text-align: left;
  font-size: 12.5px; color: var(--muted); transition: color .2s, background .2s, border-color .2s;
}
.nav a:hover, .nav button:hover { color: var(--ink); background: var(--hover); }
.nav a.active { color: var(--ink); background: var(--accent-soft); border-color: var(--line); }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border-radius: 2px;
  font: 700 9.5px/1 "Geist Mono", monospace;
}
.nav-live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.nav-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 2px; }
.me-card b { display: block; font-size: 12px; font-weight: 600; }
.me-card small { font: 500 9px/1.3 "Geist Mono", monospace; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }

.menu-toggle { display: none; }

.main { min-width: 0; padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 56px) 64px; outline: none; }

/* ---------- Typo ---------- */
.section-index, .terminal-label, .eyebrow {
  display: block;
  font: 560 9px/1.3 "Geist Mono", monospace; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.terminal-label { color: var(--ink); letter-spacing: .12em; border-bottom: 1px solid var(--line-strong); padding-bottom: 10px; margin-bottom: 18px; }
h1, h2, h3 { margin: 0; font-weight: 540; letter-spacing: -.045em; line-height: .98; }
h1 { font-size: clamp(34px, 4vw, 54px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: 20px; letter-spacing: -.03em; line-height: 1.1; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 26px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
  position: relative;
}
.page-head .section-index { margin-bottom: 18px; }
.page-head p { margin: 12px 0 0; max-width: 520px; color: var(--muted); font-size: 13.5px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons & inputs ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 2px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em; cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.button svg { width: 14px; height: 14px; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { box-shadow: 3px 3px 0 var(--line-strong); transform: translate(-1px, -1px); }
.button-ghost { background: var(--hover); border-color: var(--line-strong); color: var(--ink); }
.button-ghost:hover { border-color: var(--muted-2); }
.button-danger { background: transparent; border-color: var(--line-strong); color: var(--bad); }
.button-danger:hover { border-color: var(--bad); }
.button-sm { min-height: 32px; padding: 0 12px; font-size: 11px; }
.button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: 2px; color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line); background: var(--hover); }

.field { display: grid; gap: 7px; }
.field > span {
  font: 550 9px/1 "Geist Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.input, .field input:not([type="checkbox"]):not([type="range"]):not([type="color"]):not([type="file"]), .field select, .field textarea, select.input {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--deep); border: 1px solid var(--line); border-radius: 2px;
  font-size: 13px; outline: none; transition: border-color .2s;
}
.field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--line-strong); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px !important; }
select option { background: var(--panel); color: var(--ink); }
.field small { color: var(--muted-2); font-size: 11.5px; }
.field .error { color: var(--bad); font-size: 11.5px; }

input[type="range"] { width: 100%; accent-color: var(--accent); }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 210px; overflow-y: auto; padding: 2px; }
.check {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 2px; cursor: pointer; font-size: 12.5px;
  transition: border-color .2s, background .2s;
}
.check:hover { border-color: var(--line-strong); }
.check input { accent-color: var(--accent); margin: 0; }
.check.conflict { border-style: dashed; }
.check em { margin-left: auto; font: normal 500 9px/1 "Geist Mono", monospace; letter-spacing: .08em; color: var(--warn); text-transform: uppercase; }

.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 2px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--muted); border-radius: 1px; transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--accent-ink); }

.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 2px; padding: 2px; gap: 2px; }
.segmented button { border: 0; background: none; padding: 7px 12px; border-radius: 1px; cursor: pointer; font: 600 10px/1 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.segmented button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- Generic panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; }
.panel-pad { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line-strong); border-radius: 2px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 2px;
  font: 550 9px/1 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.tag.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); border-style: dashed; }
.tag.bad { color: var(--bad); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  font: 650 10px/1 "Geist Mono", monospace; letter-spacing: .02em; color: var(--ink);
  background-size: cover; background-position: center; position: relative;
}
.avatar.lg { width: 64px; height: 64px; font-size: 18px; }
.avatar.xl { width: 88px; height: 88px; font-size: 24px; }
.avatar .presence { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--panel); background: var(--muted-2); }
.avatar .presence.online { background: var(--ink); }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--deep); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .more { background: var(--accent); color: var(--accent-ink); }

.progress { height: 3px; background: var(--line); border-radius: 0; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .4s; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 34px; }
.stat { padding: 16px 18px 18px; display: grid; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; }
.stat-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.stat-top svg { width: 14px; height: 14px; }
.stat-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.stat-value { font-size: 30px; font-weight: 560; letter-spacing: -.04em; line-height: 1; }
.stat-delta { font: 550 10px/1 "Geist Mono", monospace; letter-spacing: .06em; color: var(--muted); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.column > * { min-width: 0; }
.column { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; min-height: 200px; min-width: 0; padding: 4px; border: 1px dashed transparent; border-radius: 2px; transition: border-color .2s, background .2s; }
.column.drag-over { border-color: var(--line-strong); background: var(--hover); }
.column-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 6px; }
.column-head b { font-size: 12.5px; font-weight: 650; }
.count { min-width: 20px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 2px; font: 650 9.5px/1 "Geist Mono", monospace; color: var(--muted); }
.column-head .icon-btn { margin-left: auto; }

.card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px 16px; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  cursor: grab; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); }
.card.dragging { opacity: .4; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 640; letter-spacing: -.01em; }
.card p { margin: 0; font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .goal { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.card .goal b { font: 600 11px/1 "Geist Mono", monospace; color: var(--ink); }
.meta { display: grid; gap: 6px; font-size: 12px; }
.meta div { display: flex; gap: 8px; }
.meta span { color: var(--muted-2); min-width: 54px; }

/* ---------- Tables / lists ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 220px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 12px 16px; font: 550 9px/1 "Geist Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--hover); }
td .sub { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 2px; }

.shoot { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 20px; padding: 18px; border-bottom: 1px solid var(--line); align-items: start; }
.shoot:last-child { border-bottom: 0; }
.shoot-date { display: grid; gap: 4px; padding-right: 18px; border-right: 1px solid var(--line); }
.shoot-date b { font-size: 30px; font-weight: 540; letter-spacing: -.04em; line-height: 1; }
.shoot-date small { font: 550 9px/1.2 "Geist Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.shoot h4 { margin: 0 0 6px; font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.shoot .line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.shoot.past { opacity: .55; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { padding: 10px; font: 550 9px/1 "Geist Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 4px; cursor: pointer; transition: background .15s; }
.cal-day:hover { background: var(--hover); }
.cal-day.out { opacity: .35; }
.cal-day .n { font: 600 11px/1 "Geist Mono", monospace; color: var(--muted); margin-bottom: 4px; }
.cal-day.today .n { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--accent); color: var(--accent-ink); border-radius: 2px; }
.ev { display: block; padding: 3px 6px; font-size: 11px; border-radius: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2px solid var(--ink); background: var(--accent-soft); }
.ev.meet { border-left-style: dotted; }
.ev.deadline { border-left-color: var(--muted-2); color: var(--muted); }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border-left: 2px solid var(--ink); background: var(--accent-soft); }
.legend i.meet { border-left-style: dotted; }
.legend i.deadline { border-left-color: var(--muted-2); }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 230px minmax(0, 1fr); height: calc(100vh - 210px); min-height: 460px; }
.channels { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; align-content: start; gap: 2px; overflow-y: auto; }
.channels .nav-label { padding-top: 6px; }
.channel { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 2px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); font-size: 13px; text-align: left; width: 100%; }
.channel:hover { color: var(--ink); background: var(--hover); }
.channel.active { color: var(--ink); background: var(--accent-soft); border-color: var(--line); }
.channel .hash { font-family: "Geist Mono", monospace; color: var(--muted-2); }
.channel .nav-badge { margin-left: auto; }
.chat-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; }
.chat-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-head h3 { font-size: 16px; }
.messages { overflow-y: auto; padding: 18px 20px; display: grid; align-content: start; gap: 2px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 8px 10px; border-radius: 2px; }
.msg:hover { background: var(--hover); }
.msg.cont { padding-top: 1px; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.msg-head b { font-size: 13px; font-weight: 640; }
.msg-head time { font: 500 9.5px/1 "Geist Mono", monospace; color: var(--muted-2); letter-spacing: .06em; }
.msg-body { font-size: 13.5px; white-space: pre-wrap; word-wrap: break-word; color: var(--ink); }
.msg-body .mention { background: var(--accent-soft); border: 1px solid var(--line); padding: 0 3px; border-radius: 2px; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; font: 550 9px/1 "Geist Mono", monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.composer { padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.composer form { display: flex; gap: 10px; align-items: flex-end; border: 1px solid var(--line-strong); border-radius: 2px; padding: 6px 6px 6px 14px; background: var(--deep); }
.composer textarea { flex: 1; border: 0; background: none; outline: none; resize: none; min-height: 24px; max-height: 140px; padding: 8px 0; font-size: 13.5px; }
.composer .hint { margin-top: 8px; font: 500 9px/1 "Geist Mono", monospace; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }

/* ---------- Voice ---------- */
.voice-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.room { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.room:last-child { border-bottom: 0; }
.room-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 2px; }
.room-info { flex: 1; min-width: 0; }
.room-info b { display: block; font-size: 13.5px; font-weight: 620; }
.room-info small { color: var(--muted-2); font-size: 11.5px; }
.room.live { background: var(--accent-soft); }

.stage { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 16px; }
.tile { position: relative; aspect-ratio: 16 / 10; background: var(--deep); border: 1px solid var(--line); border-radius: 2px; display: grid; place-items: center; overflow: hidden; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile video.mirror { transform: scaleX(-1); }
.tile .avatar { width: 64px; height: 64px; font-size: 18px; transition: box-shadow .08s; }
.tile .name { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #000000a8; color: #fff; border-radius: 2px; font: 550 10px/1 "Geist Mono", monospace; letter-spacing: .06em; z-index: 2; }
.tile.speaking { border-color: var(--accent); }
.controls { display: flex; justify-content: center; gap: 10px; padding: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ctrl { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 2px; background: none; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .2s, color .2s; }
.ctrl:hover { background: var(--hover); }
.ctrl.off { color: var(--bad); border-style: dashed; }
.ctrl.leave { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.meter { height: 6px; background: var(--line); border-radius: 0; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .06s linear; }

.meeting { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.meeting:last-child { border-bottom: 0; }
.meeting .when { text-align: center; border: 1px solid var(--line); border-radius: 2px; padding: 6px 0; }
.meeting .when b { display: block; font-size: 18px; font-weight: 560; letter-spacing: -.03em; line-height: 1.1; }
.meeting .when small { font: 550 8.5px/1 "Geist Mono", monospace; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.meeting h4 { margin: 0 0 3px; font-size: 13.5px; font-weight: 620; }
.meeting p { margin: 0; color: var(--muted-2); font-size: 11.5px; }

/* ---------- Team / Account / Settings ---------- */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.member { padding: 18px; display: grid; gap: 14px; }
.member-top { display: flex; align-items: center; gap: 14px; }
.member-top b { display: block; font-size: 14.5px; font-weight: 620; }
.member-top small { color: var(--muted); font-size: 12px; }
.member .meta span { min-width: 64px; }

.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: 24px; display: grid; gap: 2px; }
.settings-nav a { padding: 9px 12px; border-radius: 2px; color: var(--muted); font-size: 12.5px; border: 1px solid transparent; }
.settings-nav a:hover { color: var(--ink); background: var(--hover); }
.settings-nav a.active { color: var(--ink); background: var(--accent-soft); border-color: var(--line); }
.setting-group { margin-bottom: 18px; scroll-margin-top: 24px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting > div:first-child { min-width: 0; }
.setting b { display: block; font-size: 13.5px; font-weight: 600; }
.setting small { display: block; color: var(--muted-2); font-size: 12px; margin-top: 3px; max-width: 520px; }
.setting .control { flex: none; width: min(320px, 50%); display: grid; gap: 8px; justify-items: end; }
.setting .control.wide { justify-items: stretch; }
.range-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.range-row output { font: 600 11px/1 "Geist Mono", monospace; min-width: 38px; text-align: right; color: var(--muted); }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 2px; font: 600 11px/1 "Geist Mono", monospace; }

.profile-hero { display: flex; align-items: center; gap: 22px; padding: 22px; }
.profile-hero h2 { font-size: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: #000000b3; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .18s; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 2px; box-shadow: var(--shadow); animation: rise .22s; }
.modal-head { position: relative; padding: 22px 22px 0; }
.modal-head .terminal-label { margin-bottom: 14px; }
.modal-head .icon-btn { position: absolute; top: 14px; right: 14px; }
.modal form { display: grid; gap: 16px; padding: 20px 22px 22px; }
.modal .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modal .actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; }
.modal .actions .right { display: flex; gap: 10px; margin-left: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Lock / toasts ---------- */
.lock { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--deep); }
.lock-box { display: grid; gap: 16px; justify-items: start; width: min(420px, 90vw); padding-top: 26px; border-top: 1px solid var(--line-strong); }
.lock-box h2 { font-size: 54px; }
.lock { overflow-y: auto; padding: 40px 0; place-items: safe center; }
.auth-form { display: grid; gap: 14px; width: 100%; }
.auth-form .button { justify-self: start; }
.auth-error { margin: 0; padding: 10px 12px; border: 1px dashed var(--bad); border-radius: 2px; color: var(--bad); font-size: 12.5px; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.toasts { position: fixed; z-index: 400; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 2px; box-shadow: var(--shadow); font-size: 12.5px; animation: rise .22s; }
.toast::before { content: "●"; font-size: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 150; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .3s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-toggle { display: grid; gap: 5px; place-content: center; position: fixed; z-index: 160; top: 14px; right: 14px; width: 42px; height: 42px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 2px; cursor: pointer; }
  .menu-toggle span { display: block; width: 16px; height: 1px; background: var(--ink); }
  .main { padding-top: 70px; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .channels { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .channels .nav-label { display: none; }
  .channel { width: auto; flex: none; }
  .messages { height: 55vh; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .setting { flex-direction: column; align-items: stretch; }
  .setting .control { width: 100%; justify-items: start; }
  .shoot { grid-template-columns: 70px minmax(0, 1fr); }
  .shoot > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .modal .two { grid-template-columns: 1fr; }
  .cal-day { min-height: 70px; padding: 4px; }
  .ev { font-size: 0; height: 5px; padding: 0; }
}
