/* =========================================================
   JARVIS // PRO UI — refonte de lisibilité et de fluidité
   Couche isolée : ne modifie aucun handler ni endpoint.
   ========================================================= */
:root {
  --jp-bg-0: #050814;
  --jp-bg-1: #081120;
  --jp-panel: rgba(12, 20, 35, .82);
  --jp-panel-strong: rgba(15, 27, 47, .94);
  --jp-line: rgba(148, 163, 184, .14);
  --jp-line-active: rgba(34, 211, 238, .42);
  --jp-ink: #f8fbff;
  --jp-muted: #9eafc5;
  --jp-cyan: #59e5ff;
  --jp-violet: #a78bfa;
  --jp-mint: #4adead;
  --jp-shadow: 0 20px 55px rgba(0, 0, 0, .34);
  --jp-ease: cubic-bezier(.2, .8, .2, 1);
}

html { background: var(--jp-bg-0); scroll-behavior: smooth; }
body {
  color: var(--jp-ink) !important;
  background:
    radial-gradient(1000px 500px at 7% -10%, rgba(96,165,250,.16), transparent 65%),
    radial-gradient(850px 460px at 95% 10%, rgba(34,211,238,.11), transparent 68%),
    linear-gradient(150deg, #050814 0%, #08101d 48%, #060a14 100%) !important;
  min-height: 100dvh;
  letter-spacing: .01em;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .28;
  background-image: linear-gradient(rgba(148,163,184,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
button, input, textarea, select { font-family: var(--font) !important; }
button { transition: transform .18s var(--jp-ease), border-color .18s var(--jp-ease), background .18s var(--jp-ease), box-shadow .18s var(--jp-ease), filter .18s var(--jp-ease) !important; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--jp-cyan) !important; outline-offset: 3px; }

/* --- Accès et connexion : plus propre, moins décoratif --- */
#splashScreen { background: #050814 !important; }
.splash-content { transform: scale(1.05); }
#loginOverlay {
  background: linear-gradient(135deg, rgba(5,8,20,.92), rgba(10,22,42,.88)) !important;
  backdrop-filter: blur(20px);
}
.login-form {
  width: min(420px, calc(100vw - 36px)) !important;
  padding: 18px !important;
  border: 1px solid var(--jp-line) !important;
  border-radius: 22px !important;
  background: rgba(12, 20, 35, .72) !important;
  box-shadow: var(--jp-shadow) !important;
}
.login-form input { border-radius: 13px !important; min-height: 52px !important; }
.btn-login {
  min-height: 52px !important; border-radius: 13px !important;
  background: linear-gradient(135deg, #56e2ff, #7c8cff) !important;
  color: #06101d !important; font-weight: 800 !important; letter-spacing: .02em !important;
}

/* --- Navigation primaire : ruban clair, défilement souple --- */
#tabsStripWrap, #tabBar {
  background: rgba(5, 10, 20, .76) !important;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
#tabsStripWrap { border-bottom: 1px solid var(--jp-line) !important; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
#tabBar {
  gap: 7px !important; padding: 10px max(16px, env(safe-area-inset-left)) !important;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
#tabBar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 0 0 auto; scroll-snap-align: center;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  padding: 9px 12px !important;
  min-height: 39px !important;
  color: var(--jp-muted) !important;
  background: transparent !important;
  font-size: 12px !important; font-weight: 650 !important;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--jp-ink) !important; background: rgba(255,255,255,.045) !important; transform: translateY(-1px); }
.tab-btn.active {
  color: #dffbff !important;
  border-color: rgba(89,229,255,.30) !important;
  background: linear-gradient(135deg, rgba(34,211,238,.17), rgba(124,92,255,.14)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 9px 18px rgba(34,211,238,.08) !important;
}
.tab-btn.active::after { display: none !important; }

/* --- Command bar : une seule ligne de contrôle stable --- */
#softChrome {
  position: sticky; top: 0; z-index: 25;
  display: grid !important; grid-template-columns: auto auto minmax(0,1fr) auto !important;
  gap: 8px; align-items: center;
  max-width: 1460px; margin: 0 auto; padding: 14px 20px 10px !important;
  background: linear-gradient(to bottom, rgba(5,8,20,.98), rgba(5,8,20,.72), transparent) !important;
  backdrop-filter: blur(10px);
}
#softChrome button {
  min-height: 36px !important; border-radius: 10px !important;
  border: 1px solid var(--jp-line) !important;
  color: var(--jp-muted) !important; background: rgba(255,255,255,.035) !important;
  padding: 7px 10px !important; font-size: 12px !important;
}
#softChrome button:hover { color: var(--jp-ink) !important; border-color: rgba(89,229,255,.30) !important; background: rgba(89,229,255,.08) !important; }
#softChrome .sc-title { color: var(--jp-ink) !important; font-weight: 780 !important; letter-spacing: .02em; }
#softChrome .sc-jobs { color: #d9fff2 !important; border-color: rgba(74,222,173,.25) !important; background: rgba(74,222,173,.09) !important; }

/* --- Contenu : largeur éditoriale, blocs respirants --- */
#content {
  width: min(1460px, 100%) !important;
  margin: 0 auto !important;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom)) !important;
  overflow-x: clip !important;
}
.tab-panel { padding: 8px 0 28px !important; }
.tab-panel.active { animation: jp-enter .34s var(--jp-ease) both !important; }
@keyframes jp-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Statut et télémétrie --- */
.status-bar {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important; margin: 4px 0 14px !important;
  padding: 0 !important; background: transparent !important; border: 0 !important;
}
.status-item {
  min-height: 42px; display: flex !important; align-items: center; gap: 8px;
  padding: 0 12px !important; border: 1px solid var(--jp-line) !important;
  border-radius: 12px !important; background: rgba(12,20,35,.58) !important;
  color: var(--jp-muted) !important; font-size: 11px !important;
}
.status-item .dot { width: 8px !important; height: 8px !important; box-shadow: 0 0 14px currentColor; }
#body-target-bar {
  padding: 11px 14px !important; margin: 0 0 12px !important;
  border-color: rgba(89,229,255,.20) !important; border-radius: 14px !important;
  background: linear-gradient(100deg, rgba(89,229,255,.10), rgba(167,139,250,.06)) !important;
}
.info-grid { gap: 10px !important; margin-bottom: 14px !important; }
.info-card {
  position: relative; overflow: hidden; min-height: 78px;
  padding: 14px 10px !important; text-align: left !important;
  border-radius: 15px !important; border-color: var(--jp-line) !important;
  background: linear-gradient(155deg, rgba(20,33,54,.82), rgba(9,15,27,.86)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.info-card::after { content:""; position:absolute; right:-18px; bottom:-32px; width:82px; height:82px; border-radius:50%; background: radial-gradient(circle, rgba(89,229,255,.16), transparent 68%); }
.info-card .val { position:relative; z-index:1; color: var(--jp-ink) !important; font-size: 15px !important; }
.info-card .lbl { position:relative; z-index:1; color: var(--jp-muted) !important; font-size: 9px !important; letter-spacing: .11em !important; }

/* --- Cartes et actions : hiérarchie normale / accent / risque --- */
.card {
  position: relative; overflow: hidden;
  margin-bottom: 12px !important; padding: 17px !important;
  border: 1px solid var(--jp-line) !important; border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(16,27,46,.83), rgba(8,14,25,.88)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 25px rgba(0,0,0,.11) !important;
}
.card:hover { border-color: rgba(89,229,255,.22) !important; }
.card-title { color: var(--jp-ink) !important; font-size: 14px !important; font-weight: 780 !important; letter-spacing: .01em; }
.card-title + p, .card p { color: var(--jp-muted) !important; }
.do-bar {
  border: 1px solid rgba(89,229,255,.22) !important; border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(34,211,238,.105), rgba(167,139,250,.075)) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.15) !important;
}
.do-bar h3 { color: var(--jp-ink) !important; letter-spacing: -.02em; }
.do-bar p { color: var(--jp-muted) !important; }
#smartSearch, #doBarInput, .chat-input, .cockpit-input, .assist-input, .tool-field input, .tool-field textarea {
  background: rgba(4,9,18,.72) !important; border-color: rgba(148,163,184,.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
}
#smartSearch:focus, #doBarInput:focus, .chat-input:focus, .cockpit-input:focus, .assist-input:focus, .tool-field input:focus, .tool-field textarea:focus {
  border-color: var(--jp-cyan) !important; box-shadow: 0 0 0 4px rgba(89,229,255,.13) !important;
}

.grid-2 { gap: 10px !important; }
.grid-3 { gap: 8px !important; }
.btn {
  min-height: 76px !important; align-items: flex-start !important; text-align: left !important;
  padding: 13px !important; border-radius: 14px !important;
  background: rgba(148,163,184,.045) !important; border-color: var(--jp-line) !important;
  color: var(--jp-ink) !important;
}
.btn:hover { transform: translateY(-2px) !important; border-color: rgba(89,229,255,.36) !important; box-shadow: 0 10px 21px rgba(0,0,0,.18) !important; }
.btn .btn-icon { font-size: 19px !important; }
.btn .btn-name { color: currentColor !important; font-size: 12px !important; font-weight: 760 !important; }
.btn .btn-desc { color: var(--jp-muted) !important; font-size: 10px !important; max-height: 2.7em !important; }
.btn-cyan, .btn-green, .btn-blue, .btn-purple { background: linear-gradient(135deg, rgba(89,229,255,.10), rgba(124,92,255,.06)) !important; border-color: rgba(89,229,255,.22) !important; }
.btn-orange { background: linear-gradient(135deg, rgba(251,191,36,.13), rgba(251,146,60,.06)) !important; }
.btn-red { background: linear-gradient(135deg, rgba(248,113,113,.13), rgba(236,72,153,.06)) !important; }
.btn-full { min-height: 50px !important; border-radius: 13px !important; font-weight: 780 !important; }

/* --- Résultats, chat et jobs : zones de travail sans bruit visuel --- */
.result-content, .cockpit-terminal, pre.out, .term-out {
  border: 1px solid rgba(148,163,184,.14) !important; border-radius: 14px !important;
  background: #050912 !important; color: #d7e5f4 !important;
}
#cockpitOverlay {
  border: 1px solid rgba(89,229,255,.22) !important; border-radius: 20px 20px 0 0 !important;
  background: rgba(7,14,26,.96) !important; box-shadow: 0 -24px 70px rgba(0,0,0,.45) !important;
  backdrop-filter: blur(20px);
}
#softNav {
  border-top: 1px solid var(--jp-line) !important; background: rgba(6,11,21,.90) !important;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
#softNav button { color: var(--jp-muted) !important; border-radius: 12px !important; }
#softNav button.active { color: var(--jp-cyan) !important; background: rgba(89,229,255,.10) !important; }
#jobPill { border: 1px solid rgba(74,222,173,.30) !important; box-shadow: 0 10px 24px rgba(0,0,0,.25) !important; }

/* --- Sur petits écrans : moins de chrome, plus de contrôle --- */
@media (max-width: 720px) {
  #softChrome { padding: 10px 12px 8px !important; }
  #content { padding: 0 12px calc(88px + env(safe-area-inset-bottom)) !important; }
  #tabBar { padding: 8px 12px !important; }
  .tab-btn { padding: 8px 10px !important; font-size: 11px !important; }
  .status-bar { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .status-item { min-height: 38px; padding: 0 9px !important; font-size: 10px !important; }
  .info-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .info-card { min-height: 69px; }
  .card { border-radius: 15px !important; padding: 14px !important; }
  .btn { min-height: 72px !important; padding: 11px !important; }
}
@media (max-width: 420px) {
  #softChrome { grid-template-columns: auto minmax(0,1fr) auto !important; }
  #softChrome .sc-back { display: none !important; }
  #softChrome .sc-home { display: none !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* --- Palette de navigation rapide --- */
.jp-command-trigger {
  display: inline-flex !important; align-items: center; gap: 7px;
  min-height: 36px !important; border-radius: 10px !important;
  border: 1px solid rgba(167,139,250,.30) !important;
  color: #ede9fe !important; background: rgba(167,139,250,.10) !important;
  padding: 7px 10px !important; font-size: 11px !important; font-weight: 740 !important;
}
.jp-command-trigger:hover { border-color: rgba(167,139,250,.55) !important; background: rgba(167,139,250,.18) !important; }
.jp-command-trigger > span:first-child { font-family: var(--mono) !important; color: #c4b5fd; font-size: 10px; }
.jp-palette { position: fixed; inset: 0; z-index: 50000; display: none; }
.jp-palette.open { display: block; }
.jp-palette-backdrop { position: absolute; inset: 0; background: rgba(2,5,12,.72); backdrop-filter: blur(9px); }
.jp-palette-dialog {
  position: relative; width: min(620px, calc(100vw - 28px)); margin: min(18vh, 160px) auto 0;
  padding: 15px; border: 1px solid rgba(89,229,255,.27); border-radius: 20px;
  background: linear-gradient(150deg, rgba(17,31,53,.98), rgba(6,12,23,.985));
  box-shadow: 0 30px 90px rgba(0,0,0,.58), 0 0 40px rgba(89,229,255,.10);
  animation: jp-palette-in .2s var(--jp-ease) both;
}
@keyframes jp-palette-in { from { opacity:0; transform: translateY(-8px) scale(.985); } to { opacity:1; transform:none; } }
.jp-palette-topline { display:flex; align-items:center; justify-content:space-between; padding: 2px 3px 12px; color: var(--jp-ink); font-size: 13px; font-weight: 780; }
.jp-palette-esc { color: var(--jp-muted); border: 1px solid var(--jp-line); border-radius: 7px; padding: 3px 7px; font-size: 10px; font-weight: 600; }
.jp-palette-input-wrap { display:flex; align-items:center; gap:10px; border:1px solid rgba(89,229,255,.28); border-radius: 13px; padding: 0 13px; background: rgba(3,8,17,.74); }
.jp-palette-input-wrap > span { color: var(--jp-cyan); font-size: 23px; line-height:1; transform: rotate(-20deg); }
#jpPaletteInput { width:100%; min-height:52px !important; border:0 !important; background: transparent !important; color:var(--jp-ink) !important; font-size:15px !important; box-shadow:none !important; outline:0 !important; }
.jp-palette-results { max-height: min(45vh, 420px); overflow:auto; margin-top:10px; padding-right:2px; }
.jp-palette-row { width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:46px; margin:3px 0; padding: 0 12px; border:1px solid transparent; border-radius:11px; color:var(--jp-muted); background: transparent; text-align:left; }
.jp-palette-row:hover, .jp-palette-row.selected { color:var(--jp-ink); background:linear-gradient(135deg,rgba(89,229,255,.12),rgba(167,139,250,.09)); border-color:rgba(89,229,255,.20); transform:none !important; box-shadow:none !important; }
.jp-palette-key { color:var(--jp-muted); font-family:var(--mono); font-size:12px; }
.jp-palette-empty { padding:26px 10px; color:var(--jp-muted); font-size:13px; text-align:center; }
.jp-palette-foot { display:flex; justify-content:center; gap:8px; margin-top:12px; color:var(--jp-muted); font-size:10px; }
.jp-palette-foot span { color:rgba(89,229,255,.6); }
@media (max-width: 720px) { .jp-command-trigger-label { display:none; } .jp-command-trigger { padding:7px 9px !important; } .jp-palette-dialog { margin-top: 12vh; } }
@media (max-width: 420px) { .jp-command-trigger { display:inline-flex !important; } }

/* --- Refresh PWA : rechargement propre sans effacement de session --- */
.jp-refresh-trigger {
  display: inline-flex !important; align-items: center; gap: 7px;
  min-height: 36px !important; border-radius: 10px !important;
  border: 1px solid rgba(89,229,255,.30) !important;
  color: #dbfbff !important; background: rgba(89,229,255,.10) !important;
  padding: 7px 10px !important; font-size: 11px !important; font-weight: 760 !important;
}
.jp-refresh-trigger:hover { border-color: rgba(89,229,255,.58) !important; background: rgba(89,229,255,.18) !important; }
.jp-refresh-trigger:active > span:first-child { transform: rotate(180deg); }
.jp-refresh-trigger > span:first-child { color: var(--jp-cyan); font-size: 16px; line-height: 1; transition: transform .24s var(--jp-ease); }
@media (max-width:720px) { .jp-refresh-trigger-label { display:none; } .jp-refresh-trigger { padding:7px 9px !important; } }

/* =========================================================
   MOBILE COMPOSITION FIX — anti-bandeau, anti-boîte noire
   ========================================================= */
@media (max-width: 720px) {
  /* Une seule ligne de commande : plus de bloc noir ou de retour à la ligne. */
  #softChrome {
    position: sticky !important;
    top: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    gap: 6px !important;
    align-items: center !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 10px 12px 8px !important;
    background: linear-gradient(180deg, rgba(7,12,23,.98), rgba(7,12,23,.90)) !important;
    border-bottom: 1px solid rgba(148,163,184,.11) !important;
  }
  #softChrome .sc-back,
  #softChrome .sc-home { display: none !important; }
  #softChrome .sc-title {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 15px !important;
    color: var(--jp-ink) !important;
  }
  #softChrome .jp-command-trigger,
  #softChrome .jp-refresh-trigger,
  #softChrome .sc-jobs {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  #softChrome .jp-command-trigger-label,
  #softChrome .jp-refresh-trigger-label,
  #softChrome .sc-jobs { font-size: 0 !important; }
  #softChrome .jp-command-trigger > span:first-child,
  #softChrome .jp-refresh-trigger > span:first-child { font-size: 16px !important; }
  #softChrome .sc-jobs::after { content: "⚙"; font-size: 16px; color: #d9fff2; }
  #softChrome .sc-jobs #softJobCount { display: none !important; }

  /* AI Assist devient une bulle d’action : jamais une barre qui coupe le contenu. */
  #uxAssistStrip {
    position: fixed !important;
    left: auto !important;
    right: 12px !important;
    top: auto !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px !important;
    gap: 0 !important;
    border-radius: 18px !important;
    background: linear-gradient(145deg, rgba(82,28,170,.98), rgba(46,13,103,.98)) !important;
    border: 1px solid rgba(196,181,253,.42) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.42), 0 0 18px rgba(139,92,246,.26) !important;
    z-index: 34000 !important;
    touch-action: manipulation !important;
  }
  #uxAssistStrip .ux-ai-drag,
  #uxAssistStrip .ux-ai-hint,
  #uxAssistStrip #uxAiChat,
  #uxAssistStrip #uxAiJobs,
  #uxAssistStrip #uxAiClose { display: none !important; }
  #uxAssistStrip #uxAskAi {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 15px !important;
    background: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important;
  }
  #uxAssistStrip #uxAskAi::after {
    content: "✦";
    color: #f5f3ff;
    font-size: 22px;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255,255,255,.30);
  }
  #uxAiPanel {
    width: min(420px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: min(58vh, 520px) !important;
    z-index: 35000 !important;
    border-radius: 18px !important;
  }

  /* Un Job actif est signalé par la pastille ; la feuille n’occupe jamais l’écran par défaut. */
  #cockpitOverlay:not(.open),
  #cockpitOverlay.minimized {
    display: none !important;
    pointer-events: none !important;
    transform: translateY(110%) !important;
    opacity: 0 !important;
  }
  #cockpitOverlay.open:not(.minimized) {
    display: flex !important;
    height: min(58vh, 520px) !important;
    max-height: 66vh !important;
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    border-radius: 18px 18px 0 0 !important;
  }
  body.job-sheet-open #content,
  body.job-sheet-open.job-sheet-min #content {
    padding-bottom: calc(86px + env(safe-area-inset-bottom)) !important;
  }
  #jobPill { bottom: calc(76px + env(safe-area-inset-bottom)) !important; right: 76px !important; z-index: 34000 !important; }
}

/* =========================================================
   JARVIS SOVEREIGN — premium command vessel aesthetic
   Élimine l’effet patchwork : une base graphite + un signal clair.
   ========================================================= */
:root {
  --js-void: #07090d;
  --js-surface: #10141b;
  --js-surface-raised: #151b25;
  --js-line: #27303e;
  --js-line-soft: rgba(154, 169, 190, .14);
  --js-text: #f1f5f9;
  --js-muted: #91a0b5;
  --js-signal: #70d7ff;
  --js-signal-strong: #3eb7ff;
  --js-violet: #8b7cff;
  --js-success: #67d5a7;
}
body {
  background:
    radial-gradient(850px 440px at 100% -10%, rgba(62,183,255,.10), transparent 62%),
    radial-gradient(620px 430px at -8% 28%, rgba(139,124,255,.07), transparent 65%),
    linear-gradient(145deg, #07090d 0%, #0a0e14 52%, #080b10 100%) !important;
  color: var(--js-text) !important;
}
body::before {
  opacity: .16 !important;
  background-image: linear-gradient(rgba(148,163,184,.026) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.026) 1px, transparent 1px) !important;
  background-size: 48px 48px !important;
}

/* En-tête : bandeau de contrôle, pas arcade lumineuse. */
#tabsStripWrap, #tabBar {
  background: rgba(9,12,18,.92) !important;
  backdrop-filter: blur(22px) saturate(115%) !important;
}
#tabsStripWrap { border-bottom-color: var(--js-line-soft) !important; box-shadow: 0 10px 28px rgba(0,0,0,.20) !important; }
.tab-btn {
  color: #8e9cad !important;
  border-radius: 9px !important;
  font-weight: 620 !important;
}
.tab-btn:hover { color: #e8f1fb !important; background: rgba(255,255,255,.045) !important; }
.tab-btn.active {
  color: #effbff !important;
  border-color: rgba(112,215,255,.35) !important;
  background: linear-gradient(135deg, rgba(112,215,255,.13), rgba(139,124,255,.08)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
}
#softChrome {
  background: linear-gradient(to bottom, rgba(8,11,16,.98), rgba(8,11,16,.87), rgba(8,11,16,.58)) !important;
}
#softChrome button {
  color: var(--js-muted) !important;
  border-color: var(--js-line-soft) !important;
  background: rgba(255,255,255,.025) !important;
}
#softChrome button:hover {
  color: var(--js-text) !important;
  border-color: rgba(112,215,255,.38) !important;
  background: rgba(112,215,255,.075) !important;
}
#softChrome .sc-title { color: #eff6ff !important; font-family: var(--font-display) !important; font-weight: 720 !important; }
#softChrome .sc-jobs { color: #dbeafe !important; border-color: rgba(112,215,255,.24) !important; background: rgba(112,215,255,.055) !important; }

/* Système : informations sobres, aucune lueur parasite. */
.status-item {
  border-color: var(--js-line-soft) !important;
  background: rgba(18,23,31,.74) !important;
  color: var(--js-muted) !important;
}
.status-item .dot { box-shadow: none !important; }
#body-target-bar {
  border-color: rgba(112,215,255,.18) !important;
  background: rgba(112,215,255,.045) !important;
}
.info-card {
  border-color: var(--js-line-soft) !important;
  background: linear-gradient(155deg, rgba(24,30,40,.92), rgba(12,16,23,.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045) !important;
}
.info-card::after { opacity: .45; background: radial-gradient(circle, rgba(112,215,255,.12), transparent 66%) !important; }
.info-card .val { color: #eaf4ff !important; }
.info-card .lbl { color: var(--js-muted) !important; }

/* Cartes : profondeur matérielle, pas de dégradés agressifs. */
.card, .p-card {
  border-color: var(--js-line-soft) !important;
  background: linear-gradient(145deg, rgba(19,24,33,.94), rgba(12,16,23,.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 22px rgba(0,0,0,.13) !important;
}
.card:hover { border-color: rgba(112,215,255,.24) !important; }
.card-title, .tool-title { color: #eaf2fb !important; }
.card p, .p-card .meta, .p-card .plat { color: var(--js-muted) !important; }
.do-bar {
  border-color: rgba(112,215,255,.20) !important;
  background: linear-gradient(125deg, rgba(112,215,255,.075), rgba(255,255,255,.018)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 28px rgba(0,0,0,.15) !important;
}
.do-bar h3 { color: #f3f8ff !important; }
#smartSearch, #doBarInput, .chat-input, .cockpit-input, .assist-input, .tool-field input, .tool-field textarea {
  border-color: #2b3544 !important;
  background: rgba(5,8,13,.72) !important;
}

/* Actions : le signal identifie la priorité, pas toutes les cartes à la fois. */
.btn {
  border-color: var(--js-line-soft) !important;
  background: rgba(255,255,255,.025) !important;
  color: #e8eef7 !important;
  box-shadow: none !important;
}
.btn:hover { border-color: rgba(112,215,255,.34) !important; background: rgba(112,215,255,.07) !important; box-shadow: 0 10px 18px rgba(0,0,0,.15) !important; }
.btn .btn-desc { color: var(--js-muted) !important; }
.btn-cyan, .btn-green, .btn-blue, .btn-purple { background: rgba(112,215,255,.06) !important; border-color: rgba(112,215,255,.18) !important; }
.btn-orange { background: rgba(245,185,83,.065) !important; border-color: rgba(245,185,83,.18) !important; }
.btn-red { background: rgba(235,104,117,.065) !important; border-color: rgba(235,104,117,.20) !important; }
.btn-full.cyan, .btn-login {
  background: linear-gradient(135deg, #6ed7ff, #5b9dff) !important;
  color: #07101a !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Plateformes : cohérentes comme une grille de commandement ; la couleur reste un signal latéral. */
.platform-card {
  --pf-signal: var(--js-signal);
  border: 1px solid var(--js-line-soft) !important;
  border-left: 2px solid var(--pf-signal) !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(19,24,33,.92), rgba(11,15,22,.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.platform-card:hover { border-color: rgba(112,215,255,.30) !important; background: rgba(23,29,40,.94) !important; }
.platform-card .pf-name { color: #edf3fb !important; font-weight: 700 !important; }
.platform-card .pf-count { color: var(--js-muted) !important; }
.platform-card .pf-glow { display: none !important; }
.platform-card.pf-telegram { --pf-signal: #64caff; }
.platform-card.pf-snap { --pf-signal: #e7ec87; }
.platform-card.pf-facebook { --pf-signal: #77aaff; }
.platform-card.pf-instagram { --pf-signal: #e78cb2; }
.platform-card.pf-whatsapp { --pf-signal: #6ed7a6; }
.platform-card.pf-tiktok { --pf-signal: #d7a5ff; }
.platform-card.pf-discord { --pf-signal: #9aaaff; }
.platform-card.pf-twitter { --pf-signal: #a7c5e7; }

/* Conserve l’assistant discret et le panneau Jobs cohérent avec le cockpit. */
#uxAssistStrip { box-shadow: 0 12px 28px rgba(0,0,0,.42), 0 0 18px rgba(112,215,255,.12) !important; }
#cockpitOverlay {
  background: rgba(12,16,23,.985) !important;
  border-top-color: rgba(112,215,255,.22) !important;
  box-shadow: 0 -18px 44px rgba(0,0,0,.46) !important;
}
#softNav { background: rgba(8,11,16,.94) !important; border-top-color: var(--js-line-soft) !important; }
#softNav button.active { color: #dff7ff !important; background: rgba(112,215,255,.10) !important; }

@media (max-width:720px) {
  body::before { opacity: .08 !important; }
  .platform-card { border-radius: 12px !important; }
  #softChrome { background: rgba(8,11,16,.98) !important; }
}

/* --- Jarvis Sovereign: accès et splash --- */
#splashScreen {
  background:
    radial-gradient(680px 400px at 50% 42%, rgba(112,215,255,.11), transparent 66%),
    linear-gradient(145deg, #07090d, #0b1018 58%, #07090d) !important;
}
.splash-bg { opacity: .30 !important; }
.splash-grid { opacity: .18 !important; background-size: 52px 52px !important; }
.splash-scanline { opacity: .22 !important; }
.splash-content { gap: 12px !important; }
.splash-avatars { gap: 12px !important; opacity: .88; }
.splash-avatar-wrapper { width: 58px !important; height: 58px !important; border-radius: 16px !important; background: rgba(255,255,255,.025) !important; }
.splash-avatar-wrapper img { border-radius: 14px !important; }
.splash-vs { color: #65758a !important; font-size: 18px !important; }
.splash-title h1 {
  color: #eef7ff !important;
  font-family: var(--font-display) !important;
  font-size: clamp(28px, 5vw, 38px) !important;
  letter-spacing: .08em !important;
  text-shadow: none !important;
}
.splash-title p { color: #9eafc5 !important; letter-spacing: .20em !important; font-size: 10px !important; }
.splash-bar-container { border-color: rgba(112,215,255,.12) !important; background: rgba(255,255,255,.04) !important; }
.splash-bar { background: linear-gradient(90deg, #5ccaff, #8b7cff) !important; box-shadow: none !important; }
.splash-status { color: #8ea0b5 !important; font-family: var(--mono) !important; font-size: 10px !important; }
.splash-enter { color: #bfeeff !important; }
#loginOverlay {
  background:
    radial-gradient(520px 380px at 50% 25%, rgba(112,215,255,.10), transparent 66%),
    rgba(7,9,13,.94) !important;
}
.login-logo h1 { color: #eff7ff !important; letter-spacing: .07em !important; }
.login-logo p { color: #91a0b5 !important; letter-spacing: .08em !important; }
.login-form {
  border-color: rgba(154,169,190,.18) !important;
  background: rgba(17,22,31,.86) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.42) !important;
}
.login-form input { border-color: #2b3544 !important; background: rgba(5,8,13,.82) !important; }
.btn-login { background: linear-gradient(135deg, #6ed7ff, #5e9dff) !important; box-shadow: none !important; }

/* =========================================================
   ACTION COMPOSER — presets, contexte libre, fichier
   ========================================================= */
.jac-composer {
  margin: 14px 0 4px;
  padding: 14px;
  border: 1px solid rgba(112,215,255,.20);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18,25,35,.92), rgba(10,14,21,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.jac-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:12px; }
.jac-head > div { display:grid; gap:3px; }
.jac-eyebrow { color: #73d9ff; font-family:var(--mono); font-size:9px; letter-spacing:.14em; font-weight:800; }
.jac-head strong { color:#eff7ff; font-size:14px; }
.jac-context { color:#93a4ba; font-size:10px; border:1px solid rgba(148,163,184,.18); border-radius:99px; padding:4px 7px; }
.jac-presets { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:12px; }
.jac-preset {
  appearance:none; border:1px solid rgba(148,163,184,.18); border-radius:99px; padding:6px 9px;
  color:#b7c5d8; background:rgba(255,255,255,.025); font-size:11px; font-weight:650; cursor:pointer;
}
.jac-preset:hover, .jac-preset.active { color:#eafaff; border-color:rgba(112,215,255,.44); background:rgba(112,215,255,.10); }
.jac-intent-label { display:block; color:#cdd8e6; font-size:11px; font-weight:700; margin:0 0 6px; }
#jacIntent { width:100%; min-height:64px; resize:vertical; box-sizing:border-box; border:1px solid #2a3545; border-radius:11px; padding:9px 10px; color:#ecf6ff; background:rgba(4,7,12,.67); font:inherit; font-size:12px; line-height:1.4; }
#jacIntent:focus { outline:0; border-color:rgba(112,215,255,.64); box-shadow:0 0 0 3px rgba(112,215,255,.09); }
.jac-upload { display:flex; align-items:center; gap:10px; margin-top:10px; padding:10px; border:1px dashed rgba(148,163,184,.32); border-radius:12px; cursor:pointer; background:rgba(255,255,255,.018); transition:border-color .18s, background .18s; }
.jac-upload:hover, .jac-composer.is-dropping .jac-upload { border-color:rgba(112,215,255,.72); background:rgba(112,215,255,.07); }
.jac-upload-icon { display:grid; place-items:center; flex:0 0 26px; width:26px; height:26px; border-radius:8px; color:#a4e8ff; background:rgba(112,215,255,.10); font-size:19px; line-height:1; }
.jac-upload-copy { display:grid; gap:2px; min-width:0; flex:1; }
.jac-upload-copy strong { color:#dce8f5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.jac-upload-copy span { color:#8494a9; font-size:10px; line-height:1.35; }
.jac-clear-file { display:none; width:26px; height:26px; flex:0 0 26px; border:0; border-radius:8px; color:#c8d4e3; background:rgba(255,255,255,.08); font-size:18px; cursor:pointer; }
.jac-composer.has-file .jac-clear-file { display:block; }
.jac-upload-status { margin-top:7px; color:#85e2b6; font-size:10px; line-height:1.35; }
.jac-note { margin:9px 0 0; color:#7e8da2; font-size:10px; line-height:1.45; }
@media (max-width:720px) {
  .jac-composer { margin:12px 0 2px; padding:12px; border-radius:14px; }
  .jac-upload { align-items:flex-start; }
  .jac-upload-copy span { font-size:9px; }
  .jac-preset { min-height:34px; padding:7px 10px; }
}

/* =========================================================
   PLATFORM HUB PLUS
   ========================================================= */
.pf-drawer .pf-section-title {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,.12);
  color: #a9e5ff;
  font-family: var(--mono);
  letter-spacing: .08em;
  font-size: 10px;
}
.pf-drawer .pf-section-title:first-of-type { margin-top: 8px; }
.pf-drawer .btn .btn-desc { line-height: 1.35; }
.pf-drawer .grid-2 { gap: 9px; }
@media (max-width:720px) {
  .pf-drawer .grid-2 { grid-template-columns: 1fr; gap: 8px; }
  .pf-drawer .btn { min-height: 64px; }
  .pf-drawer .pf-section-title { margin-top: 14px; padding-top: 10px; }
}

/* =========================================================
   TAB WORKSPACE PLUS — extension transversale des onglets
   ========================================================= */
.jtw-workspace { margin: 13px 0 16px; padding: 12px; border:1px solid rgba(112,215,255,.18); border-radius:16px; background:linear-gradient(135deg,rgba(14,23,34,.94),rgba(9,13,19,.97)); box-shadow:inset 0 1px 0 rgba(255,255,255,.04); }
.jtw-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.jtw-head > div { display:flex; gap:8px; align-items:baseline; min-width:0; }
.jtw-head span { color:#70d7ff; font-family:var(--mono); letter-spacing:.13em; font-size:9px; font-weight:800; }
.jtw-head strong { color:#edf6ff; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jtw-head em { color:#8ea4ba; border:1px solid rgba(148,163,184,.17); border-radius:99px; padding:4px 7px; font-style:normal; font-size:10px; white-space:nowrap; }
.jtw-tools { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.jtw-tools > button { min-width:0; min-height:76px; padding:9px; display:flex; align-items:flex-start; gap:8px; text-align:left; color:#dbe7f4; background:rgba(255,255,255,.022); border:1px solid rgba(148,163,184,.14); border-radius:12px; cursor:pointer; transition:border-color .18s,transform .18s,background .18s; }
.jtw-tools > button:hover { transform:translateY(-1px); border-color:rgba(112,215,255,.54); background:rgba(112,215,255,.075); }
.jtw-tools b { display:grid; place-items:center; flex:0 0 23px; width:23px; height:23px; border-radius:7px; color:#9de9ff; background:rgba(112,215,255,.11); font-size:14px; }
.jtw-tools span { display:grid; gap:4px; min-width:0; }
.jtw-tools strong { color:#e9f4ff; font-size:11px; line-height:1.2; }
.jtw-tools small { color:#8394a9; font-size:9px; line-height:1.35; }
.jtw-foot { display:flex; gap:10px; align-items:center; justify-content:space-between; margin-top:10px; color:#78899e; font-size:10px; }
.jtw-foot > button { appearance:none; border:0; padding:0; color:#9bdfff; background:transparent; font:inherit; font-weight:700; cursor:pointer; }
.jtw-notes { margin:-8px 0 16px; padding:12px; border:1px solid rgba(148,163,184,.16); border-radius:0 0 15px 15px; background:rgba(8,12,18,.93); }
.jtw-notes-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:8px; }
.jtw-notes-head strong { color:#dceafa; font-size:12px; }
.jtw-notes-head span { color:#78899e; font-size:9px; }
.jtw-notes textarea { display:block; width:100%; min-height:82px; box-sizing:border-box; resize:vertical; padding:9px; color:#eaf5ff; background:rgba(0,0,0,.25); border:1px solid #293647; border-radius:10px; font:inherit; font-size:11px; line-height:1.4; }
.jtw-notes textarea:focus { outline:none; border-color:rgba(112,215,255,.62); box-shadow:0 0 0 3px rgba(112,215,255,.08); }
.jtw-notes-foot { display:flex; justify-content:space-between; align-items:center; margin-top:7px; color:#7edcaf; font-size:10px; }
.jtw-notes-foot button { border:0; color:#a5b4c6; background:transparent; cursor:pointer; font-size:10px; }
@media (max-width:900px) { .jtw-tools { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:480px) { .jtw-workspace { padding:10px; border-radius:14px; } .jtw-tools { gap:7px; } .jtw-tools > button { min-height:68px; padding:8px; } .jtw-tools small { display:none; } .jtw-foot span { display:none; } }

/* =========================================================
   TAB WORKSPACE PLUS — PACK AVANCÉ
   ========================================================= */
.jtw-advanced { margin:-12px 0 16px; padding:8px 12px; border:1px solid rgba(148,163,184,.13); border-top:0; border-radius:0 0 16px 16px; background:rgba(7,11,16,.72); }
.jtwx-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.jtwx-group { display:flex; align-items:center; gap:5px; min-width:0; overflow:auto; scrollbar-width:none; }
.jtwx-group::-webkit-scrollbar { display:none; }
.jtwx-top button, .jtwx-row button { appearance:none; cursor:pointer; border:1px solid rgba(148,163,184,.15); border-radius:8px; padding:5px 8px; color:#97aabd; background:rgba(255,255,255,.025); font:600 10px/1 var(--mono); white-space:nowrap; transition:border-color .16s,background .16s,color .16s; }
.jtwx-top button:hover, .jtwx-row button:hover { border-color:rgba(112,215,255,.5); background:rgba(112,215,255,.08); color:#d7f6ff; }
.jtwx-top .active { border-color:rgba(255,203,76,.55); color:#ffd873; background:rgba(255,203,76,.08); }
.jtwx-toggle { color:#80dfff !important; }
.jtwx-body { display:grid; gap:8px; padding-top:10px; }
.jtwx-row { display:grid; grid-template-columns:105px minmax(0,1fr); gap:8px; align-items:center; }
.jtwx-row > span { color:#657b91; font:700 9px/1 var(--mono); letter-spacing:.08em; }
.jtwx-row > div { display:flex; flex-wrap:wrap; gap:5px; min-width:0; }
.jtwx-files button { max-width:180px; overflow:hidden; text-overflow:ellipsis; }
.jtwx-files span, .jtwx-activity span { color:#8596a9; font-size:10px; line-height:1.25; }
@media (max-width:480px) { .jtw-advanced { margin-top:-10px; padding:8px 10px; } .jtwx-row { grid-template-columns:1fr; gap:5px; } .jtwx-row > span { font-size:8px; } .jtwx-top button { padding:5px 7px; font-size:9px; } }

/* =========================================================
   BUILDERS — correction de panneau vide et recouvrement mobile
   ========================================================= */
#tab-builders .result-panel:not(.visible) { display:none !important; }
#tab-builders .result-panel.visible { display:block !important; margin-bottom:22px; }
#tab-builders .result-panel.visible .result-content:empty { display:none !important; }
@media (max-width:720px) {
  #tab-builders .result-panel.visible { margin-bottom:calc(82px + env(safe-area-inset-bottom)) !important; }
  #tab-builders ~ #uxAssistStrip, body:has(#tab-builders.active) #uxAssistStrip { z-index:150 !important; }
  body:has(#tab-builders.active) #uxAiPanel { display:none !important; pointer-events:none !important; }
}

/* =========================================================
   JOBS — suppression de la feuille vide
   ========================================================= */
#cockpitOverlay:not(.open),
#cockpitOverlay.minimized:not(.open) {
  display:none !important;
  pointer-events:none !important;
  visibility:hidden !important;
}
body:not(.job-sheet-open) #cockpitOverlay {
  display:none !important;
  pointer-events:none !important;
}
@media (max-width:720px) {
  body:not(.job-sheet-open) #content { padding-bottom:calc(68px + env(safe-area-inset-bottom)) !important; }
  #jobPill:not(.show) { display:none !important; }
}

/* =========================================================
   CAPABILITY DECK + ASSISTANT ANCRÉ MOBILE
   ========================================================= */
.pf-drawer .pf-section-title { position:relative; }
.pf-drawer .pf-section-title::after { content:''; display:block; width:34px; height:2px; margin-top:7px; background:linear-gradient(90deg,#70d7ff,transparent); opacity:.72; }
.pf-drawer .btn { position:relative; overflow:hidden; }
.pf-drawer .btn:active { transform:scale(.985); }
@media (max-width:720px) {
  /* The assistant sits above the bottom nav as a compact anchored control.
     It no longer floats within the content grid or across platform cards. */
  #uxAssistStrip {
    position:fixed !important;
    left:auto !important;
    right:12px !important;
    bottom:calc(66px + env(safe-area-inset-bottom)) !important;
    width:auto !important;
    max-width:calc(100vw - 24px) !important;
    min-height:42px !important;
    padding:5px !important;
    gap:0 !important;
    border-radius:14px !important;
    background:rgba(20,15,37,.97) !important;
    border-color:rgba(112,215,255,.34) !important;
    box-shadow:0 10px 26px rgba(0,0,0,.46) !important;
    z-index:37900 !important;
  }
  #uxAssistStrip .ux-ai-drag,
  #uxAssistStrip .ux-ai-hint,
  #uxAssistStrip #uxAiChat,
  #uxAssistStrip #uxAiJobs,
  #uxAssistStrip #uxAiClose { display:none !important; }
  #uxAssistStrip #uxAskAi {
    min-height:32px !important;
    padding:6px 10px !important;
    border-radius:10px !important;
    background:rgba(112,215,255,.14) !important;
    color:#dff7ff !important;
    font-size:11px !important;
    line-height:1 !important;
    border:1px solid rgba(112,215,255,.22) !important;
  }
  #uxAssistStrip #uxAskAi::after { content:'AI'; }
  #uxAssistStrip #uxAskAi { font-size:0 !important; }
  #uxAssistStrip #uxAskAi::after { font-size:11px; font-weight:900; }
  #uxAiPanel.open {
    position:fixed !important;
    left:12px !important;
    right:12px !important;
    bottom:calc(116px + env(safe-area-inset-bottom)) !important;
    top:auto !important;
    width:auto !important;
    max-height:min(52vh, 460px) !important;
    z-index:37910 !important;
  }
  #content { padding-bottom:calc(88px + env(safe-area-inset-bottom)) !important; }
  .pf-drawer .btn { min-height:58px !important; }
  .pf-drawer .grid-2 { grid-template-columns:1fr !important; }
}

/* =========================================================
   PLATFORM QUICK MENU + WORK MODES
   ========================================================= */
.sc-platforms { display:inline-flex; align-items:center; gap:7px; border:1px solid rgba(112,215,255,.26); border-radius:10px; background:rgba(112,215,255,.07); color:#dff7ff; min-height:34px; padding:6px 9px; font:800 11px var(--mono); cursor:pointer; }
.sc-platforms span:first-child { color:#70d7ff; font-size:14px; }
.jp-platform-menu { position:fixed; top:58px; right:16px; width:min(540px,calc(100vw - 32px)); max-height:min(76vh,680px); overflow:auto; display:none; z-index:41000; padding:14px; border:1px solid rgba(112,215,255,.28); border-radius:18px; background:rgba(8,12,19,.985); box-shadow:0 22px 60px rgba(0,0,0,.62),0 0 24px rgba(112,215,255,.13); backdrop-filter:blur(18px); }
.jp-platform-menu.open { display:block; animation:jpPlatformIn .16s ease-out both; }
@keyframes jpPlatformIn { from { opacity:0; transform:translateY(-8px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
.jp-platform-menu-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.jp-platform-menu-head div { display:grid; gap:3px; }
.jp-platform-menu-head span, .jp-platform-menu-label { color:#70d7ff; font:800 9px var(--mono); letter-spacing:.15em; }
.jp-platform-menu-head strong { color:#f4f9ff; font-size:17px; }
#jpPlatformClose { width:34px; height:34px; border:1px solid rgba(148,163,184,.18); border-radius:10px; background:rgba(255,255,255,.04); color:#d7e5f3; font-size:20px; cursor:pointer; }
.jp-platform-search { display:flex; align-items:center; gap:8px; margin-bottom:12px; padding:0 10px; border:1px solid rgba(148,163,184,.18); border-radius:12px; background:rgba(255,255,255,.035); color:#70d7ff; }
.jp-platform-search input { width:100%; height:40px; outline:0; border:0; background:transparent; color:#eef7ff; font-size:14px; }
.jp-platform-modes { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; margin-bottom:16px; }
.jp-platform-modes button { min-height:72px; padding:8px; display:flex; gap:7px; align-items:flex-start; text-align:left; border:1px solid rgba(148,163,184,.14); border-radius:12px; background:rgba(255,255,255,.025); color:#dbe8f5; cursor:pointer; }
.jp-platform-modes button:hover { border-color:rgba(112,215,255,.46); background:rgba(112,215,255,.075); }
.jp-platform-modes b { color:#a7edff; font-size:14px; }
.jp-platform-modes span { display:grid; gap:4px; min-width:0; }
.jp-platform-modes strong { font-size:11px; }
.jp-platform-modes small { color:#8fa6bb; font-size:9px; line-height:1.25; }
.jp-platform-menu-label { padding:4px 1px 8px; }
.jp-platform-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.jp-platform-item { min-height:50px; display:flex; align-items:center; gap:8px; padding:8px 9px; border:1px solid rgba(148,163,184,.14); border-left:2px solid var(--jp-platform-color); border-radius:11px; background:rgba(255,255,255,.022); color:#e7f1fb; cursor:pointer; text-align:left; }
.jp-platform-item:hover { background:rgba(112,215,255,.065); }
.jp-platform-icon { color:var(--jp-platform-color); font-size:17px; }
.jp-platform-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:800; font-size:12px; }
.jp-platform-fav { color:#f4d78b; font-size:16px; line-height:1; }
.jp-platform-empty { padding:20px; text-align:center; color:#8fa6bb; font-size:12px; }
.platform-card.pf-onlyfans { --pf-signal:#7dd3fc; }
.platform-card.pf-chaturbate { --pf-signal:#f0abfc; }
@media (max-width:720px) {
  .sc-platforms { min-height:34px; padding:6px 8px; border-radius:9px; }
  .sc-platforms span:last-child { display:none; }
  .jp-platform-menu { top:auto; bottom:calc(62px + env(safe-area-inset-bottom)); right:8px; left:8px; width:auto; max-height:calc(100vh - 92px); padding:12px; border-radius:16px; }
  .jp-platform-modes { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .jp-platform-modes button { min-height:62px; padding:7px; }
  .jp-platform-modes small { display:none; }
  .jp-platform-list { grid-template-columns:1fr 1fr; }
  .jp-platform-item { min-height:48px; }
}

/* =========================================================
   KALI AUDIT LIBRARY
   ========================================================= */
.kali-audit-library { border-top:1px solid rgba(112,215,255,.22); }
.kali-audit-library .card-title { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.kali-audit-library .card-title small { color:#89a0b5; font:600 10px var(--mono); }
.kali-tool-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
.kali-tool-btn { min-height:58px; text-align:left; }
@media (max-width:720px) {
  .kali-tool-grid { grid-template-columns:1fr; }
  .kali-tool-btn { min-height:54px; }
}

/* Target-only hubs: OnlyFans + Chaturbate */
.pf-onlyfans-target { border-color:rgba(125,211,252,.65)!important; }
.pf-chaturbate-target { border-color:rgba(240,171,252,.65)!important; }
.pf-onlyfans-target .pf-count,.pf-chaturbate-target .pf-count { color:#a9dff6; }

/* Command State — health, route and local session journal */
.jarvis-command-state { margin:14px 0 18px; padding:15px; border:1px solid rgba(86,177,255,.34); border-radius:18px; background:linear-gradient(135deg,rgba(12,24,43,.98),rgba(7,13,27,.96)); box-shadow:0 16px 40px rgba(0,0,0,.2); }
.jcs-head,.jcs-journal>div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.jcs-head strong,.jcs-journal strong { display:block; font-size:.98rem; color:#e8f4ff; }
.jcs-eyebrow { display:block; margin-bottom:3px; color:#78c8ff; font-size:.64rem; font-weight:800; letter-spacing:.13em; }
.jcs-health { flex:0 0 auto; padding:7px 9px; border:1px solid rgba(255,255,255,.13); border-radius:999px; font-size:.7rem; font-weight:800; }
.jcs-health.pending { color:#d8e9ff; background:rgba(105,159,212,.13); }
.jcs-health.ok { color:#a9f8cd; background:rgba(52,211,153,.12); border-color:rgba(52,211,153,.3); }
.jcs-health.watch { color:#ffe8a5; background:rgba(250,204,21,.12); border-color:rgba(250,204,21,.28); }
.jcs-health.error { color:#ffc1cf; background:rgba(244,63,94,.12); border-color:rgba(244,63,94,.28); }
.jcs-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-top:13px; }
.jcs-metric,.jcs-route { min-height:96px; padding:11px; border:1px solid rgba(149,191,230,.13); border-radius:13px; background:rgba(3,9,19,.38); }
.jcs-metric span,.jcs-route span { display:block; color:#9db0c5; font-size:.7rem; font-weight:700; }
.jcs-metric strong { display:block; margin:4px 0; color:#f2f8ff; font-size:1.45rem; line-height:1; }
.jcs-metric small { display:block; color:#7d92aa; font-size:.67rem; line-height:1.25; }
.jcs-route { display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; }
.jcs-route strong { overflow:hidden; width:100%; color:#c9e9ff; font-size:.74rem; white-space:nowrap; text-overflow:ellipsis; }
.jcs-route button { width:100%; min-height:30px; border:1px solid rgba(98,199,255,.35); border-radius:9px; background:rgba(30,106,164,.22); color:#d8f3ff; font-size:.72rem; font-weight:800; }
.jcs-route button:disabled { opacity:.6; }
.jcs-journal { margin-top:12px; padding-top:11px; border-top:1px solid rgba(149,191,230,.12); }
.jcs-journal ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; margin:10px 0 0; padding:0; list-style:none; }
.jcs-journal li { display:flex; gap:6px; min-width:0; color:#aebfd2; font-size:.69rem; line-height:1.35; }
.jcs-journal time { flex:0 0 auto; color:#637b96; }
.jcs-journal span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jcs-empty { color:#657991; }
@media (max-width:720px) { .jarvis-command-state { margin:10px 0 14px; padding:12px; border-radius:15px; } .jcs-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; } .jcs-metric,.jcs-route { min-height:82px; padding:9px; } .jcs-journal ol { grid-template-columns:1fr; gap:5px; } .jcs-head strong { font-size:.88rem; } .jcs-health { font-size:.64rem; padding:6px 8px; } }

/* Command State — budget de ressources */
.jarvis-command-state .jcs-resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:8px}.jarvis-command-state .jcs-resources>div{padding:8px;border:1px solid rgba(102,176,230,.13);border-radius:9px;background:rgba(3,10,20,.32)}.jarvis-command-state .jcs-resources span{display:block;color:#718aa4;font-size:.6rem;font-weight:800;letter-spacing:.07em}.jarvis-command-state .jcs-resources b{display:block;margin-top:3px;color:#d5efff;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:620px){.jarvis-command-state .jcs-resources{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Focused usability polish — preserve cyan/violet identity and existing gates. */
#tabBar .tab-btn { min-height: 44px !important; }
#tabBar .tab-btn.active {
  color: #05131d !important;
  background: #59e5ff !important;
  border-color: #b6f5ff !important;
  box-shadow: inset 0 -3px 0 #16889e, 0 3px 14px #22d3ee24 !important;
}
#tabBar .tab-btn:is([data-tab="opsec"], [data-tab="attack"], [data-tab="recon"]) {
  border-color: #b99a505e !important;
}
button:not(:disabled):not([aria-disabled="true"]):hover { filter: brightness(1.1); }
button:not(:disabled):not([aria-disabled="true"]):active { transform: translateY(1px) !important; }
button:disabled, button[aria-disabled="true"] {
  opacity: .55 !important; cursor: not-allowed !important;
  transform: none !important; filter: none !important; box-shadow: none !important;
}
button[aria-busy="true"] { cursor: progress !important; }
button[aria-busy="true"]::after { content: ' …'; }
button[data-ui-state="success"] { border-color: #4adead !important; }
button[data-ui-state="error"] { border-color: #fb7185 !important; }
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid #b6f5ff !important; outline-offset: 3px !important;
}
.jp-palette-input-wrap:focus-within { outline: 2px solid var(--jp-cyan); outline-offset: 3px; }
.jp-palette-esc { background: #182338; color: var(--jp-ink); min-height: 36px; cursor: pointer; }
.jp-palette-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.do-bar-row > button, .btn-full.cyan {
  background: #59e5ff !important; color: #05131d !important;
  border: 1px solid #a1efff !important; font-weight: 800 !important;
  min-height: 44px; padding: 10px 18px;
}
.btn.btn-red, .btn-full.red {
  color: #ffc5cc !important; border-color: #fb71857a !important;
  background: #fb718514 !important;
}
.btn.btn-red:hover, .btn-full.red:hover { border-color: #fb7185 !important; }
.btn .btn-desc { max-height: none !important; line-height: 1.45; }
.card-title { line-height: 1.4; }
.status-item { color: #c5d4e6 !important; line-height: 1.4; }
#content :is(input, textarea, select) { min-width: 0; max-width: 100%; }
#body-target-bar { flex-wrap: wrap; gap: 8px; }
#body-target-bar select { min-width: 0; }
.do-bar-row { gap: 10px; }
.do-bar-row input { min-width: 0; }
@media (max-width: 720px) {
  #softChrome { display: flex !important; flex-wrap: wrap; }
  #softChrome .sc-title { flex: 1 1 100px; }
  #softChrome :is(.jp-command-trigger, .jp-refresh-trigger, .sc-jobs, .sc-platforms) {
    min-width: 44px !important; min-height: 44px !important;
  }
  .do-bar-row { flex-wrap: wrap; }
  .do-bar-row input { flex: 1 1 180px; }
  .do-bar-row > button { flex: 0 0 auto; }
  .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .btn { overflow-wrap: anywhere; }
  #controlled-tools-panel { max-height: calc(100dvh - 100px); overflow-y: auto; }
  #controlled-tools-toggle { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
}
@media (max-width: 380px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr) !important; }
  .status-item { flex-wrap: wrap; padding: 8px !important; }
}
