:root {
  --blue: #336699;
  --blue-d: #1F4D7A;
  --blue-50: #EBF2F9;
  --blue-100: #D6E4F2;
  --green: #2E7D3A;
  --green-50: #E6F3E8;
  --amber: #A86412;
  --amber-50: #FBF0DF;
  --red: #B42318;
  --red-50: #FDECEA;
  --ink: #0F1D2E;
  --ink-2: #2B3A4D;
  --mute: #5D6B7E;
  --line: #E3E8EF;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --r: 16px;
  --shadow: 0 1px 2px rgba(15, 29, 46, .05), 0 4px 14px rgba(15, 29, 46, .05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: #E9EDF2; font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
svg.lucide { width: 20px; height: 20px; stroke-width: 2; flex: none; }

/* ---------- desktop stage ---------- */
.stage { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 32px; }
.aside { width: 300px; }
.aside img { height: 34px; display: block; }
.aside h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.4px; margin: 22px 0 8px; }
.aside p { color: var(--mute); margin: 0 0 22px; font-size: 14px; }
.aside .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--mute); font-weight: 700; margin: 18px 0 8px; }
.aside .views { display: flex; flex-direction: column; gap: 8px; }
.aside .views button { text-align: left; background: #fff; border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; border: 1.5px solid transparent; box-shadow: var(--shadow); }
.aside .views button.on { border-color: var(--blue); }
.aside .views b { display: block; font-size: 14px; }
.aside .views span { font-size: 12.5px; color: var(--mute); }
.aside .views .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.aside .note { font-size: 12px; color: var(--mute); margin-top: 22px; }

.device { width: 390px; height: 844px; border-radius: 54px; background: #0B1220; padding: 12px; box-shadow: 0 30px 80px rgba(15, 29, 46, .28); position: relative; flex: none; }
.device .island { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 112px; height: 32px; border-radius: 20px; background: #0B1220; z-index: 50; }
.screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--bg); position: relative; display: flex; flex-direction: column; }

/* on a real phone: full screen, no frame */
@media (max-width: 640px) {
  body { background: var(--bg); }
  .stage { padding: 0; display: block; min-height: 100%; }
  .aside { display: none; }
  .device { width: 100%; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; background: var(--bg); }
  .device .island { display: none; }
  .screen { border-radius: 0; }
  .sbar { display: none !important; }
  .top { padding-top: max(14px, env(safe-area-inset-top)) !important; }
}

/* ---------- app chrome ---------- */
.sbar { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-size: 15px; font-weight: 600; }
.sbar .r { display: flex; gap: 6px; align-items: center; }
.sbar svg { width: 17px; height: 17px; }
.top { flex: none; padding: 6px 18px 10px; display: flex; align-items: center; gap: 10px; min-height: 52px; }
.top .back { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.top h2 { font-size: 19px; margin: 0; letter-spacing: -.2px; flex: 1; }
.top .logo { height: 22px; }
.top .sp { flex: 1; }
.top .bell { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: var(--shadow); }
.top .bell i.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; scrollbar-width: none; }
.body::-webkit-scrollbar { display: none; }
.tabs { flex: none; display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 8px 6px 26px; }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #8592A3; width: 70px; font-weight: 500; }
.tabs button.on { color: var(--blue); font-weight: 700; }
.tabs svg { width: 22px; height: 22px; }

/* ---------- content ---------- */
.hello { margin: 4px 2px 14px; }
.hello small { color: var(--mute); font-size: 14px; }
.hello h1 { margin: 2px 0 0; font-size: 25px; letter-spacing: -.5px; line-height: 1.15; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.tap { cursor: pointer; }
.card h3 { margin: 0; font-size: 16px; }
.card .sub { color: var(--mute); font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.sec { font-size: 13px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .8px; margin: 20px 4px 10px; }
.hero { background: linear-gradient(150deg, #336699 0%, #24527F 100%); color: #fff; }
.hero .sub { color: rgba(255, 255, 255, .78); }
.hero .big { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.hero .big small { font-size: 18px; font-weight: 600; margin-left: 2px; }
.hero .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hero .stats div { background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 9px 10px; }
.hero .stats b { display: block; font-size: 16px; }
.hero .stats span { font-size: 11.5px; color: rgba(255, 255, 255, .8); }
.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.pill svg { width: 14px; height: 14px; }
.pill.ok { background: var(--green-50); color: var(--green); }
.pill.warn { background: var(--amber-50); color: var(--amber); }
.pill.bad { background: var(--red-50); color: var(--red); }
.pill.info { background: var(--blue-50); color: var(--blue); }
.pill.glass { background: rgba(255, 255, 255, .16); color: #fff; }
.meter { height: 8px; background: rgba(255, 255, 255, .2); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: #9FD8A8; border-radius: 8px; }
.meter.light { background: var(--line); }
.meter.light i { background: var(--green); }

.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.qa { background: #fff; border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; gap: 10px; min-height: 104px; }
.qa b { font-size: 14.5px; line-height: 1.2; }
.qa span { font-size: 12px; color: var(--mute); margin-top: -6px; }
.ico { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.ico.g { background: var(--green-50); color: var(--green); }
.ico.a { background: var(--amber-50); color: var(--amber); }
.ico.r { background: var(--red-50); color: var(--red); }
.ico.sm { width: 34px; height: 34px; border-radius: 10px; }
.ico.sm svg { width: 18px; height: 18px; }

.list { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li b { font-size: 14.5px; font-weight: 600; display: block; }
.li span.s { font-size: 12.5px; color: var(--mute); display: block; }
.li .chev { color: #A3AEBB; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border-radius: 14px; background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; }
.btn.ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.btn.green { background: var(--green); }
.btn.sm { height: 40px; font-size: 14px; border-radius: 12px; }
.btn:disabled { opacity: .45; }
.btns2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foot { flex: none; padding: 12px 16px 28px; background: linear-gradient(transparent, var(--bg) 30%); }

/* chart */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; position: relative; padding-top: 6px; }
.chart .b { flex: 1; background: var(--blue); border-radius: 3px 3px 1px 1px; min-height: 2px; position: relative; }
.chart .b.low { background: #E2A04A; }
.chart .b.zero { background: #E7B1AB; }
.chart .thr { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--green); }
.chart .thr span { position: absolute; right: 0; top: -18px; font-size: 11px; font-weight: 700; color: var(--green); background: #fff; padding: 0 3px; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 6px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv > div { background: #fff; border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.kv b { display: block; font-size: 20px; letter-spacing: -.3px; }
.kv span { font-size: 12px; color: var(--mute); }
.seg { display: flex; background: #E6EBF1; border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 8px 0; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--mute); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* consumables */
.cons { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.cons:last-child { border-bottom: 0; }
.cons .th { width: 50px; height: 50px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.cons .th svg { width: 24px; height: 24px; }
.check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #C5CFDA; display: flex; align-items: center; justify-content: center; flex: none; }
.check.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.check svg { width: 16px; height: 16px; stroke-width: 3; }
.check.off { opacity: .35; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); margin-bottom: 10px; border: 1.5px solid transparent; width: 100%; text-align: left; }
.opt.on { border-color: var(--blue); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C5CFDA; flex: none; margin-top: 1px; }
.opt.on .radio { border: 7px solid var(--blue); }
.opt b { display: block; font-size: 14.5px; }
.opt span { font-size: 12.5px; color: var(--mute); }

/* success */
.done { text-align: center; padding: 30px 10px 10px; }
.done .ring { width: 86px; height: 86px; border-radius: 50%; background: var(--green-50); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.done .ring svg { width: 42px; height: 42px; stroke-width: 2.5; }
.done h2 { margin: 0 0 6px; font-size: 22px; }
.done p { margin: 0 auto; color: var(--mute); max-width: 290px; }
.steps { margin: 22px 0 6px; text-align: left; }
.step { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.step:last-child { padding-bottom: 0; }
.step .d { width: 22px; height: 22px; border-radius: 50%; background: var(--line); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; position: relative; z-index: 1; }
.step .d svg { width: 13px; height: 13px; stroke-width: 3; }
.step.ok .d { background: var(--green); }
.step.cur .d { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.step:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.step.ok::before { background: var(--green) !important; }
.step b { font-size: 14px; display: block; }
.step span { font-size: 12.5px; color: var(--mute); }

/* chat */
.tech { display: flex; gap: 12px; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(140deg, #CFE0F0, #9DBCDD); color: var(--blue-d); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.bubbles { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.bub { max-width: 80%; padding: 10px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.35; }
.bub.in { background: #fff; align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: var(--shadow); }
.bub.out { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.bub small { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.day { align-self: center; font-size: 12px; color: var(--mute); margin: 6px 0; }
.compose { flex: none; display: flex; gap: 8px; padding: 10px 14px 28px; background: #fff; border-top: 1px solid var(--line); align-items: center; }
.compose input { flex: 1; height: 42px; border-radius: 21px; border: 1px solid var(--line); background: var(--bg); padding: 0 16px; outline: none; }
.compose button { width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; }
.compose .att { background: var(--bg); color: var(--mute); }

/* form */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 2px 6px; }
.field input, .field select, .field textarea { width: 100%; height: 48px; border-radius: 12px; border: 1px solid #D5DDE6; background: #fff; padding: 0 14px; outline: none; }
.field textarea { height: 90px; padding: 12px 14px; resize: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 13px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1.5px #D5DDE6; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--blue); color: #fff; box-shadow: none; }

/* document preview */
.doc { background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(15, 29, 46, .12); padding: 22px 20px; font-size: 10.5px; line-height: 1.45; color: #222; font-family: Georgia, "Times New Roman", serif; }
.doc .hd { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--blue); padding-bottom: 10px; margin-bottom: 12px; }
.doc .hd img { height: 20px; }
.doc .hd small { font-family: "Figtree", sans-serif; font-size: 8.5px; color: #555; text-align: right; line-height: 1.35; }
.doc h4 { font-family: "Figtree", sans-serif; font-size: 12px; margin: 0 0 2px; text-align: center; letter-spacing: .3px; }
.doc h5 { font-family: "Figtree", sans-serif; font-size: 10px; margin: 0 0 10px; text-align: center; color: #555; font-weight: 500; font-style: italic; }
.doc p { margin: 0 0 7px; }
.doc .en { color: #555; font-style: italic; }
.doc .sig { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; font-family: "Figtree", sans-serif; font-size: 9px; }
.doc .stamp { border: 1.5px solid var(--blue); color: var(--blue); border-radius: 6px; padding: 5px 8px; font-weight: 700; transform: rotate(-4deg); font-size: 8.5px; text-align: center; }

/* toast + sheet */
.toast { position: absolute; left: 16px; right: 16px; bottom: 100px; background: var(--ink); color: #fff; border-radius: 14px; padding: 13px 16px; font-size: 14px; display: flex; gap: 10px; align-items: center; z-index: 60; animation: up .25s ease; }
.toast svg { color: #9FD8A8; }
@keyframes up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.scrim { position: absolute; inset: 0; background: rgba(15, 29, 46, .35); z-index: 40; display: flex; align-items: flex-end; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; border-radius: 24px 24px 0 0; padding: 10px 16px 30px; animation: up .25s ease; max-height: 85%; overflow-y: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #C5CFDA; margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 18px; }

.banner { display: flex; gap: 12px; align-items: center; background: var(--amber-50); border-radius: var(--r); padding: 13px 14px; margin-bottom: 12px; text-align: left; width: 100%; }
.banner b { font-size: 14px; display: block; color: #6B3F0A; }
.banner span { font-size: 12.5px; color: #8A5A1E; }
.banner.blue { background: var(--blue-50); }
.banner.blue b { color: var(--blue-d); }
.banner.blue span { color: var(--ink-2); }
.urg { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--r); padding: 13px 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.urg b { display: block; font-size: 14px; }
.urg span { font-size: 12.5px; color: var(--mute); }
.muted { color: var(--mute); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.hint { font-size: 12px; color: var(--mute); padding: 0 4px; margin: 6px 0 12px; display: flex; gap: 6px; align-items: flex-start; }
.hint svg { width: 15px; height: 15px; margin-top: 1px; }

/* technician */
.tl { position: relative; }
.job { display: flex; gap: 12px; padding: 13px 14px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; width: 100%; text-align: left; align-items: flex-start; }
.job .t { width: 50px; flex: none; font-weight: 800; font-size: 15px; }
.job .t span { display: block; font-size: 11.5px; color: var(--mute); font-weight: 500; }
.job b { display: block; font-size: 14.5px; }
.job .s { font-size: 12.5px; color: var(--mute); }
.job.donej { opacity: .6; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chk { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; font-size: 14.5px; }
.chk:last-child { border-bottom: 0; }
.sigpad { height: 110px; border: 1.5px dashed #C5CFDA; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--mute); font-size: 13px; position: relative; }
.sigpad svg.sg { width: 180px; height: 70px; stroke: var(--ink); stroke-width: 2.2; fill: none; }

/* login */
.login { flex: 1; display: flex; flex-direction: column; padding: 30px 24px 34px; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.login .lg { height: 46px; align-self: flex-start; margin: 40px 0 26px; }
.login h1 { font-size: 30px; letter-spacing: -.7px; line-height: 1.1; margin: 0 0 10px; }
.login p { color: var(--mute); margin: 0 0 26px; }
.who { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.who button { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); text-align: left; }
.who b { display: block; font-size: 15px; }
.who span { font-size: 12.5px; color: var(--mute); }
.who .chev { margin-left: auto; color: #A3AEBB; }
.demo { font-size: 11.5px; color: var(--mute); text-align: center; margin-top: 14px; }
