:root { --bg: #04140f; --bg2: #0a2219; --bg3: #123528; --line: #1d4a39; --fg: #ecfdf5; --fg2: #8fc2ac; --ac: #22c55e; --ac2: #059669; --bad: #ef4444; --warn: #f59e0b; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: radial-gradient(900px 500px at 50% -20%, #0f3d2c, transparent), var(--bg); color: var(--fg); font: 16px/1.45 "Segoe UI", Rubik, system-ui, sans-serif; overflow: hidden; }
#app { height: 100%; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.empty { color: var(--fg2); text-align: center; padding: 30px 14px; }
button { font: inherit; color: var(--fg); background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; cursor: pointer; }
button:active { transform: scale(.97); }
button.p { background: linear-gradient(135deg, var(--ac), var(--ac2)); border: 0; font-weight: 700; }
button.d { background: var(--bad); border: 0; }
input, select { font: inherit; color: var(--fg); background: #021009; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg2); margin-top: 10px; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 14px calc(8px); padding-top: max(12px, env(safe-area-inset-top)); }
.top img { width: 30px; height: 30px; border-radius: 9px; }
.top .who { flex: 1; min-width: 0; }
.top .who b { display: block; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-inline-end: 5px; }
.dot.on { background: var(--ac); box-shadow: 0 0 8px var(--ac); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--bg3); color: var(--fg2); }
.badge.warn { background: rgba(245,158,11,.2); color: #fcd34d; }
.view { flex: 1; overflow: auto; padding: 6px 14px 14px; }
.tabbar { display: flex; border-top: 1px solid var(--line); background: var(--bg2); padding-bottom: env(safe-area-inset-bottom); }
.tabbar span { flex: 1; text-align: center; padding: 9px 2px 8px; font-size: 12px; color: var(--fg2); cursor: pointer; position: relative; }
.tabbar span i { display: block; font-style: normal; font-size: 21px; line-height: 1.2; }
.tabbar span.on { color: var(--fg); }
.tabbar span .n { position: absolute; top: 4px; inset-inline-start: 50%; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.number { width: 100%; text-align: center; font-size: 30px; letter-spacing: 2px; background: transparent; border: 0; direction: ltr; padding: 10px 0; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 4px auto; }
.pad button { height: 64px; border-radius: 50%; width: 64px; justify-self: center; font-size: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--bg2); }
.pad button small { font-size: 10px; color: var(--fg2); letter-spacing: 1px; }
.callbtn { display: flex; justify-content: center; gap: 22px; margin: 16px 0 6px; align-items: center; }
.round { width: 66px; height: 66px; border-radius: 50%; font-size: 28px; display: grid; place-items: center; padding: 0; }
.list .it { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--bg3); flex: none; position: relative; }
.av .dot { position: absolute; bottom: 0; inset-inline-end: 0; margin: 0; border: 2px solid var(--bg); }
.it .t { flex: 1; min-width: 0; }
.it .t b, .it .t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it .t small { color: var(--fg2); font-size: 13px; }
.in { color: #86efac; } .out { color: #93c5fd; } .miss { color: #fca5a5; }
/* the call */
.call { position: fixed; inset: 0; z-index: 20; background: radial-gradient(800px 600px at 50% 0, #14532d, #04140f 70%); display: flex; flex-direction: column; align-items: center; padding: max(30px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
.call .big { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 700; background: var(--bg3); margin-top: 4vh; box-shadow: 0 0 0 10px rgba(34,197,94,.08), 0 0 0 22px rgba(34,197,94,.04); }
.call.ringing .big { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(34,197,94,.18), 0 0 0 34px rgba(34,197,94,.06); } }
.call h2 { margin: 16px 0 2px; font-size: 26px; text-align: center; }
.call .st { color: var(--fg2); min-height: 22px; }
.call .ctl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 26px; margin-top: auto; margin-bottom: 18px; }
.call .ctl button { width: 70px; height: 70px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 24px; padding: 0; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.call .ctl button small { font-size: 11px; margin-top: 2px; color: var(--fg2); }
.call .ctl button.on { background: #ecfdf5; color: #052e16; }
.call .ctl button.on small { color: #052e16; }
.call .lines { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.call .lines span { background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.call .lines span.on { background: var(--ac); color: #052e16; font-weight: 700; }
.call .pad { margin-top: 10px; }
.sheet { position: fixed; inset: auto 0 0; z-index: 30; background: var(--bg2); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
.sheet h3 { margin: 0 0 8px; }
.sheet .row { display: flex; gap: 8px; margin-top: 10px; }
.sheet .row > * { flex: 1; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: #166534; color: #fff; padding: 9px 16px; border-radius: 12px; z-index: 60; }
.toast.bad { background: #991b1b; }
.waiting { position: fixed; top: 12px; inset-inline: 12px; z-index: 40; background: #1e3a8a; border-radius: 16px; padding: 12px; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.waiting .t { flex: 1; }
.set { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.set h4 { margin: 0 0 4px; }
.sw { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 8px 0; }
.sw input { width: 22px; height: 22px; accent-color: var(--ac); }
.mono { font-family: ui-monospace, Consolas, monospace; direction: ltr; unicode-bidi: embed; }
.login { margin: auto; width: min(380px, 92vw); padding: 20px; }
.login img { width: 84px; height: 84px; border-radius: 22px; display: block; margin: 0 auto 10px; }
