/* ============================================================
   Bose SE — Console
   Graphite console for the Red Team. Monochrome discipline,
   one signature: the wordmark-derived audio pulse.
   ============================================================ */

:root {
  /* ── Ink & graphite surfaces ── */
  --ink:            #000000;
  --graphite-950:   #08090a;
  --graphite-900:   #0f1113;
  --graphite-850:   #141619;
  --graphite-800:   #191c20;
  --graphite-700:   #212429;
  --graphite-600:   #2c3036;
  --graphite-500:   #3a3f46;

  /* ── Silver & white ── */
  --white:          #ffffff;
  --silver-050:     #f4f6f8;
  --silver-200:     #d7dbe0;
  --silver-300:     #c6cbd2;
  --silver-500:     #8a9099;
  --silver-600:     #6a7078;
  --silver-700:     #4c5158;

  /* ── Hairlines ── */
  --line:           rgba(255,255,255,.08);
  --line-2:         rgba(255,255,255,.14);
  --line-3:         rgba(255,255,255,.22);

  /* ── Restrained semantics ── */
  --ok:             #63d2a4;
  --ok-dim:         rgba(99,210,164,.16);
  --bad:            #f06a6a;
  --bad-dim:        rgba(240,106,106,.16);
  --warn:           #e2b355;
  --warn-dim:       rgba(226,179,85,.16);

  /* ── Type ── */
  --font-display: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Radii ── */
  --r-sm: 9px;
  --r:    13px;
  --r-lg: 20px;
  --pill: 999px;

  /* ── Motion ── */
  --ease-expo: cubic-bezier(.16,1,.3,1);
  --ease-out:  cubic-bezier(.22,.61,.36,1);

  /* ── Shadows ── */
  --shadow-lift: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -18px rgba(0,0,0,.8);
  --shadow-pop:  0 40px 90px -30px rgba(0,0,0,.85);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--silver-200);
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(255,255,255,.05), transparent 60%),
    radial-gradient(900px 700px at -6% 110%, rgba(255,255,255,.035), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--silver-050); text-decoration: none; }
a:hover { color: var(--white); }

::selection { background: rgba(255,255,255,.18); color: #fff; }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Scrollbar ── */
* { scrollbar-width: thin; scrollbar-color: var(--graphite-600) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--graphite-600); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 { font-family: var(--font-display); color: var(--white); letter-spacing: -.02em; margin: 0; font-weight: 600; }
h1 { font-size: clamp(1.55rem, 1.1rem + 1.8vw, 2.15rem); line-height: 1.05; }
h2 { font-size: 1.02rem; letter-spacing: -.01em; }
h3 { font-size: .92rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .28em;
  color: var(--silver-600); font-weight: 500;
}
.muted { color: var(--silver-500); }
.mono  { font-family: var(--font-mono); }

/* ============================================================
   Layout
   ============================================================ */
header.app {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2.1rem);
  background: rgba(8,9,10,.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brandmark { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.brandmark .wordmark { height: 20px; width: auto; color: var(--white); display: block; }
.brandmark .tag {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--silver-600); padding-left: .8rem; border-left: 1px solid var(--line-2); white-space: nowrap;
}
@media (max-width: 560px) { .brandmark .tag { display: none; } }
header .cluster { display: flex; align-items: center; gap: .55rem; }
header .user {
  color: var(--silver-500); font-size: .8rem; font-family: var(--font-mono);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 720px) { header .user { display: none; } }

main {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(1.1rem, 3vw, 2.4rem) clamp(1rem, 4vw, 2.1rem) 5rem;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head .titles { min-width: 0; }
.page-head .eyebrow { margin-bottom: .5rem; display: block; }

/* ── Cards ── */
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 42%),
    var(--graphite-850);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.3rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-lift);
}
.card > h2 { margin-bottom: 1rem; }
.card .sub { color: var(--silver-500); font-size: .85rem; margin: -.5rem 0 1rem; }

.section-label {
  display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem;
}
.section-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .split-2 { grid-template-columns: 1fr; } }

hr.sep { border: none; border-top: 1px solid var(--line); margin: 1.3rem 0; }

/* ============================================================
   Controls
   ============================================================ */
button, .btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .58rem 1rem; min-height: 40px;
  color: var(--silver-100, var(--silver-050));
  background: var(--graphite-700);
  border: 1px solid var(--line-2);
  border-radius: var(--pill);
  white-space: nowrap;
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out), transform .18s var(--ease-out);
}
button:hover, .btn:hover { background: var(--graphite-600); border-color: var(--line-3); color: var(--white); }
button:active, .btn:active { transform: translateY(1px); }

button.primary, .btn.primary {
  background: var(--white); color: #000; border-color: var(--white); font-weight: 600;
}
button.primary:hover, .btn.primary:hover { background: var(--silver-200); border-color: var(--silver-200); color: #000; }

button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--silver-300); }
button.ghost:hover, .btn.ghost:hover { background: var(--graphite-700); color: var(--white); }

button.danger, .btn.danger { color: var(--bad); border-color: rgba(240,106,106,.35); background: transparent; }
button.danger:hover, .btn.danger:hover { background: var(--bad-dim); border-color: var(--bad); color: var(--bad); }

button:disabled, .btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── Appeler Bose (tel:) ── */
a.call-bose, .btn.call-bose {
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
a.call-bose .call-ico, .call-bose .call-ico {
  width: 14px; height: 14px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: callRing 2.4s var(--ease-out) infinite;
}
a.call-bose.primary { box-shadow: 0 0 0 0 rgba(255,255,255,.35); animation: callGlow 2.8s var(--ease-out) infinite; }
@keyframes callRing {
  0%, 100% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.15); opacity: .75; }
  70% { transform: scale(1); opacity: 1; }
}
@keyframes callGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.28); }
  50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

.call-card {
  position: relative; overflow: hidden;
  margin-bottom: 1.1rem;
  background: linear-gradient(135deg, var(--graphite-800) 0%, var(--graphite-900) 55%, #0a0c10 100%);
  border-color: var(--line-2);
}
.call-card-body {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; position: relative; z-index: 1;
}
.call-wave {
  position: absolute; right: -1rem; bottom: -.4rem; display: flex; align-items: flex-end;
  gap: 4px; height: 48px; opacity: .28; pointer-events: none;
}
.call-wave i {
  width: 4px; border-radius: 99px; background: var(--white);
  animation: eqHero 1.4s var(--ease-out) infinite; transform-origin: bottom;
}
.call-wave i:nth-child(1){height:30%;animation-delay:0s}
.call-wave i:nth-child(2){height:55%;animation-delay:.08s}
.call-wave i:nth-child(3){height:80%;animation-delay:.16s}
.call-wave i:nth-child(4){height:100%;animation-delay:.24s}
.call-wave i:nth-child(5){height:70%;animation-delay:.12s}
.call-wave i:nth-child(6){height:45%;animation-delay:.2s}
.call-wave i:nth-child(7){height:90%;animation-delay:.04s}
.call-wave i:nth-child(8){height:35%;animation-delay:.28s}

/* icon-only square buttons (organiser ops) */
button.icon {
  min-height: 34px; width: 34px; padding: 0; border-radius: var(--r-sm);
  font-size: .82rem; background: var(--graphite-800);
}

/* ── Inputs ── */
input, select, textarea {
  width: 100%; padding: .62rem .8rem; font: inherit;
  color: var(--silver-050);
  background: var(--graphite-900);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: border-color .16s var(--ease-out), background .16s var(--ease-out);
}
input::placeholder, textarea::placeholder { color: var(--silver-700); }
input:focus, select:focus, textarea:focus { border-color: var(--line-3); background: var(--graphite-850); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--white); outline-offset: 1px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--silver-500) 50%), linear-gradient(135deg, var(--silver-500) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input:disabled, select:disabled, textarea:disabled { background: var(--graphite-800); color: var(--silver-600); cursor: not-allowed; border-style: dashed; }

label { display: block; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--silver-500); margin: .95rem 0 .35rem; font-weight: 500; }
.field-hint { font-size: .78rem; color: var(--silver-600); margin: .35rem 0 0; }
.check { display: inline-flex; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; }
.check input { width: auto; }

/* ============================================================
   Signature — audio pulse / sound bars
   ============================================================ */
.pulse { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 18px; }
.pulse i {
  width: 2.5px; height: 40%; border-radius: 99px; background: var(--silver-500);
  transform-origin: bottom;
}
.pulse.live i { background: var(--white); animation: eq 1.15s var(--ease-out) infinite; }
.pulse i:nth-child(1) { animation-delay: 0s;    height: 35%; }
.pulse i:nth-child(2) { animation-delay: .18s;  height: 70%; }
.pulse i:nth-child(3) { animation-delay: .36s;  height: 100%; }
.pulse i:nth-child(4) { animation-delay: .12s;  height: 55%; }
.pulse i:nth-child(5) { animation-delay: .30s;  height: 80%; }
@keyframes eq {
  0%, 100% { transform: scaleY(.35); opacity: .75; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ── Badges / status ── */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .28rem .6rem; border-radius: var(--pill);
  background: var(--graphite-700); color: var(--silver-300); border: 1px solid var(--line-2);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge.ok   { color: var(--ok);   background: var(--ok-dim);   border-color: rgba(99,210,164,.3); }
.badge.bad  { color: var(--bad);  background: var(--bad-dim);  border-color: rgba(240,106,106,.3); }
.badge.warn { color: var(--warn); background: var(--warn-dim); border-color: rgba(226,179,85,.3); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

/* ============================================================
   KPI
   ============================================================ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--graphite-850); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.1rem 1.15rem; min-width: 0;
}
.kpi .k-label { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--silver-600); }
.kpi .k-val {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  color: var(--white); line-height: 1; margin-top: .55rem; letter-spacing: -.03em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kpi.accent-ok  .k-val { color: var(--ok); }
.kpi.accent-bad .k-val { color: var(--bad); }
.kpi .k-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--white), transparent); opacity: .35; }
.kpi.accent-ok  .k-bar { background: linear-gradient(90deg, var(--ok), transparent); }
.kpi.accent-bad .k-bar { background: linear-gradient(90deg, var(--bad), transparent); }

/* smaller data tiles (dossier meta) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; }
.tile { background: var(--graphite-850); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem .9rem; min-width: 0; }
.tile .k-label { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--silver-600); }
.tile .k-val { font-family: var(--font-mono); font-size: .92rem; color: var(--silver-050); margin-top: .4rem; word-break: break-word; line-height: 1.35; }

/* ============================================================
   Lists / dossier rows
   ============================================================ */
.list { display: flex; flex-direction: column; gap: .5rem; }
.item {
  display: block; width: 100%; text-align: left; margin: 0;
  padding: .95rem 1.05rem;
  background: var(--graphite-850); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--silver-200); overflow: hidden;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out), transform .18s var(--ease-out);
}
.item:hover { border-color: var(--line-3); background: var(--graphite-800); transform: translateX(4px) scale(1.005); }
.kpi, .tile, .cred, .card {
  transition: transform .28s var(--ease-expo), border-color .2s var(--ease-out), box-shadow .28s var(--ease-out);
}
.kpi:hover, .tile:hover, .cred:hover {
  transform: translateY(-3px);
  border-color: var(--line-3);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.card:hover { border-color: var(--line-2); }
button.primary, .btn.primary {
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out), transform .18s var(--ease-out), box-shadow .3s var(--ease-out);
}
button.primary:hover, .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255,255,255,.12);
}
button.primary:active, .btn.primary:active { transform: translateY(0); }
.item .title-line { display: flex; align-items: center; gap: .6rem; justify-content: space-between; }
.item strong { font-family: var(--font-display); font-weight: 500; font-size: .98rem; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.item .meta { color: var(--silver-500); font-size: .8rem; font-family: var(--font-mono); margin-top: .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta b { color: var(--silver-300); font-weight: 500; }

.empty { color: var(--silver-600); font-size: .88rem; padding: .4rem 0; }

/* ── Organiser mode ── */
.organiser-bar {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  margin-bottom: 1rem; padding: .7rem .9rem;
  background: var(--graphite-900); border: 1px dashed var(--line-2); border-radius: var(--r);
}
.organiser-bar .hint { font-size: .8rem; color: var(--silver-500); }
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--graphite-600); border: 1px solid var(--line-2); position: relative; transition: background .2s var(--ease-out); flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--silver-300); transition: transform .2s var(--ease-expo), background .2s var(--ease-out); }
.switch input:checked + .track { background: var(--white); }
.switch input:checked + .track::after { transform: translateX(18px); background: #000; }
.switch input:focus-visible + .track { outline: 2px solid var(--white); outline-offset: 2px; }
.switch .lbl { font-size: .85rem; font-weight: 600; color: var(--silver-100, var(--silver-050)); font-family: var(--font-display); }

.dossier-row { display: flex; align-items: stretch; gap: .4rem; }
.dossier-row .item { flex: 1; min-width: 0; }
.dossier-ops { display: none; flex-direction: column; gap: .25rem; flex: 0 0 auto; }
.organising .dossier-ops { display: flex; }
.organising .dossier-row .item { cursor: grab; }
.organising .dossier-row .item:hover { transform: none; }
.dossier-row.dragging { opacity: .4; }
.dossier-row.drag-over .item { border-color: var(--white); background: var(--graphite-700); }
.grip { color: var(--silver-600); font-size: .9rem; padding-right: .2rem; display: none; }
.organising .grip { display: inline; }

/* ============================================================
   Credentials
   ============================================================ */
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 640px) { .cred-grid { grid-template-columns: 1fr; } }
.cred {
  background: var(--graphite-900); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem .9rem; min-width: 0;
  position: relative;
}
.cred .k { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .16em; color: var(--silver-600); }
.cred .v { font-family: var(--font-mono); font-size: .88rem; color: var(--silver-050); word-break: break-all; margin-top: .35rem; }
.cred .copy { position: absolute; top: .55rem; right: .55rem; min-height: 26px; width: 26px; padding: 0; font-size: .7rem; opacity: 0; transition: opacity .15s; }
.cred:hover .copy, .cred:focus-within .copy { opacity: 1; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translate(-50%, 12px);
  background: var(--white); color: #000; padding: .7rem 1.15rem; border-radius: var(--pill);
  font-size: .88rem; font-weight: 600; font-family: var(--font-display);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out), transform .35s var(--ease-expo);
  z-index: 60; max-width: 90vw; box-shadow: var(--shadow-pop);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Modal
   ============================================================ */
.modal-bg {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-bg.open { display: flex; animation: fade .2s var(--ease-out); }
.modal {
  background: var(--graphite-850); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  max-width: 640px; width: 100%; max-height: 88vh; overflow: auto; padding: 1.5rem;
  box-shadow: var(--shadow-pop); animation: pop .32s var(--ease-expo);
}
.modal.wide { max-width: 820px; }
.modal h2, .modal h3 { margin-bottom: .35rem; }
.modal .modal-foot { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ============================================================
   Login — brand-first
   ============================================================ */
.login-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr;
}
@media (max-width: 860px) { .login-shell { grid-template-columns: 1fr; } }
.login-hero {
  position: relative; overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem);
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 500px at 20% 20%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, var(--graphite-900), var(--ink));
  border-right: 1px solid var(--line);
}
@media (max-width: 860px) { .login-hero { border-right: none; border-bottom: 1px solid var(--line); min-height: 42vh; } }
.login-hero .wordmark { height: clamp(34px, 6vw, 52px); width: auto; color: var(--white); }
.login-hero .hero-eq {
  display: flex; align-items: flex-end; gap: 6px; height: clamp(70px, 12vw, 130px); margin: 2.2rem 0;
}
.login-hero .hero-eq i {
  width: clamp(6px, 1.4vw, 11px); border-radius: 99px; background: linear-gradient(180deg, var(--white), var(--silver-600));
  animation: eqHero 1.6s var(--ease-out) infinite; transform-origin: bottom;
}
.login-hero .hero-eq i:nth-child(1){height:32%;animation-delay:0s}
.login-hero .hero-eq i:nth-child(2){height:64%;animation-delay:.12s}
.login-hero .hero-eq i:nth-child(3){height:90%;animation-delay:.24s}
.login-hero .hero-eq i:nth-child(4){height:52%;animation-delay:.36s}
.login-hero .hero-eq i:nth-child(5){height:100%;animation-delay:.20s}
.login-hero .hero-eq i:nth-child(6){height:44%;animation-delay:.30s}
.login-hero .hero-eq i:nth-child(7){height:74%;animation-delay:.08s}
.login-hero .hero-eq i:nth-child(8){height:28%;animation-delay:.40s}
@keyframes eqHero {
  0%,100% { transform: scaleY(.3); opacity: .5; }
  50%     { transform: scaleY(1); opacity: 1; }
}
.login-hero .lede { font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1.5vw, 1.9rem); color: var(--white); max-width: 15ch; line-height: 1.15; letter-spacing: -.02em; }
.login-hero .foot { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; color: var(--silver-600); }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: clamp(1.5rem, 5vw, 3rem); }
.login-form { width: 100%; max-width: 360px; }
.check-row {
  display: flex; align-items: center; gap: .65rem;
  margin: 1rem 0 0; cursor: pointer; user-select: none;
  text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--silver-300); font-weight: 400;
}
.check-row input[type="checkbox"] {
  width: 16px; height: 16px; margin: 0; accent-color: var(--white); cursor: pointer; flex: 0 0 auto;
}
.mode-row {
  display: flex; gap: .5rem; margin: .35rem 0 1rem; flex-wrap: wrap;
}
.mode-pill {
  display: inline-flex; align-items: center; cursor: pointer; user-select: none;
  margin: 0; text-transform: none; letter-spacing: 0; font-weight: 500;
}
.mode-pill input { position: absolute; opacity: 0; pointer-events: none; }
.mode-pill span {
  display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line);
  border-radius: 999px; font-size: .86rem; color: var(--silver-400);
  background: var(--graphite-900); transition: border-color .15s, color .15s, background .15s;
}
.mode-pill input:checked + span {
  color: var(--white); border-color: var(--silver-500); background: var(--graphite-800);
}
#seManualBlock[hidden], #seAutoBlock[hidden] { display: none !important; }
.filter-bar {
  display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.filter-bar input {
  flex: 1; min-width: 160px; margin: 0;
}

.bulk-defaults {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem;
}
@media (max-width: 800px) { .bulk-defaults { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .bulk-defaults { grid-template-columns: 1fr; } }
.bulk-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin-top: .4rem; }
.bulk-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.bulk-table th {
  text-align: left; padding: .65rem .75rem; font-family: var(--font-mono);
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--silver-600); border-bottom: 1px solid var(--line); background: var(--graphite-900);
}
.bulk-table td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bulk-table tr:last-child td { border-bottom: 0; }
.bulk-table select, .bulk-table input {
  margin: 0; width: 100%; min-width: 7rem; font-size: .82rem; padding: .4rem .5rem; min-height: 34px;
}
.bulk-table .mono { font-family: var(--font-mono); color: var(--silver-500); width: 2rem; }
.badge.bad { color: var(--bad); background: var(--bad-dim); border-color: rgba(240,106,106,.28); }
.bulk-progress { margin-bottom: 1.2rem; }

/* ============================================================
   Loading SE — full-bleed cinematic
   ============================================================ */
.load-stage {
  position: fixed; inset: 0; z-index: 5; overflow: hidden;
  display: flex; flex-direction: column;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, var(--graphite-900), var(--ink));
}
.load-orb {
  position: absolute; border-radius: 50%; pointer-events: none; filter: blur(48px);
  opacity: .35; mix-blend-mode: screen;
}
.load-orb-a {
  width: 420px; height: 420px; top: -8%; left: 50%; margin-left: -210px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%);
  animation: loadOrbA 7s var(--ease-out) infinite alternate;
}
.load-orb-b {
  width: 280px; height: 280px; bottom: 8%; right: -4%;
  background: radial-gradient(circle, rgba(99,210,164,.18), transparent 70%);
  animation: loadOrbB 9s var(--ease-out) infinite alternate;
}
@keyframes loadOrbA {
  from { transform: translate3d(0,0,0) scale(1); opacity: .28; }
  to   { transform: translate3d(40px, 30px, 0) scale(1.12); opacity: .45; }
}
@keyframes loadOrbB {
  from { transform: translate3d(0,0,0) scale(1); opacity: .2; }
  to   { transform: translate3d(-50px, -20px, 0) scale(1.2); opacity: .4; }
}
.load-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.03) 48%, transparent 52%);
  background-size: 100% 220%;
  animation: loadScan 3.6s linear infinite;
  opacity: .7;
}
@keyframes loadScan { from { background-position: 0 -40%; } to { background-position: 0 140%; } }

.load-stage .stage-inner {
  position: relative; z-index: 1;
  margin: auto; width: 100%; max-width: 560px; padding: 2rem 1.4rem;
}
.load-stage .wordmark { height: 26px; color: var(--white); display: block; margin: 0 auto 1.6rem; opacity: .9; }
.load-stage .eyebrow { text-align: center; display: block; margin-bottom: .5rem; }
.load-stage h1 { text-align: center; margin-bottom: .4rem; }
.load-stage .lede { text-align: center; color: var(--silver-500); font-size: .88rem; margin: 0 auto 1.4rem; max-width: 34ch; }

.load-meter { margin: 0 auto 1.4rem; max-width: 320px; }
.load-meter-track {
  height: 3px; border-radius: 99px; background: var(--graphite-700); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.load-meter-fill {
  height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--silver-600), var(--white));
  transition: width .55s var(--ease-expo);
  position: relative;
}
.load-meter-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 1.4s linear infinite;
}
.load-meter-meta {
  display: flex; justify-content: space-between; margin-top: .45rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--silver-500);
}

/* progress bars (audio-pulse derived) */
.load-eq { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 52px; margin-bottom: 1.2rem; }
.load-eq i {
  width: 5px; height: 18%; border-radius: 99px; background: var(--graphite-600);
  transition: background .25s var(--ease-out);
}
.load-eq i.on { background: var(--white); }
.load-eq i.run { background: var(--silver-300); }

.load-live {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  margin: 0 auto 1.5rem; min-height: 1.4rem;
  font-family: var(--font-mono); font-size: .78rem; color: var(--silver-300);
  letter-spacing: .02em; text-align: center;
}
.load-live-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ok); box-shadow: 0 0 0 0 rgba(99,210,164,.5);
  animation: loadDot 1.4s var(--ease-out) infinite;
}
@keyframes loadDot {
  0%,100% { box-shadow: 0 0 0 0 rgba(99,210,164,.45); opacity: 1; }
  50% { box-shadow: 0 0 0 8px rgba(99,210,164,0); opacity: .7; }
}
#loadBeat.flash { animation: beatFlash .45s var(--ease-out); }
@keyframes beatFlash {
  from { opacity: .35; transform: translateY(3px); }
  to   { opacity: 1; transform: none; }
}

.steps-cine { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.steps-cine li {
  display: flex; gap: .85rem; align-items: center;
  padding: .85rem 1rem; border-radius: var(--r);
  background: var(--graphite-850); border: 1px solid var(--line);
  opacity: .45; transform: translateY(4px);
  transition: opacity .35s var(--ease-out), border-color .35s var(--ease-out), background .35s var(--ease-out), transform .35s var(--ease-expo), box-shadow .35s var(--ease-out);
}
.steps-cine li.run {
  opacity: 1; transform: none;
  border-color: var(--line-3); background: var(--graphite-800);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 12px 32px -18px rgba(0,0,0,.7);
}
.steps-cine li.ok  { opacity: 1; transform: none; border-color: rgba(99,210,164,.28); }
.steps-cine li.err { opacity: 1; transform: none; border-color: rgba(240,106,106,.4); background: var(--bad-dim); }
.step-ico {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  background: var(--graphite-700); color: var(--silver-500); border: 1px solid var(--line-2);
  transition: background .3s var(--ease-out), color .3s, border-color .3s, transform .3s var(--ease-expo);
}
.steps-cine li.ok  .step-ico { background: var(--ok);  color: #05271b; border-color: var(--ok); }
.steps-cine li.err .step-ico { background: var(--bad); color: #2c0808; border-color: var(--bad); }
.steps-cine li.run .step-ico { background: var(--white); color: #000; border-color: var(--white); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.step-body strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: .92rem; color: var(--white); }
.step-body .meta { color: var(--silver-500); font-size: .78rem; font-family: var(--font-mono); margin-top: .2rem; word-break: break-word; }
.step-body .meta[hidden] { display: none; }
.load-status { text-align: center; margin-top: 1.6rem; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; color: var(--silver-400, var(--silver-500)); }
.load-hint { text-align: center; margin-top: .5rem; font-size: .76rem; color: var(--silver-600); }

@media (prefers-reduced-motion: reduce) {
  .load-orb, .load-meter-fill::after, .load-live-dot { animation: none !important; }
  .steps-cine li, .step-ico { transition: none !important; }
}

/* ============================================================
   Pending live cards (dossier)
   ============================================================ */
.pending-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.3rem; }
@media (max-width: 720px) { .pending-grid { grid-template-columns: 1fr; } }
.pending-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 1.15rem 1.2rem;
  background: var(--graphite-850); min-height: 120px;
  transition: border-color .4s var(--ease-out), background .4s var(--ease-out);
}
.pending-card .pc-label { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .18em; color: var(--silver-600); display: flex; align-items: center; gap: .5rem; }
.pending-card .pc-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; color: var(--white); margin: .55rem 0 .3rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .55rem; }
.pending-card .pc-sub { font-size: .84rem; color: var(--silver-500); word-break: break-word; font-family: var(--font-mono); }
.pending-card .pc-sub.ok { color: var(--ok); }
.pending-card.wait, .pending-card.gen { border-color: var(--line-2); }
.pending-card.ready { border-color: rgba(99,210,164,.4); background: linear-gradient(180deg, var(--ok-dim), var(--graphite-850) 60%); animation: readyPop .5s var(--ease-expo); }
.pending-card.err   { border-color: rgba(240,106,106,.45); background: linear-gradient(180deg, var(--bad-dim), var(--graphite-850) 60%); }
@keyframes readyPop { 0% { transform: scale(.99); } 55% { transform: scale(1.012); } 100% { transform: scale(1); } }
.pending-card .pc-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--white), transparent); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; opacity: 0; }
.pending-card.wait .pc-bar, .pending-card.gen .pc-bar { opacity: .8; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--graphite-600); border-top-color: var(--white); animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.mini-retry { font-family: var(--font-body); font-size: .74rem; padding: .1rem .55rem; min-height: 24px; border-radius: var(--pill); background: transparent; border: 1px solid var(--line-2); color: var(--silver-300); margin-left: .4rem; }

/* ============================================================
   Mail viewer
   ============================================================ */
.mail-head { padding: 0 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.mail-head .from { font-family: var(--font-mono); font-size: .78rem; color: var(--silver-500); margin-top: .4rem; word-break: break-word; }
.mail-frame-wrap { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: #fff; min-height: 260px; }
.mail-iframe { width: 100%; min-height: 400px; border: 0; background: #fff; display: block; }
.mail-plain { white-space: pre-wrap; font-size: .9rem; line-height: 1.6; padding: 1.1rem; margin: 0; font-family: var(--font-mono); color: #202124; background: #fff; }

/* ============================================================
   Admin table
   ============================================================ */
table.admin { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.admin th { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: var(--silver-600); text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line-2); font-weight: 500; white-space: nowrap; }
table.admin td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 200px; }
table.admin td input, table.admin td select { padding: .4rem .55rem; min-height: 34px; }
table.admin .num { font-family: var(--font-mono); color: var(--silver-300); text-align: center; }

/* ============================================================
   Entrance motion — staggered
   ============================================================ */
.enter { animation: enter .6s var(--ease-expo) both; }
.enter-2 { animation: enter .6s var(--ease-expo) both; animation-delay: .06s; }
.enter-3 { animation: enter .6s var(--ease-expo) both; animation-delay: .12s; }
.enter-4 { animation: enter .6s var(--ease-expo) both; animation-delay: .18s; }
.enter-5 { animation: enter .6s var(--ease-expo) both; animation-delay: .24s; }
.stagger > * { animation: enter .55s var(--ease-expo) both; }
.stagger > *:nth-child(1){animation-delay:.03s}
.stagger > *:nth-child(2){animation-delay:.08s}
.stagger > *:nth-child(3){animation-delay:.13s}
.stagger > *:nth-child(4){animation-delay:.18s}
.stagger > *:nth-child(5){animation-delay:.23s}
.stagger > *:nth-child(6){animation-delay:.28s}
.stagger > *:nth-child(7){animation-delay:.33s}
.stagger > *:nth-child(8){animation-delay:.38s}
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.page-enter { animation: pageIn .55s var(--ease-expo) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px) scale(.992); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

.stagger > *:nth-child(9){animation-delay:.43s}
.stagger > *:nth-child(10){animation-delay:.48s}
.stagger > *:nth-child(11){animation-delay:.53s}
.stagger > *:nth-child(12){animation-delay:.58s}

.badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  display: inline-block; margin-right: .35rem; vertical-align: 1px;
  animation: dotPulse 1.6s var(--ease-out) infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: .7; transform: scale(1.15); box-shadow: 0 0 0 5px transparent; }
}

.toast.show { animation: toastIn .4s var(--ease-expo); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.cred.flash-copy { animation: flashCopy .55s var(--ease-out); }
@keyframes flashCopy {
  0% { border-color: var(--white); background: var(--graphite-700); }
  100% { border-color: var(--line); background: var(--graphite-850); }
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(255,255,255,.045), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(255,255,255,.03), transparent 50%);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}
#app, .toast, .modal-bg { position: relative; z-index: 1; }
@keyframes ambientDrift {
  from { opacity: .7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

header.app .tag {
  animation: tagFade 4s var(--ease-out) infinite;
}
@keyframes tagFade {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .pulse.live i, .load-eq i.run, .steps-cine li.run .step-ico, .login-hero .hero-eq i,
  .call-wave i, a.call-bose.primary, .call-ico, body::before, .badge .dot, header.app .tag {
    animation: none !important;
  }
  .pulse i { height: 60% !important; }
  .login-hero .hero-eq i { opacity: .85; }
  .kpi:hover, .tile:hover, .cred:hover, .item:hover { transform: none; }
}
