/* ==========================================================================
   IRIS — Design system (maquettes réutilisables)
   Dérivé des planches design_maquette/source (logo + planche1 + planche2).
   Un seul fichier, partagé par l'UI de supervision et le Studio v2.
   Thème clair par défaut ; thème sombre via [data-theme="dark"] sur <html>.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Marque */
  --brand-900: #0E2A63;
  --brand-800: #123072;
  --brand-700: #173A86;
  --brand-600: #1741B8;
  --primary:   #1B4FD8;   /* bleu roi des boutons (Se connecter / Analyser) */
  --primary-h: #1741B8;
  --brand-400: #2E7CC0;   /* bleu médian du logo */

  /* Surfaces & fonds */
  --bg:        #EEF4FD;
  --bg-2:      #E4EDFB;
  --surface:   #FFFFFF;
  --surface-2: #F6F9FE;
  --sky-100:   #DCE8FB;   /* pastilles d'icônes */
  --sky-50:    #EAF1FB;

  /* Texte */
  --ink:    #0F2350;
  --ink-2:  #33436B;
  --muted:  #6B7A99;

  /* Lignes */
  --line:   #E1E9F6;
  --line-2: #D2DEF1;

  /* Sémantique */
  --danger:    #E23D50;
  --danger-bg: #FDECEE;
  --success:   #1BA97A;
  --success-bg:#E7F7F0;
  --warn:      #E0912B;
  --warn-bg:   #FBF1E1;
  --info:      #2E7CC0;

  /* Rayons */
  --r-card: 20px;
  --r-md:   14px;
  --r-sm:   10px;
  --r-pill: 999px;

  /* Ombres (teintées bleu) */
  --shadow-sm:  0 1px 2px rgba(20,60,140,.06);
  --shadow-md:  0 8px 22px -12px rgba(20,60,140,.22);
  --shadow-lg:  0 18px 44px -18px rgba(20,60,140,.30);

  /* Typo */
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Poppins", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --bg:        #0B1530;
  --bg-2:      #0E1B3C;
  --surface:   #101E42;
  --surface-2: #142449;
  --sky-100:   #1B2F5C;
  --sky-50:    #16264D;
  --ink:    #EAF1FF;
  --ink-2:  #C6D3EE;
  --muted:  #8A9AC0;
  --line:   #22345F;
  --line-2: #2B3F6E;
  --primary:   #3B6BE8;
  --primary-h: #5680F0;
  --danger-bg: #3A1D26;
  --success-bg:#123227;
  --warn-bg:   #33270F;
  --shadow-md: 0 8px 22px -12px rgba(0,0,0,.55);
  --shadow-lg: 0 18px 44px -18px rgba(0,0,0,.6);
}

/* ---- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--primary); text-decoration: none; }
code, pre { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.spacer { flex: 1 1 auto; }

/* ---- Boutons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600;
  padding: 10px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: .15s ease; white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--brand-700); }
.btn-soft { background: #4A78E8; border-color: #4A78E8; color: #fff; box-shadow: 0 6px 16px -10px rgba(74,120,232,.55); }
.btn-soft:hover { background: #3F6BDD; border-color: #3F6BDD; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-approve { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.btn-reject  { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.btn.tiny { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.link-btn { background: none; border: none; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-back { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; margin-bottom: 8px; }
.link-back:hover { color: var(--primary); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--r-sm); border: 1px solid transparent; background: transparent;
  color: var(--ink-2); cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: var(--sky-50); color: var(--primary); }

/* ---- Brand / logo ------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .mark { width: 40px; height: 40px; display: block; }
.brand .word { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: var(--brand-800); }
.brand .sub  { color: var(--muted); font-weight: 500; font-size: 14px; letter-spacing: 0; }
html[data-theme="dark"] .brand .word { color: #EAF1FF; }

/* ---- App shell (sidebar + topbar) --------------------------------------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px; background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar .brand { padding: 4px 8px 18px; }
.sidebar .brand .word { font-size: 20px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-sm);
  color: var(--ink-2); font-weight: 600; cursor: pointer;
  border: 1px solid transparent; text-align: left; background: none; font: inherit; font-weight: 600;
  transition: .15s;
}
.nav-item svg { width: 20px; height: 20px; flex: 0 0 20px; }
.nav-item:hover { background: var(--sky-50); color: var(--primary); }
.nav-item.is-active { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.nav-item.is-active svg { stroke: #fff; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.side-foot { margin-top: auto; }
.user-card {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
}
.avatar { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-400), var(--primary)); color: #fff; font-weight: 700; }
.user-card .u-name { font-weight: 700; font-size: 13.5px; }
.user-card .u-role { color: var(--muted); font-size: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px; background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar .title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink-2); }
.searchbar {
  flex: 1 1 auto; max-width: 460px; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--r-pill); background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted);
}
.searchbar input { border: none; background: none; outline: none; flex: 1; font: inherit; color: var(--ink); }
.content { padding: 26px 28px 60px; }

/* ---- Cards / panels ----------------------------------------------------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-md); padding: 22px;
}
.panel + .panel { margin-top: 18px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.eyebrow { font-family: var(--font-display); letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-700); font-weight: 700; font-size: 13px; }
.ico-badge { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--sky-100);
  display: grid; place-items: center; color: var(--primary); flex: 0 0 44px; }
.ico-badge svg { width: 22px; height: 22px; }

/* ---- Chips / filtres ---------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--sky-100); color: var(--brand-700); font-size: 12px; }
.chip.is-active .chip-count { background: rgba(255,255,255,.25); color: #fff; }

.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 600; background: var(--sky-100); color: var(--brand-700); }
.tag-ko   { background: var(--danger-bg); color: var(--danger); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }

/* ---- Badges de statut --------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
  background: var(--sky-100); color: var(--brand-700);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.st-running { background: var(--sky-100); color: var(--primary); }
.badge.st-waiting { background: var(--warn-bg);  color: var(--warn); }
.badge.st-done    { background: var(--success-bg); color: var(--success); }
.badge.st-issue   { background: var(--danger-bg); color: var(--danger); }
.badge.st-manual  { background: #EAE7FB; color: #6B4FD0; }
.badge-prod { background: var(--success-bg); color: var(--success); }
.badge-dev  { background: var(--warn-bg); color: var(--warn); }

.pill { display: inline-flex; padding: 3px 11px; border-radius: var(--r-pill); font-weight: 700; font-size: 12px; }
.ok-pill   { background: var(--success-bg); color: var(--success); }
.ko-pill   { background: var(--danger-bg); color: var(--danger); }
.warn-pill { background: var(--warn-bg); color: var(--warn); }

/* ---- Formulaires -------------------------------------------------------- */
.text-input, .select, textarea.text-input {
  width: 100%; font: inherit; color: var(--ink);
  padding: 11px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: .15s;
}
.text-input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea.text-input { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label, .field > span { font-weight: 600; font-size: 13px; color: var(--ink-2); }

/* interrupteur simulation */
.switch { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: .18s; }
.switch input:checked { background: var(--primary); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: var(--shadow-sm); }
.switch input:checked::after { transform: translateX(17px); }

/* ---- Bannières ---------------------------------------------------------- */
.banner {
  border-radius: var(--r-md); padding: 12px 16px; font-size: 13.5px;
  background: var(--sky-50); color: var(--ink-2); border: 1px solid var(--line-2);
}
.banner-warn  { background: var(--warn-bg);  border-color: color-mix(in srgb,var(--warn) 30%,transparent);  color: #8a5a12; }
.banner-error { background: var(--danger-bg); border-color: color-mix(in srgb,var(--danger) 30%,transparent); color: #a51f2f; }

/* ---- Accordéon (carte ticket / étape) ----------------------------------- */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.acc + .acc { margin-top: 12px; }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.acc-head::-webkit-details-marker { display: none; }
.chevron { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; flex: 0 0 18px; }
details[open] > .acc-head .chevron, details[open] > summary .chevron { transform: rotate(90deg); }
.acc-body { padding: 0 18px 18px; }

.step { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.step + .step { margin-top: 8px; }
.step-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; font-size: 13px; }
.step-head::-webkit-details-marker { display: none; }
.step-seq { font-family: var(--font-mono); color: var(--muted); font-size: 12px; }
.step-body { padding: 12px 14px; }
.json-block { background: var(--brand-900); color: #cdd9f5; border-radius: var(--r-sm); padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; overflow-x: auto; margin: 8px 0 0; }

/* ---- Tables ------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }

/* ---- Modale ------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,21,48,.55); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 460px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---- Tabs --------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { padding: 11px 16px; font: inherit; font-weight: 600; color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; }
.tab:hover { color: var(--primary); }
.tab.tab-active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- Tuiles (project home) --------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-md); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tile-emoji { font-size: 30px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- Divers ------------------------------------------------------------- */
.toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.toolbar-actions { display: flex; gap: 10px; }
.app-title { font-family: var(--font-display); font-size: 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---- Studio shell (topbar + conteneur centré) --------------------------- */
.studio-top {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 32px; background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.studio-top .brand .sub { background: var(--sky-100); color: var(--brand-700); font-weight: 700;
  padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; letter-spacing: .02em; }
.studio-wrap { max-width: 1080px; margin: 0 auto; padding: 28px 24px 64px; }
.project-title { font-family: var(--font-display); font-size: 26px; margin: 6px 0 4px; }

/* Liste de projets */
.proj-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.proj-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.proj-check { width: 18px; height: 18px; accent-color: var(--primary); }
.proj-name { flex: 1; text-align: left; background: none; border: none; font: inherit; font-weight: 700;
  font-size: 15.5px; color: var(--ink); cursor: pointer; }
.proj-name:hover { color: var(--primary); }
.proj-badges { display: flex; gap: 8px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Guideline : jauge + colonnes + flux */
.gl-gauge { display: flex; align-items: center; gap: 16px; margin: 18px 0; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.gl-gauge-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--sky-100); overflow: hidden; }
.gl-gauge-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-400), var(--primary)); }
.gl-gauge-txt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--muted); min-width: 210px; }
.gl-gauge-txt strong { color: var(--ink); font-size: 15px; }
.gl-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.gl-section summary { font-weight: 700; cursor: pointer; padding: 8px 0; }
.gl-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sky-100); color: var(--brand-700); font-size: 12px; margin-left: 6px; }
.gl-q { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.gl-q + .gl-q { margin-top: 8px; }
.gl-q-label { font-weight: 600; }
.gl-ev { font-size: 12.5px; margin-top: 6px; }
.gl-ev-ok { color: var(--success); }
.gl-ev-ko { color: var(--danger); }
.gl-vals { color: var(--muted); }
.gl-action { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); margin-top: 10px; }
.gl-action-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gl-flow { width: 100%; border-collapse: collapse; }
.gl-flow td { padding: 5px 6px; font-size: 13px; }
.gl-flow-field { font-family: var(--font-mono); font-size: 12.5px; }
.gl-flow-arrow { color: var(--muted); }
.gl-req { color: var(--danger); }
.gl-src-select { width: 100%; }
.gl-tool-ok { background: var(--success-bg); color: var(--success); }
.gl-tool-missing { background: var(--warn-bg); color: var(--warn); }
.gl-gaps { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: 18px; }
.gl-gaps h3 { margin-bottom: 12px; }
.gl-gap { border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.gl-sev-block { border-left-color: var(--danger); }
.gl-sev-reco { border-left-color: var(--warn); }
.gl-sev-info { border-left-color: var(--info); }
.gl-gap-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.gl-gap-sev { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gl-sev-block .gl-gap-sev { color: var(--danger); }
.gl-sev-reco .gl-gap-sev { color: var(--warn); }
.gl-sev-info .gl-gap-sev { color: var(--info); }
.gl-gap-code { color: var(--muted); font-family: var(--font-mono); }
.gl-gap-title { font-weight: 600; margin: 6px 0 2px; }
.gl-gap-detail { color: var(--muted); font-size: 12.5px; }
.gl-fiche { margin-top: 8px; padding: 8px 10px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 8px; font-size: 12.5px; }

/* Dispatch design : verdict + tables */
.verdict { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 16px; }
.verdict strong { font-size: 15px; }
.verdict-ok { background: var(--success-bg); color: var(--success); }
.verdict-ko { background: var(--danger-bg); color: var(--danger); }
.verdict span { color: var(--ink-2); font-size: 13px; }
.route-editor { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--surface-2); }
.sig-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sig-label { min-width: 92px; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.chip-req { background: var(--success-bg); color: var(--success); }
.chip-opt { background: var(--sky-100); color: var(--primary); }
.chip-neg { background: var(--danger-bg); color: var(--danger); }
.chip-pat { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); }
.cov { font-family: var(--font-mono); font-size: 11px; opacity: .8; margin-left: 4px; }
.chip-x { background: none; border: none; color: inherit; cursor: pointer; margin-left: 4px; font-size: 14px; line-height: 1; }
.import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.import-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-sm); }
.tickets { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ticket-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.ticket-head { display: flex; align-items: center; gap: 12px; }
.ticket-desc { color: var(--muted); flex: 1; font-size: 13px; }
.ticket-signals { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--primary); animation: spin 1s linear infinite; }
.spinner.done { border-color: var(--success); animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .grid-2, .gl-cols, .import-grid, .tiles { grid-template-columns: 1fr !important; }
  .history-form { grid-template-columns: 1fr !important; }
}
