/* Action Tools - brand: logo green #417638, water blue #3883C5, deep forest, Poppins + Inter. */
:root {
  --green: #417638;
  --green-600: #36652f;
  --green-800: #234420;
  --green-900: #12261a;
  --green-50: #edf5ea;
  --blue: #3883c5;
  --blue-600: #2c6ca6;
  --blue-50: #e8f1fa;
  --lime: #4cc94c;
  --ink: #142019;
  --muted: #5c6c61;
  --faint: #8a998f;
  --bg: #f2f6f1;
  --card: #ffffff;
  --card-2: #f7faf6;
  --line: #dde6da;
  --danger: #c62828;
  --danger-50: #fdecea;
  --pass: #1d7a34;
  --pass-50: #e4f4e7;
  --warn: #9a5b00;
  --warn-50: #fff4e0;
  --shadow: 0 1px 2px rgba(18, 38, 26, .06), 0 6px 20px rgba(18, 38, 26, .07);
  --radius: 16px;
  --tap: 52px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7efe8; --muted: #a3b3a7; --faint: #7d8e82;
    --bg: #0b140e; --card: #132018; --card-2: #182a1f; --line: #24382b;
    --green-50: #1a2e1f; --blue-50: #142536; --pass-50: #15301d; --danger-50: #3a1717; --warn-50: #33260f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e7efe8; --muted: #a3b3a7; --faint: #7d8e82;
  --bg: #0b140e; --card: #132018; --card-2: #182a1f; --line: #24382b;
  --green-50: #1a2e1f; --blue-50: #142536; --pass-50: #15301d; --danger-50: #3a1717; --warn-50: #33260f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.01em; }
a { color: var(--blue); }
.hidden { display: none !important; }
#app { min-height: 100%; }

/* ---------- boot splash ---------- */
.splash { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(120% 80% at 50% 0%, #2b5a26 0%, var(--green-900) 60%); }
.splash img { width: 96px; animation: breathe 1.6s ease-in-out infinite; filter: drop-shadow(0 6px 20px rgba(0,0,0,.35)); }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .85; } }

/* ---------- hero / brand surfaces ---------- */
.brand-bg { background:
  radial-gradient(90% 60% at 85% -10%, rgba(56,131,197,.55), transparent 60%),
  radial-gradient(80% 60% at -10% 10%, rgba(76,201,76,.25), transparent 60%),
  linear-gradient(180deg, #2a5326 0%, #17331c 55%, #0f2316 100%); color: #fff; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; display: block; }
.logo-badge { width: 64px; height: 64px; border-radius: 20px; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.logo-badge img { width: 50px; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-top { padding: calc(48px + var(--safe-top)) 24px 90px; position: relative; text-align: center; }
.login-top h1 { font-size: 30px; margin-top: 18px; }
.login-top p { margin: 6px 0 0; opacity: .82; }
.login-top .logo-badge { margin: 0 auto; width: 84px; height: 84px; border-radius: 26px; }
.login-top .logo-badge img { width: 66px; }
.login-card { flex: 1; background: var(--bg); padding: 8px 20px calc(28px + var(--safe-bottom)); }
.login-card .card { max-width: 440px; margin: -40px auto 0; position: relative; }
.otp { letter-spacing: .5em; text-align: center; font-size: 28px !important; font-weight: 700; font-family: var(--head) !important; }

/* ---------- generic ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
label.f { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 12px 14px; font-size: 17px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 500;
  transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(56,131,197,.18); }
.input::placeholder { color: var(--faint); font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 12px; }
@media (max-width: 380px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :first-child { grid-column: 1 / -1; } }

.btn { min-height: var(--tap); border-radius: 14px; border: 0; padding: 0 20px; font-weight: 700; font-size: 16px; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: transform .08s, filter .15s, background .15s; font-family: var(--head); letter-spacing: .01em; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, #4b8742, var(--green)); color: #fff; box-shadow: 0 6px 16px rgba(65,118,56,.35); }
.btn.blue { background: linear-gradient(180deg, #4592d4, var(--blue)); color: #fff; box-shadow: 0 6px 16px rgba(56,131,197,.32); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn.danger { background: var(--danger-50); color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: 11px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.link { background: none; border: 0; color: var(--blue); font-weight: 600; padding: 8px; }
.err { color: var(--danger); font-weight: 600; font-size: 14px; }

/* chips + segmented */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip.on.blue { background: var(--blue); border-color: var(--blue); }
.chip.on.bad { background: var(--danger); border-color: var(--danger); }
.chip svg { width: 16px; height: 16px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card-2); border: 1.5px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { min-height: 46px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: var(--muted); font-size: 15px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button.on.good { background: var(--pass); color: #fff; }
.seg button.on.bad { background: var(--danger); color: #fff; }

/* ---------- app shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; padding: calc(10px + var(--safe-top)) 14px 10px; display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.topbar h1 { font-size: 19px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); flex: none; }
.iconbtn:active { background: var(--card-2); }
.iconbtn svg { width: 24px; height: 24px; }
.page { padding: 16px 16px calc(120px + var(--safe-bottom)); max-width: 760px; margin: 0 auto; }

/* ---------- hub ---------- */
.hub { min-height: 100dvh; display: flex; flex-direction: column; }
.hub-hero { position: relative; padding: calc(18px + var(--safe-top)) 20px 92px; overflow: hidden; }
.hub-hero .bar { display: flex; align-items: center; gap: 12px; }
.hub-hero .bar .logo-badge { width: 46px; height: 46px; border-radius: 14px; }
.hub-hero .bar .logo-badge img { width: 36px; }
.hub-hero .brand { flex: 1; line-height: 1.15; }
.hub-hero .brand b { font-family: var(--head); font-size: 16px; display: block; }
.hub-hero .brand span { font-size: 12px; opacity: .75; letter-spacing: .08em; text-transform: uppercase; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.14); color: #fff;
  font-family: var(--head); font-weight: 700; display: grid; place-items: center; text-decoration: none; flex: none; }
.hello { margin-top: 26px; }
.hello h2 { font-size: 30px; line-height: 1.1; }
.hello p { margin: 6px 0 0; opacity: .8; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 12px; backdrop-filter: blur(6px); text-align: left; color: #fff; }
.stat b { font-family: var(--head); font-size: 26px; display: block; line-height: 1.1; }
.stat span { font-size: 12px; opacity: .82; }
.stat.alert { background: rgba(198,40,40,.32); border-color: rgba(255,140,140,.4); }
.hub-body { flex: 1; padding: 0 18px calc(24px + var(--safe-bottom)); margin-top: -46px; position: relative; z-index: 2; max-width: 760px; width: 100%; margin-left: auto; margin-right: auto; }
.tray { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 10px 40px rgba(18,38,26,.16); padding: 18px 16px 20px; }
.tray-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 12px; }
.tray-head h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 8px; }
.tool { background: none; border: 0; display: grid; justify-items: center; gap: 9px; padding: 4px; text-align: center; color: var(--ink); }
.tool .orb { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 30% 25%, #6aa95f, var(--green) 55%, #2b5226); box-shadow: 0 10px 22px rgba(65,118,56,.38), inset 0 -6px 14px rgba(0,0,0,.18), inset 0 4px 10px rgba(255,255,255,.25); transition: transform .15s; }
.tool .orb::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--blue); opacity: .55; }
.tool:active .orb { transform: scale(.94); }
.tool .orb svg { width: 46px; height: 46px; color: #fff; }
.tool .orb .count { position: absolute; top: -2px; right: -2px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); z-index: 1; }
.tool b { font-size: 13px; line-height: 1.25; font-weight: 700; max-width: 110px; }
.tool.soon .orb { background: var(--card-2); box-shadow: none; border: 2px dashed var(--line); }
.tool.soon .orb::after { display: none; }
.tool.soon .orb svg { color: var(--faint); }
.tool.soon b { color: var(--faint); font-weight: 600; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 26px 4px 10px; font-family: var(--head); }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.team .card { padding: 14px; display: flex; align-items: center; gap: 12px; }
.team .avatar { background: var(--green-50); color: var(--green); border-color: var(--line); }
.team b { font-family: var(--head); font-size: 20px; }

/* ---------- list ---------- */
.searchbar { position: relative; }
.searchbar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; color: var(--faint); }
.searchbar .input { padding-left: 44px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex: none; min-height: 38px; font-size: 14px; padding: 0 14px; }
.rlist { display: grid; gap: 10px; }
.ritem { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); width: 100%; color: var(--ink); }
.ritem:active { transform: scale(.995); }
.rbadge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 14px; background: var(--blue-50); color: var(--blue-600); }
.rbadge.passed { background: var(--pass-50); color: var(--pass); }
.rbadge.failed { background: var(--danger-50); color: var(--danger); }
.ritem .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem .m { font-size: 12px; color: var(--faint); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.pill.draft { background: var(--warn-50); color: var(--warn); }
.pill.completed { background: var(--blue-50); color: var(--blue-600); }
.pill.sent { background: var(--pass-50); color: var(--pass); }
.pill.passed { background: var(--pass-50); color: var(--pass); }
.pill.failed { background: var(--danger-50); color: var(--danger); }
.sync { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; color: var(--line); }
.fab { position: fixed; right: 18px; bottom: calc(20px + var(--safe-bottom)); z-index: 30; border-radius: 999px; padding: 0 22px 0 18px; min-height: 58px; font-size: 17px; }

/* ---------- editor ---------- */
.steps { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; position: sticky; top: calc(64px + var(--safe-top)); z-index: 15; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.steps::-webkit-scrollbar { display: none; }
.step { flex: none; display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; color: var(--muted); }
.step i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--card-2); }
.step.on { border-color: var(--green); color: var(--ink); }
.step.on i { background: var(--green); color: #fff; }
.step.done i { background: var(--green-50); color: var(--green); }
.savestate { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.savestate.ok { color: var(--pass); }
.savestate.off { color: var(--warn); }
.savestate svg { width: 14px; height: 14px; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 14px calc(10px + var(--safe-bottom)); display: flex; gap: 10px;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bottombar .btn { flex: 1; }
.bottombar .btn.icon { flex: none; width: var(--tap); padding: 0; }
.h-sec { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.h-sec h2 { font-size: 20px; }
.h-sec .num { width: 30px; height: 30px; border-radius: 10px; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 14px; }
.hint { font-size: 14px; color: var(--muted); margin: -4px 0 0; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.18); z-index: 40; overflow: hidden; }
.suggest button { width: 100%; text-align: left; border: 0; background: none; padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; color: var(--ink); }
.suggest button:last-child { border-bottom: 0; }
.suggest button:active { background: var(--card-2); }
.suggest b { font-size: 15px; }
.suggest span { font-size: 13px; color: var(--muted); }
.rel { position: relative; }
.linked { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); font-size: 14px; font-weight: 600; }
.linked svg { width: 18px; height: 18px; flex: none; }
.linked button { margin-left: auto; }
.devices { display: grid; gap: 8px; }
.device-card { text-align: left; width: 100%; border: 1.5px dashed var(--blue); background: var(--blue-50); color: var(--ink); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.device-card b { font-size: 15px; }
.device-card span { font-size: 13px; color: var(--muted); }
.atype { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.atype button { border: 2px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px 6px 12px; display: grid; justify-items: center; gap: 6px; color: var(--ink); }
.atype button b { font-family: var(--head); font-size: 22px; }
.atype button span { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.2; }
.atype button svg { width: 42px; height: 26px; color: var(--faint); }
.atype button.on { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 4px rgba(65,118,56,.14); }
.atype button.on svg { color: var(--green); }
.comp { border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.comp-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.comp-h b { font-family: var(--head); font-size: 16px; flex: 1; }
.comp-h .tag { font-size: 12px; font-weight: 800; color: var(--muted); }
.comp-b { padding: 14px 16px 16px; display: grid; gap: 14px; }
.psid { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; align-items: center; }
.psid button { height: var(--tap); border-radius: 12px; border: 1.5px solid var(--line); background: var(--card-2); font-size: 22px; font-weight: 700; color: var(--ink); }
.psid .input { text-align: center; font-family: var(--head); font-weight: 700; font-size: 22px; }
.psid-wrap { display: grid; gap: 6px; }
.psid-wrap > span { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.banner { border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.banner svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.banner.pass { background: var(--pass-50); color: var(--pass); }
.banner.fail { background: var(--danger-50); color: var(--danger); }
.banner.info { background: var(--blue-50); color: var(--blue-600); }
.banner.warn { background: var(--warn-50); color: var(--warn); }
.banner ul { margin: 4px 0 0; padding-left: 18px; }
.bigresult { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigresult button { min-height: 84px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); font-family: var(--head); font-weight: 800; font-size: 20px; letter-spacing: .04em; display: grid; place-items: center; gap: 2px; color: var(--muted); }
.bigresult button svg { width: 28px; height: 28px; }
.bigresult .pass.on { background: var(--pass); border-color: var(--pass); color: #fff; box-shadow: 0 8px 22px rgba(29,122,52,.35); }
.bigresult .fail.on { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 8px 22px rgba(198,40,40,.32); }
.testerbox { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.testerbox .k { font-size: 12px; color: var(--muted); }
.sigpad-wrap { border: 1.5px dashed var(--line); border-radius: 14px; background: var(--card-2); position: relative; }
.sigpad { width: 100%; height: 170px; display: block; touch-action: none; }
.sigpad-wrap .x { position: absolute; left: 14px; right: 14px; bottom: 34px; border-bottom: 1.5px solid var(--faint); pointer-events: none; }
.sigpad-wrap .hint2 { position: absolute; left: 14px; bottom: 10px; font-size: 12px; color: var(--faint); pointer-events: none; }
.sig-img { height: 64px; max-width: 100%; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px 8px; }

/* ---------- report view ---------- */
.preview-frame { width: 100%; aspect-ratio: 8.5 / 11; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; }
.preview-frame iframe { width: 816px; height: 1056px; border: 0; transform-origin: 0 0; position: absolute; left: 0; top: 0; pointer-events: none; }
.preview-frame .tap { position: absolute; inset: 0; border: 0; background: transparent; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.act { border: 1px solid var(--line); background: var(--card); border-radius: 16px; min-height: 86px; display: grid; place-items: center; gap: 6px; padding: 10px 6px; font-weight: 700; font-size: 13px; color: var(--ink); box-shadow: var(--shadow); }
.act svg { width: 26px; height: 26px; color: var(--green); }
.act.blue svg { color: var(--blue); }
.act.red svg { color: var(--danger); }
.act:active { transform: scale(.97); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; }

/* ---------- modal / sheet ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(8,16,10,.55); animation: fade .15s; }
.modal .panel { background: var(--bg); width: 100%; max-width: 620px; max-height: 92dvh; overflow: auto; border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + var(--safe-bottom)); animation: up .22s cubic-bezier(.2,.9,.3,1.1); }
.modal .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.modal.full { align-items: stretch; }
.modal.full .panel { max-width: none; max-height: none; border-radius: 0; padding: calc(8px + var(--safe-top)) 0 0; display: flex; flex-direction: column; }
.viewer { flex: 1; overflow: auto; background: #525659; padding: 16px; -webkit-overflow-scrolling: touch; }
.viewer .paper { width: 816px; height: 1056px; transform-origin: 0 0; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.viewer .paper iframe { width: 816px; height: 1056px; border: 0; display: block; }
@media (min-width: 640px) { .modal { align-items: center; } .modal .panel { border-radius: 24px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%); z-index: 200; background: #12261a; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: calc(100% - 32px); animation: up .2s; }
.install-steps { display: grid; gap: 12px; counter-reset: s; }
.install-steps li { list-style: none; display: flex; gap: 12px; align-items: center; }
.install-steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.install-steps svg { width: 22px; height: 22px; vertical-align: -5px; color: var(--blue); }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: var(--warn); color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: calc(4px + var(--safe-top)) 10px 4px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
