:root {
  --brand: #0b6e5f; --brand-dark: #08574b; --accent: #25b37a; --bg: #f0ebe3; --panel: #ffffff;
  --ink: #111b21; --muted: #667781; --line: #e6e1d8; --mine: #dcf8c6; --owner: #d9fdd3; --sys: #e9f1f7;
  --danger: #c0392b; --warn: #b9770e; --chip: #eef3f1; --radius: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid #ffb703; outline-offset: 2px; }
#app { height: 100dvh; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 761px) { #app { box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgba(0,0,0,.08); } }

/* header */
.top { background: var(--brand); color: #fff; padding: calc(10px + var(--safe-t)) 12px 10px; display: flex; align-items: center; gap: 8px; min-height: 58px; flex-shrink: 0; }
.top h1 { font-size: 19px; margin: 0; font-weight: 700; line-height: 1.15; }
.top .sub { font-size: 12.5px; opacity: .85; }
.top .grow { flex: 1; min-width: 0; }
.top .title-btn { background: none; border: 0; color: #fff; text-align: left; padding: 0; min-width: 0; width: 100%; }
.top .title-btn h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: none; border: 0; color: inherit; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 20px; flex-shrink: 0; position: relative; }
.icon-btn:active { background: rgba(255,255,255,.15); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { background: var(--accent); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; }
.icon-btn .badge { position: absolute; top: 2px; right: 0; font-size: 10.5px; min-width: 17px; height: 17px; background: #e74c3c; }

/* main scroll + tabs */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; background: var(--panel); }
.tabs { display: flex; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); flex-shrink: 0; }
.tabs a { flex: 1; text-align: center; padding: 8px 2px 9px; color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 600; position: relative; min-height: 56px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabs a .ti { font-size: 21px; line-height: 1.1; }
.tabs a.on { color: var(--brand); }
.tabs a.on::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--brand); border-radius: 0 0 3px 3px; }
.tabs a .badge { position: absolute; top: 4px; left: 55%; font-size: 10.5px; min-width: 18px; height: 18px; }

/* chat list */
.banner { margin: 10px 12px 4px; background: #fff4d6; border: 1px solid #f2d27a; border-radius: var(--radius); padding: 11px 13px; display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.banner b { font-size: 15px; }
.banner .grow { flex: 1; }
.banner small { color: #7a5b00; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #f2efe9; min-height: 72px; background: var(--panel); width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.row:active { background: #f5f5f5; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: #dfe9e6; display: grid; place-items: center; font-size: 23px; flex-shrink: 0; color: var(--brand-dark); font-weight: 700; }
.avatar.sm { width: 36px; height: 36px; font-size: 16px; }
.row .mid { flex: 1; min-width: 0; }
.row .l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.row .name { font-weight: 650; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .time { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.row .time.unread { color: var(--accent); font-weight: 700; }
.row .l2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 3px; }
.row .prev { color: var(--muted); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .counts { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.total { font-size: 11.5px; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 2px 7px; }
.fold { width: 100%; background: #f7f5f1; border: 0; border-bottom: 1px solid var(--line); padding: 11px 14px; text-align: left; font-weight: 700; color: var(--muted); font-size: 13.5px; display: flex; justify-content: space-between; min-height: 44px; align-items: center; }
.star { color: #e0a800; }
.tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; background: var(--chip); color: var(--brand-dark); font-weight: 650; }
.tag.red { background: #fde3e0; color: var(--danger); }
.tag.amber { background: #fff1d1; color: #8a5a00; }
.tag.green { background: #dcf3e6; color: #13734a; }
.tag.grey { background: #eceff1; color: #546e7a; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }

/* chat view */
.chat-wrap { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--bg); background-image: radial-gradient(rgba(11,110,95,.05) 1px, transparent 1px); background-size: 18px 18px; }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 14px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.day { text-align: center; margin: 12px 0 8px; }
.day span { background: #e1ecf0; color: #54656f; font-size: 12px; padding: 5px 11px; border-radius: 8px; font-weight: 600; }
.unread-div { text-align: center; margin: 10px -10px; background: rgba(255,255,255,.75); color: var(--brand-dark); font-size: 12.5px; font-weight: 700; padding: 5px; }
.msg { display: flex; flex-direction: column; margin: 3px 0; max-width: 88%; position: relative; }
.msg.me { align-self: flex-end; margin-left: auto; align-items: flex-end; }
.bubble { background: #fff; border-radius: 10px; padding: 7px 10px 6px; box-shadow: 0 1px .5px rgba(0,0,0,.13); min-width: 90px; max-width: 100%; overflow-wrap: anywhere; position: relative; user-select: text; -webkit-user-select: text; }
.msg.me .bubble { background: var(--mine); }
.msg.owner .bubble { background: var(--owner); }
.msg.hl .bubble { animation: hl 1.6s ease; }
@keyframes hl { 0%,40% { box-shadow: 0 0 0 3px #ffb703; } 100% { box-shadow: 0 1px .5px rgba(0,0,0,.13); } }
.who { font-size: 13px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.owner-badge { background: #0b6e5f; color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 5px; font-weight: 700; letter-spacing: .02em; }
.private-badge { background: #6c5ce7; color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 5px; }
.to { color: var(--muted); font-weight: 500; font-size: 12px; }
.sumline { font-weight: 700; font-size: 15px; line-height: 1.35; }
.sumline .auto { font-weight: 500; color: var(--muted); font-size: 11px; margin-left: 4px; }
.body { font-size: 15px; line-height: 1.4; white-space: pre-wrap; margin-top: 2px; }
.more { background: none; border: 0; color: var(--brand); font-weight: 650; padding: 4px 0 0; font-size: 14px; }
.meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 3px; display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.reply-q { border-left: 4px solid var(--accent); background: rgba(0,0,0,.05); border-radius: 6px; padding: 4px 8px; margin: 2px 0 5px; font-size: 13px; color: #3b4a54; display: block; width: 100%; text-align: left; border-top: 0; border-right: 0; border-bottom: 0; }
.reply-q b { color: var(--brand); display: block; font-size: 12.5px; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: -4px; padding: 0 6px; z-index: 1; }
.reacts span { background: #fff; border-radius: 999px; padding: 1px 7px; font-size: 13.5px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.sys { align-self: center; max-width: 92%; text-align: center; margin: 6px auto; }
.sys .bubble { background: var(--sys); color: #3b4a54; font-size: 13.5px; box-shadow: none; padding: 6px 12px; text-align: center; min-width: 0; }
.sys .who { justify-content: center; color: #54656f; font-size: 12px; }
.digest .bubble { background: #fffdf3; border: 1px solid #f0e2b0; text-align: left; }
.status-msg .bubble { background: #f3f8ff; }

/* cards */
.card { border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 10px; padding: 9px 10px; margin-top: 6px; }
.card h4 { margin: 0 0 4px; font-size: 14.5px; }
.card .kv { font-size: 13.5px; color: #3b4a54; margin: 2px 0; }
.card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: 14.5px; background: var(--brand); color: #fff; min-height: 44px; }
.btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.red { background: var(--danger); }
.btn.sm { padding: 7px 12px; min-height: 38px; font-size: 13.5px; }
.btn:disabled { opacity: .5; }
.poll-opt { display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 10px; margin: 6px 0; position: relative; overflow: hidden; min-height: 44px; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: rgba(37,179,122,.18); z-index: 0; }
.poll-opt .t { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt small { color: var(--muted); display: block; position: relative; z-index: 1; font-size: 12px; }
.img-thumb { display: block; max-width: 100%; width: 260px; max-height: 320px; object-fit: cover; border-radius: 8px; margin-top: 4px; background: #ddd; }
.filebox { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.04); border-radius: 8px; padding: 9px; margin-top: 4px; border: 0; width: 100%; text-align: left; text-decoration: none; color: var(--ink); min-height: 48px; }
.filebox .fi { font-size: 26px; }
audio { width: 100%; max-width: 280px; margin-top: 5px; }
.transcript { font-size: 13.5px; color: #3b4a54; font-style: italic; margin-top: 4px; white-space: pre-wrap; }

/* pill + composer */
.pill { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 5; min-height: 44px; }
.jump-bottom { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); font-size: 18px; z-index: 4; }
.composer { background: #f0f2f5; padding: 6px 8px calc(6px + var(--safe-b)); display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; border-top: 1px solid var(--line); }
.composer .bar { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { flex: 1; resize: none; border: 0; border-radius: 22px; padding: 11px 15px; font-size: 16px; line-height: 1.3; max-height: 140px; min-height: 44px; background: #fff; outline: none; }
.composer .icon-btn { color: #54656f; width: 44px; height: 44px; }
.send { background: var(--brand) !important; color: #fff !important; }
.composer .ctx { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 6px 6px 6px 10px; font-size: 13px; border-left: 4px solid var(--accent); }
.composer .ctx .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chipline { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); padding: 0 4px; flex-wrap: wrap; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; min-height: 32px; }
.chip.on { background: #6c5ce7; color: #fff; border-color: #6c5ce7; }
.closed-bar { background: #fde3e0; color: var(--danger); padding: 12px; text-align: center; font-weight: 650; font-size: 14px; padding-bottom: calc(12px + var(--safe-b)); }
.rec { color: var(--danger) !important; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* sheets */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 760px; border-radius: 16px 16px 0 0; max-height: 88dvh; overflow-y: auto; padding: 8px 0 calc(12px + var(--safe-b)); animation: up .18s ease; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.sheet h3 { margin: 8px 16px 10px; font-size: 17px; }
.sheet .item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 18px; background: none; border: 0; text-align: left; font-size: 16px; min-height: 50px; }
.sheet .item:active { background: #f3f3f3; }
.sheet .item .ii { width: 24px; text-align: center; font-size: 19px; }
.sheet .emojis { display: flex; justify-content: space-around; padding: 6px 10px 10px; border-bottom: 1px solid var(--line); }
.sheet .emojis button { font-size: 27px; background: none; border: 0; width: 46px; height: 46px; border-radius: 50%; }
.sheet .emojis button.on { background: #e5f6ee; }
.form { padding: 4px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 13px; font-weight: 650; color: #3b4a54; display: flex; flex-direction: column; gap: 4px; }
.form input, .form select, .form textarea { border: 1.5px solid #d5dbdf; border-radius: 10px; padding: 11px 12px; font-size: 16px; background: #fff; width: 100%; min-height: 44px; }
.form .row2 { display: flex; gap: 8px; }
.form .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.form .check input { width: 22px; height: 22px; min-height: 0; }

/* pages */
.page { padding: 10px 12px 24px; }
.section-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 750; margin: 18px 4px 8px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.pcard.pin { border: 2px solid #f2b705; background: #fffcf0; }
.pcard .ph { display: flex; gap: 10px; align-items: center; }
.pcard .ph .grow { flex: 1; min-width: 0; }
.pcard .ph b { font-size: 16px; }
.lineedit { display: block; width: 100%; text-align: left; background: #f7f8f8; border: 1px dashed #c9d2d6; border-radius: 9px; padding: 8px 10px; margin-top: 8px; font-size: 14px; min-height: 44px; }
.lineedit .lbl { font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: block; }
.lineedit .by { font-size: 11.5px; color: var(--muted); }
.mini { font-size: 13px; color: #3b4a54; margin-top: 6px; }
.mini li { margin: 2px 0; }
.mini ul { margin: 4px 0; padding-left: 18px; }
.statusrow { display: flex; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; align-items: flex-start; }
.statusrow .grow { flex: 1; min-width: 0; }
.statusrow .em { font-size: 26px; }
.ago { font-size: 12px; color: var(--muted); }
.ago.old { color: var(--danger); }
.prof { font-size: 13.5px; margin: 4px 0; color: #3b4a54; }
.prof b { color: var(--ink); }
table.log { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.log td { border-bottom: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
.note-box { background: #0f1720; color: #d7e3ea; border-radius: 10px; padding: 12px; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 300px; overflow: auto; }
.signin { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 16px; background: linear-gradient(170deg, #0b6e5f, #08463d); color: #fff; }
.signin img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.signin h1 { margin: 0; font-size: 26px; }
.signin p { margin: 0; opacity: .85; text-align: center; }
.signin input { font-size: 28px; letter-spacing: .35em; text-align: center; width: 220px; padding: 12px; border-radius: 14px; border: 0; color: var(--ink); }
.signin .btn { background: #fff; color: var(--brand); width: 220px; font-size: 17px; }
.signin .err { color: #ffd2cc; min-height: 20px; font-weight: 600; }
#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: #263238; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 100; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }
.searchbar { padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.searchbar input { width: 100%; border: 0; background: #f0f2f5; border-radius: 22px; padding: 11px 15px; font-size: 16px; min-height: 44px; }
.res { display: block; padding: 10px 14px; border-bottom: 1px solid #f2efe9; text-decoration: none; color: var(--ink); }
.res small { color: var(--muted); }
.res mark { background: #fff1a8; }
.pdfview { position: fixed; inset: 0; background: #2b2f33; z-index: 60; display: flex; flex-direction: column; }
.pdfview .top { background: #1f2326; }
.pdfview .pages { flex: 1; overflow: auto; padding: 10px; text-align: center; -webkit-overflow-scrolling: touch; }
.pdfview canvas { display: block; margin: 0 auto 10px; box-shadow: 0 2px 10px rgba(0,0,0,.5); background: #fff; max-width: none; }
.transcript-lines p { margin: 6px 0; font-size: 14px; }
.transcript-lines b { color: var(--brand); }
.kpi { display: flex; gap: 8px; margin: 6px 0 2px; flex-wrap: wrap; }
.loading { padding: 30px; text-align: center; color: var(--muted); }

/* rooms */
.top .switcher { background: none; border: 0; color: inherit; text-align: left; padding: 0; min-width: 0; cursor: pointer; }
.top .switcher h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .switcher .caret { font-size: 13px; opacity: .85; }
.sheet-h { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 750; padding: 10px 18px 2px; }
.sheet .item small.muted, small.muted { color: var(--muted); font-size: 12.5px; }
.sheet .item .tick { color: var(--brand); font-weight: 800; font-size: 18px; }
.pcard .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.copybox { background: #f2fbf8; border: 2px dashed var(--brand); border-radius: 12px; padding: 12px; font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; color: var(--ink); }
.copybox.key { font-size: 15px; }
.warnbox { background: #fff4d6; border: 1px solid #f2d27a; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: #5c4300; }
details.snip { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; }
details.snip summary { font-weight: 700; font-size: 14px; cursor: pointer; }
details.snip .note-box { margin: 8px 0; max-height: 220px; }
.signin .authf { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.signin .authf label { font-size: 13px; font-weight: 650; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.signin .authf input { border: 0; border-radius: 12px; padding: 12px 14px; font-size: 16px; min-height: 46px; }
.signin .authf .btn { background: #fff; color: var(--brand-dark, #08463d); }
.signin .pinbox { width: 100%; max-width: 340px; }
.signin .pinbox summary { cursor: pointer; opacity: .85; font-size: 14px; text-align: center; margin-bottom: 8px; }
.signin p { text-align: center; max-width: 360px; margin: 0; }
.signin .mini.light, .signin .light { color: #e2f3ef; }
.signin a { color: #fff; }
.signin .err { min-height: 18px; font-size: 14px; color: #ffe3a3; text-align: center; }
.btn.ghost.light { background: transparent; color: #fff; border-color: #fff; text-decoration: none; display: inline-flex; align-items: center; }

.signin .authf input { width: 100%; box-sizing: border-box; letter-spacing: normal; text-align: left; font-size: 16px; }
.signin .authf .btn { width: 100%; }
.signin #pin { letter-spacing: .35em; text-align: center; font-size: 24px; }

/* simplicity pass */
.btn.sm { min-height: 44px; padding: 9px 14px; }
.btn.big { width: 100%; min-height: 52px; font-size: 17px; }
.pcard .actions .btn.big + .btn { width: 100%; }
.top .roompill { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; border: 0; font-size: 13.5px; font-weight: 650; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .switcher { display: flex; flex-direction: column; align-items: flex-start; min-height: 44px; }
.top .switcher .roompill { pointer-events: none; }
#rp { position: relative; }
#rp::after { content: ''; position: absolute; inset: -6px 0; }
.emptybox { background: #fff; border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px; color: #3b4a54; font-size: 14.5px; margin-bottom: 10px; }
.steps { font-size: 16px; }
details.adv { border-top: 1px solid var(--line); padding-top: 6px; }
details.adv summary, details.snip summary, .signin .pinbox summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 650; color: var(--muted); }
.signin .pinbox summary { justify-content: center; color: inherit; }
details.adv .snip { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 8px 0; background: #fff; }
.snip-h { font-weight: 700; font-size: 14px; }
.sheet .item { min-height: 54px; }
details.adv summary::before { content: '▸'; margin-right: 8px; }
details.adv[open] summary::before { content: '▾'; }
.pcard .btn.sm.red { background: #fff; color: var(--danger); border: 1.5px solid #f0c4bf; }


/* ===== Build 2: never lost ===== */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 13.5px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.page .crumbs { background: none; border: 0; padding: 0 4px 8px; }
.crumbs a { color: var(--brand); text-decoration: none; font-weight: 650; min-height: 32px; display: inline-flex; align-items: center; padding: 0 2px; }
.crumbs span[aria-current] { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.crumbs .sep { color: #b6bfc4; padding: 0 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c3cbd0; display: inline-block; flex-shrink: 0; }
.dot.on { background: #25b37a; box-shadow: 0 0 0 3px rgba(37,179,122,.18); }
.dot.ring { outline: 2px solid var(--danger); outline-offset: 1px; }
.cbanner { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cbanner .grow { flex: 1; min-width: 0; }
.cbanner.amber { background: #fff4d6; color: #5c4300; }
.cbanner.red { background: #fde9e6; color: #7b2318; }
.cbanner.grey { background: #f1f4f5; color: #3b4a54; }
.warnline { margin-top: 5px; font-size: 12.5px; color: #8a5a00; background: #fff6df; border-radius: 6px; padding: 3px 7px; }
.main.home { background: var(--bg); padding: 4px 12px 24px; }
.greet { font-size: 20px; font-weight: 750; margin: 14px 4px 2px; color: var(--ink); }
.needs { display: flex; flex-direction: column; gap: 8px; }
.need { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-left: 4px solid #f2b705; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.needs .need { margin-bottom: 0; }
.need .ni { font-size: 20px; line-height: 1.2; }
.need .grow { flex: 1; min-width: 0; }
.need .nt { font-weight: 700; font-size: 15px; }
.need .nt a { color: inherit; text-decoration: none; }
.nd { font-size: 13.5px; color: #3b4a54; margin-top: 2px; }
.nr { font-size: 12px; color: var(--muted); margin-top: 2px; }
.nb { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.nb .btn { text-decoration: none; display: inline-flex; align-items: center; }
.allclear { background: #fff; border-radius: 12px; padding: 14px; color: #13734a; font-weight: 650; border: 1px solid #cfeedd; }
.olist { background: #fff; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.orow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 56px; border-bottom: 1px solid #f2efe9; color: var(--ink); text-decoration: none; background: #fff; }
.orow:last-child { border-bottom: 0; }
.orow .grow { flex: 1; min-width: 0; }
.orow-a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-height: 44px; }
.orow b { font-size: 15px; }
.orow small { color: var(--muted); font-size: 12.5px; }
.oe { width: 36px; height: 36px; border-radius: 50%; background: #dfe9e6; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; color: var(--brand-dark); font-weight: 700; }
.chev { color: #b6bfc4; font-size: 22px; }
.pchip { margin-left: 6px; font-size: 11.5px; background: var(--chip); color: var(--brand-dark); border-radius: 999px; padding: 1px 7px; font-weight: 650; white-space: nowrap; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ptile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px; text-decoration: none; color: var(--ink); min-height: 104px; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; }
.ptile .pt1 { display: flex; gap: 6px; align-items: center; }
.ptile .pt1 b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptile .pe { font-size: 20px; }
.ptile .pt3 { font-size: 13px; color: #3b4a54; }
.ptile .pt4 { font-size: 12px; color: var(--muted); margin-top: auto; }
.ptile.unfiled { border-style: dashed; background: #fffdf6; }
.ptile.add { border-style: dashed; align-items: center; justify-content: center; color: var(--brand); }
.ptile.add .pe { font-size: 26px; }
.red-t { color: var(--danger); font-weight: 650; }
.acard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; margin-bottom: 8px; }
.acard .ah { display: flex; align-items: center; gap: 8px; }
.acard .ah b { font-size: 15.5px; }
.acard .grow { flex: 1; }
.acard .today { font-size: 12.5px; color: var(--muted); }
.acard .aw { font-size: 14px; margin-top: 6px; }
.acard .af { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.nudge-out { margin-top: 8px; background: #f2fbf8; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.nudge-out .chans { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; color: #3b4a54; }
.install { display: flex; align-items: center; gap: 10px; background: #0b6e5f; color: #fff; border-radius: 14px; padding: 10px 6px 10px 12px; margin: 10px 0 4px; }
.install img { border-radius: 10px; }
.install .grow { flex: 1; min-width: 0; }
.install small { opacity: .85; }
.install .btn { background: #fff; color: var(--brand); }
.install .icon-btn.x { color: #fff; }
.howto { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.svc { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f2efe9; font-size: 14.5px; }
.svc:last-child { border-bottom: 0; }
.svc .grow { flex: 1; }
.tabs .badge.red-badge { background: #e74c3c; }

/* Build 3: setup recipes for OAuth apps, connected apps */
.pcard ol.steps { margin: 8px 0 6px; padding-left: 22px; font-size: 15.5px; }
.pcard ol.steps li { margin: 6px 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; background: #eef1f4; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.warn-line { color: #8a5a00; }

/* Build 4: the brain */
.msg.brainmsg { justify-content: center; }
.msg.brainmsg .bubble { background: #fbf7ee; border: 1px solid #eadcb8; max-width: 92%; }
.msg.brainmsg .who { color: #7a5b12; }
.msg.brainmsg .body { font-size: 15px; }
.msg.brainmsg .body.struck { text-decoration: line-through; color: var(--muted); }
.bacts { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.bacts .btn.sm { min-height: 44px; }
.linkbtn { background: none; border: 0; color: var(--brand); font-weight: 650; padding: 10px 2px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.whyline { font-size: 16px; line-height: 1.4; background: #fbf7ee; border: 1px solid #eadcb8; border-radius: 10px; padding: 10px 12px; }
.whyrow { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #fff; }
.whyrow.win { border-color: var(--accent); background: #f2fbf6; }
.whyrow .wh { display: flex; align-items: center; gap: 6px; }
.whyrow .wh .grow { flex: 1; }
.wbar { height: 8px; border-radius: 4px; background: #eceff1; margin: 8px 0 6px; overflow: hidden; }
.wbar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.whyrow:not(.win) .wbar span { background: #9fb4ad; }
.wchips { display: flex; flex-wrap: wrap; gap: 5px; }
.wchips span { font-size: 12px; background: var(--chip); color: var(--brand-dark); border-radius: 6px; padding: 2px 7px; }
.skills { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.skill { font-size: 12px; border-radius: 999px; padding: 2px 9px; background: #eef0fb; color: #3949ab; font-weight: 650; border: 0; }
.skillpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.skill.pick { font-size: 14px; padding: 8px 14px; min-height: 44px; background: #f2f3f7; color: var(--ink); border: 1px solid var(--line); }
.skill.pick.on { background: #3949ab; color: #fff; border-color: #3949ab; }
.switchrow { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; }
.switchrow .grow { flex: 1; }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 999px; background: #c9d2cf; position: relative; flex-shrink: 0; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 23px; }
.brainset .mini { margin-top: 2px; }
.dlog .kv { margin-top: 6px; }
.sheetpad { padding: 0 16px; }
.sheetpad details.adv { margin-top: 10px; }
.form .switchrow { flex-direction: row; align-items: center; gap: 12px; font-size: 15px; color: var(--ink); }
.form .switchrow b { font-size: 16px; }
.form .switchrow .mini { font-weight: 450; color: var(--muted); font-size: 13.5px; }
.form input.switch { width: 52px; min-width: 52px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: #c9d2cf; }
.form input.switch:checked { background: var(--accent); }



/* Build 5: audit log and permissions */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.alog { padding: 4px 12px; }
.arow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.arow:last-child { border-bottom: 0; }
.arow .grow { flex: 1; min-width: 0; }
.arow .asum { color: #3b4a54; margin-top: 2px; overflow-wrap: anywhere; }
.arow.denied { background: #fff6f5; margin: 0 -12px; padding: 10px 12px; }
.arow .ago a { color: var(--brand); }

/* Build 5: Tasks tab */
.tlist { padding: 4px 12px; }
.trow { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.trow:last-child { border-bottom: 0; }
.trow .grow { flex: 1; min-width: 0; }
.trow .t1 b { font-size: 15.5px; }
.trow .t2 { margin-top: 3px; color: #3b4a54; }
.trow .t3 { margin-top: 3px; color: #8a5a00; }
.trow .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Build 5: room states */
.rs-banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid; }
.rs-banner.paused { background: #fbefd9; color: #5c3800; border-color: #e9c98f; }
.rs-banner.completed { background: #e8eaee; color: #2b313c; border-color: #d3d7de; }
.rs-banner .grow { flex: 1; }
.closed-bar .btn { margin-left: 8px; }

/* Build 5: 3-pane desktop layout */
.pane { display: none; }
body.wide { display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; height: 100dvh; }
body.wide #app { max-width: none; margin: 0; box-shadow: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
body.wide .pane { display: flex; flex-direction: column; height: 100dvh; overflow-y: auto; background: #fff; }
#lpane .lp-head { background: var(--brand); color: #fff; padding: 12px; min-height: 58px; display: flex; align-items: center; }
#lpane .lp-room { background: none; border: 0; color: #fff; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 0; }
#lpane .lp-room b { font-size: 17px; } #lpane .lp-room span { font-size: 12px; opacity: .85; }
#lpane .lp-nav { display: flex; flex-direction: column; padding: 6px; border-bottom: 1px solid var(--line); }
#lpane .lp-nav a { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; }
#lpane .lp-nav a.on, #lpane .lp-nav a:hover { background: var(--chip); }
#lpane .lp-sec, #rpane .rp-sec { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
#lpane .row.cur { background: #ecebfb; }
#lpane .row .counts .total { display: none; }
#rpane .rp-head { padding: 12px; border-bottom: 1px solid var(--line); min-height: 58px; }
#rpane .rp-head b { font-size: 16px; display: block; margin-bottom: 8px; }
#rpane .rp-tabs { display: flex; gap: 4px; }
#rpane .rp-tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 650; color: var(--muted); }
#rpane .rp-tabs button.on { background: #14161c; color: #fff; }
#rpane .rp-body { padding: 8px 12px 24px; }
#rpane .rp-body .pcard { box-shadow: none; }
#rpane .rp-mem { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
#rpane .rp-mem .grow { flex: 1; min-width: 0; }
.avatar.xs { width: 32px; height: 32px; font-size: 13px; }
.seg { display: inline-flex; background: #f0f0f3; border-radius: 10px; padding: 3px; gap: 2px; margin: 0 0 4px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 650; font-size: 13px; }
.seg button.on { background: #14161c; color: #fff; }
table.rules { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 8px; }
table.rules td { padding: 6px 0; border-bottom: 1px solid var(--line); } table.rules td:last-child { text-align: right; }
.btn.wide { display: block; width: 100%; text-align: center; margin: 8px 0 12px; }
/* Your agents */
.ygrid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 900px) { .ygrid { grid-template-columns: 1fr 1fr; } }
body.wide .ygrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.yag .yrow { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.yag .yrow > span { color: var(--muted); }
.dot.idle { background: #b07a12; }

/* Build 5: guided connect */
.connect .lead { font-size: 15.5px; margin: 4px 4px 14px; }
.cx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 700px) { .cx-grid { grid-template-columns: repeat(5, 1fr); } }
.cx-agent { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 650; min-height: 104px; }
.cx-agent:hover { border-color: var(--brand); }
.connect .copybox.key { word-break: break-all; }
.connect ol.steps { margin: 12px 0; padding-left: 22px; font-size: 15px; }
.connect ol.steps li { margin: 6px 0; }
.okbox { background: #dcf3e6; color: #13734a; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-weight: 600; }
.cx-done { text-align: center; padding: 24px 8px; }
.avatar.big { width: 72px; height: 72px; font-size: 28px; margin: 0 auto 8px; }

/* ---------- Agent map (agents → subagents → deployed bots) ---------- */
:root { --st-working: #1f9d68; --st-paused: #d48a00; --st-idle: #4f7cac; --st-offline: #9aa5ab; --tree: #c9d5d1; }
.seg a { display: inline-block; padding: 7px 14px; border-radius: 8px; font-weight: 650; font-size: 13.5px; color: var(--ink); text-decoration: none; min-height: 36px; line-height: 22px; }
.seg a.on { background: #14161c; color: #fff; }
.amap-page .seg { margin: 2px 0 10px; }
.spill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #eef1f2; color: #46555d; white-space: nowrap; }
.spill i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-offline); display: inline-block; }
.spill.working { background: #dcf3e6; color: #13734a; } .spill.working i { background: var(--st-working); box-shadow: 0 0 0 3px rgba(31,157,104,.2); animation: ampulse 1.6s ease-in-out infinite; }
.spill.paused { background: #fff1d1; color: #8a5a00; } .spill.paused i { background: var(--st-paused); }
.spill.idle { background: #e5eef7; color: #2f5a85; } .spill.idle i { background: var(--st-idle); }
@keyframes ampulse { 50% { box-shadow: 0 0 0 6px rgba(31,157,104,0); } }
@media (prefers-reduced-motion: reduce) { .spill.working i { animation: none; } }
.acounts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.nowpanel summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; min-height: 32px; }
.nowpanel summary::-webkit-details-marker { display: none; }
.nowpanel summary::after { content: '▾'; color: var(--muted); }
.nowpanel:not([open]) summary::after { content: '▸'; }
.nowpanel summary .mini { margin: 0; margin-left: auto; color: var(--muted); }
.nowlist { margin-top: 6px; display: flex; flex-direction: column; }
.nowrow { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 9px 2px; min-height: 48px; width: 100%; }
.nowrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nowrow .nl { font-size: 13.5px; color: #3b4a54; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrow .nago { font-size: 12px; white-space: nowrap; }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--st-offline); flex-shrink: 0; display: inline-block; }
.sdot.working { background: var(--st-working); } .sdot.paused { background: var(--st-paused); } .sdot.idle { background: var(--st-idle); }
.amap, .amap ul { list-style: none; margin: 0; padding: 0; }
.amap > li { margin-bottom: 12px; }
.amap ul { margin-left: 16px; }
.amap ul > li { position: relative; padding: 8px 0 0 18px; }
.amap ul > li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--tree); }
.amap ul > li:last-child::before { bottom: auto; height: 34px; }
.amap ul > li::after { content: ''; position: absolute; left: 0; top: 34px; width: 16px; border-top: 2px solid var(--tree); }
.anode { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--st-offline); border-radius: 12px; padding: 9px 10px; min-height: 52px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.anode.working { border-left-color: var(--st-working); } .anode.paused { border-left-color: var(--st-paused); } .anode.idle { border-left-color: var(--st-idle); }
.anode:active { transform: scale(.995); }
.an-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-top .avatar.xs { width: 28px; height: 28px; font-size: 12px; }
.an-name { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-task { font-size: 14px; margin-top: 5px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-ic { margin-right: 4px; }
.an-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ash { padding: 2px 16px 8px; }
.ash h3 { margin: 0; font-size: 18px; }
.ash .nowbox { background: #f6f8f7; border-radius: 10px; padding: 10px; margin-top: 10px; font-size: 15px; }
.ash .nowbox .lbl { font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 2px; }
.slist { display: flex; flex-direction: column; }
.srow { display: flex; gap: 8px; align-items: flex-start; padding: 8px 2px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14.5px; min-height: 44px; }
.srow .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.srow .mini { display: block; margin-top: 2px; color: var(--muted); }
.kids { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; min-height: 40px; font-weight: 650; font-size: 13.5px; }
.ash .mgr { margin-top: 12px; } .ash .mgr summary { font-weight: 700; color: var(--brand); cursor: pointer; min-height: 40px; }
.ash .mgr .form { padding: 4px 0 0; }
.section-h .linkbtn { text-transform: none; letter-spacing: 0; font-size: 13px; float: right; padding: 0; min-height: 0; }


/* Agent Room modern landing & sign-in surface */
.signin {
  min-height: 100dvh;
  width: 100%;
  box-sizing: border-box;
  background:
    radial-gradient(640px 360px at 50% -60px, rgba(16, 185, 129, 0.18), transparent 72%),
    radial-gradient(520px 340px at 85% 110%, rgba(14, 165, 233, 0.08), transparent 70%),
    #090d12;
  color: #f1f5f9;
  padding: 28px 18px;
  gap: 18px;
}
.signin-card {
  width: 100%;
  max-width: 416px;
  background: rgba(17, 23, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  padding: 32px 28px 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-sizing: border-box;
}
.signin-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.signin-logo-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.45), rgba(255, 255, 255, 0.08));
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.22);
}
.signin .signin-logo-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  display: block;
  box-shadow: none;
}
.signin-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.signin h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: #f8fafc;
}
.signin .signin-sub {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #94a3b8;
  max-width: 320px;
  opacity: 1;
}
.signin-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.signin-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #a7f3d0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  max-width: none;
}
.signin-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.signin-tabs .stab {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 650;
  padding: 8px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.signin-tabs .stab.on {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.signin .authf {
  width: 100%;
  max-width: none;
  gap: 10px;
}
.signin .authf label {
  font-size: 12.5px;
  font-weight: 650;
  color: #cbd5e1;
  letter-spacing: 0.01em;
}
.signin .authf input {
  width: 100%;
  background: #0b1016;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  min-height: 48px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.signin .authf input::placeholder {
  color: #475569;
  letter-spacing: normal;
}
.signin .authf input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.signin #pin {
  letter-spacing: 0.28em;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}
.signin .authf .btn.primary-cta {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(180deg, #10b981, #059669);
  color: #03150e;
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.26);
  transition: transform 0.1s ease, filter 0.15s ease;
}
.signin .authf .btn.primary-cta:hover {
  filter: brightness(1.06);
}
.signin .authf .btn.primary-cta:active {
  transform: translateY(1px);
}
.signin .authf .btn.primary-cta:disabled {
  opacity: 0.6;
  cursor: wait;
}
.signin .signin-hint {
  font-size: 12.5px;
  color: #64748b;
  text-align: center;
  margin: 2px 0 0;
  max-width: none;
  opacity: 1;
}
.signin .err {
  min-height: 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fca5a5;
  text-align: center;
}
.signin .pinbox {
  width: 100%;
  max-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: 4px;
}
.signin .pinbox summary {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
  justify-content: center;
  margin-bottom: 4px;
  opacity: 1;
}
.signin .pinbox summary:hover {
  color: #e2e8f0;
}
.signin-foot {
  font-size: 12px;
  color: #475569;
  letter-spacing: 0.01em;
  margin: 0;
  opacity: 1;
}
