/* TSH 2.0 Engineering — Workshop Entry (the phone app).

   Its own stylesheet rather than tsh-design.css: that one lays out a rail and
   a desk-sized content column, and this is a phone form. The TOKENS are the
   platform's, copied from tsh-design.css §1 so the app is recognisably TSH
   2.0 — same cream, same green, same font — without inheriting its layout.
   Targets are 44px+ throughout: this is used with dirty hands in daylight. */

@font-face{
  font-family:"Plus Jakarta Sans";font-style:normal;font-weight:300 800;font-display:swap;
  src:url("/shared/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"Plus Jakarta Sans";font-style:normal;font-weight:300 800;font-display:swap;
  src:url("/shared/assets/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root{
  --canvas:#FDFBF7;--canvas-2:#F4F1E9;--plate:#FFFFFF;
  --green:#006B3F;--green-d:#004D2D;--green-tint:#EEF6F1;
  --espresso:#0B2B1D;--ink:#16241C;--ink-2:#3B4A41;--ink-soft:#6A786F;--on-dark:#EFE9DA;
  --red:#C62828;--amber:#B77D0A;--gold:#E7CE86;--gold-soft:#F4EAD0;
  --hair:rgba(19,42,31,.10);--line:rgba(19,42,31,.18);
  --radius:20px;--ease:cubic-bezier(0.32,0.72,0,1);
  --safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;}
html,body{margin:0;min-height:100%;}
body{
  background:var(--canvas);color:var(--ink);
  font-family:"Plus Jakarta Sans",system-ui,"Segoe UI",sans-serif;font-size:16px;line-height:1.45;
  -webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;
}
button,input,select,textarea{font:inherit;color:inherit;}
h1,h2,h3,p{margin:0;}
[hidden]{display:none !important;}

/* Only the screen the app is on is shown. */
.we-app{min-height:100dvh;display:flex;flex-direction:column;}
.we-screen{display:none;flex:1;flex-direction:column;min-height:100dvh;}
.we-app[data-screen="login"] .we-login,.we-app[data-screen="flow"] .we-flow{display:flex;}
.we-app[data-screen="loading"]::before{
  content:"";display:block;margin:40vh auto 0;width:28px;height:28px;border-radius:50%;
  border:3px solid var(--hair);border-top-color:var(--green);animation:we-spin .8s linear infinite;
}
@keyframes we-spin{to{transform:rotate(360deg);}}

/* ── Sign in ─────────────────────────────────────────────────────────────── */
.we-hero{background:var(--espresso);color:var(--on-dark);padding:calc(28px + var(--safe-top)) 24px 72px;}
.we-hero-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px;}
/* The logo's "TSH RESOURCES BERHAD" lettering is black, so it sits on a
   white plate rather than straight on the dark hero, where it would vanish. */
.we-logo{height:52px;width:auto;display:block;background:#fff;border-radius:12px;padding:6px 10px;}
.we-kicker{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);margin-bottom:8px;}
.we-hero h1{font-size:32px;line-height:1.12;font-weight:800;letter-spacing:-.02em;}
.we-hero p{margin-top:12px;font-size:15px;line-height:1.5;color:rgba(239,233,218,.78);max-width:34ch;}
.we-card{
  background:var(--plate);border-radius:var(--radius);padding:24px 20px;
  box-shadow:0 18px 40px -24px rgba(11,43,29,.45),0 0 0 1px var(--hair);
}
.we-login-card{margin:-40px 16px 0;display:flex;flex-direction:column;gap:16px;}
.we-login .we-foot{padding:24px 28px calc(28px + var(--safe-bottom));font-size:13px;line-height:1.55;color:var(--ink-soft);text-align:center;margin-top:auto;}

/* ── Fields ──────────────────────────────────────────────────────────────── */
.we-field{display:flex;flex-direction:column;gap:6px;}
.we-field > label{font-size:13px;font-weight:700;color:var(--ink-2);}
.we-field .req{color:var(--red);}
.we-field input[type=text],.we-field input[type=password],.we-field input[type=search],.we-field textarea{
  width:100%;min-height:52px;border:1.5px solid var(--line);border-radius:14px;padding:12px 14px;
  background:var(--canvas);color:var(--ink);font-size:16px;outline:none;
  transition:border-color .3s var(--ease),box-shadow .3s var(--ease);
}
.we-field textarea{min-height:104px;line-height:1.45;resize:none;background:var(--plate);}
.we-field input:focus,.we-field textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(0,107,63,.14);}
.we-pass{position:relative;}
.we-pass input{padding-right:56px;}
.we-eye{position:absolute;right:4px;top:4px;width:44px;height:44px;border:0;background:none;color:var(--ink-2);display:flex;align-items:center;justify-content:center;border-radius:10px;cursor:pointer;}
.we-eye svg,.we-icon svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;}
/* .we-field.we-search, not .we-search: the generic .we-field input rule is
   more specific than a single class and was resetting the left padding, so
   the icon sat on top of the placeholder. */
.we-field.we-search{position:relative;}
.we-field.we-search svg{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:20px;height:20px;stroke:var(--ink-soft);stroke-width:2;fill:none;stroke-linecap:round;pointer-events:none;}
.we-field.we-search input{padding-left:48px;background:var(--plate);}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.we-btn{
  width:100%;min-height:54px;border:0;border-radius:14px;padding:0 20px;cursor:pointer;
  font-size:16px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px;
  transition:transform .2s var(--ease),background .3s var(--ease),opacity .3s;
}
.we-btn:active{transform:scale(.985);}
.we-btn:disabled{opacity:.55;cursor:default;transform:none;}
.we-btn.primary{background:var(--green);color:#fff;box-shadow:0 12px 26px -16px rgba(0,107,63,.9);}
.we-btn.primary:hover{background:var(--green-d);}
.we-btn.ghost{background:var(--canvas-2);color:var(--ink);}
.we-btn.outline{background:var(--plate);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--line);}

/* Language toggle: the same segmented pair shared/i18n.js draws on every
   page, restyled for the dark hero and the light sheet. */
.we-lang-toggle{display:inline-flex;padding:3px;border-radius:999px;background:rgba(239,233,218,.12);}
.we-lang-toggle button{border:0;border-radius:999px;padding:6px 12px;min-height:32px;background:transparent;color:var(--on-dark);font-size:12px;font-weight:700;cursor:pointer;}
.we-lang-toggle button.active{background:var(--on-dark);color:var(--espresso);}
.we-sheet .we-lang-toggle{background:var(--canvas-2);}
.we-sheet .we-lang-toggle button{color:var(--ink-2);}
.we-sheet .we-lang-toggle button.active{background:var(--espresso);color:var(--on-dark);}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.we-alert{border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.5;}
.we-alert ul{margin:4px 0 0;padding-left:18px;}
.we-alert.err{background:rgba(198,40,40,.08);color:#8E1C1C;box-shadow:0 0 0 1px rgba(198,40,40,.25);}
.we-alert.ok{background:var(--green-tint);color:var(--green-d);box-shadow:0 0 0 1px rgba(0,107,63,.2);}

/* ── The flow ────────────────────────────────────────────────────────────── */
.we-bar{
  position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;
  padding:calc(10px + var(--safe-top)) 16px 10px;background:var(--plate);border-bottom:1px solid var(--hair);
}
.we-icon{width:44px;height:44px;border:0;border-radius:12px;background:var(--canvas-2);color:var(--ink);display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none;}
.we-icon[disabled]{opacity:.35;}
/* The bar is white, so the logo's black lettering needs no plate here. */
.we-bar-logo{height:44px;width:auto;display:block;flex:none;}
.we-bar-title{flex:1;font-size:16px;font-weight:800;letter-spacing:-.01em;}
.we-user{
  display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 12px 4px 4px;border:0;border-radius:999px;
  background:var(--canvas-2);font-size:13px;font-weight:700;cursor:pointer;max-width:46%;
}
.we-user span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.we-avatar{width:30px;height:30px;border-radius:999px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;flex:none;}

.we-body{flex:1;display:flex;flex-direction:column;padding:20px 16px 120px;}
.we-summary{display:none;}
/* On a phone the step is NOT a card: the options are cards themselves, and
   a card of cards narrows them and doubles every edge. The step sits on the
   page, its left edge on the same 16px line as the header's back button.
   It becomes a card again on a laptop (below), where there is room. */
.we-step-card{display:flex;flex-direction:column;gap:10px;background:none;box-shadow:none;border-radius:0;padding:0;}
.we-progress{display:flex;gap:6px;}
.we-progress i{flex:1;height:6px;border-radius:3px;background:var(--hair);}
.we-progress i.on{background:var(--green);}
.we-stepno{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);margin-top:6px;}
.we-step h2{font-size:26px;font-weight:800;letter-spacing:-.02em;line-height:1.15;margin-bottom:14px;}
.we-step p.sub{font-size:14px;color:var(--ink-soft);margin:-8px 0 16px;}
.we-chips{display:flex;flex-wrap:wrap;gap:6px;margin:-4px 0 16px;}
.we-chip{padding:6px 10px;border-radius:999px;background:var(--gold-soft);font-size:12px;font-weight:700;color:#4A3A10;}

/* Option cards — PT, asset type, unit. One tap selects, Next confirms, and
   the selected one is the only green thing on the screen. */
.we-options{display:flex;flex-direction:column;gap:10px;}
.we-opt{
  width:100%;text-align:left;min-height:60px;border:1.5px solid var(--hair);border-radius:16px;padding:14px;
  background:var(--plate);display:flex;align-items:center;gap:12px;cursor:pointer;
  transition:border-color .3s var(--ease),background .3s var(--ease);
}
.we-opt:hover{border-color:var(--line);}
.we-opt.on{border:2px solid var(--green);background:var(--green-tint);padding:13px;}
.we-opt .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
.we-opt .t{font-size:17px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.we-opt .s{font-size:13px;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.we-opt .tag{font-size:11px;font-weight:700;padding:2px 7px;border-radius:6px;background:var(--canvas-2);color:var(--ink-2);}
.we-opt .tag.warn{background:#F1E4C6;color:#6B4A05;}
.we-opt .n{font-size:13px;font-weight:700;color:var(--ink-soft);font-variant-numeric:tabular-nums;}
.we-opt .tick{width:28px;height:28px;border-radius:999px;background:var(--green);color:#fff;display:none;align-items:center;justify-content:center;flex:none;}
.we-opt.on .tick{display:flex;}
.we-opt .tick svg{width:16px;height:16px;stroke:currentColor;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.we-grid2 .we-opt{min-height:52px;justify-content:center;text-align:center;padding:12px;}
.we-grid2 .we-opt .t{font-size:15px;justify-content:center;}
.we-grid2 .we-opt.on{padding:11px;}
.we-grid2 .we-opt .tick{display:none !important;}
.we-empty{padding:32px 12px;text-align:center;color:var(--ink-soft);font-size:14px;line-height:1.55;}
.we-empty b{display:block;color:var(--ink);margin-bottom:4px;}

/* Status: a two-way switch. Open is amber — a job still open is something
   to watch; Closed is plain. */
.we-switch{display:flex;background:var(--canvas-2);border-radius:14px;padding:4px;gap:4px;}
.we-switch button{flex:1;min-height:44px;border:0;border-radius:11px;background:transparent;font-size:15px;font-weight:700;color:var(--ink-2);cursor:pointer;}
.we-switch button.on{background:var(--plate);box-shadow:0 2px 6px rgba(11,43,29,.12);font-weight:800;color:var(--ink);}
.we-switch button.on[data-v="Open"]{color:var(--amber);}

/* The unit banner on the job step — what this entry is about, and a way back. */
.we-unit{background:var(--espresso);color:var(--on-dark);border-radius:16px;padding:14px 16px;display:flex;align-items:center;gap:12px;margin-bottom:14px;}
.we-unit .main{flex:1;min-width:0;}
.we-unit .t{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums;}
.we-unit .s{font-size:13px;color:rgba(239,233,218,.75);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.we-unit button{border:1px solid rgba(239,233,218,.3);background:transparent;color:var(--gold);border-radius:10px;padding:0 12px;min-height:36px;font-size:13px;font-weight:700;cursor:pointer;}
.we-form{display:flex;flex-direction:column;gap:14px;}
.we-form .we-field > label{display:flex;justify-content:space-between;}
.we-form .cnt{font-weight:500;color:var(--ink-soft);}

/* The receipt. */
.we-done{display:flex;flex-direction:column;gap:18px;align-items:stretch;text-align:center;padding-top:8px;}
.we-done .ok-orb{width:64px;height:64px;border-radius:999px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;margin:0 auto;}
.we-done .ok-orb svg{width:32px;height:32px;stroke:currentColor;stroke-width:2.6;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-done h2{margin:0;}
.we-done p{color:var(--ink-soft);font-size:15px;}
.we-receipt{text-align:left;border:1px solid var(--hair);border-radius:14px;overflow:hidden;background:var(--canvas);}
.we-receipt .rh{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px dashed var(--line);}
.we-receipt .no{font-size:16px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--green-d);}
.we-receipt .when{font-size:13px;color:var(--ink-soft);}
.we-receipt .rg{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;padding:12px 14px;font-size:14px;}
.we-receipt .rg .k,.we-receipt .rp .k{font-size:12px;color:var(--ink-soft);}
.we-receipt .rg .v{font-weight:700;}
.we-receipt .rp{padding:0 14px 14px;font-size:14px;line-height:1.5;white-space:pre-line;}
.we-done .we-btn + .we-btn{margin-top:-8px;}

/* The pinned button under the thumb. */
.we-foot-bar{
  position:fixed;left:0;right:0;bottom:0;z-index:6;display:flex;gap:10px;
  padding:12px 16px calc(12px + var(--safe-bottom));background:var(--plate);border-top:1px solid var(--hair);
}
.we-foot-bar:empty{display:none;}
.we-foot-bar .we-btn.outline{flex:0 0 auto;width:auto;padding:0 18px;}

/* ── Account sheet ───────────────────────────────────────────────────────── */
.we-scrim{position:fixed;inset:0;z-index:20;background:rgba(11,43,29,.4);opacity:0;pointer-events:none;transition:opacity .4s var(--ease);}
.we-scrim.open{opacity:1;pointer-events:auto;}
.we-sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:21;max-height:88dvh;overflow-y:auto;
  background:var(--canvas);border-radius:22px 22px 0 0;padding:8px 20px calc(20px + var(--safe-bottom));
  transform:translateY(104%);transition:transform .5s var(--ease);display:flex;flex-direction:column;gap:14px;
  box-shadow:0 -20px 60px -30px rgba(11,43,29,.6);
}
.we-sheet.open{transform:none;}
.we-sheet-grip{width:40px;height:4px;border-radius:2px;background:var(--line);margin:4px auto 0;}
.we-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.we-sheet-name{font-size:18px;font-weight:800;}
.we-sheet-sub{font-size:13px;color:var(--ink-soft);}
.we-sheet h3{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);}
.we-badge{font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;white-space:nowrap;letter-spacing:0;}
.we-badge.open{background:rgba(183,125,10,.12);color:var(--amber);}
.we-badge.closed{background:rgba(19,42,31,.06);color:var(--ink-soft);}
/* On the dark unit banner the light badges need their own colours. */
.we-badge.on-dark.open{background:var(--gold);color:#4A3A10;}
.we-badge.on-dark.closed{background:rgba(239,233,218,.16);color:var(--on-dark);}
.chev{width:20px;height:20px;flex:none;stroke:var(--ink-soft);stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round;}

/* ── Home ────────────────────────────────────────────────────────────────────
   New entry and History side by side, then the units this person worked on
   last (one tap to the job form), then the jobs still open, oldest first. */
.we-duo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.we-tile{
  min-height:84px;padding:14px;border:1.5px solid var(--hair);border-radius:16px;background:var(--plate);cursor:pointer;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;text-align:left;
  transition:border-color .3s var(--ease),transform .2s var(--ease);
}
.we-tile:active{transform:scale(.98);}
.we-tile:hover{border-color:var(--line);}
.we-tile .ic{color:var(--green);display:flex;}
.we-tile .ic svg{width:24px;height:24px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-tile .t{font-size:16px;font-weight:800;letter-spacing:-.01em;}
.we-tile.primary{background:var(--green);border-color:var(--green);color:#fff;box-shadow:0 14px 30px -18px rgba(0,107,63,.9);}
.we-tile.primary .ic{color:#fff;}
.we-sec{display:flex;align-items:baseline;justify-content:space-between;margin:22px 0 10px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);}
.we-link{border:0;background:none;padding:6px 0;min-height:32px;font-size:13px;font-weight:700;color:var(--green);cursor:pointer;text-transform:none;letter-spacing:0;}
.we-recent{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none;}
.we-recent::-webkit-scrollbar{display:none;}
.we-runit{
  flex:none;min-height:56px;min-width:108px;padding:8px 14px;border:1.5px solid var(--hair);border-radius:14px;background:var(--plate);
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;cursor:pointer;text-align:left;
}
.we-runit b{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;}
.we-runit span{font-size:11px;font-weight:600;color:var(--ink-soft);max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.we-days{flex:none;padding:4px 9px;border-radius:8px;background:var(--gold-soft);color:#6B4A05;font-size:12px;font-weight:800;white-space:nowrap;}

/* ── History list ────────────────────────────────────────────────────────────
   One card per job: the date range on top the way the Power App showed it,
   then the unit, the problem, and the entry number. Open jobs carry an amber
   rule down the left so they stand out in a long list at a glance. */
.we-hseg button .n{font-size:12px;font-weight:700;color:var(--ink-soft);margin-left:2px;font-variant-numeric:tabular-nums;}
.we-hist{display:flex;flex-direction:column;gap:10px;}
.we-hrow{
  width:100%;text-align:left;display:flex;align-items:center;gap:10px;padding:14px 12px 14px 16px;
  border:1.5px solid var(--hair);border-radius:16px;background:var(--plate);cursor:pointer;position:relative;overflow:hidden;
}
.we-hrow.open::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--amber);}
.we-hrow .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}
.we-hrow .top{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.we-hrow .range{font-size:12px;font-weight:700;color:var(--ink-2);font-variant-numeric:tabular-nums;}
.we-hrow .t{font-size:17px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;}
.we-hrow .t .job{font-size:13px;font-weight:700;color:var(--ink-2);margin-left:4px;}
.we-hrow .s{font-size:14px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.we-hrow .dur{font-size:12.5px;font-weight:700;color:var(--ink-2);font-variant-numeric:tabular-nums;}
.we-hrow.open .dur{color:var(--amber);}
.we-hrow .m{font-size:12px;color:var(--ink-soft);font-variant-numeric:tabular-nums;}

/* ── Photos ──────────────────────────────────────────────────────────────── */
.we-photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.we-photo{position:relative;aspect-ratio:1;border-radius:12px;overflow:hidden;background:var(--canvas-2);box-shadow:0 0 0 1px var(--hair);}
.we-photo img{width:100%;height:100%;object-fit:cover;display:block;cursor:zoom-in;}
.we-photo.add{
  border:1.5px dashed var(--line);box-shadow:none;background:var(--plate);cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  font-size:11px;font-weight:700;color:var(--green);padding:4px;text-align:center;line-height:1.2;
}
.we-photo.add svg{width:24px;height:24px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-photo.busy{display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--ink-soft);text-align:center;padding:4px;}
.we-photo .rm{
  position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:999px;border:0;cursor:pointer;
  background:rgba(255,255,255,.94);color:var(--red);box-shadow:0 1px 4px rgba(11,43,29,.25);
  display:flex;align-items:center;justify-content:center;
}
.we-photo .rm svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;}
.we-cam{display:inline-flex;align-items:center;gap:3px;margin-left:4px;}
.we-cam svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-dphotos{margin-top:14px;}
.we-dphotos .k{font-size:13px;font-weight:700;color:var(--ink-soft);margin-bottom:8px;}
.we-lightbox{position:fixed;inset:0;z-index:40;background:rgba(11,43,29,.9);display:none;align-items:center;justify-content:center;padding:16px;cursor:zoom-out;}
.we-lightbox.open{display:flex;}
.we-lightbox img{max-width:100%;max-height:100%;border-radius:10px;}

/* ── Quick problem picks, voice, the unit's last job ────────────────────── */
.we-quick-h{font-size:13px;font-weight:700;color:var(--ink-2);margin-bottom:8px;}
.we-quick-list{display:flex;flex-wrap:wrap;gap:8px;}
.we-qchip{
  min-height:40px;padding:0 13px;border:1.5px solid var(--line);border-radius:999px;background:var(--plate);
  font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;
}
.we-qchip.on{border:2px solid var(--green);background:var(--green-tint);color:var(--green-d);font-weight:700;padding:0 12.5px;}
.we-mic-wrap{position:relative;}
.we-mic-wrap textarea{padding-right:62px;}
.we-mic{
  position:absolute;right:8px;bottom:8px;width:46px;height:46px;border:0;border-radius:999px;cursor:pointer;
  background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;
}
.we-mic svg{width:21px;height:21px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-mic.on{background:var(--red);animation:we-pulse 1.2s ease-in-out infinite;}
@keyframes we-pulse{0%,100%{box-shadow:0 0 0 0 rgba(198,40,40,.45);}50%{box-shadow:0 0 0 10px rgba(198,40,40,0);}}
.we-hint{font-size:12px;color:var(--ink-soft);}
.we-last{padding:12px 14px;border-radius:14px;background:var(--canvas-2);font-size:13px;line-height:1.5;color:var(--ink-2);}
.we-last .k{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:3px;}
.we-last b{color:var(--ink);}

/* ── No signal ───────────────────────────────────────────────────────────── */
.we-net{
  position:sticky;top:calc(64px + var(--safe-top));z-index:4;width:100%;border:0;cursor:pointer;
  display:flex;align-items:center;gap:10px;padding:11px 16px;font-size:14px;font-weight:700;text-align:left;
  background:var(--gold-soft);color:#4A3A10;
}
.we-net svg{width:20px;height:20px;flex:none;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;}
.we-net.sending{background:var(--green-tint);color:var(--green-d);}
.we-net.failed{background:rgba(198,40,40,.1);color:#8E1C1C;}
.we-done .ok-orb.amber{background:var(--gold-soft);color:#8A5A00;}
.we-done .ok-orb.amber svg{width:30px;height:30px;stroke-width:2;}
.we-qrow{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1.5px dashed var(--line);border-radius:16px;background:var(--canvas);}
.we-qrow.failed{border-color:rgba(198,40,40,.4);background:rgba(198,40,40,.04);}
.we-qrow .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
.we-qrow .range{font-size:12px;font-weight:700;color:#8A5A00;}
.we-qrow.failed .range{color:#8E1C1C;}
.we-qrow .t{font-size:15px;font-weight:800;}
.we-qrow .s{font-size:13px;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* ── Progress: add an update, and the job's timeline ─────────────────────── */
.we-dsec{margin-top:16px;}
.we-dsec > .k{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:10px;}
.we-compose{background:var(--plate);border:1.5px solid var(--hair);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:12px;}
.we-compose > .k{margin-bottom:0;}
.we-hours{max-width:220px;}
.we-stepper{display:flex;align-items:stretch;border:1.5px solid var(--line);border-radius:14px;overflow:hidden;background:var(--canvas);}
.we-stepper button{width:52px;border:0;background:var(--canvas-2);font-size:22px;font-weight:700;color:var(--ink);cursor:pointer;}
.we-stepper input{flex:1;min-width:0;border:0;background:transparent;text-align:center;font-size:18px;font-weight:800;min-height:50px;outline:none;font-variant-numeric:tabular-nums;}
.we-compose .we-duo .we-btn{min-height:52px;font-size:15px;padding:0 10px;}
.we-timeline{display:flex;flex-direction:column;padding-left:4px;}
.we-tl{display:grid;grid-template-columns:14px minmax(0,1fr);gap:12px;position:relative;padding-bottom:16px;}
.we-tl:last-child{padding-bottom:0;}
.we-tl::before{content:"";position:absolute;left:6px;top:16px;bottom:0;width:2px;background:var(--hair);}
.we-tl:last-child::before{display:none;}
.we-tl .dot{width:14px;height:14px;border-radius:999px;background:var(--green);margin-top:3px;}
.we-tl.first .dot{background:var(--line);}
.we-tl.pending .dot{background:var(--gold);}
/* A status change in the timeline: closed, or reopened (amber, like an open job). */
.we-tl.ev-closed .dot{background:var(--ink-soft);}
.we-tl.ev-reopened .dot{background:var(--amber);}
.we-tl.ev-closed .v,.we-tl.ev-reopened .v{font-weight:700;}
.we-tl .k{font-size:12px;font-weight:700;color:var(--ink-soft);}
.we-tl .v{font-size:15px;line-height:1.45;white-space:pre-line;word-break:break-word;}

/* ── Sign-in note, and the Add to home screen sheet ─────────────────────── */
.we-stay{font-size:13px;color:var(--ink-soft);text-align:center;margin:0;}
.we-install{gap:16px;}
.we-install-top{display:flex;gap:14px;align-items:center;}
.we-install-icon{width:64px;height:64px;border-radius:16px;flex:none;box-shadow:0 0 0 1px var(--hair),0 6px 16px -8px rgba(11,43,29,.4);}
.we-install h3{font-size:18px;font-weight:800;line-height:1.25;text-transform:none;letter-spacing:-.01em;color:var(--ink);}
.we-install p{font-size:14px;color:var(--ink-2);margin-top:4px;}
.we-steps{margin:0;padding:0;list-style:none;counter-reset:s;display:flex;flex-direction:column;gap:10px;}
.we-steps li{counter-increment:s;display:flex;align-items:center;gap:12px;font-size:15px;line-height:1.4;padding:12px;border-radius:14px;background:var(--plate);box-shadow:0 0 0 1px var(--hair);}
.we-steps li::before{content:counter(s);width:28px;height:28px;flex:none;border-radius:999px;background:var(--green);color:#fff;font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:center;}
.ic-inline{width:20px;height:20px;vertical-align:-4px;stroke:var(--green);stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.we-steps .ic-inline circle{fill:var(--green);stroke:none;}

/* ── Entry detail: label beside value, as the Power App laid it out ─────── */
.we-dl{background:var(--plate);border:1.5px solid var(--hair);border-radius:16px;padding:4px 16px;}
.we-drow{display:grid;grid-template-columns:118px minmax(0,1fr);gap:12px;padding:12px 0;border-bottom:1px solid var(--hair);}
.we-drow:last-child{border-bottom:0;}
.we-drow .k{font-size:13px;font-weight:700;color:var(--ink-soft);}
.we-drow .v{font-size:15px;color:var(--ink);word-break:break-word;}
.we-drow .v.mono{font-weight:700;font-variant-numeric:tabular-nums;}
.we-drow .v.pre{white-space:pre-line;line-height:1.5;}
.we-drow .v.amber{color:var(--amber);font-weight:800;}

/* ── Laptop ──────────────────────────────────────────────────────────────── */
@media (min-width:900px){
  body{background:var(--canvas-2);}
  /* Sign in: the hero becomes the left half, the card sits in the right. */
  .we-login{position:relative;flex-direction:row;min-height:100dvh;}
  .we-hero{flex:0 0 50%;display:flex;flex-direction:column;justify-content:center;padding:48px 64px;}
  .we-hero h1{font-size:44px;}
  .we-login-card{width:420px;flex:none;margin:auto;}
  .we-login .we-foot{position:absolute;right:0;bottom:0;width:50%;margin-top:0;}

  .we-bar{padding-left:32px;padding-right:32px;}
  .we-body{flex-direction:row;gap:24px;align-items:flex-start;padding:40px 32px 40px;max-width:1040px;margin:0 auto;width:100%;}
  .we-summary{display:flex;flex-direction:column;gap:2px;width:280px;flex:none;position:sticky;top:96px;}
  .we-summary{background:var(--plate);border-radius:var(--radius);padding:22px;box-shadow:0 18px 40px -34px rgba(11,43,29,.4),0 0 0 1px var(--hair);}
  .we-summary .k{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:10px;}
  .we-sum{display:flex;gap:12px;padding:10px 12px;margin:0 -12px;border-radius:12px;align-items:flex-start;}
  .we-sum.cur{background:var(--green-tint);}
  .we-sum .dot{width:26px;height:26px;border-radius:999px;background:var(--green);color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;flex:none;}
  .we-sum.todo .dot{background:var(--canvas-2);color:var(--ink-soft);}
  .we-sum.cur .dot{background:var(--plate);box-shadow:inset 0 0 0 2px var(--green);color:var(--green);}
  .we-sum .l{font-size:12px;color:var(--ink-soft);font-weight:600;}
  .we-sum .v{font-size:14px;font-weight:700;word-break:break-word;}
  .we-sum.cur .v{color:var(--green-d);}
  .we-step-card{flex:1;min-width:0;padding:28px 32px 32px;background:var(--plate);border-radius:var(--radius);box-shadow:0 18px 40px -24px rgba(11,43,29,.45),0 0 0 1px var(--hair);}
  .we-foot-bar{position:sticky;bottom:0;margin:0 auto;max-width:1040px;padding:14px 32px;background:transparent;border:0;justify-content:flex-end;}
  .we-foot-bar .we-btn{width:auto;min-width:220px;}
  .we-foot-bar .we-btn.primary{margin-left:auto;}
  .we-sheet{left:auto;right:24px;bottom:auto;top:80px;width:380px;border-radius:var(--radius);padding-top:20px;transform:translateY(-12px);opacity:0;}
  .we-sheet.open{transform:none;opacity:1;}
  .we-sheet-grip{display:none;}
}
@media (prefers-reduced-motion:reduce){
  .we-sheet,.we-scrim,.we-btn,.we-opt{transition:none;}
}
