:root { color-scheme: dark; --bg:#080d0a; --surface:#111813; --surface-2:#161f19; --line:#28372e; --text:#f3f6f4; --muted:#8e9a92; --green:#2dbe64; --green-bright:#43db7b; --green-soft:rgba(45,190,100,.12); --danger:#ff6f6f; font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
* { box-sizing:border-box; }
html { background:var(--bg); -webkit-text-size-adjust:100%; }
body { margin:0; min-height:100dvh; background:var(--bg); color:var(--text); overscroll-behavior-y:none; }
button,input { font:inherit; }
button { cursor:pointer; }
[hidden] { display:none !important; }
.auth-view { min-height:100dvh; display:grid; place-items:center; padding:max(24px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom)); }
.login-card { width:min(100%,390px); padding:30px 22px; border:1px solid var(--line); border-radius:24px; background:var(--surface); box-shadow:0 24px 80px rgba(0,0,0,.3); }
.mark { width:54px; height:54px; display:grid; place-items:center; margin-bottom:22px; border-radius:17px; background:var(--green); color:#041108; font-size:17px; font-weight:900; }
.login-card h1 { margin:0; display:flex; align-items:center; gap:8px; font-size:24px; letter-spacing:-.5px; }
.login-card h1 i,.topbar h1 i { width:2px; height:1em; border-radius:2px; background:var(--green); }
.login-card p { margin:8px 0 25px; color:var(--muted); }
label { display:grid; gap:7px; margin-top:14px; color:var(--muted); font-size:13px; font-weight:700; }
input { width:100%; min-height:50px; border:1px solid var(--line); border-radius:14px; outline:none; background:#0c120e; color:var(--text); padding:0 14px; font-size:16px; }
input:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(45,190,100,.1); }
.primary,.secondary { min-height:48px; border:0; border-radius:14px; padding:0 18px; font-weight:850; }
.primary { width:100%; margin-top:20px; background:var(--green); color:#051209; }
.secondary { border:1px solid var(--line); background:var(--surface-2); color:var(--text); }
.message { min-height:18px; margin-top:10px; color:var(--danger); font-size:13px; }
.message.ok { color:var(--green-bright); }
.app { min-height:100dvh; }
.topbar { position:sticky; top:0; z-index:5; height:calc(72px + env(safe-area-inset-top)); display:flex; align-items:end; justify-content:space-between; gap:12px; padding:env(safe-area-inset-top) 16px 16px; border-bottom:1px solid rgba(255,255,255,.07); background:rgba(8,13,10,.92); backdrop-filter:blur(18px); }
.topbar h1 { min-width:0; margin:0; display:flex; align-items:center; gap:7px; font-size:17px; line-height:1; white-space:nowrap; }
.topbar h1 span { overflow:hidden; text-overflow:ellipsis; }
.icon-button { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--text); font-size:20px; }
main { width:min(100%,760px); margin:0 auto; padding:20px 14px calc(32px + env(safe-area-inset-bottom)); }
.search-box { height:52px; display:flex; align-items:center; gap:10px; padding:0 13px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.search-box > span { color:var(--muted); font-size:24px; transform:rotate(-15deg); }
.search-box input { min-height:0; height:100%; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.search-box button { width:32px; height:32px; padding:0; border:0; border-radius:50%; background:var(--surface-2); color:var(--muted); font-size:22px; }
.list-head { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 3px 0; color:var(--muted); font-size:12px; }
.sync-state { color:var(--green-bright); }
.people-list { display:grid; gap:10px; }
.person-card { min-height:82px; display:flex; align-items:center; gap:12px; padding:14px 15px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.person-details { min-width:0; flex:1; display:grid; gap:8px; }
.person-name { font-size:16px; overflow-wrap:anywhere; }
.person-contact-row { display:flex; align-items:end; justify-content:space-between; gap:12px; }
.phone-copy { width:fit-content; max-width:100%; padding:0; border:0; background:transparent; color:var(--green-bright); font-size:13px; text-align:left; overflow-wrap:anywhere; }
.phone-copy.is-copied { color:var(--text); }
.call-button { flex:0 0 auto; min-height:39px; display:grid; place-items:center; padding:0 13px; border:1px solid rgba(45,190,100,.4); border-radius:11px; background:var(--green-soft); color:var(--green-bright); font-size:12px; font-weight:800; text-decoration:none; }
.empty { padding:42px 0; color:var(--muted); text-align:center; }
dialog { width:min(calc(100% - 20px),620px); max-height:min(88dvh,840px); padding:0; border:1px solid var(--line); border-radius:22px; background:var(--surface); color:var(--text); box-shadow:0 30px 100px rgba(0,0,0,.65); overflow:auto; }
dialog::backdrop { background:rgba(0,0,0,.7); backdrop-filter:blur(4px); }
.dialog-head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:18px; border-bottom:1px solid var(--line); background:var(--surface); }
.dialog-head h2,.dialog-head p { margin:0; }
.dialog-head h2 { font-size:19px; }
.dialog-head p { margin-top:3px; color:var(--muted); font-size:12px; }
.edit-form,.import-box { padding:0 18px 18px; border-bottom:1px solid var(--line); }
.form-actions { display:flex; align-items:center; gap:9px; }
.form-actions .primary { flex:1; }
.import-box h3 { margin:18px 0 5px; font-size:15px; }
.import-box p { margin:0 0 14px; color:var(--muted); font-size:12px; line-height:1.5; }
.file-picker { min-height:46px; display:grid; place-items:center; margin:0; border:1px dashed var(--green); border-radius:13px; color:var(--green-bright); cursor:pointer; }
.file-picker input { display:none; }
.manage-list { display:grid; }
.manage-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:12px 18px; border-bottom:1px solid var(--line); }
.manage-row div { min-width:0; }
.manage-row strong,.manage-row span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.manage-row span { margin-top:3px; color:var(--muted); font-size:12px; }
.mini { width:38px; height:38px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--text); }
.mini.danger { color:var(--danger); }
.logout { width:calc(100% - 36px); min-height:45px; margin:18px; border:1px solid rgba(255,111,111,.3); border-radius:13px; background:transparent; color:var(--danger); }
.toast { position:fixed; z-index:20; left:50%; bottom:calc(20px + env(safe-area-inset-bottom)); transform:translateX(-50%); width:max-content; max-width:calc(100% - 30px); padding:11px 15px; border:1px solid var(--line); border-radius:12px; background:#17211a; box-shadow:0 12px 50px rgba(0,0,0,.5); font-size:13px; }
@media (min-width:760px) { main { padding-top:30px; } .topbar { padding-inline:max(24px,calc((100% - 760px)/2)); } }
@media (max-width:370px) { .topbar h1 { font-size:14px; gap:5px; } .person-card { padding-inline:12px; } }
