/* IWH — Integrated Work Hub. Navy + gold, phone first, works offline. */

:root {
  --navy: #14284a;
  --navy-2: #1d3762;
  --navy-3: #2a4a7f;
  --gold: #c69236;
  --gold-soft: #f7ecd8;
  --blue: #2c67c5;
  --blue-soft: #e8f0fc;
  --green: #16a34a;
  --green-soft: #e6f6ec;
  --yellow: #eab308;
  --yellow-soft: #fdf6d8;
  --orange: #ea580c;
  --orange-soft: #fdecdf;
  --red: #dc2626;
  --red-soft: #fde8e8;
  --gray: #6b7280;
  --gray-soft: #eef0f3;
  --bg: #f3f5f9;
  --card: #fff;
  --ink: #142033;
  --ink-2: #4b5567;
  --line: #e1e5ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 74, .06), 0 4px 16px rgba(20, 40, 74, .06);
  --sb: 264px;
  --top: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.45; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
[hidden], .hidden { display: none !important; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
h4 { font-size: .95rem; margin: 14px 0 8px; }
p { margin: 6px 0; }
small { font-size: .8rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--gray-soft); padding: 1px 5px; border-radius: 6px; }
code.wrap { display: block; word-break: break-all; padding: 8px; margin-top: 6px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.center { text-align: center; }
.block { display: block; }
.pad { padding: 8px 12px; }
.plain { margin: 6px 0; padding-left: 18px; }
.plain li { margin: 4px 0; }
.steps { padding-left: 20px; }
.steps li { margin: 8px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ok-ic { color: var(--green); } .warn-ic { color: var(--orange); } .plan-ic { color: var(--gray); }
.fav-on { color: var(--gold); fill: var(--gold); }
.ack-on { color: var(--green); }

/* ---------- buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; background: var(--gray-soft); color: var(--ink);
  font: inherit; font-weight: 600; font-size: .94rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.outline { background: #fff; border-color: var(--navy); color: var(--navy); }
.btn.soft { background: var(--blue-soft); color: var(--navy); }
.btn.soft:hover { background: #dbe7fa; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--gray-soft); }
.btn.link { background: none; color: var(--blue); padding: 0 6px; min-height: 34px; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-soft { background: var(--red-soft); color: var(--red); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: .85rem; border-radius: 9px; }
.btn.lg { min-height: 50px; font-size: 1rem; }
.btn.block { display: flex; width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; position: relative; flex: none; }
.icon-btn:hover { background: rgba(127, 140, 160, .14); }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44, 103, 197, .15); }
.input:disabled { background: var(--gray-soft); color: var(--gray); }
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f-label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.f-label i { font-weight: 400; color: var(--ink-2); font-style: normal; }
.f-hint { color: var(--ink-2); }
.f-err { color: var(--red); font-weight: 600; min-height: 0; }
.f-err:empty { display: none; }
.field.bad .input { border-color: var(--red); background: #fffafa; }
.f-sec { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--navy); }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.check-row { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.check-row.small { font-size: .88rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 2px 10px; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; min-height: 42px; flex: 1; min-width: 160px; }
.search input { border: 0; outline: none; font: inherit; flex: 1; min-width: 0; background: transparent; min-height: 38px; }
.search .ic { color: var(--ink-2); }
.search.sm { min-height: 36px; }
.search.sm input { min-height: 32px; }
.seg { display: inline-flex; background: var(--gray-soft); border-radius: 10px; padding: 3px; gap: 3px; }
.seg.block { display: flex; }
.seg > button, .seg > label { flex: 1; border: 0; background: none; font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); text-align: center; position: relative; }
.seg > button.on, .seg > label:has(input:checked) { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg.sm > button { padding: 5px 10px; font-size: .85rem; }

/* ---------- chips, dots, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--gray-soft); color: var(--gray); white-space: nowrap; font-style: normal; }
.chip .ic { width: 14px; height: 14px; }
.chip.green { background: var(--green-soft); color: #11753a; }
.chip.yellow { background: var(--yellow-soft); color: #8a6a00; }
.chip.orange { background: var(--orange-soft); color: #b23f06; }
.chip.red { background: var(--red-soft); color: #b31b1b; }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.xs { font-size: .66rem; padding: 1px 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gray); margin-right: 6px; flex: none; vertical-align: 0; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.orange { background: var(--orange); } .dot.red { background: var(--red); } .dot.blue { background: var(--blue); } .dot.gray { background: #b5bcc8; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; font-style: normal; line-height: 1; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin: 8px 0; }
.legend span { display: inline-flex; align-items: center; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--navy); color: #fff; text-align: center; padding: 24px; }
.boot b { font-size: 2rem; letter-spacing: .08em; }
.boot p { max-width: 340px; opacity: .85; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center; padding: 24px 14px calc(40px + var(--safe-b)); background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #26467a 100%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); margin: auto 0; }
.auth.wide .auth-card { max-width: 640px; }
.auth-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px 18px; background: var(--navy); color: #fff; text-align: center; border-bottom: 4px solid var(--gold); }
.auth-hero b { font-size: 1.9rem; letter-spacing: .1em; margin-top: 6px; }
.auth-hero span { font-weight: 600; opacity: .95; }
.auth-hero small { opacity: .7; }
.auth-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.auth-body h2 { display: flex; align-items: center; gap: 8px; }
.auth-foot { padding: 12px 20px; background: var(--gray-soft); font-size: .76rem; color: var(--ink-2); text-align: center; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.back-link { align-self: flex-start; margin-left: -6px; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lang-pick { margin-bottom: 4px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); font-size: .9rem; margin: 8px 0; }
.notice .ic { margin-top: 1px; }
.notice.warn { background: var(--yellow-soft); color: #6b5100; }
.notice.info { background: var(--blue-soft); }
.recovery { font-family: ui-monospace, Menlo, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .12em; text-align: center; padding: 16px; border: 2px dashed var(--gold); border-radius: 12px; background: var(--gold-soft); color: var(--navy); user-select: all; margin: 8px 0; word-break: break-all; }
.recovery.sm { font-size: 1rem; letter-spacing: .06em; padding: 10px; }
.big-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--yellow-soft); color: #8a6a00; margin-bottom: 8px; }
.big-ic .ic { width: 32px; height: 32px; }
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.pick:hover { border-color: var(--navy); background: var(--blue-soft); }
.pick > span { flex: 1; display: flex; flex-direction: column; }
.pick small { color: var(--ink-2); }
.pick > .ic:first-child { color: var(--navy); width: 24px; height: 24px; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; background: var(--navy); color: #fff; box-shadow: 0 2px 10px rgba(20, 40, 74, .25); }
.tb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tb-title b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title small { opacity: .7; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-actions { display: flex; align-items: center; gap: 2px; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.topbar .badge { position: absolute; top: 3px; right: 1px; }
.topbar .chip.yellow { background: var(--gold); color: var(--navy); }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .9rem; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .74rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.view { padding: 14px 14px calc(96px + var(--safe-b)); max-width: 1180px; margin: 0 auto; }
.practice-banner { position: sticky; top: 0; z-index: 31; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 12px; background: var(--gold); color: var(--navy); font-size: .82rem; }
.practice-banner > span { flex: 1; min-width: 160px; }
.practice-banner > span i { font-style: normal; }
.practice-banner .btn { background: rgba(255, 255, 255, .55); color: var(--navy); }
.practice-banner:not([hidden]) + .topbar { top: 0; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); box-shadow: 0 -4px 16px rgba(20, 40, 74, .06); }
.bn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--ink-2); font-size: .7rem; font-weight: 600; background: none; border: 0; font-family: inherit; cursor: pointer; position: relative; min-height: 56px; justify-content: center; }
.bn .ic { width: 22px; height: 22px; }
.bn.on { color: var(--navy); }
.bn.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.bn .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.guide-fab { position: fixed; right: 14px; bottom: calc(70px + var(--safe-b)); z-index: 41; display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--gold); color: var(--navy); font: inherit; font-weight: 800; box-shadow: 0 6px 18px rgba(198, 146, 54, .45); cursor: pointer; }
.guide-fab .ic { width: 20px; height: 20px; }
@media (max-width: 1023px) { .guide-fab { display: none; } }
@media (max-width: 639px) {
  .practice-banner { flex-wrap: nowrap; padding: 6px 10px; }
  .practice-banner > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .practice-banner > span i { display: none; }
  .practice-banner > .ic { display: none; }
  .tb-chip { display: none; }
}

@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--sb) 1fr; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--navy); color: #dfe6f3; overflow-y: auto; border-right: 3px solid var(--gold); }
  .bottomnav { display: none; }
  .view { padding: 22px 28px 60px; }
  .guide-fab { bottom: 22px; right: 22px; }
  .tb-brand { display: none; }
}
.sb-top { padding: 18px 18px 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-word { display: flex; flex-direction: column; line-height: 1.1; }
.logo-word b { color: #fff; font-size: 1.2rem; letter-spacing: .08em; }
.logo-word small { color: var(--gold); font-size: .72rem; }
.sb-who { display: flex; gap: 10px; align-items: center; margin: 0 12px 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.sb-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sb-who b { color: #fff; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-who small { opacity: .75; font-size: .74rem; }
.sb-nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px; flex: 1; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: #dfe6f3; font-size: .9rem; font-weight: 500; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: left; }
.sb-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sb-link.on { background: rgba(198, 146, 54, .2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sb-link span { flex: 1; }
.sb-link .ic { opacity: .9; }
.sb-foot { display: flex; gap: 6px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sb-foot .btn { color: #dfe6f3; border-color: rgba(255, 255, 255, .2); flex: 1; }
.sb-foot .btn:hover { background: rgba(255, 255, 255, .1); }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 14px; flex-wrap: wrap; }
.ph-text { flex: 1; min-width: 200px; }
.ph-text h1 { font-size: 1.35rem; display: flex; align-items: center; gap: 9px; color: var(--navy); }
.ph-text h1 .ic { width: 24px; height: 24px; color: var(--gold); }
.ph-text p { color: var(--ink-2); font-size: .9rem; }
.ph-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.page-head .back { margin-left: -8px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; border: 1px solid rgba(225, 229, 236, .6); }
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--blue); }
.sec { margin: 18px 0 10px; color: var(--navy); font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid2 > .card { margin-bottom: 0; }
.grid2 { margin-bottom: 14px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 16px; color: var(--ink-2); }
.empty-ic { width: 44px; height: 44px; color: #b6bfcd; }
.empty b { color: var(--ink); }
.gate { text-align: center; padding: 34px 20px; }
.gate-ic { width: 48px; height: 48px; color: var(--gold); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on { color: var(--navy); border-color: var(--gold); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats.sm { grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(225, 229, 236, .6); border-left: 4px solid var(--line); font: inherit; color: inherit; text-align: left; cursor: default; }
button.stat { cursor: pointer; }
button.stat:hover { border-color: var(--blue); }
.stat b { font-size: 1.5rem; color: var(--navy); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--ink-2); }
.stat.green { border-left-color: var(--green); } .stat.yellow { border-left-color: var(--yellow); } .stat.orange { border-left-color: var(--orange); } .stat.red { border-left-color: var(--red); } .stat.blue { border-left-color: var(--blue); } .stat.gray { border-left-color: #b5bcc8; }
.stats.sm .stat { padding: 10px; box-shadow: none; background: var(--bg); }
.stats.sm .stat b { font-size: 1.2rem; }

.hello { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border: 0; }
.hello small { opacity: .8; }
.hello p { opacity: .85; font-size: .88rem; }
.hello .chip { background: rgba(255, 255, 255, .16); color: #fff; }
.hello .chip.green { background: rgba(22, 163, 74, .35); }
.hello .chip.red { background: rgba(220, 38, 38, .5); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--ink); border: 1px solid rgba(225, 229, 236, .6); border-top: 4px solid var(--line); min-height: 112px; transition: transform .1s; }
.tile:hover { transform: translateY(-2px); border-color: var(--blue); }
.tile-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); margin-bottom: 4px; }
.tile-t { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.tile b { font-size: 1.05rem; color: var(--navy); }
.tile small { color: var(--ink-2); }
.tile.green { border-top-color: var(--green); } .tile.green .tile-ic { background: var(--green-soft); color: var(--green); }
.tile.yellow { border-top-color: var(--yellow); } .tile.yellow .tile-ic { background: var(--yellow-soft); color: #8a6a00; }
.tile.orange { border-top-color: var(--orange); } .tile.orange .tile-ic { background: var(--orange-soft); color: var(--orange); }
.tile.red { border-top-color: var(--red); } .tile.red .tile-ic { background: var(--red-soft); color: var(--red); }
.tile.blue { border-top-color: var(--blue); }
.tile.gray .tile-ic { background: var(--gray-soft); color: var(--gray); }
.tiles.quick .tile { min-height: 96px; border-top-color: var(--gold); }
.attention h3 { color: var(--navy); }
.att-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); color: var(--ink); }
.att-row span { flex: 1; }
.att-row .ic:last-child { color: var(--ink-2); }
.intro-card { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid #ecd6ad; color: #5c4210; }
.intro-card > span { flex: 1; min-width: 200px; }
.intro-btns { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }

.kv-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 560px) { .kv-grid { grid-template-columns: 1fr 1fr; column-gap: 18px; } }
.kv { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.kv > span { font-size: .76rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.kv > b { font-weight: 600; word-break: break-word; }
.kv .btn.link { align-self: flex-start; margin-left: -6px; min-height: 28px; font-size: .82rem; }
.kv-grid.sm .kv { padding: 6px 0; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row > span:first-child > .ic { display: none; }
.list-row small { color: var(--ink-2); }
.profile-card .pc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.profile-card .pc-head p { color: var(--ink-2); }
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; position: relative; }
.tl-row > i { width: 12px; height: 12px; border-radius: 50%; background: #c5ccd8; flex: none; box-shadow: 0 0 0 4px #fff; z-index: 1; }
.tl-row.now > i { background: var(--gold); }
.tl-row::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-row > span { flex: 1; display: flex; flex-direction: column; }
.big-stat { text-align: center; padding: 24px 16px; }
.big-stat small { color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.big-stat b { display: block; font-size: 1.8rem; color: var(--navy); margin: 6px 0; }
.big-stat.party { background: linear-gradient(135deg, var(--gold-soft), #fff); border-color: var(--gold); }

/* LP */
.lp-summary { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .lp-summary { grid-template-columns: 1fr 1fr 1.3fr; } }
.lp-summary > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.lp-summary small { color: var(--ink-2); }
.lp-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.lp-row { display: flex; align-items: center; gap: 14px; margin: 0; border-left: 5px solid #c5ccd8; flex-wrap: wrap; }
.lp-row.green { border-left-color: var(--green); } .lp-row.yellow { border-left-color: var(--yellow); } .lp-row.orange { border-left-color: var(--orange); } .lp-row.red { border-left-color: var(--red); }
.lp-n { display: flex; flex-direction: column; align-items: center; font-weight: 800; color: var(--navy); font-size: 1.15rem; width: 48px; }
.lp-n small { font-size: .7rem; color: var(--ink-2); }
.lp-main { flex: 1; display: flex; flex-direction: column; min-width: 140px; }
.lp-main small { color: var(--ink-2); }
.lp-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- folder browser ---------- */
.card.fb { padding: 0; overflow: hidden; }
.fb-bar { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; }
@media (min-width: 760px) { .fb-bar { flex-direction: row; align-items: center; } }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; flex: 1; font-weight: 600; font-size: .9rem; min-width: 0; }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; gap: 4px; }
.crumbs .ic { width: 16px; height: 16px; color: var(--ink-2); }
.fb-tools { display: flex; gap: 6px; align-items: center; }
.fb-list { display: flex; flex-direction: column; }
.fb-row { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 0; border-bottom: 1px solid var(--line); }
.fb-row:last-child { border-bottom: 0; }
.fb-row:hover { background: #fafbfd; }
.fb-row.trashed { opacity: .75; }
.fb-main { flex: 1; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.fb-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fb-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-name small { color: var(--ink-2); }
.fi { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--gray-soft); color: var(--gray); }
.fi.folder { background: var(--gold-soft); color: #9a6c1c; }
.fi.link { background: var(--blue-soft); color: var(--blue); }
.fi.pdf { background: var(--red-soft); color: var(--red); }
.fi.image { background: var(--green-soft); color: var(--green); }
.fi.word { background: var(--blue-soft); color: var(--blue); }
.fi.excel { background: var(--green-soft); color: #11753a; }
#fb-results { border-top: 1px solid var(--line); }
@media (max-width: 559px) { .hide-sm { display: none; } }
.tree-pick { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.tree-pick button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.tree-pick button:hover:not(:disabled) { background: var(--blue-soft); }
.tree-pick button:disabled { opacity: .45; }

/* more / menus */
.more-list { display: flex; flex-direction: column; }
.more-row { display: flex; align-items: center; gap: 12px; padding: 13px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.more-row:hover { background: var(--gray-soft); }
.more-row.danger { color: var(--red); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: var(--bg); color: var(--ink); font-size: .76rem; font-weight: 600; text-align: center; }
.more-item .ic { color: var(--navy); width: 22px; height: 22px; }

/* groups (user) */
.cards { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 10px; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.gcard { display: flex !important; align-items: center; gap: 12px; margin: 0; }
.gcard > .ic:first-child { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); }
.gcard span { flex: 1; display: flex; flex-direction: column; }
.gcard small { color: var(--ink-2); }

/* compliance (user) */
.req-card { display: flex; gap: 12px; flex-wrap: wrap; padding: 14px; margin-bottom: 10px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border-left: 5px solid var(--red); }
.card .req-card { box-shadow: none; border: 1px solid var(--line); border-left-width: 5px; }
.req-card.green { border-left-color: var(--green); } .req-card.yellow { border-left-color: var(--yellow); } .req-card.blue { border-left-color: var(--blue); }
.rq-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.rq-main small { color: var(--ink-2); }
.rq-main p { margin: 2px 0; font-size: .9rem; }
.rq-act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.bad-text { color: var(--red) !important; font-weight: 600; }
.clearance { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--gray-soft) 0); flex: none; }
.ring b { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: #fff; color: var(--navy); font-size: 1.2rem; }
.bar { height: 8px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.bar.sm { height: 6px; width: 80px; display: inline-block; vertical-align: middle; margin: 0 6px 0 0; }

/* messages */
.msgs { padding: 0; overflow: hidden; }
.msg-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.msg-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msg-row b { font-weight: 500; }
.msg-row.unread b { font-weight: 800; }
.msg-row.unread { background: #f8fbff; }
.msg-row small { color: var(--ink-2); }
.msg-body { white-space: normal; padding: 12px; background: var(--bg); border-radius: 10px; margin: 8px 0 12px; }

/* subscription */
.plans { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { text-align: center; display: flex; flex-direction: column; gap: 6px; margin: 0; border-top: 4px solid var(--gold); }
.price { font-size: 2rem; font-weight: 800; color: var(--navy); }
.sub-status h2 { margin: 6px 0 2px; }
.sub-status.red { border-left: 5px solid var(--red); }

/* notifications */
.note-actions { display: flex; justify-content: flex-end; }
.note { display: flex; gap: 12px; width: 100%; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.note > span:last-child { flex: 1; display: flex; flex-direction: column; }
.note small { color: var(--ink-2); }
.note i { font-style: normal; color: var(--ink-2); font-size: .74rem; margin-top: 2px; }
.note.unread { background: #f6f9ff; }
.note.unread b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-left: 6px; }
.note-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); flex: none; }
.note-ic.lp { background: var(--orange-soft); color: var(--orange); }
.note-ic.birthday { background: var(--gold-soft); color: #9a6c1c; }
.note-ic.compliance { background: var(--red-soft); color: var(--red); }
.note-ic.sub { background: var(--green-soft); color: var(--green); }

/* ---------- admin tables and filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.fsel { display: flex; flex-direction: column; gap: 3px; min-width: 150px; flex: 1; max-width: 260px; }
.fsel > span { font-size: .74rem; color: var(--ink-2); font-weight: 600; }
.fsel .input { min-height: 42px; padding-top: 8px; padding-bottom: 8px; background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; }
.tbl-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(225, 229, 236, .6); }
.card .tbl-wrap { box-shadow: none; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; padding: 10px 12px; background: #f7f9fc; color: var(--ink-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr[data-href] { cursor: pointer; }
.tbl tr[data-href]:hover td { background: #f6f9ff; }
.tbl td small.block { font-size: .78rem; }
.tbl td .btn + .btn { margin-left: 4px; }
@media (max-width: 760px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tbl td { padding: 3px 0; border: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .tbl td::before { content: attr(data-label); flex: 0 0 96px; font-size: .72rem; color: var(--ink-2); text-transform: uppercase; }
  .tbl td[data-label=""]::before { display: none; }
  .tbl td:first-child::before { display: none; }
  .tbl td:first-child { display: block; }
}
.old { color: var(--red); text-decoration: line-through; }
.new { color: var(--green); font-weight: 700; }
.diff { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; font-size: 1.02rem; }

.appl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.appl-head > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.appl-head small { color: var(--ink-2); }
.appl-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.req-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); flex: none; }

.org.archived { opacity: .6; }
.office-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.btn-chip { border: 0; cursor: pointer; font-family: inherit; font-size: .8rem; padding: 6px 11px; }
.btn-chip small { opacity: .7; }
.btn-chip.dashed { background: #fff; border: 1.5px dashed var(--line); color: var(--ink-2); }
.org-admins { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.backup-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.backup-card > span { flex: 1; display: flex; flex-direction: column; min-width: 180px; }
.backup-card small { color: var(--ink-2); }
.backup-card > .ic { color: var(--green); width: 28px; height: 28px; }
.backup-card.warn { border-left: 5px solid var(--yellow); }
.backup-card.warn > .ic { color: var(--yellow); }
.danger-zone { border: 1.5px solid var(--red-soft); }
.danger-zone h3 { color: var(--red); }

/* repository */
.sugg { padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: .88rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sugg:empty { display: none; }
.rc-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.rc-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 5px solid var(--green); background: #fff; }
.rc-row.review { border-left-color: var(--orange); background: #fffaf6; }
.rc-row.unmatched { border-left-color: var(--red); background: #fffafa; }
.rc-line { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.rc-line code { background: none; padding: 0; font-size: .86rem; word-break: break-word; }
.rc-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 220px; }
.rc-who select { max-width: 280px; min-height: 38px; }
.add-lines { margin-top: 10px; }
.add-lines summary, details > summary { cursor: pointer; font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.add-lines textarea { margin: 8px 0; }
.pick-list { display: flex; flex-direction: column; max-height: 42vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0 10px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: var(--bg); }
.pick-row input { width: 19px; height: 19px; accent-color: var(--navy); flex: none; }
.pick-row span { display: flex; flex-direction: column; }
.pick-row small { color: var(--ink-2); }
.pick-list > p { padding: 10px 12px; margin: 0; }
.pick-list .search { margin: 8px; }
.creq-top { display: flex; gap: 10px; flex-wrap: wrap; }
.creq-top > span:first-child { flex: 1; display: flex; flex-direction: column; min-width: 200px; }
.creq-top small { color: var(--ink-2); }
.creq.archived { opacity: .6; }
.gtree { padding: 8px; }
.gnode { margin-left: calc(var(--d, 0) * 4px); }
.gnode .gnode { border-left: 2px solid var(--line); margin-left: 18px; padding-left: 8px; }
.gn-row { display: flex; align-items: center; gap: 4px; }
.gn-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--ink); }
a.gn-main:hover { background: var(--blue-soft); }
.gn-main > span { flex: 1; display: flex; flex-direction: column; }
.gn-main small { color: var(--ink-2); }
.gn-main > .ic { color: var(--navy); }
.gnode.archived > .gn-row { opacity: .55; }

/* ---------- modals and drawers ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(12, 22, 40, .5); animation: fade .16s ease; }
@media (min-width: 640px) { .modal-wrap { align-items: center; padding: 20px; } }
.modal-wrap.out { opacity: 0; transition: opacity .15s; }
.modal { width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); animation: up .2s ease; }
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.modal.sm { max-width: 420px; }
.modal.md { max-width: 640px; }
.modal.lg { max-width: 920px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 10px 10px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.modal-body { padding: 14px 18px calc(18px + var(--safe-b)); overflow-y: auto; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.confirm-text { margin: 2px 0 4px; }
.modal-wrap.as-drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.as-drawer .modal { max-width: 440px; max-height: none; height: 100%; border-radius: 0; animation: slide .22s ease; }
@media (max-width: 639px) { .as-drawer .modal { max-width: none; height: auto; max-height: 92dvh; margin-top: auto; border-radius: 20px 20px 0 0; animation: up .2s ease; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
@keyframes slide { from { transform: translateX(40px); opacity: .5; } }
.pv { background: #e9edf3; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 240px; }
.pv-img { max-width: 100%; max-height: 70vh; display: block; }
.pv-pdf { width: 100%; height: 70vh; border: 0; background: #fff; }
.pv-none { text-align: center; padding: 30px; color: var(--ink-2); }
.pv-none .ic { width: 40px; height: 40px; }
.pv-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: .86rem; color: var(--ink-2); }
.pv-meta > span:first-child { flex: 1; min-width: 140px; }

/* guide drawer */
.guide-search { margin-bottom: 10px; }
.guide-lang { margin-bottom: 8px; }
.g-h { color: var(--navy); text-transform: uppercase; font-size: .76rem; letter-spacing: .05em; margin: 16px 0 8px; }
.g-topic { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.g-topic:hover { border-color: var(--blue); background: #f8fbff; }
.g-topic > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.g-topic small { color: var(--ink-2); }
.g-topic > .ic:first-child { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); }
.g-topic.featured { border-color: var(--gold); background: var(--gold-soft); }
.g-topic.featured > .ic:first-child { background: var(--gold); color: var(--navy); }
.g-tours { display: flex; flex-direction: column; gap: 6px; }
.g-tours .btn { justify-content: flex-start; }
.g-roles { display: grid; grid-template-columns: 1fr; gap: 6px; }
.g-role { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.g-role .ic { grid-row: span 2; color: var(--navy); }
.g-role small { color: var(--ink-2); }
.g-article h3 { font-size: 1.15rem; color: var(--navy); }
.g-steps { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.g-steps li { display: flex; gap: 10px; align-items: flex-start; }
.g-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.g-tips { background: var(--gold-soft); border-radius: 12px; padding: 8px 12px; }
.g-tips p { display: flex; gap: 8px; font-size: .9rem; }
.g-tips .ic { color: #9a6c1c; }
.g-faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.g-faq summary { color: var(--ink); font-weight: 600; }
.g-faq p { color: var(--ink-2); font-size: .9rem; }

/* ---------- tour ---------- */
.tour { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.tour-shade { position: fixed; background: rgba(12, 22, 40, .55); pointer-events: auto; }
.tour-ring { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--gold), 0 0 0 9px rgba(198, 146, 54, .3); pointer-events: none; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 0 14px rgba(198, 146, 54, .15); } }
.tour-tip { position: fixed; width: min(330px, calc(100vw - 16px)); background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); pointer-events: auto; border-top: 4px solid var(--gold); }
.tour-step { font-size: .72rem; color: var(--ink-2); text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.tour-tip b { display: block; margin: 4px 0; color: var(--navy); }
.tour-tip p { font-size: .92rem; margin: 0 0 10px; }
.tour-progress { height: 4px; background: var(--gray-soft); border-radius: 9px; overflow: hidden; margin-bottom: 10px; }
.tour-progress i { display: block; height: 100%; background: var(--gold); }
.tour-btns { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tour-btns .btn.link { margin-right: auto; }
.tour-hint { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: #9a6c1c; }
body.touring .guide-fab { z-index: 79; }

/* ---------- lock ---------- */
.lock { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--navy), var(--navy-2)); }
.lock-card { width: 100%; max-width: 360px; background: #fff; border-radius: 20px; padding: 26px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lock-card .form { width: 100%; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(82px + var(--safe-b)); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 20px)); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); pointer-events: auto; animation: up .2s ease; font-size: .92rem; }
.toast.out { opacity: 0; transition: opacity .25s; }
.toast-ic { display: grid; place-items: center; }
.toast.ok .toast-ic { color: #4ade80; } .toast.err .toast-ic { color: #f87171; } .toast.warn .toast-ic { color: #facc15; }
.toast-msg { flex: 1; }
.toast-btn { border: 0; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }

/* ---------- print (PDF export) ---------- */
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; }
  body.printing { background: #fff; }
  @page { margin: 14mm; }
}
.rp { font-family: Arial, sans-serif; color: #000; font-size: 10.5pt; }
.rp h1 { text-align: center; font-size: 14pt; margin: 0; }
.rp-sub { text-align: center; margin: 2pt 0 10pt; }
.rp table { width: 100%; border-collapse: collapse; }
.rp th, .rp td { border: 1px solid #444; padding: 4px 6px; text-align: left; }
.rp th { background: #e8edf5; }
.rp-total { font-weight: bold; }
.rp-sign td { border: 0 !important; width: 33%; padding-top: 22pt !important; vertical-align: top; }
.rp-line { display: block; border-top: 1px solid #000; margin-top: 2px; width: 85%; }
.rp-foot { font-size: 8pt; color: #555; margin-top: 12pt; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
