/* VPS Private Vault — design aprovado (docs/design): fundo azul-marinho/preto, azul luminoso,
   cartões arredondados com borda azul translúcida, indicadores verdes de segurança. */
:root {
  --bg: #050b18; --bg2: #0a1630; --card: rgba(16, 30, 58, 0.78); --card-solid: #0f1d38; --border: rgba(86, 148, 255, 0.28);
  --text: #eaf1ff; --muted: #9db0cf; --blue: #3b9bff; --blue-glow: rgba(59, 155, 255, 0.55); --green: #22c55e; --green-bg: rgba(34, 197, 94, 0.16);
  --amber: #f5a524; --amber-bg: rgba(245, 165, 36, 0.16); --red: #ff5a5a; --gold: #ffc531; --track: rgba(120, 150, 200, 0.22);
  --radius: 18px; --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef3fb; --bg2: #ffffff; --card: rgba(255, 255, 255, 0.92); --card-solid: #ffffff; --border: rgba(31, 111, 229, 0.18);
  --text: #0b1a33; --muted: #5b6b86; --blue: #1f6fe5; --blue-glow: rgba(31, 111, 229, 0.25); --green: #16a34a; --green-bg: rgba(22, 163, 74, 0.12);
  --amber: #c27803; --amber-bg: rgba(245, 165, 36, 0.16); --track: rgba(31, 111, 229, 0.12); --shadow: 0 6px 22px rgba(15, 40, 80, 0.12);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  font: 16px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 60% at 50% -10%, rgba(40, 110, 255, 0.28), transparent 60%), linear-gradient(180deg, var(--bg2), var(--bg) 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
:root[data-theme="light"] body { background: radial-gradient(120% 60% at 50% -10%, rgba(31, 111, 229, 0.12), transparent 60%), var(--bg); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img { display: block; }
.ic { flex: none; }
.blue { color: var(--blue); } .green { color: var(--green); } .gold { color: var(--gold); } .blue-t { color: var(--blue); }
.muted { color: var(--muted); font-size: 0.86rem; }

.screen { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 96px); }

/* faixa de demonstração */
.demo-ribbon { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 0.78rem; color: var(--amber); background: var(--amber-bg); border: 1px solid rgba(245, 165, 36, 0.35); }

/* topo */
.dash-head { display: flex; justify-content: space-between; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--text); }
.icon-btn:active { background: var(--track); }
.icon-btn.small { width: 36px; height: 36px; color: var(--muted); }
.icon-btn[disabled] { opacity: 0.3; }
.topbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 4px; margin: 0 -16px 8px; padding: calc(env(safe-area-inset-top) + 4px) 8px 6px; background: linear-gradient(180deg, var(--bg2) 70%, transparent); }
.tb-title { text-align: center; min-width: 0; }
.tb-title h1 { margin: 0; font-size: 1.3rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.tb-actions { display: flex; justify-content: flex-end; min-width: 44px; }
.tb-spacer { width: 44px; }

/* marca */
.brand { text-align: center; margin: -6px 0 16px; }
.brand-shield { display: inline-grid; place-items: center; color: var(--blue); filter: drop-shadow(0 0 18px var(--blue-glow)) drop-shadow(0 0 4px var(--blue-glow)); }
.brand h1 { margin: 6px 0 2px; font-size: 2rem; letter-spacing: -0.02em; font-weight: 800; }
.brand p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* cartões */
.card { display: block; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card-link:active { transform: scale(0.985); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head > div { flex: 1; min-width: 0; }
.card-head strong { display: block; font-size: 0.98rem; line-height: 1.15; }
.card-head span { display: block; font-size: 0.8rem; color: var(--muted); }
.card-head .chev, .chev { color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 2px 0 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f86ff, #5bb4ff); box-shadow: 0 0 10px var(--blue-glow); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 4px; margin-bottom: 10px; }
.stats button { display: grid; justify-items: center; gap: 2px; padding: 4px 0; border-right: 1px solid var(--border); }
.stats button:last-child { border-right: 0; }
.stats span { font-size: 0.82rem; color: var(--muted); }
.stats strong { font-size: 1.05rem; }

.thumbs3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumbs3 span { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.thumbs3 img { width: 100%; height: 100%; object-fit: cover; }
.thumbs3 em { position: absolute; right: 4px; bottom: 4px; padding: 1px 7px; border-radius: 99px; font-style: normal; font-size: 0.75rem; font-weight: 700; background: rgba(0, 0, 0, 0.55); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.tile { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 4px 12px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--blue); }
.tile strong { color: var(--text); font-size: 0.86rem; line-height: 1.15; overflow-wrap: anywhere; }
.tile span { color: var(--muted); font-size: 0.7rem; line-height: 1.2; }
.tile.green-ic > .ic { color: var(--green); }
.tile:active { transform: scale(0.97); }

.secbar { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.secbar > div { flex: 1; }
.secbar strong { display: block; } .secbar span { font-size: 0.8rem; color: var(--muted); }
.secbar-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; }
.secbar.ok strong { color: var(--green); } .secbar.ok .secbar-ic { background: var(--green-bg); color: var(--green); box-shadow: 0 0 16px rgba(34, 197, 94, 0.35); }
.secbar.wait strong { color: var(--amber); } .secbar.wait .secbar-ic { background: var(--amber-bg); color: var(--amber); }

/* listas */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row-item { display: flex; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding-right: 4px; }
.row-main { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-width: 0; }
.row-text { flex: 1; min-width: 0; }
.row-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-text span { display: block; font-size: 0.8rem; color: var(--muted); }
.row-thumb { width: 64px; height: 44px; border-radius: 10px; object-fit: cover; }
.row-thumb.left { width: 48px; height: 48px; }
.folder-ic { position: relative; color: var(--fc); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.folder-ic .ic { width: 34px; height: 34px; }
.lock-badge { position: absolute; left: 10px; top: 13px; color: #3b2a00; }
.vthumb { position: relative; width: 86px; height: 56px; border-radius: 10px; overflow: hidden; flex: none; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb .play { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; }
.vthumb em { position: absolute; right: 4px; bottom: 3px; font-style: normal; font-size: 0.68rem; padding: 0 5px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.doc-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--track); color: var(--blue); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 10px; font-size: 0.85rem; color: var(--muted); }
.crumbs button { color: var(--blue); }
.crumbs strong { color: var(--text); }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.seg button { padding: 7px 0; border-radius: 9px; text-align: center; font-size: 0.88rem; color: var(--muted); }
.seg button.on { background: var(--blue); color: #fff; box-shadow: 0 0 12px var(--blue-glow); }
.group { margin: 14px 2px 8px; font-size: 0.95rem; color: var(--muted); text-transform: capitalize; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.cell { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell em { position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 0.7rem; padding: 1px 5px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; display: inline-flex; }
.cell em.fav { color: var(--gold); }
.empty { text-align: center; color: var(--muted); margin: 40px 16px; }

.fab { position: fixed; right: max(20px, calc(50% - 260px)); bottom: calc(env(safe-area-inset-bottom) + 24px); display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: #fff; background: linear-gradient(180deg, #4aa8ff, #1f6fe5); box-shadow: 0 6px 22px var(--blue-glow); z-index: 6; }

/* telas de centro (backup, segurança, ajustes) */
.center-head { display: grid; justify-items: center; gap: 6px; margin: 0 0 14px; text-align: center; }
.center-head .od { display: flex; align-items: center; gap: 8px; font-size: 1.4rem; }
.faceid { filter: drop-shadow(0 0 14px var(--blue-glow)); }
.status-card { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.status-card strong { display: block; } .status-card span { display: block; font-size: 0.82rem; color: var(--muted); }
.status-card.amber { color: var(--amber); border-color: rgba(245, 165, 36, 0.4); }
.status-card.amber > div strong { color: var(--amber); }
.kpis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.kpis span { display: block; font-size: 0.78rem; color: var(--muted); } .kpis strong { font-size: 1.1rem; }
.row-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; font-weight: 600; background: var(--card); border: 1px solid var(--border); }
.btn.primary { background: linear-gradient(180deg, #4aa8ff, #1f6fe5); color: #fff; border-color: transparent; box-shadow: 0 4px 16px var(--blue-glow); }
.settings { list-style: none; margin: 0 0 10px; padding: 4px 0; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 50px; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row > button { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 50px; }
.set-ic { display: grid; place-items: center; color: var(--muted); }
.set-label { flex: 1; }
.set-label small { display: block; font-size: 0.75rem; color: var(--muted); }
.set-value { font-size: 0.85rem; color: var(--muted); }
.flag { font-size: 1.1rem; } .flag.big { font-size: 1.6rem; }
.dot { width: 12px; height: 12px; border-radius: 3px; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: var(--track); flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on { background: var(--green); } .switch.on i { left: 23px; }
.switch.disabled { opacity: 0.45; }
.note { font-size: 0.8rem; color: var(--muted); margin: 6px 4px 16px; }
.prose p { margin: 0; }

.donut-card { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; margin-bottom: 10px; }
.donut { width: 150px; height: 150px; }
.donut text { font-size: 18px; font-weight: 800; fill: var(--text); }
.donut-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; }
.donut-card dt { color: var(--muted); } .donut-card dd { margin: 0; font-weight: 700; }

.locked { display: grid; justify-items: center; text-align: center; gap: 8px; margin-top: 20px; }
.locked h2 { margin: 4px 0 0; font-size: 1.2rem; }
.locked p { margin: 0 0 8px; color: var(--muted); max-width: 420px; }
.gate { text-align: left; }
.gate h3 { margin: 0 0 8px; font-size: 1rem; }
.gate-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.85rem; }
.gate-list li { display: flex; gap: 8px; align-items: flex-start; }
.gate-list li.passed { color: var(--green); } .gate-list li.pending { color: var(--amber); }
.gate-list li span { color: var(--text); }

.searchbox { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--muted); }
.searchbox input { flex: 1; height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }

/* folha inferior */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 86vh; overflow: auto; padding: 14px 14px calc(env(safe-area-inset-bottom) + 14px); border-radius: 22px 22px 0 0; background: var(--card-solid); border: 1px solid var(--border); transform: translateY(100%); transition: transform .22s ease-out; }
.sheet-wrap.open .sheet { transform: none; } .sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet-head > div { flex: 1; } .sheet-head strong { display: block; font-size: 1.05rem; } .sheet-head span { font-size: 0.8rem; color: var(--muted); }
.sheet-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li > button, .menu-colors { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 46px; padding: 0 6px; border-bottom: 1px solid var(--border); }
.menu li:last-child > button { border-bottom: 0; }
.menu .danger { color: var(--red); }
.swatches { display: flex; gap: 8px; margin-left: auto; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); }
.menu-colors span:nth-child(2) { flex: 0 0 auto; }
.form { display: grid; gap: 10px; }
.form input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }

/* visualizador: barra com Fechar sempre visível */
.viewer { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: auto 1fr auto; background: #000; color: #fff; }
.viewer-bar, .viewer-nav { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 4px) 8px 6px; background: rgba(0, 0, 0, 0.7); }
.viewer-nav { justify-content: center; gap: 24px; padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px); }
.viewer .icon-btn { color: #fff; }
.viewer-title { flex: 1; min-width: 0; text-align: center; }
.viewer-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-title span { font-size: 0.78rem; opacity: 0.75; }
.viewer-stage { display: grid; place-items: center; overflow: hidden; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.video-demo { position: relative; display: grid; place-items: center; }
.video-demo .play { position: absolute; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); }
.video-demo p { position: absolute; bottom: 8px; margin: 0; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); font-size: 0.8rem; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 100px); transform: translate(-50%, 20px); opacity: 0; transition: all .25s; z-index: 40; max-width: 90vw; padding: 10px 16px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 0.88rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.install { max-width: 460px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 48px) 24px 40px; text-align: center; }
.install h1 { margin: 10px 0; }
.install p { color: var(--muted); }
.install ol { text-align: left; margin: 18px 0 24px; padding-left: 22px; display: grid; gap: 8px; }

.privacy-cover { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); color: var(--blue); }
.privacy-cover[hidden] { display: none; }

@media (max-width: 380px) {
  .tiles { gap: 6px; } .tile { padding: 12px 2px 10px; } .tile strong { font-size: 0.8rem; } .tile span { font-size: 0.64rem; }
  .brand h1 { font-size: 1.7rem; } .donut-card { grid-template-columns: 120px 1fr; } .donut { width: 120px; height: 120px; }
}

/* criação do cofre e bloqueio (demonstração) */
.steps { display: flex; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.steps i { width: 28px; height: 5px; border-radius: 99px; background: var(--track); }
.steps i.on { background: var(--blue); box-shadow: 0 0 8px var(--blue-glow); }
.center-head h2 { margin: 6px 0 0; font-size: 1.35rem; }
.center-head p { margin: 2px 12px 0; }
.checks .set-row { min-height: 56px; }
.fake-field { display: grid; gap: 4px; margin-bottom: 8px; padding: 10px 14px; opacity: 0.75; }
.fake-field span { font-size: 0.78rem; color: var(--muted); }
.fake-field b { letter-spacing: 0.18em; }
.strength { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 6px 0 4px; }
.strength i { display: block; height: 100%; width: 80%; background: linear-gradient(90deg, var(--amber), var(--green)); }
.note-list { margin: 8px 0 14px; padding-left: 20px; color: var(--muted); font-size: 0.85rem; display: grid; gap: 4px; }
.recovery-key { display: grid; gap: 6px; justify-items: center; margin-bottom: 10px; }
.recovery-key code { font: 600 0.95rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.lockscreen { min-height: 80vh; display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; }
.lockscreen h1 { margin: 6px 0 0; }
.faceid-btn { display: grid; justify-items: center; gap: 8px; margin: 22px 0 6px; padding: 20px 28px; border-radius: 24px; color: var(--blue); background: var(--card); border: 1px solid var(--border); box-shadow: 0 0 24px var(--blue-glow); }
.faceid-btn span { color: var(--text); font-weight: 600; }
.link { color: var(--blue); font-weight: 600; padding: 8px; }
.small { font-size: 0.78rem; }

/* ===== app funcional ===== */
.demo-ribbon { width: 100%; text-align: left; font: inherit; font-size: 0.78rem; }
.pill.red { background: rgba(255, 90, 90, 0.16); color: var(--red); }
.pill.muted-pill { background: var(--track); color: var(--muted); }
.status-card.green { color: var(--green); border-color: rgba(34, 197, 94, 0.4); } .status-card.green > div strong { color: var(--green); }
.status-card.red { color: var(--red); border-color: rgba(255, 90, 90, 0.45); } .status-card.red > div strong { color: var(--red); }
.status-card.muted { color: var(--muted); }
.small-card { padding: 10px 12px; margin-bottom: 10px; width: 100%; text-align: left; }
.small-card strong { font-size: 0.92rem; }
.amber-t { color: var(--amber); } .set-value.green { color: var(--green); }
.muted-ic { color: var(--muted); }
.mini { font-size: 0.75rem; margin: 6px 0; grid-column: 1 / -1; }
.empty-state { display: grid; justify-items: center; gap: 12px; text-align: center; margin: 40px 16px; color: var(--muted); }
.th { width: 100%; height: 100%; object-fit: cover; background: var(--track); opacity: 0; transition: opacity .25s; }
.th.loaded { opacity: 1; }
.th-ic { display: grid; place-items: center; opacity: 1; color: var(--muted); }
.row-thumb.th-ic { width: 64px; height: 44px; border-radius: 10px; }
.cell.sel { outline: 3px solid var(--blue); outline-offset: -3px; }
.cell .check { position: absolute; left: 6px; top: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, 0.35); color: transparent; }
.cell.sel .check { background: var(--blue); color: #fff; }
.cell em.docname { left: 4px; right: 4px; bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; text-align: center; }
.cell em.dur { gap: 3px; align-items: center; }
.cell em.fav { right: auto; left: 4px; top: 4px; bottom: auto; background: rgba(0, 0, 0, 0.4); }
.cell em.keep { left: 4px; right: auto; background: var(--green); }
.row-item.sel { outline: 2px solid var(--blue); }
.selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 16px); z-index: 8; display: flex; align-items: center; gap: 2px; padding: 6px 8px 6px 14px; border-radius: 18px; background: var(--card-solid); border: 1px solid var(--border); box-shadow: var(--shadow); width: max-content; max-width: calc(100vw - 24px); }
.selbar > span { font-size: 0.85rem; margin-right: 6px; white-space: nowrap; }
.icon-btn.danger, .danger { color: var(--red); }
.btn.danger { background: rgba(255, 90, 90, 0.14); color: var(--red); border-color: rgba(255, 90, 90, 0.4); }
.btn.small { padding: 7px 12px; font-size: 0.85rem; }
.btn.wide { width: 100%; margin: 6px 0; }
.btn[disabled] { opacity: 0.5; }
.hist .row-main { align-items: flex-start; }
.row-text.wrap p { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); white-space: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chip { padding: 7px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--border); font-size: 0.85rem; }
.chip.on { background: var(--blue); color: #fff; border-color: transparent; }
.lang-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px 0; }
.picker .menu .folder-ic .ic { width: 26px; height: 26px; }
.crumb-up { display: flex; align-items: center; gap: 6px; color: var(--blue); padding: 6px 0 10px; font-size: 0.9rem; }
.pad { padding: 10px 6px; margin: 0; }
.steps-list { margin: 4px 0 14px; padding-left: 22px; display: grid; gap: 6px; font-size: 0.92rem; }
.sheet-msg { white-space: pre-wrap; margin: 4px 2px 14px; color: var(--text); line-height: 1.45; }
.menu li > button small { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.lbl { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.form-err { color: var(--red); font-size: 0.86rem; margin: 0; }
.wide-form { width: 100%; max-width: 360px; }
.hidden-input { position: fixed; left: -9999px; opacity: 0; }
.strength i.s0, .strength i.s1 { background: var(--red); } .strength i.s2 { background: var(--amber); } .strength i.s3, .strength i.s4 { background: var(--green); }
.strength i { width: 0; transition: width .2s; }
.recovery-key code { word-break: break-all; text-align: center; font-size: 1rem; line-height: 1.6; }
.dup { margin-bottom: 10px; } .dup .grid3 { margin: 0 0 6px; }
.busy { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.55); }
.busy-card { display: grid; justify-items: center; gap: 8px; width: min(360px, 100%); padding: 22px; border-radius: 20px; background: var(--card-solid); border: 1px solid var(--border); text-align: center; }
.busy-card .bar { width: 100%; }
.busy-sub { font-size: 0.82rem; color: var(--muted); word-break: break-all; }
.busy-card small { color: var(--muted); font-size: 0.75rem; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 80vh; display: grid; place-items: center; }
.boot-error { white-space: pre-wrap; padding: 16px; color: var(--red); }
.toast.warn { border-color: rgba(245, 165, 36, 0.6); } .toast.error { border-color: rgba(255, 90, 90, 0.7); color: var(--red); }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 8px); z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; background: var(--blue); color: #fff; font-weight: 600; font-size: 0.88rem; box-shadow: 0 6px 20px var(--blue-glow); max-width: calc(100vw - 24px); }
.viewer-bar .viewer-title { text-align: left; }
.viewer-stage { position: relative; }
.viewer-stage video { max-width: 100%; max-height: 100%; }
.viewer-stage img.zoomable { touch-action: pinch-zoom; transition: transform .2s; }
.viewer-stage img.zoomed { transform: scale(2.2); cursor: zoom-out; }
.docframe { width: 100%; height: 100%; border: 0; background: #fff; }
.textview { width: 100%; height: 100%; margin: 0; padding: 14px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: #e8eefc; background: #0b1426; font: 0.85rem/1.45 ui-monospace, Menlo, Consolas, monospace; }
.viewer-msg { display: grid; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: #cfd8ea; }
.viewer-hint { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.65); font-size: 0.75rem; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.switch { border: 0; padding: 0; cursor: pointer; }
.kpis small { display: block; font-size: 0.68rem; line-height: 1.2; margin-top: 2px; }
.set-row > button.danger .set-ic { color: var(--red); }
@media print { body * { visibility: hidden; } .recovery-key, .recovery-key * { visibility: visible; } .recovery-key { position: fixed; top: 30%; left: 0; right: 0; border: 0; box-shadow: none; color: #000; background: #fff; } }