:root{
--bg:#03111d;--panel:#071a2a;--panel2:#0a2134;--line:#1b3b55;--text:#f5f2ea;
--muted:#91a5b8;--orange:#ff8b2a;--orange2:#ffb15b;--ok:#26d98a;--shadow:0 24px 70px #0008
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:radial-gradient(circle at 65% 0,#10324a 0,#03111d 42%,#020a12 100%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}
body{overflow-x:hidden}
button,input{font:inherit}button{cursor:pointer}
.ambient{position:fixed;inset:0;pointer-events:none;background:linear-gradient(120deg,#ff7a1808,transparent 40%,#3d8dff08)}
.topbar{height:76px;border-bottom:1px solid #ffffff12;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,64px);position:sticky;top:0;background:#03111dec;backdrop-filter:blur(14px);z-index:5}
.brand{display:flex;gap:12px;align-items:center;min-width:0}.brand-mark{width:40px;height:40px;border:2px solid var(--orange);border-radius:13px;display:grid;place-items:center;color:var(--orange);font-weight:900;flex:0 0 auto}.brand strong{font-size:21px}.brand strong span,footer span{color:var(--orange)}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.top-actions{display:flex;align-items:center;gap:14px}.ghost-btn{background:none;border:1px solid #24445e;color:#c9d5df;border-radius:20px;padding:7px 12px}.user-chip{border:1px solid #24445e;border-radius:30px;padding:5px 10px 5px 6px;display:flex;align-items:center;gap:9px}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#102c42;border:1px solid #37617f}
.login-view{min-height:calc(100vh - 76px);display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:clamp(24px,4vw,64px);align-items:center;max-width:1500px;margin:auto;padding:clamp(24px,5vh,56px) clamp(16px,5vw,72px)}
.hero-art,.hero-panel-art{position:relative;overflow:hidden;background:linear-gradient(180deg,#102d43,#071522 60%,#11110d);border:1px solid #27455c;box-shadow:var(--shadow)}
.hero-art{height:min(650px,68vh);min-height:480px;border-radius:28px}
.sun{position:absolute;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,#ffd18b,#ff7d2a 45%,transparent 70%);right:14%;top:15%;opacity:.8}.mountains{position:absolute;inset:auto 0 0;height:56%;background:linear-gradient(145deg,transparent 0 35%,#07111a 36% 51%,transparent 52%),linear-gradient(35deg,#07111a 0 45%,transparent 46%),linear-gradient(155deg,transparent 0 45%,#0b1720 46% 63%,transparent 64%);opacity:.95}
.marcel-asset{position:absolute;display:block;max-width:none;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 30px 55px #0009);user-select:none;pointer-events:none}.marcel-login-asset{left:18%;bottom:0;width:52%;height:auto;z-index:1}
.hero-copy{position:absolute;left:6%;bottom:9%;z-index:2;max-width:52%}.eyebrow{letter-spacing:.16em;color:var(--orange2);font-size:11px;font-weight:800}.hero-copy h1{font-size:clamp(38px,4.4vw,60px);line-height:1;margin:8px 0 0}.hero-copy h2{font-size:clamp(23px,2.4vw,31px);line-height:1.1;margin:8px 0}.motto{color:#c9d6df;max-width:460px;line-height:1.55}
.login-card{background:#071a2af2;border:1px solid #284b64;border-radius:22px;padding:clamp(24px,3vw,36px);box-shadow:var(--shadow);max-width:480px;width:100%;justify-self:end}.lock-icon{color:var(--orange);font-size:34px}.login-card h3{font-size:27px;margin:8px 0}.login-card p{color:var(--muted)}label{display:block;color:#b8c7d2;font-size:13px;margin:18px 0}input{display:block;width:100%;margin-top:7px;padding:13px 14px;border-radius:10px;border:1px solid #284b64;background:#041321;color:var(--text);outline:none}input:focus{border-color:var(--orange);box-shadow:0 0 0 3px #ff8b2a18}.primary{border:0;border-radius:11px;padding:13px 17px;background:linear-gradient(135deg,#ff9b3b,#ff7b18);color:#1a0d03;font-weight:900;box-shadow:0 10px 30px #ff8b2a25}.primary b{float:right}.error{margin-top:14px;padding:10px;border:1px solid #8d392f;background:#7b241f33;color:#ffb3a9;border-radius:9px}
.welcome{max-width:1500px;margin:0 auto;padding:30px clamp(16px,5vw,72px) 18px;display:flex;justify-content:space-between;align-items:end}.welcome h1{font-size:clamp(36px,4vw,48px);margin:5px 0}.welcome p:not(.eyebrow){color:var(--muted)}.status{color:var(--ok);font-size:13px}.status i{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ok);box-shadow:0 0 12px var(--ok)}

.tiles{max-width:1500px;margin:0 auto 22px;padding:0 clamp(16px,5vw,72px);display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.tile{position:relative;text-align:left;padding:20px;background:#071a2a;border:1px solid #1b3c54;border-radius:17px;color:var(--text);transition:.18s;min-height:120px}.tile:hover{transform:translateY(-2px);border-color:#3b6684}.tile span{font-size:25px;color:var(--orange);display:block;margin-bottom:16px}.tile strong,.tile small{display:block}.tile small{color:var(--muted);margin-top:5px}.tile>b{position:absolute;right:17px;bottom:18px;color:#7590a4}
.columns{max-width:1500px;margin:0 auto;padding:0 clamp(16px,5vw,72px);display:grid;grid-template-columns:1.5fr 1fr .9fr;gap:12px}.panel{background:#061727;border:1px solid #1b3c54;border-radius:17px;padding:20px}.panel header{display:flex;justify-content:space-between;align-items:center}.panel h3{margin:0;font-size:16px}.panel header button{background:none;border:0;color:#8fa8ba}.list{list-style:none;padding:5px 0 0;margin:0}.list li{padding:13px 0;border-bottom:1px solid #ffffff0b;color:#d9e2e8}.list i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#4e91cc;margin-right:10px}.quick{display:grid;gap:8px;margin-top:12px}.quick button{background:#0a2134;border:1px solid #173950;color:#cbd8e0;padding:10px;border-radius:9px;text-align:left}.cage-gate{border-color:#6b3e16;background:linear-gradient(180deg,#1b160f,#071727)}.cage-lock{color:var(--orange);font-size:25px}.cage-gate p{color:var(--muted);font-size:13px;line-height:1.5}.secure{width:100%;padding:11px;border-radius:9px;border:1px solid var(--orange);background:#ff8b2a12;color:var(--orange2);font-weight:700}.security-note{display:block;color:#718b9e;margin-top:10px;line-height:1.4}
footer{border-top:1px solid #ffffff12;padding:22px clamp(16px,5vw,72px);color:#72889a;font-size:12px;margin-top:40px}footer em{float:right;font-style:normal}
@media(max-width:1100px){
.login-view{grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr)}.hero-art{height:560px}.marcel-login-asset{left:16%;width:58%}.hero-copy{max-width:58%}.hero-copy h1{font-size:46px}

}
@media(max-width:780px){
.topbar{height:68px}.login-view{grid-template-columns:1fr;min-height:auto;padding:18px 16px 30px;gap:18px}.hero-art{height:430px;min-height:0}.marcel-login-asset{left:26%;width:60%}.hero-copy{left:6%;bottom:7%;max-width:64%}.hero-copy h1{font-size:42px}.hero-copy h2{font-size:24px}.motto{font-size:14px}.login-card{justify-self:stretch;max-width:none}

}
@media(max-width:520px){
.topbar{padding:0 12px}.brand{gap:8px}.brand-mark{width:36px;height:36px;border-radius:11px}.brand strong{font-size:18px}.brand small{display:none}.top-actions{gap:7px}.ghost-btn{padding:7px 9px}.user-chip{padding:4px 7px 4px 5px}.user-chip #userName{display:none}
.login-view{padding:12px}.hero-art{height:340px;border-radius:20px}.marcel-login-asset{left:34%;width:65%}.hero-copy{left:6%;bottom:7%;max-width:65%}.hero-copy h1{font-size:34px}.hero-copy h2{font-size:20px}.motto{font-size:12px;max-width:250px}.login-card{padding:22px;border-radius:18px}.login-card h3{font-size:23px}

.tiles{padding:0 12px;grid-template-columns:1fr;gap:9px}.tile{min-height:92px;padding:17px}.tile span{display:inline-block;margin:0 12px 0 0}.tile strong{display:inline-block}.tile small{margin-left:38px}.tile>b{right:16px;top:34px;bottom:auto}.columns{padding:0 12px}.panel{padding:17px}footer{padding:18px 12px}footer em{float:none;display:block;margin-top:5px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
[hidden]{display:none!important}

/* ============================================================
   WEB-V1.1 / P2.2.2 — AUTHORITATIVE RESPONSIVE HERO LAYOUT
   Desktop composition preserved.
   Mobile composition deliberately separated.
   ============================================================ */

/* ------------------------------------------------------------
   LOGIN / DASHBOARD SHARED POSITIONING
   ------------------------------------------------------------ */

.hero{
  position:relative;
}

/* ------------------------------------------------------------
   DASHBOARD HERO — SHARED
   ------------------------------------------------------------ */

.hero-panel{
  max-width:1500px;
  margin:0 auto 22px;
  padding:0 clamp(16px,5vw,72px);
  position:relative;
  box-sizing:border-box;
}

.hero-panel-art{
  position:relative;
  width:100%;
  height:330px;
  overflow:hidden;
  box-sizing:border-box;
  border-radius:25px;
  border:1px solid #27455c;
  background:#071a2a;
  box-shadow:var(--shadow);
}

.hero-panel-scene{
  position:absolute;
  inset:0 0 0 auto;
  width:58%;
  height:100%;
  z-index:2;
  background:
    linear-gradient(90deg,#071a2a 0%,#071a2a00 32%),
    url('/assets/marcel-dashboard.png') right center / auto 100% no-repeat;
}

.hero-panel-copy{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:48%;
  min-height:0;
  box-sizing:border-box;
  padding:clamp(38px,4vw,54px) clamp(28px,3.2vw,50px);
  background:
    linear-gradient(
      90deg,
      #061727f7 0%,
      #061727e8 68%,
      #06172700 100%
    );
  z-index:5;
}

.hero-panel-copy .eyebrow{
  margin:0 0 10px;
}

.hero-panel-copy h2{
  margin:0 0 12px;
  font-size:clamp(36px,3.5vw,52px);
  line-height:1.02;
  max-width:100%;
  overflow-wrap:break-word;
}

.hero-panel-copy p:not(.eyebrow){
  margin:0;
  max-width:430px;
  font-size:clamp(15px,1.25vw,18px);
  line-height:1.45;
}

.hero-panel-copy .large{
  display:inline-block;
  max-width:100%;
  margin-top:22px;
  white-space:nowrap;
}

.hero-panel-motto{
  position:absolute;
  left:49%;
  top:22%;
  width:15%;
  max-width:220px;
  z-index:6;
  color:#ffb27a;
  font-size:clamp(18px,1.7vw,28px);
  line-height:1.08;
  text-align:center;
  font-style:italic;
  font-weight:600;
  transform:rotate(-3deg);
  text-shadow:0 4px 20px #0008;
}

.hero-panel-art .sun,
.hero-panel-art .mountains{
  display:none;
}

#dashboardView > .welcome{
  display:none;
}

/* ------------------------------------------------------------
   DESKTOP
   ------------------------------------------------------------ */

@media (min-width:1101px){

  .topbar{
    position:relative;
    z-index:20;
  }

  .header-status{
    display:flex;
    align-items:center;
    gap:7px;
    margin-left:auto;
    margin-right:24px;
    white-space:nowrap;
    flex:0 0 auto;
  }

  .hero-status{
    display:none;
  }
}

/* ------------------------------------------------------------
   LAPTOP
   ------------------------------------------------------------ */

@media (min-width:1101px) and (max-width:1350px){

  .header-status{
    margin-right:16px;
    font-size:12px;
  }

  .hero-panel-copy{
    width:50%;
    padding:34px 32px;
  }

  .hero-panel-copy h2{
    font-size:40px;
  }

  .hero-panel-copy p:not(.eyebrow){
    font-size:15px;
    max-width:370px;
  }

  .hero-panel-motto{
    left:50%;
    width:16%;
    font-size:19px;
  }
}

/* ------------------------------------------------------------
   TABLET
   ------------------------------------------------------------ */

@media (max-width:1100px){

  .header-status{
    display:none;
  }

  .hero-panel{
    padding:0 16px;
  }

  .hero-panel-art{
    height:300px;
  }

  .hero-panel-scene{
    width:58%;
    height:100%;
    background:
      linear-gradient(90deg,#071a2a 0%,#071a2a00 45%),
      url('/assets/marcel-dashboard.png') right bottom / auto 100% no-repeat;
  }

  .hero-panel-copy{
    width:72%;
    padding:36px 28px;
  }

  .hero-panel-copy h2{
    font-size:32px;
  }

  .hero-panel-motto{
    left:8%;
    top:auto;
    bottom:22px;
    width:38%;
    max-width:180px;
    font-size:20px;
  }
}

/* ------------------------------------------------------------
   MOBILE — LOGIN
   ------------------------------------------------------------ */

@media (max-width:780px){

  .login-view{
    grid-template-columns:1fr;
    min-height:auto;
    padding:18px 16px 30px;
    gap:18px;
  }

  .hero{
    position:relative;
    width:100%;
  }

  .hero-art{
    height:430px;
    min-height:0;
  }

  .marcel-login-asset{
    left:26%;
    width:60%;
  }

  .hero-copy{
    left:6%;
    right:6%;
    bottom:7%;
    width:88%;
    max-width:none;
    z-index:3;
  }

  .hero-copy h1{
    font-size:42px;
  }

  .hero-copy h2{
    font-size:24px;
  }

  .motto{
    font-size:14px;
  }

  .login-card{
    position:relative;
    z-index:4;
    justify-self:stretch;
    max-width:none;
  }

  .welcome{
    padding:25px 16px 16px;
    display:block;
  }

  .status{
    margin-top:10px;
  }

  .tiles{
    padding:0 16px;
    grid-template-columns:repeat(2,1fr);
  }

  .columns{
    padding:0 16px;
    grid-template-columns:1fr;
  }
}

/* ------------------------------------------------------------
   MOBILE — FINAL COMPOSITION
   Image/devises and textual/action content are separate.
   ------------------------------------------------------------ */

@media (max-width:520px){

  .topbar{
    padding:0 12px;
  }

  .brand{
    gap:8px;
  }

  .brand-mark{
    width:36px;
    height:36px;
    border-radius:11px;
  }

  .brand strong{
    font-size:18px;
  }

  .brand small{
    display:none;
  }

  .top-actions{
    gap:7px;
  }

  .ghost-btn{
    padding:7px 9px;
  }

  .user-chip{
    padding:4px 7px 4px 5px;
  }

  .user-chip #userName{
    display:none;
  }

  /* LOGIN --------------------------------------------------- */

  .login-view{
    padding:12px;
    gap:18px;
  }

  .hero{
    position:relative;
  }

  .hero-art{
    height:360px;
    min-height:0;
    border-radius:20px;
  }

  .marcel-login-asset{
    left:43%;
    width:52%;
    height:auto;
  }

  .hero-copy{
    left:6%;
    right:6%;
    bottom:18px;
    width:88%;
    max-width:none;
    padding-right:6%;
    z-index:3;
  }

  .hero-copy h1{
    font-size:32px;
  }

  .hero-copy h2{
    font-size:19px;
  }

  .motto{
    font-size:12px;
    max-width:230px;
  }

  .login-card{
    position:relative;
    z-index:4;
    margin-top:0;
    padding:22px;
    border-radius:18px;
  }

  /* DASHBOARD ---------------------------------------------- */

  /*
     Mobile deliberately abandons the desktop overlay.
     The visual hero is one block.
     The welcome/action content is a separate block.
  */

  .hero-panel{
    padding:0 12px;
  }

  .hero-panel-art{
    height:250px;
    border-radius:20px;
  }

  .hero-panel-scene{
    inset:0;
    width:100%;
    height:100%;
    background:
      linear-gradient(90deg,#071a2a55 0%,#071a2a00 55%),
      url('/assets/marcel-dashboard.png') center bottom / auto 100% no-repeat;
  }

  .hero-panel-motto{
    left:8%;
    right:auto;
    top:auto;
    bottom:18px;
    width:42%;
    max-width:150px;
    font-size:18px;
    z-index:4;
  }

  .hero-panel-copy{
    position:relative;
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;

    width:100%;
    min-height:0;
    height:auto;

    margin-top:12px;
    padding:25px 20px;

    background:#061727;
    border:1px solid #27455c;
    border-radius:20px;

    z-index:1;
  }

  .hero-panel-copy h2{
    font-size:27px;
  }

  .hero-panel-copy p:not(.eyebrow){
    font-size:14px;
    max-width:100%;
  }

  .hero-panel-copy .large{
    white-space:normal;
  }

  .tiles{
    padding:0 12px;
    grid-template-columns:1fr;
    gap:9px;
  }

  .tile{
    min-height:92px;
    padding:17px;
  }

  .tile span{
    display:inline-block;
    margin:0 12px 0 0;
  }

  .tile strong{
    display:inline-block;
  }

  .tile small{
    margin-left:38px;
  }

  .tile>b{
    right:16px;
    top:34px;
    bottom:auto;
  }

  .columns{
    padding:0 12px;
  }

  .panel{
    padding:17px;
  }

  footer{
    padding:18px 12px;
  }

  footer em{
    float:none;
    display:block;
    margin-top:5px;
  }
}

/* TELEMETRY V1 — OWNER SYSTEM STATUS */
.owner-system-status{
  margin-top:1rem;
  padding:1rem;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:rgba(5,15,30,.72);
}

.owner-system-status-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

.owner-system-status-kicker{
  font-size:.68rem;
  letter-spacing:.14em;
  opacity:.65;
}

.owner-system-status-head h3{
  margin:.25rem 0;
}

.owner-system-status-head p{
  margin:.25rem 0 0;
  opacity:.72;
  font-size:.85rem;
}

.system-status-body{
  display:grid;
  gap:.55rem;
  margin-top:1rem;
}

.system-status-row{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:.4rem .8rem;
  padding:.7rem .8rem;
  border-radius:12px;
  background:rgba(255,255,255,.035);
}

.system-status-label{
  opacity:.65;
}

.system-status-value{
  font-weight:600;
}

.system-status-row small{
  grid-column:2;
  opacity:.58;
  font-size:.72rem;
}

.system-status-generated{
  display:block;
  margin-top:.7rem;
  opacity:.45;
  font-size:.7rem;
}

@media(max-width:640px){
  .owner-system-status-head{
    flex-direction:column;
  }

  .owner-system-status-head .secure{
    width:100%;
  }

  .system-status-row{
    grid-template-columns:1fr;
  }

  .system-status-row small{
    grid-column:1;
  }
}


/* OWNER_VALIDATOR_LAB_V1 */
.owner-validator{margin:1rem 0;padding:1.2rem;border:1px solid #34445a;border-radius:14px;background:var(--panel,#101c2b);color:inherit}
.owner-validator-head h3{margin:.35rem 0}
.owner-validator p{line-height:1.5}
.validator-form{display:grid;gap:.55rem;max-width:680px;margin:1rem 0}
.validator-form input,.validator-form textarea,.validator-form select{box-sizing:border-box;width:100%;padding:.7rem;border:1px solid #53657a;border-radius:8px;background:#0c1623;color:inherit;font:inherit}
.validator-form button,.validator-actions button,.coucou-settings button{padding:.65rem .85rem;border:1px solid #64758a;border-radius:8px;background:#17283b;color:inherit;cursor:pointer}
.validator-form button:disabled,.validator-actions button:disabled{opacity:.5;cursor:wait}
.validator-task-list{display:grid;gap:.75rem}
.validator-task{padding:.85rem;border:1px solid #34445a;border-radius:10px}
.validator-task h4{margin:.1rem 0 .5rem}
.validator-task small{display:block;line-height:1.5;overflow-wrap:anywhere;color:#c0ccda}
.validator-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.75rem}
.coucou-controls{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;padding:1rem;margin:1rem 0;border:1px solid #34445a;border-radius:12px}
.coucou-house{position:relative;display:grid;place-items:center;width:78px;height:68px;border:2px solid #b87943;border-radius:8px;background:#30251f;overflow:hidden}
.coucou-roof{position:absolute;top:-12px;font-size:30px;color:#e9a45d}
.coucou-door{position:absolute;bottom:0;font-size:38px;color:#e9c69a}
.coucou-bird{position:absolute;top:18px;left:26px;font-size:25px;transform:translateY(22px);opacity:.15}
.coucou-bird.coucou-pop{animation:coucouPop 1.1s ease-out}
.coucou-settings{display:grid;gap:.5rem;min-width:180px}
@keyframes coucouPop{0%{transform:translateY(22px) scale(.65);opacity:0}25%{transform:translateY(-15px) scale(1.15);opacity:1}65%{transform:translateY(-15px) scale(1);opacity:1}100%{transform:translateY(22px) scale(.8);opacity:0}}
@media(prefers-reduced-motion:reduce){.coucou-bird.coucou-pop{animation:none;transform:translateY(-12px);opacity:1}}



/* OWNER_TELEMETRY_COMPACT_V1 */
.owner-system-status,
.owner-system-status * {
  box-sizing: border-box;
}

.owner-system-status {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.owner-system-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.owner-system-status-head > div {
  flex: 1 1 240px;
  min-width: 0;
}

.owner-system-status-head #systemStatusRefresh {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: .7rem 1.25rem;
  white-space: nowrap;
}

.system-status-body {
  display: grid;
  gap: .55rem;
  min-width: 0;
}

.system-status-row {
  display: grid;
  grid-template-columns: minmax(100px, .65fr) minmax(100px, 1fr);
  align-items: center;
  gap: .35rem 1rem;
  min-width: 0;
  padding: .8rem 1rem;
}

.system-status-row > small {
  grid-column: 2;
  overflow-wrap: anywhere;
}

.system-status-value {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.system-status-value::before {
  content: "";
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8792a2;
  box-shadow: 0 0 0 3px #8792a222;
}

.system-status-row[data-state="RUNNING"] .system-status-value::before {
  background: #35c875;
  box-shadow: 0 0 0 3px #35c87525;
}

.system-status-row[data-state="INACTIVE"] .system-status-value::before {
  background: #f0ae45;
  box-shadow: 0 0 0 3px #f0ae4525;
}

.system-status-row[data-state="UNHEALTHY"] .system-status-value::before,
.system-status-row[data-state="FAILED"] .system-status-value::before,
.system-status-row[data-state="ERROR"] .system-status-value::before {
  background: #f05b65;
  box-shadow: 0 0 0 3px #f05b6525;
}

.system-status-row[data-state="UNKNOWN"] .system-status-value::before {
  background: #8792a2;
}

@media (max-width: 650px) {
  .owner-system-status-head {
    align-items: stretch;
  }
  .owner-system-status-head #systemStatusRefresh {
    align-self: flex-start;
  }
  .system-status-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .system-status-row > small {
    grid-column: 1;
  }
}

/* Fin OWNER_TELEMETRY_COMPACT_V1 */

/* SEC-AUDIT-001 — rapport compact, export intégral */
.leon-mission-summary {
  margin:.8rem 0;
  padding:.85rem 1rem;
  border:1px solid #34445a;
  border-radius:10px;
  background:rgba(5,15,30,.55);
  line-height:1.55;
  overflow-wrap:anywhere;
}
.leon-mission-actions {
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  margin:.75rem 0;
}
.leon-mission-actions button:disabled {
  opacity:.5;
  cursor:not-allowed;
}
.leon-mission-details {
  margin-top:.75rem;
  border:1px solid #34445a;
  border-radius:10px;
  overflow:hidden;
}
.leon-mission-details summary {
  padding:.8rem 1rem;
  cursor:pointer;
  font-weight:650;
}
.leon-mission-report {
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  max-height:24rem;
  margin:0;
  padding:1rem;
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  overscroll-behavior:contain;
  border-top:1px solid #34445a;
  background:rgba(2,10,18,.7);
  font: .82rem/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
}

/* CHAT_UI_POLISH_001 — LAB candidate */
button {
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid #31516a;
  border-radius: 10px;
  background: linear-gradient(180deg, #123047, #0a2134);
  color: var(--text);
  font-weight: 650;
  transition: border-color .16s ease, background .16s ease,
              box-shadow .16s ease, transform .16s ease;
}

button:hover:not(:disabled) {
  border-color: var(--orange);
  box-shadow: 0 4px 16px #0003;
}

button:focus-visible {
  outline: 2px solid var(--orange2);
  outline-offset: 3px;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button.primary,
#chatSend {
  border-color: transparent;
  background: linear-gradient(135deg, var(--orange2), var(--orange));
  color: #1a0d03;
  font-weight: 800;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  width: min(100% - 32px, 1000px);
  height: min(760px, calc(100dvh - 112px));
  min-height: 320px;
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  box-shadow: var(--shadow);
}

.chat-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.chat-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.chat-history {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
}

.chat-message {
  max-width: min(82%, 720px);
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.user {
  align-self: flex-end;
  border-color: #805020;
  border-bottom-right-radius: 4px;
  background: #4a2b16;
}

.chat-message.assistant {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: #0a2134;
}

.chat-form {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #041321;
}

.chat-form input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.chat-form button {
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .chat-panel {
    width: calc(100% - 16px);
    height: calc(100dvh - 88px);
    min-height: 280px;
    margin: 8px auto;
    border-radius: 14px;
  }

  .chat-history {
    padding: 12px;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-form {
    gap: 8px;
    padding: 10px;
  }

  .chat-form button {
    padding: 10px 12px;
  }
}
/* END CHAT_UI_POLISH_001 */

/* LAB v2 — affichage télémétrie : libellé et valeur côte à côte, texte lisible */
.system-status-row { grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr); }
.system-status-label { font-size: 1rem; }
.system-status-value { font-size: 1rem; }
.system-status-row > small { font-size: .85rem; }

/* LAB v3 — télémétrie : unités relatives (rem, minmax, fr) : le cadre suit le zoom. Couleurs OK / WARNING / CRITICAL */
.system-status-row { padding: 1rem 1.1rem; }
.system-status-label { font-size: 1.05rem; }
.system-status-value { font-size: 1.1rem; }
.system-status-row > small { font-size: .9rem; line-height: 1.4; }
.system-status-row[data-state="OK"] .system-status-value::before { background: #35c875; box-shadow: 0 0 0 3px #35c87525; }
.system-status-row[data-state="WARNING"] .system-status-value::before { background: #f0ae45; box-shadow: 0 0 0 3px #f0ae4525; }
.system-status-row[data-state="CRITICAL"] .system-status-value::before { background: #f05b65; box-shadow: 0 0 0 3px #f05b6525; }

/* Cadre aligné sur les panneaux du tableau de bord (.columns : max 1500 px, gouttière clamp) */
#ownerSystemStatus {
  width: min(1500px, 100% - 2 * clamp(16px, 5vw, 72px));
  max-width: none;
  margin: 1rem auto 0;
  box-sizing: border-box;
}

/* LAB candidate 05: visual hover parity for the account chip */
.user-chip {
  transition: border-color .18s ease, box-shadow .18s ease;
}
.user-chip:hover,
.user-chip:focus-within {
  border-color: var(--orange, #ff8a32);
  box-shadow: 0 0 0 1px var(--orange, #ff8a32);
}


/* LAB feature panels: projects and notes remain browser-local. */
.cm-section-view { max-width: min(1500px, 100% - 2 * clamp(16px, 5vw, 72px)); margin: 22px auto; }
.cm-section-view > header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; flex-wrap:wrap; }
.cm-section-view h2 { margin:.3rem 0; }
.cm-section-view header p:not(.eyebrow) { color:var(--muted); }
.cm-section-content { margin-top:1.25rem; }
.cm-section-content form { display:grid; gap:.65rem; max-width:42rem; }
.cm-entry-row { display:flex; gap:.5rem; flex-wrap:wrap; }
.cm-entry-row input { flex:1; min-width:12rem; }
.cm-entry-row button, .cm-items button, .cm-section-view header button { padding:.65rem .85rem; border:1px solid #64758a; border-radius:8px; background:#17283b; color:inherit; cursor:pointer; }
.cm-items { list-style:none; padding:0; margin:1.25rem 0; display:grid; gap:.6rem; }
.cm-items li { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem; border:1px solid var(--line); border-radius:.65rem; overflow-wrap:anywhere; }
.cm-local-note { color:var(--muted); font-size:.9rem; margin-top:1rem; }
@media(max-width:520px){ .cm-section-view { max-width:calc(100% - 24px); margin:12px auto; padding:17px; } .cm-items li { align-items:flex-start; flex-direction:column; } }
/* ISC-CONTROLS-V1.1.0 — contrôle ISC owner */
.isc-controls { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(127,127,127,.35); }
.isc-controls-head p { margin: .25rem 0 .75rem; opacity: .85; }
.isc-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }
.isc-buttons button { min-height: 44px; padding: .55rem 1rem; border-radius: .6rem; cursor: pointer; }
.isc-buttons button:disabled { opacity: .55; cursor: wait; }
.isc-buttons button.isc-danger { border-color: #c0392b; color: #c0392b; }
.isc-buttons button.isc-bau { background: #c0392b; color: #fff; border-color: #c0392b; font-weight: 700; }
.isc-status-line { margin: .75rem 0 .25rem; font-weight: 600; }
.isc-status-line[data-tone="ok"] { color: #1e8e3e; }
.isc-status-line[data-tone="warn"] { color: #b26a00; }
.isc-status-line[data-tone="error"] { color: #c0392b; }
.isc-output { white-space: pre-wrap; word-break: break-word; font-size: .85rem; max-height: 14rem; overflow: auto; padding: .6rem; border-radius: .5rem; background: rgba(127,127,127,.12); }

.chat-model-info { display: block; margin-top: .6rem; font-size: .8rem; opacity: .7; }

/* Personal home and dedicated Owner workspace. */
.tiles { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.daily-home { width:min(1500px,100%); margin:0 auto; padding:0 clamp(16px,5vw,72px); display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:16px; box-sizing:border-box; }
.daily-focus { grid-row:span 2; }
.daily-home .panel { min-width:0; }
.section-intro { color:var(--muted); line-height:1.5; font-size:.9rem; }
.daily-progress { color:var(--orange2); white-space:nowrap; font-size:.85rem; }
.cm-entry-row { display:flex; align-items:center; gap:10px; }
.cm-entry-row input { min-width:0; flex:1; margin:0; }
.daily-priorities,.home-projects { list-style:none; padding:0; margin:18px 0 0; }
.daily-priorities li { display:flex; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
.daily-priorities label { display:flex; flex:1; gap:12px; align-items:center; margin:0; font-size:1rem; overflow-wrap:anywhere; }
.daily-priorities input[type=checkbox] { width:22px; height:22px; margin:0; flex-shrink:0; accent-color:var(--orange); }
.daily-priorities .is-done span { text-decoration:line-through; color:var(--muted); }
.daily-priorities button { border:0; background:transparent; color:var(--muted); padding:10px; }
.daily-empty { color:var(--muted); }
.home-projects li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.home-projects small { color:var(--orange2); white-space:nowrap; }
.owner-view { width:min(1500px,100%); margin:0 auto; padding:24px clamp(16px,5vw,72px); box-sizing:border-box; }
.workspace-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.workspace-head h2 { margin:4px 0; font-size:clamp(28px,4vw,40px); }
.workspace-head p { color:var(--muted); }
#ownerView #ownerSystemStatus { width:100%; margin:0; }
#ownerView .owner-validator { width:100%; box-sizing:border-box; }
.cm-section-view { width:min(1250px,calc(100% - 32px)); margin:24px auto; box-sizing:border-box; }
.cm-items { padding:0; list-style:none; }
.cm-items li { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.cm-items li>span { flex:1; overflow-wrap:anywhere; }
.cm-items button { padding:8px; border:1px solid var(--line); border-radius:8px; background:transparent; color:var(--text); }
.cm-local-note { color:var(--muted); font-size:.85rem; }
@media(max-width:780px){.daily-home{grid-template-columns:1fr;}.daily-focus{grid-row:auto;}.workspace-head{align-items:flex-start;}}
@media(max-width:520px){.tiles{grid-template-columns:1fr;}.daily-home{padding:0 12px;}.owner-view{padding:16px 12px;}.workspace-head{flex-direction:column;}.cm-entry-row{flex-wrap:wrap;}.cm-entry-row .primary{width:100%;}.daily-home header{align-items:flex-start;gap:10px;flex-wrap:wrap;}.home-projects li{align-items:flex-start;}.cm-items li{flex-wrap:wrap;}}
#ownerView .leon-mission-form select { width:100%; max-width:100%; min-width:0; box-sizing:border-box; padding:10px; color:var(--text); background:var(--bg); border:1px solid var(--line); border-radius:8px; }
.tile small { padding-right:14px; }
@media(max-width:780px){.hero-panel-motto{display:none;}}
.owner-crown svg { display:block; }
.cm-sync-status { color:var(--muted); font-size:.85rem; line-height:1.5; }

/* Settings stylesheet served externally for the production CSP. */

  #cm-settings-overlay{position:fixed;inset:0;z-index:99999;background:#07111ee8;
    display:flex;align-items:center;justify-content:center;padding:18px;color:#f4eee3}
  #cm-settings{width:min(1040px,100%);max-height:92vh;overflow:auto;background:#101e30;
    border:1px solid #34445a;border-radius:16px;box-shadow:0 24px 80px #0009}
  #cm-settings *{box-sizing:border-box}
  #cm-settings .cm-head{display:flex;justify-content:space-between;align-items:center;
    gap:12px;padding:20px 24px;border-bottom:1px solid #34445a}
  #cm-settings h2,#cm-settings h3{margin:0 0 10px}
  #cm-settings .cm-body{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:420px}
  #cm-settings nav{padding:14px;border-right:1px solid #34445a}
  #cm-settings nav button{display:block;width:100%;text-align:left;margin:4px 0;
    background:transparent;color:#f4eee3;border:1px solid transparent;border-radius:8px;
    padding:11px;cursor:pointer}
  #cm-settings nav button[aria-selected="true"]{background:#26364a;border-color:#f28c28}
  #cm-settings .cm-content{padding:24px;min-width:0}
  #cm-settings .cm-section{display:none}
  #cm-settings .cm-section.active{display:block}
  #cm-settings label{display:block;margin:14px 0 6px}
  #cm-settings input,#cm-settings select{width:100%;padding:11px;border-radius:8px;
    border:1px solid #506078;background:#091523;color:#f4eee3}
  #cm-settings button.cm-primary{background:#f28c28;color:#171717;border:0;
    border-radius:8px;padding:11px 16px;font-weight:700;cursor:pointer}
  #cm-settings button.cm-close{background:transparent;color:#f4eee3;
    border:1px solid #506078;border-radius:8px;padding:8px 12px;cursor:pointer}
  #cm-settings .cm-note{color:#b9c5d4;font-size:.92rem;line-height:1.5}
  #cm-settings .cm-status{margin-top:12px;white-space:pre-wrap}
  @media(max-width:650px){
    #cm-settings-overlay{padding:6px}
    #cm-settings{max-height:96vh}
    #cm-settings .cm-body{grid-template-columns:1fr}
    #cm-settings nav{border-right:0;border-bottom:1px solid #34445a;
      display:grid;grid-template-columns:1fr 1fr;gap:4px}
    #cm-settings nav button{font-size:.86rem;padding:9px}
    #cm-settings .cm-content{padding:16px}
  }

.settings-modal{position:fixed;left:50%;top:15%;transform:translateX(-50%);width:min(420px,calc(100% - 32px));z-index:50;}
