  :root{
    --ink:#1c2230;
    --ink-soft:#5b6472;
    --paper:#eef1f6;
    --paper-raise:#ffffff;
    --line:#dde2ea;
    --brand:#0f6e8c;
    --brand-ink:#0b5069;
    --brand-tint:#e4f1f5;
    --amber:#e8a33d;
    --shadow: 0 18px 40px -18px rgba(20,30,50,.35);

    --status-static:#2f7bda;
    --status-idle:#f4b400;
    --status-moving:#34a853;
    --status-speeding:#e53935;
    --status-offline:#9aa0a6;
  }
  :root[data-theme="dark"]{
    --ink:#e9edf4;
    --ink-soft:#a7b0bf;
    --paper:#12151b;
    --paper-raise:#1a1e27;
    --line:#2a2f3a;
    --brand:#3fa9c7;
    --brand-ink:#8fd2e6;
    --brand-tint:#152a30;
    --shadow: 0 18px 40px -18px rgba(0,0,0,.6);
  }
  /* Auto dark-mode is intentionally DISABLED. This app's surfaces (callout,
     cards, overlays, toggle rows) are hardcoded light (#fff / rgba(255,255,255,…)),
     so flipping only the text tokens to near-white on a dark-OS phone left the
     labels near-white on white = unreadable (reported regression, Oct 2026).
     The light `:root` palette now always applies. The explicit
     `:root[data-theme="dark"]` opt-in above is kept for a future, fully-migrated
     dark theme; nothing sets that attribute today.
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --ink:#e9edf4;
      --ink-soft:#a7b0bf;
      --paper:#12151b;
      --paper-raise:#1a1e27;
      --line:#2a2f3a;
      --brand:#3fa9c7;
      --brand-ink:#8fd2e6;
      --brand-tint:#152a30;
      --shadow: 0 18px 40px -18px rgba(0,0,0,.6);
    }
  }
  */

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--paper);
    color:var(--ink);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
  }

  .page{
    max-width:1180px;
    margin:0 auto;
    padding:56px 28px 80px;
    display:flex;
    flex-direction:column;
    gap:40px;
  }

  /* ---------- Intro / masthead ---------- */
  .masthead{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:32px;
    flex-wrap:wrap;
    border-bottom:1px solid var(--line);
    padding-bottom:28px;
  }
  .brandmark{display:flex;align-items:center;gap:14px;}
  .brandmark .logo{
    width:44px;height:44px;border-radius:12px;
    background:linear-gradient(155deg,var(--brand),var(--brand-ink));
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-weight:800;font-size:15px;letter-spacing:.02em;
    box-shadow:var(--shadow);
    flex-shrink:0;
  }
  .brandmark h1{
    margin:0;font-size:22px;font-weight:800;letter-spacing:-.01em;
  }
  .brandmark p{
    margin:2px 0 0;color:var(--ink-soft);font-size:13.5px;
  }
  .masthead-note{
    max-width:380px;font-size:13px;line-height:1.55;color:var(--ink-soft);
  }
  .masthead-note b{color:var(--ink);font-weight:650;}

  /* ---------- Layout: phone + side panel ---------- */
  .studio{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:48px;
    align-items:start;
  }
  @media (max-width:920px){
    .studio{grid-template-columns:1fr;justify-items:center;}
  }

  /* ---------- Phone chrome ---------- */
  .phone-wrap{position:relative;flex-shrink:0;}
  .phone{
    width:375px;
    height:812px;
    background:#0c0d10;
    border-radius:46px;
    padding:14px;
    box-shadow:var(--shadow), 0 0 0 1px rgba(0,0,0,.4);
    position:relative;
  }
  .phone::before{
    content:"";
    position:absolute;
    top:14px;left:50%;transform:translateX(-50%);
    width:120px;height:26px;
    background:#0c0d10;
    border-radius:0 0 16px 16px;
    z-index:30;
  }
  .screen{
    width:100%;height:100%;
    background:#f4f6f9;
    border-radius:32px;
    overflow:hidden;
    position:relative;
    display:flex;
    flex-direction:column;
  }

  .statusbar{
    height:44px;flex:0 0 44px;
    display:flex;align-items:center;justify-content:space-between;
    padding:0 26px 0 24px;
    font-size:14px;font-weight:600;
    background:#232734;
    color:#fff;
    transition:background .15s ease, color .15s ease;
  }
  .statusbar.on-light{background:#eef1f6;color:#1c2230;}
  .statusbar .icons{display:flex;align-items:center;gap:5px;}

  .panels-wrap{flex:1 1 auto;position:relative;overflow:hidden;}

  .app-header{
    flex:0 0 auto;
    background:#232734;
    color:#fff;
    display:flex;align-items:center;gap:12px;
    padding:2px 16px 14px;
  }
  .app-header .hbtn{
    width:30px;height:30px;display:flex;align-items:center;justify-content:center;
    color:#fff;flex-shrink:0;background:none;border:none;padding:0;cursor:pointer;
  }
  .app-header .htitle{flex:1;font-size:16.5px;font-weight:650;text-align:center;padding-right:30px;letter-spacing:.01em;}
  .app-header.simple .htitle{text-align:left;padding-right:0;}

  .app-body{flex:1 1 auto;overflow-y:auto;background:#f4f6f9;position:relative;}
  .app-body::-webkit-scrollbar{width:0;}
  .screen-note{padding:12px 16px 2px;font-size:11.5px;color:#9aa0ab;line-height:1.4;}

  .bottomnav{
    flex:0 0 auto;
    display:flex;
    background:#fff;
    border-top:1px solid #e6e8ee;
    padding:8px 6px;
  }
  .bottomnav button{
    flex:1;background:none;border:none;display:flex;flex-direction:column;
    align-items:center;gap:3px;color:#9aa0ab;font-size:10.5px;font-weight:600;
    padding:4px 2px;cursor:pointer;position:relative;
    font-family:inherit;
  }
  .bottomnav button.active{color:var(--brand-ink,#0f6e8c);}
  .bottomnav svg{width:22px;height:22px;}

  /* OS-level nav bar (recent / home / back) — phone chrome, not part of the app,
     always visible regardless of which app screen is active. */
  .sysnav{
    flex:0 0 auto;
    display:flex;align-items:center;justify-content:space-evenly;
    height:38px;
    background:#e8eaee;
  }
  .sysnav button{
    background:none;border:none;color:#8a8f98;
    width:56px;height:100%;display:flex;align-items:center;justify-content:center;
    cursor:pointer;padding:0;
  }
  .sysnav svg{width:18px;height:18px;}

  .screen-panel{
    position:absolute;inset:0;
    display:flex;flex-direction:column;
    opacity:0;pointer-events:none;
    transform:translateX(14px);
    transition:opacity .22s ease, transform .22s ease;
  }
  .screen-panel.active{opacity:1;pointer-events:auto;transform:translateX(0);}

  .rowlist{background:#fff;margin:10px 16px 16px;border-radius:12px;overflow:hidden;box-shadow:0 1px 0 #e9ebf0;}
  .rowlist .r-item{
    display:flex;align-items:center;gap:12px;padding:13px 14px;
    border-bottom:1px solid #f0f1f5;background:none;border-left:none;border-right:none;border-top:none;
    width:100%;text-align:left;font-family:inherit;cursor:pointer;color:inherit;
  }
  .rowlist .r-item:last-child{border-bottom:none;}
  .r-item .r-icon{width:24px;height:24px;flex-shrink:0;display:flex;align-items:center;justify-content:center;}
  .r-item .r-txt{flex:1;min-width:0;}
  .r-item .r-title{font-size:13.5px;font-weight:700;color:#242a36;}
  .r-item .r-sub{font-size:11px;color:#9aa0ab;margin-top:2px;line-height:1.35;}
  .r-item .r-chev{width:16px;height:16px;color:#c3c7d1;flex-shrink:0;}
  .r-pill{font-size:9.5px;font-weight:700;padding:3px 8px;border-radius:20px;color:#fff;flex-shrink:0;white-space:nowrap;}

  /* ================= Map (Suivi) ================= */
  .map-wrap{position:relative;flex:1;overflow:hidden;background:
    linear-gradient(180deg,#eef2ea,#e7ede3);
  }
  .map-wrap .terrain{
    position:absolute;inset:0;
    background:
      radial-gradient(220px 160px at 20% 82%, rgba(120,170,140,.35), transparent 70%),
      radial-gradient(260px 200px at 88% 10%, rgba(120,170,220,.30), transparent 65%);
  }
  .map-wrap .blocks{
    position:absolute;inset:0;
    background-image:
      repeating-linear-gradient(0deg, rgba(255,255,255,.9) 0 3px, transparent 3px 76px),
      repeating-linear-gradient(90deg, rgba(255,255,255,.9) 0 3px, transparent 3px 96px),
      repeating-linear-gradient(37deg, rgba(255,255,255,.55) 0 2px, transparent 2px 140px);
  }
  .map-wrap .water{
    position:absolute;top:-40px;right:-60px;width:220px;height:220px;border-radius:50%;
    background:radial-gradient(circle at 35% 35%, #bcd8ea, #a7cbe4);
    opacity:.85;filter:blur(1px);
  }
  .legend-fab{
    position:absolute;right:12px;top:12px;z-index:5;
    width:36px;height:36px;border-radius:50%;background:#fff;border:none;
    box-shadow:0 6px 16px -4px rgba(20,30,50,.35);
    display:flex;align-items:center;justify-content:center;cursor:pointer;color:#3d4451;
  }
  .legend-fab svg{width:18px;height:18px;}

  .pin{
    position:absolute;width:40px;height:40px;transform:translate(-50%,-50%);
    z-index:4;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
  }
  .pin-scaler{display:flex;align-items:center;justify-content:center;transform-origin:50% 50%;}
  .pin-icon{
    width:38px;height:38px;object-fit:contain;
    transform-origin:50% 50%;
    transition:filter .15s ease;
  }
  .pin.st-static  .pin-icon{filter:url(#duo-static)   drop-shadow(0 3px 3px rgba(10,20,35,.5));}
  .pin.st-idle    .pin-icon{filter:url(#duo-idle)     drop-shadow(0 3px 3px rgba(10,20,35,.5));}
  .pin.st-moving  .pin-icon{filter:url(#duo-moving)   drop-shadow(0 3px 3px rgba(10,20,35,.5));}
  .pin.st-speeding .pin-icon{filter:url(#duo-speeding) drop-shadow(0 3px 3px rgba(10,20,35,.5));}
  .pin.st-offline .pin-icon{filter:url(#duo-offline)  drop-shadow(0 3px 3px rgba(10,20,35,.5));}

  /* Brief "here it is" bounce when a vehicle is spotlighted programmatically —
     scales the icon only (a sibling wrapper), so it never fights the pin's own
     translate(-50%,-50%) centering or the icon's heading rotation. */
  .pin.pin-ping .pin-scaler{animation:pinBounce 1.1s cubic-bezier(.34,1.56,.64,1) 1;}
  @keyframes pinBounce{
    0%{transform:scale(1);}
    30%{transform:scale(1.55);}
    55%{transform:scale(.9);}
    75%{transform:scale(1.12);}
    100%{transform:scale(1);}
  }
  @media (prefers-reduced-motion: reduce){
    .pin.pin-ping .pin-scaler{animation:none;}
  }

  /* World layer that pans to keep the followed vehicle in view — everything
     that should move with the vehicle (terrain, roads, pins) lives in here;
     legend / callout stay fixed as UI chrome on top. */
  .map-camera{position:absolute;inset:0;transition:transform .6s cubic-bezier(.4,0,.2,1);will-change:transform;}

  /* Small anchored, translucent callout next to the tapped vehicle */
  .callout{
    position:absolute;top:0;left:0;z-index:9;
    width:170px;
    background:rgba(255,255,255,.7);
    -webkit-backdrop-filter:blur(14px) saturate(1.7);
    backdrop-filter:blur(14px) saturate(1.7);
    border:1px solid rgba(255,255,255,.5);
    border-radius:11px;
    box-shadow:0 10px 24px -8px rgba(20,30,50,.4);
    padding:8px 9px 9px;
    opacity:0;pointer-events:none;
    transform:translate(-50%, calc(-100% - 13px)) scale(.96);
    transform-origin:50% 100%;
    transition:opacity .15s ease, transform .15s ease, top .5s cubic-bezier(.4,0,.2,1), left .5s cubic-bezier(.4,0,.2,1);
  }
  .callout.show{opacity:1;pointer-events:auto;transform:translate(-50%, calc(-100% - 13px)) scale(1);}
  .callout.below{transform:translate(-50%, 13px) scale(.96);transform-origin:50% 0%;}
  .callout.below.show{transform:translate(-50%, 13px) scale(1);}
  .callout-close{
    position:absolute;top:5px;right:5px;width:17px;height:17px;border-radius:50%;
    background:rgba(0,0,0,.06);border:none;color:#6b7280;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;
  }
  .callout-close svg{width:9px;height:9px;}
  .callout-head{display:flex;flex-direction:column;gap:3px;padding-right:16px;}
  .callout-plate{font-size:12px;font-weight:800;color:#1c2230;font-variant-numeric:tabular-nums;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .status-pill{
    align-self:flex-start;
    display:inline-flex;align-items:center;padding:2px 6px;border-radius:20px;
    font-size:8.5px;font-weight:700;color:#fff;background:var(--c);flex-shrink:0;white-space:nowrap;
  }
  .callout-rows{margin-top:7px;padding-top:7px;border-top:1px solid rgba(0,0,0,.08);display:flex;flex-direction:column;gap:4px;}
  .callout-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:10px;}
  .callout-row .k{color:#6b7280;font-weight:600;flex-shrink:0;}
  .callout-row .v{color:#1c2230;font-weight:700;font-variant-numeric:tabular-nums;text-align:right;}
  .callout-row .v.cf-low{color:var(--status-speeding,#e53935);font-weight:800;} /* fuel under 10% */
  .cf-bar{height:4px;border-radius:3px;background:rgba(0,0,0,.09);overflow:hidden;margin:1px 0 2px;}
  .cf-bar>span{display:block;height:100%;width:0;border-radius:3px;background:var(--status-moving,#34a853);transition:width .3s ease;}
  .cf-bar.midfuel>span{background:var(--status-idle,#f4b400);}
  .cf-bar.lowfuel>span{background:var(--status-speeding,#e53935);}
  .callout-tail{
    position:absolute;left:50%;bottom:-5px;width:9px;height:9px;
    background:rgba(255,255,255,.7);
    -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
    transform:translateX(-50%) rotate(45deg);
    border-right:1px solid rgba(255,255,255,.5);border-bottom:1px solid rgba(255,255,255,.5);
  }
  .callout.below .callout-tail{bottom:auto;top:-5px;border-right:none;border-bottom:none;border-left:1px solid rgba(255,255,255,.5);border-top:1px solid rgba(255,255,255,.5);}

  .legend-pop{
    position:absolute;right:12px;top:54px;z-index:7;
    background:#26282f;color:#f2f3f6;border-radius:12px;padding:14px 16px;
    width:190px;box-shadow:0 12px 30px -10px rgba(0,0,0,.5);
    opacity:0;transform:translateY(-6px) scale(.97);pointer-events:none;
    transition:opacity .16s ease, transform .16s ease;
    font-size:12px;
  }
  .legend-pop.show{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;}
  .legend-pop .lg-title{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#9aa0ab;font-weight:700;margin-bottom:8px;}
  .legend-pop .lg-row{display:flex;align-items:center;gap:9px;padding:3.5px 0;}
  .legend-pop .lg-dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;background:var(--c);}

  /* ================= Appareil (list) ================= */
  .devrow{
    display:flex;align-items:center;gap:12px;background:#fff;padding:12px 14px;
    border-bottom:1px solid #f0f1f5;
  }
  .devlist{background:#fff;margin:14px 16px 16px;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;overflow:hidden;}
  .devlist .devrow:last-child{border-bottom:none;}
  .devrow.selected-row{background:var(--brand-tint,#e4f1f5);}
  .dev-badge{
    width:38px;height:38px;border-radius:50%;background:var(--c);display:flex;align-items:center;justify-content:center;flex-shrink:0;
    border:none;padding:0;
  }
  .dev-badge img{width:24px;height:24px;object-fit:contain;}
  .dev-badge.pick{cursor:pointer;}
  .devrow-main{
    flex:1;min-width:0;display:flex;align-items:center;gap:12px;
    background:none;border:none;padding:0;text-align:left;font-family:inherit;cursor:pointer;color:inherit;
  }
  .dev-info{flex:1;min-width:0;}
  .dev-info .name{font-size:14px;font-weight:700;color:#1c2230;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .dev-info .sub{font-size:11.5px;color:#9aa0ab;margin-top:2px;font-variant-numeric:tabular-nums;}
  .dev-tag{font-size:10.5px;font-weight:700;padding:3px 8px;border-radius:20px;color:#fff;background:var(--c);flex-shrink:0;}

  /* ================= Alerte ================= */
  .alertrow{display:flex;gap:12px;background:#fff;margin:10px 16px 0;border-radius:12px;padding:13px 14px;box-shadow:0 1px 0 #e9ebf0;border-left:4px solid var(--c);}
  .alertrow .a-icon{width:34px;height:34px;border-radius:50%;background:color-mix(in srgb, var(--c) 16%, #fff);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--c);}
  .alertrow .a-icon svg{width:18px;height:18px;}
  .alertrow .a-body{flex:1;min-width:0;}
  .alertrow .a-title{font-size:13.5px;font-weight:700;color:#1c2230;}
  .alertrow .a-desc{font-size:12px;color:#8b93a0;margin-top:2px;}
  .alertrow .a-time{font-size:10.5px;color:#b0b5bf;margin-top:5px;font-variant-numeric:tabular-nums;}

  /* ================= Login ================= */
  .login-wrap{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    padding:40px 30px;text-align:center;
    background:linear-gradient(165deg, var(--brand,#0f6e8c), var(--brand-ink,#0b5069));
    color:#fff;
  }
  /* Holds the site logo from config ($gsValues['LOGO'], the same 250x56 wordmark
     the classic UI shows). That file is fully opaque on a light background, so a
     translucent tint would render it as a grey rectangle on the dark gradient --
     a solid white plate blends with the logo's own background instead. Sizing is
     intrinsic so a differently-shaped logo still fits. */
  .login-logo{
    max-width:210px;padding:10px 14px;border-radius:14px;background:#fff;
    display:inline-flex;align-items:center;justify-content:center;
    margin:0 auto 14px;box-shadow:0 2px 10px rgba(0,0,0,.14);
  }
  .login-logo img{display:block;width:100%;max-width:180px;height:auto;}
  .login-title{font-size:23px;font-weight:800;letter-spacing:-.01em;}
  .login-sub{font-size:12.5px;color:rgba(255,255,255,.75);margin-top:4px;}
  .login-form{width:100%;max-width:270px;margin-top:30px;display:flex;flex-direction:column;text-align:left;}
  .login-label{font-size:10.5px;font-weight:650;color:rgba(255,255,255,.8);text-transform:uppercase;letter-spacing:.04em;margin:14px 0 5px;}
  .login-label:first-child{margin-top:0;}
  .login-input{
    background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.3);border-radius:9px;
    padding:11px 13px;color:#fff;font-size:14px;font-family:inherit;box-sizing:border-box;
  }
  .login-input::placeholder{color:rgba(255,255,255,.55);}
  .login-input:focus{outline:none;border-color:#fff;background:rgba(255,255,255,.22);}
  .login-error{font-size:11.5px;color:#ffdcd8;margin-top:10px;}
  /* Password field + reveal toggle. Padding on the input keeps the text clear of
     the button; the wrapper is only a positioning context so the input keeps its
     own .login-input sizing. */
  .login-pass-wrap{position:relative;display:block;}
  .login-pass-wrap .login-input{padding-inline-end:44px;width:100%;}
  .login-eye{
    position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);
    width:34px;height:34px;display:flex;align-items:center;justify-content:center;
    background:none;border:none;padding:0;cursor:pointer;
    color:rgba(255,255,255,.7);border-radius:8px;
  }
  .login-eye:hover{color:#fff;}
  .login-eye:focus-visible{outline:2px solid rgba(255,255,255,.7);outline-offset:1px;}
  .login-eye svg{width:19px;height:19px;}
  /* Password recovery. Same gradient palette as the rest of the login panel:
     a plain button styled as a link, so it stays keyboard- and screen-reader
     reachable without pulling in anchor navigation. */
  .login-link{
    display:block;width:100%;margin-top:14px;padding:4px 0;
    background:none;border:none;font:inherit;font-size:12.5px;
    color:rgba(255,255,255,.85);text-decoration:underline;
    text-underline-offset:3px;cursor:pointer;
  }
  .login-link:hover{color:#fff;}
  .login-note{font-size:12.5px;line-height:1.5;color:rgba(255,255,255,.8);margin-bottom:18px;}
  .login-ok{font-size:11.5px;line-height:1.5;color:#d8ffe4;margin-top:10px;}
  /* "Rester connecté". accent-color tints the native control to the login
     screen's palette without replacing it, so it keeps platform semantics and
     stays reachable by the WebView's accessibility layer. */
  .login-remember{
    display:flex;align-items:center;gap:9px;margin-top:16px;
    font-size:12.5px;color:rgba(255,255,255,.85);cursor:pointer;user-select:none;
  }
  .login-remember input{
    width:16px;height:16px;margin:0;flex:none;cursor:pointer;accent-color:#fff;
  }
  /* Language chips for the login gradient. .filter-chip is tuned for the light
     app background and would render teal-on-teal here, so these are separate. */
  .login-lang{
    display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:18px;
  }
  .login-lang-chip{
    padding:6px 13px;border-radius:999px;cursor:pointer;
    border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.10);
    color:rgba(255,255,255,.9);font-family:inherit;font-size:12px;font-weight:600;
    line-height:1.2;
  }
  .login-lang-chip:hover{background:rgba(255,255,255,.18);}
  .login-lang-chip.active{
    background:#fff;border-color:#fff;color:var(--brand-ink,#0b5069);
  }
  .login-btn{
    margin-top:22px;width:100%;padding:13px;border-radius:11px;border:none;
    background:#fff;color:var(--brand-ink,#0b5069);font-weight:750;font-size:14.5px;
    font-family:inherit;cursor:pointer;
  }
  .login-brand{
    margin-top:34px;display:flex;flex-direction:column;align-items:center;gap:8px;
  }
  .login-brand span{font-size:9.5px;font-weight:650;color:rgba(255,255,255,.65);text-transform:uppercase;letter-spacing:.08em;}
  .login-brand img{
    height:30px;width:auto;background:#fff;padding:9px 16px;border-radius:20px;
  }

  /* ================= Compte ================= */
  .info-card{background:#fff;margin:14px 16px 0;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;overflow:hidden;}
  .info-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid #f0f1f5;}
  .info-row:last-child{border-bottom:none;}
  .info-row .k{font-size:11.5px;color:#9aa0ab;font-weight:650;flex-shrink:0;}
  .info-row .v{font-size:13.5px;color:#1c2230;font-weight:700;text-align:right;font-variant-numeric:tabular-nums;}
  .info-row .v.warn{color:var(--status-idle);}
  .brand-card{
    background:var(--brand-tint,#e4f1f5);margin:14px 16px 0;border-radius:12px;
    padding:20px 20px 18px;text-align:center;
    border:1px solid rgba(15,110,140,.14);
  }
  .brand-card .brand-eyebrow{font-size:9.5px;font-weight:700;color:var(--brand-ink,#0b5069);text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px;}
  .brand-card img{height:52px;width:auto;display:block;margin:0 auto 10px;}
  .brand-card p{margin:0;font-size:11px;color:var(--brand-ink,#0b5069);opacity:.75;line-height:1.5;}
  .brand-card p b{opacity:1;}
  .menu-group{background:#fff;margin:12px 16px 0;border-radius:12px;overflow:hidden;box-shadow:0 1px 0 #e9ebf0;}
  .menu-item{
    display:flex;align-items:center;gap:13px;padding:13px 14px;border-bottom:1px solid #f0f1f5;
    background:none;border-left:none;border-right:none;border-top:none;width:100%;text-align:left;
    font-family:inherit;cursor:pointer;color:inherit;position:relative;
  }
  .menu-item:last-child{border-bottom:none;}
  .menu-item .m-icon{width:22px;height:22px;flex-shrink:0;color:#5b6472;}
  .menu-item .m-txt{flex:1;font-size:14.5px;font-weight:600;color:#242a36;}
  .menu-item .m-chev{width:16px;height:16px;color:#c3c7d1;flex-shrink:0;}
  .signout{margin:18px 16px 4px;background:#fff;border:none;border-radius:12px;padding:14px;width:calc(100% - 32px);text-align:center;font-weight:700;color:#e14b4b;font-size:14.5px;box-shadow:0 1px 0 #e9ebf0;font-family:inherit;cursor:pointer;}
  .version{text-align:center;color:#b0b5bf;font-size:11.5px;margin:12px 0 20px;}

  /* ---- Notifications (toggle list) ---- */
  .toggle-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid #f0f1f5;}
  .toggle-row:last-child{border-bottom:none;}
  .toggle-row .t-txt{font-size:13.5px;font-weight:600;color:#242a36;}
  .toggle-switch{width:42px;height:25px;border-radius:14px;background:#d7dae0;border:none;position:relative;cursor:pointer;padding:0;flex-shrink:0;transition:background .18s ease;}
  .toggle-switch .thumb{position:absolute;top:2px;left:2px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .18s ease;}
  .toggle-switch.on{background:var(--brand,#0f6e8c);}
  .toggle-switch.on .thumb{transform:translateX(17px);}
  .toggle-sub{display:flex;align-items:center;gap:8px;padding:0 14px 13px;margin-top:-9px;font-size:12px;color:#5b6472;border-bottom:1px solid #f0f1f5;}
  .toggle-sub:last-child{border-bottom:none;}
  .toggle-sub-input{width:50px;padding:5px 6px;border:1px solid #e6e8ee;border-radius:7px;font-size:12px;font-family:inherit;text-align:center;}

  /* ---- Maintenance ---- */
  .odo-card{background:#fff;margin:14px 16px 0;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;padding:14px 16px;}
  .odo-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
  .odo-lbl{font-size:11px;color:#9aa0ab;font-weight:650;text-transform:uppercase;letter-spacing:.03em;}
  .odo-val{font-size:19px;font-weight:800;color:#1c2230;margin-top:3px;font-variant-numeric:tabular-nums;}
  .odo-edit{flex-shrink:0;background:var(--brand-tint,#e4f1f5);color:var(--brand-ink,#0b5069);border:none;border-radius:8px;padding:7px 12px;font-size:11.5px;font-weight:700;font-family:inherit;cursor:pointer;}
  .odo-sub{font-size:11.5px;color:#8b93a0;margin-top:8px;font-variant-numeric:tabular-nums;}
  .odo-total{font-size:12.5px;color:#3d4451;margin-top:6px;padding-top:8px;border-top:1px solid #f0f1f5;font-variant-numeric:tabular-nums;}
  .odo-edit-form{display:flex;gap:8px;margin-top:12px;align-items:center;}
  .odo-edit-form input{flex:1;border:1px solid #e6e8ee;border-radius:8px;padding:8px 10px;font-size:13px;font-family:inherit;min-width:0;}
  .odo-edit-actions{display:flex;gap:6px;flex-shrink:0;}
  .odo-edit-actions button{border:none;border-radius:8px;padding:8px 10px;font-size:11.5px;font-weight:700;font-family:inherit;cursor:pointer;}
  #odoCancel{background:#f2f3f6;color:#5b6472;}
  #odoSave{background:var(--brand,#0f6e8c);color:#fff;}

  .r-item.editing{flex-direction:column;align-items:stretch;gap:8px;cursor:default;}
  .maint-edit-form{display:flex;gap:8px;}
  .maint-edit-form input{flex:1;border:1px solid #e6e8ee;border-radius:8px;padding:7px 9px;font-size:12px;font-family:inherit;min-width:0;}
  .maint-edit-actions{display:flex;gap:6px;justify-content:flex-end;}
  .maint-edit-actions button{border:none;border-radius:7px;padding:6px 10px;font-size:11px;font-weight:700;font-family:inherit;cursor:pointer;}
  .maint-cancel{background:#f2f3f6;color:#5b6472;}
  .maint-save{background:var(--brand,#0f6e8c);color:#fff;}

  .maint-add{
    display:flex;gap:8px;align-items:center;margin:10px 16px 16px;padding:10px 12px;
    background:#fff;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;
  }
  .maint-add input{flex:1;border:1px solid #e6e8ee;border-radius:8px;padding:8px 10px;font-size:12.5px;font-family:inherit;min-width:0;}
  .maint-add button{flex-shrink:0;background:var(--brand,#0f6e8c);color:#fff;border:none;border-radius:8px;padding:8px 12px;font-size:12.5px;font-weight:700;font-family:inherit;cursor:pointer;}

  .section-title{margin:18px 16px 0;font-size:11px;font-weight:700;color:#9aa0ab;text-transform:uppercase;letter-spacing:.04em;}

  /* ---- Horaires ---- */
  .hours-hero{background:#fff;margin:14px 16px 0;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;padding:20px 16px;text-align:center;}
  .hours-hero .h-lbl{font-size:11.5px;color:#9aa0ab;font-weight:650;text-transform:uppercase;letter-spacing:.04em;}
  .hours-hero .h-val{font-size:34px;font-weight:800;color:#1c2230;margin-top:6px;font-variant-numeric:tabular-nums;}
  .hours-chart{background:#fff;margin:10px 16px 16px;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;padding:16px 14px 12px;}
  .hours-chart .hc-title{font-size:11px;color:#9aa0ab;font-weight:650;text-transform:uppercase;letter-spacing:.04em;margin-bottom:12px;}
  .hc-bars{display:flex;align-items:flex-end;gap:8px;height:90px;}
  .hc-bar{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:6px;}
  .hc-bar .bar{width:100%;border-radius:4px 4px 2px 2px;background:var(--brand,#0f6e8c);min-height:3px;}
  .hc-bar.today .bar{background:var(--status-idle);}
  .hc-bar .d{font-size:9.5px;color:#9aa0ab;font-weight:650;}

  /* ---- Moteur (arrêt / redémarrage à distance) ---- */
  .engine-card{background:#fff;margin:14px 16px 0;border-radius:12px;box-shadow:0 1px 0 #e9ebf0;padding:18px 16px;}
  .engine-status{display:flex;align-items:center;gap:12px;}
  .engine-dot{width:14px;height:14px;border-radius:50%;background:var(--status-offline);flex-shrink:0;}
  .engine-dot.on{background:var(--status-moving);}
  .engine-lbl{font-size:11px;color:#9aa0ab;font-weight:650;text-transform:uppercase;letter-spacing:.03em;}
  .engine-val{font-size:17px;font-weight:800;color:#1c2230;margin-top:2px;}
  .engine-btn{
    margin-top:16px;width:100%;padding:13px;border-radius:11px;border:none;
    font-size:14.5px;font-weight:750;font-family:inherit;cursor:pointer;
    background:var(--status-speeding);color:#fff;
  }
  .engine-btn.restart{background:var(--status-moving);}
  .engine-hint{margin:12px 0 0;font-size:11.5px;color:#9aa0ab;line-height:1.5;}
  .engine-banner{
    margin-top:14px;padding:10px 12px;border-radius:9px;font-size:12px;font-weight:650;line-height:1.4;
    display:flex;align-items:flex-start;gap:8px;
  }
  .engine-banner.stopped{background:color-mix(in srgb, var(--status-speeding) 14%, #fff);color:#a3271f;}
  .engine-banner.started{background:color-mix(in srgb, var(--status-moving) 14%, #fff);color:#1c7a41;}

  .pw-backdrop{position:absolute;inset:0;background:rgba(15,20,30,.45);opacity:0;pointer-events:none;transition:opacity .16s ease;z-index:20;}
  .pw-backdrop.show{opacity:1;pointer-events:auto;}
  .pw-modal{
    position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.94);
    width:250px;background:#fff;border-radius:14px;padding:18px 18px 16px;
    box-shadow:0 20px 50px -15px rgba(0,0,0,.5);z-index:21;
    opacity:0;pointer-events:none;transition:opacity .16s ease, transform .16s ease;
  }
  .pw-modal.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1);}
  .pw-title{font-size:15px;font-weight:750;color:#1c2230;}
  .pw-sub{margin:4px 0 12px;font-size:12px;color:#8b93a0;line-height:1.4;}
  .pw-input{width:100%;padding:10px 12px;border-radius:9px;border:1px solid #e2e5ea;font-size:14px;font-family:inherit;box-sizing:border-box;}
  .pw-input:focus{outline:2px solid var(--brand,#0f6e8c);outline-offset:1px;}
  .pw-actions{display:flex;gap:8px;margin-top:14px;}
  .pw-actions button{flex:1;padding:10px;border-radius:9px;border:none;font-weight:700;font-size:13px;font-family:inherit;cursor:pointer;}
  .pw-cancel{background:#f2f3f6;color:#5b6472;}
  .pw-confirm{background:var(--brand,#0f6e8c);color:#fff;}

  /* ---- Icon picker (choose which top-view icon represents a vehicle) ---- */
  .icon-picker-backdrop{position:absolute;inset:0;background:rgba(15,20,30,.45);opacity:0;pointer-events:none;transition:opacity .16s ease;z-index:20;}
  .icon-picker-backdrop.show{opacity:1;pointer-events:auto;}
  .icon-picker-modal{
    position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.94);
    width:280px;max-height:74%;overflow-y:auto;background:#fff;border-radius:14px;padding:16px;
    box-shadow:0 20px 50px -15px rgba(0,0,0,.5);z-index:21;
    opacity:0;pointer-events:none;transition:opacity .16s ease, transform .16s ease;
  }
  .icon-picker-modal.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1);}
  .icon-picker-title{font-size:14.5px;font-weight:750;color:#1c2230;margin-bottom:12px;}
  .icon-picker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
  .icon-picker-item{
    background:#f7f8fa;border:2px solid transparent;border-radius:10px;padding:8px 4px;
    display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;font-family:inherit;
  }
  .icon-picker-item img{width:32px;height:32px;object-fit:contain;}
  .icon-picker-item span{font-size:9px;font-weight:600;color:#5b6472;text-align:center;line-height:1.2;}
  .icon-picker-item.selected{border-color:var(--brand,#0f6e8c);background:var(--brand-tint,#e4f1f5);}

  /* ---- Historique ---- */
  .filter-row{display:flex;gap:8px;margin:12px 16px 0;}
  .filter-chip{flex-shrink:0;padding:7px 13px;border-radius:20px;background:#fff;border:1px solid #e6e8ee;font-size:12.5px;font-weight:650;color:#5b6472;cursor:pointer;font-family:inherit;}
  .filter-chip.active{background:var(--brand,#0f6e8c);border-color:var(--brand,#0f6e8c);color:#fff;}
  .history-map{position:relative;margin:12px 16px 0;height:250px;border-radius:12px;overflow:hidden;box-shadow:0 1px 0 #e9ebf0;background:linear-gradient(180deg,#eef2ea,#e7ede3);}
  .history-map .terrain{position:absolute;inset:0;background:
      radial-gradient(200px 150px at 15% 85%, rgba(120,170,140,.3), transparent 70%),
      radial-gradient(220px 170px at 90% 8%, rgba(120,170,220,.28), transparent 65%);}
  .history-map svg{position:absolute;inset:0;width:100%;height:100%;}
  .history-map .h-marker{position:absolute;transform:translate(-50%,-50%);width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 2px 5px rgba(0,0,0,.35);}
  .history-map .h-marker svg{position:static;width:9px;height:9px;}
  .history-legend{display:flex;gap:16px;margin:10px 16px 16px;font-size:11.5px;color:#5b6472;}
  .history-legend span{display:inline-flex;align-items:center;gap:6px;}
  .history-legend .ln{width:14px;height:3px;border-radius:2px;display:inline-block;}

  .toast{
    position:absolute;left:50%;bottom:80px;transform:translate(-50%,8px);
    background:#232734;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;font-weight:600;
    box-shadow:0 10px 24px -8px rgba(0,0,0,.4);opacity:0;transition:opacity .18s ease, transform .18s ease;
    pointer-events:none;z-index:40;white-space:nowrap;
  }
  .toast.show{opacity:1;transform:translate(-50%,0);}

  /* ---------- side legend panel ---------- */
  .side{display:flex;flex-direction:column;gap:22px;max-width:520px;}
  .card{
    background:var(--paper-raise);border:1px solid var(--line);border-radius:16px;
    padding:22px 24px;box-shadow:var(--shadow);
  }
  .card h2{margin:0 0 4px;font-size:15px;font-weight:750;}
  .card .sub{margin:0 0 16px;font-size:12.5px;color:var(--ink-soft);}
  .swatch-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px;}
  .swatch{display:flex;align-items:center;gap:10px;font-size:13px;}
  .swatch .dot{width:13px;height:13px;border-radius:50%;background:var(--c);flex-shrink:0;box-shadow:0 0 0 1px rgba(0,0,0,.06);}
  .swatch b{font-weight:650;color:var(--ink);}
  .swatch span.sub2{color:var(--ink-soft);}

  .fleet-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;}
  .fleet-strip figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--paper);border-radius:11px;padding:10px 4px 8px;}
  .fleet-strip img{width:34px;height:34px;object-fit:contain;}
  .fleet-strip figcaption{font-size:9.5px;color:var(--ink-soft);text-align:center;line-height:1.2;font-weight:600;}

  .steps{display:flex;flex-direction:column;gap:10px;font-size:13px;color:var(--ink-soft);}
  .steps li{margin-left:18px;}
  .kbd{
    display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:650;color:var(--brand-ink);
    background:var(--brand-tint);padding:3px 8px;border-radius:6px;
  }
  footer.note{font-size:12px;color:var(--ink-soft);text-align:center;padding-top:6px;}

  /* ---------- RTL (Arabic) — most layout mirrors automatically via flexbox +
     dir, these are the pieces that use a fixed physical transform/side and
     need an explicit flip. ---------- */
  [dir="rtl"] .r-chev, [dir="rtl"] .m-chev, [dir="rtl"] .app-header .hbtn svg{transform:scaleX(-1);}
  [dir="rtl"] .toggle-switch.on .thumb{transform:translateX(-17px);}
  [dir="rtl"] .callout-plate, [dir="rtl"] .login-form{text-align:right;}
