:root {
    --ink: #15171b; --ink-2: #5d6168; --ink-3: #9a9ea6;
    --bg: #f4f5f7; --card: #fff; --line: #e7e9ed;
    --accent: #ffdb4d; --accent-hover: #ffd21f;
    --ok: #12804a; --ok-bg: #e3f7ec; --warn: #9a6b00; --warn-bg: #fff4d6; --bad: #c62828; --bad-bg: #fde5e5;
    --radius: 16px; --shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 4px 16px rgba(20, 24, 31, .05);
    --ink-soft: #5d6168; --ink-faint: #9a9ea6; --paper: #fff; --paper-warm: #f7f8f7;
    --green: #07c160; --green-soft: #e8f9ef; --brand-red: #ff0000;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: #1a6dd8; text-decoration: none; }
h2 { font-size: 20px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
svg { width: 20px; height: 20px; flex: none; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--ink); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1b1b1b; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--bad); }
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-solid:hover { background: #a91f1f; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: #1a6dd8; }
.btn-link:hover { background: none; text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.input, select.input, textarea.input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; color: var(--ink); }
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: 2px solid #ffe680; border-color: #e5c100; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
label.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
label.check input { width: 18px; height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: #e5b400; border-radius: 50%; animation: spin .8s linear infinite; margin: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Login (shared with other Atlayo apps) */
.login { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; background: radial-gradient(900px 500px at 80% -10%, #fff3c4 0%, transparent 60%), #eceef1; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 32px 28px 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, .06); text-align: center; }
.login-logo { width: 44px; height: 48px; }
.login-brand h1 { font-size: 22px; font-weight: 650; margin: 12px 0 4px; }
.login-brand h1 span { font-weight: 650; }
.login-brand p { margin: 0 0 22px; }
.login-checking { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; }
.login-profile { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.login-avatar { width: 64px; height: 64px; border-radius: 50%; background: #fff2bf; display: grid; place-items: center; font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.login-profile-name { font-size: 17px; font-weight: 600; }
.login-profile-phone { margin-bottom: 16px; }
.login .btn { height: 36px; border: 0; background: #f4f5f7; font-weight: 500; }
.login .btn-primary { background: #ffdb4d; color: #1b1b1b; }
.login .btn-primary:hover { background: #ffd21f; }
.login .btn-link { background: none; border: 0; color: var(--ink-2); height: auto; padding: 8px; }
.login .btn-link:hover { background: none; color: var(--ink); text-decoration: underline; }
.login-tabs { display: flex; background: #f4f5f7; border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.login-tab { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-weight: 500; padding: 0; cursor: pointer; }
.login-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.login-panel { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.login-panel p { margin: 0; }
.login-panel[data-panel="phone"] { width: 100%; align-items: stretch; }
.phone-field { position: relative; display: flex; width: 100%; align-items: stretch; text-align: left; }
.phone-dial { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: #f4f5f7; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.phone-dial::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .55; }
.phone-flag { font-size: 18px; line-height: 1; }
.phone-code { font-variant-numeric: tabular-nums; }
.phone-field > .input { height: 42px; border-radius: 0 10px 10px 0; border-color: var(--line); font-size: 14px; }
.phone-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(20, 24, 31, .16); z-index: 30; overflow: hidden; }
.phone-search { flex: 0 0 auto; width: calc(100% - 16px); margin: 8px; height: 40px; min-height: 40px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.phone-search::-webkit-search-decoration, .phone-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.phone-menu-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding-bottom: 6px; }
.phone-option { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.phone-option .name { flex: 1; }
.phone-option .dial { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.phone-option:hover, .phone-option.active { background: #f0f1f4; }
.phone-wait { padding: 12px 14px; border-radius: 12px; background: #fff4c2; border: 1px solid #f0d56a; color: #1b1b1b; font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.login-as { display: none; }
.qr-box { width: 232px; height: 232px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.qr-box img, .qr-box canvas, .qr-box svg { width: 100% !important; height: auto !important; display: block; }
.login-status { min-height: 0; margin: 14px 0 0; }
.login-status:empty { margin: 0; }
.login-error { margin: 10px 0 0; color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 10px; font-size: 13px; }
.login-foot { --ink-faint: var(--ink-3); margin-top: 22px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.login-back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(20, 24, 31, .04); }
.login-back svg { width: 16px; height: 16px; color: var(--ink-2); }
.login-back:hover { background: var(--bg); color: var(--ink); text-decoration: none; }

/* Shell */
.app { display: flex; min-height: 100%; }
.side { width: 248px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; padding: 4px 10px 24px; }
.side-brand img { width: 32px; height: 32px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; }
.side-nav a svg { color: var(--ink-3); }
.side-nav a:hover { background: var(--bg); color: var(--ink); }
.side-nav a.active { background: #fff6d1; color: var(--ink); }
.side-nav a.active svg { color: #c99a00; }
.side-nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding: 12px 12px 0; border-top: 1px solid var(--line); }
.side-link { color: var(--ink-2); font-size: 13px; text-align: left; }
.side-link:hover { color: var(--ink); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 28px; min-height: 64px; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-bottom: 20px; }
.top-brand { display: none; }
.top-title { font-size: 20px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { position: relative; display: flex; align-items: center; gap: 10px; }
.login-foot .lang-picker-trigger,
.top .lang-picker-trigger { height: 36px; padding: 0 12px; background: #fff; color: var(--ink); border-color: var(--line); font-size: 14px; font-weight: 600; max-width: 168px; }
.balance-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink-2); font-size: 14px; }
.balance-chip b { color: var(--ink); }
.balance-low b { color: var(--bad); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); border: 0; display: grid; place-items: center; font-weight: 700; overflow: hidden; cursor: pointer; padding: 0; font: inherit; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu { position: absolute; right: 0; top: 46px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .15); min-width: 240px; padding: 8px; z-index: 40; }
.user-menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-weight: 600; }
.user-menu-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px; border: 0; background: none; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.user-menu-item:hover { background: var(--bg); }
.view { padding: 8px 28px 60px; max-width: 1200px; width: 100%; }
#banner:empty { display: none; }
#banner { padding: 0 28px; }
.banner { background: var(--warn-bg); color: #6b4a00; padding: 12px 16px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; }
.banner-bad { background: var(--bad-bg); color: var(--bad); }
.tabbar { display: none; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.card-flat { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 1px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.more svg { width: 16px; height: 16px; }
.stat { display: grid; gap: 2px; }
.stat-label { color: var(--ink-2); font-size: 13px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.stat-grid .stat { padding: 8px 10px; border-radius: 12px; color: inherit; }
.stat-grid .stat:hover { background: var(--bg); text-decoration: none; }
.stat-zero .stat-value { color: var(--ink-3); font-weight: 700; }
.stat-alert .stat-value { color: var(--bad); }
.home-picks { padding: 10px; display: grid; align-content: center; gap: 2px; }
.home-picks a { display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; align-items: center; column-gap: 14px; padding: 12px; border-radius: 12px; color: inherit; }
.home-picks a:hover { background: var(--bg); text-decoration: none; }
.home-picks .li-main { display: grid; gap: 3px; }
.home-picks .li-title { font-size: 16px; white-space: normal; line-height: 1.25; }
.home-picks .li-sub { line-height: 1.4; }
.home-picks .chev { color: var(--ink-3); width: 18px; height: 18px; }
.hero-card { background: linear-gradient(135deg, #fff7d6 0%, #fffdf5 60%, #fff 100%); border-color: #f3e3a0; }
.hero-card .muted { color: var(--ink-2); }
.hero-card .stat-value { font-size: 38px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quick a { display: grid; gap: 8px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 650; }
.quick a:hover { border-color: #e5c100; }
.quick svg { width: 26px; height: 26px; color: #c99a00; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty svg { width: 40px; height: 40px; color: var(--ink-3); margin-bottom: 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list a.li-link { display: flex; align-items: center; gap: 14px; color: inherit; flex: 1; min-width: 0; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-sub { color: var(--ink-2); font-size: 13px; }
.li-flag { font-size: 26px; }
.li-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink-2); flex: none; }
.li-ico.missed { background: var(--bad-bg); color: var(--bad); }

.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-accent { background: var(--accent); color: #1b1b1b; }
.badge-demo { background: #ede7ff; color: #5b3cc4; }

.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #ffd21f, #ff9f1c); border-radius: 99px; }
.bar.bar-bad > span { background: var(--bad); }
.bar.bar-warn > span { background: #ff9f1c; }
.bar-lg { height: 14px; }
.tracker { display: grid; gap: 10px; }
.tracker-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tracker-used { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.tracker-pct { color: var(--ink-2); font-weight: 700; }
.tracker-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.install-card { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.qr-big { display: grid; place-items: center; width: 300px; max-width: 100%; aspect-ratio: 1; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.qr-big img { width: 100%; height: auto; image-rendering: pixelated; }
.btn-lg { height: 50px; font-size: 16px; }
.manual summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.manual .kv { margin-top: 10px; }
.warn-text { color: var(--warn); }
.ok-text { color: var(--ok); font-weight: 600; }

.esim-card { display: grid; gap: 12px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.esim-card:hover { border-color: #e5c100; }
.esim-head { display: flex; gap: 12px; align-items: center; }
.esim-head .li-flag { font-size: 32px; }

.pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pkg { position: relative; display: grid; gap: 2px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; font: inherit; cursor: pointer; color: var(--ink); }
.pkg:hover { border-color: #e5c100; }
.pkg-hot { border: 2px solid var(--accent); }
.pkg-data { font-size: 24px; font-weight: 800; }
.pkg-price { font-size: 18px; font-weight: 800; margin-top: 8px; }
.pkg-badge { position: absolute; top: -10px; right: 12px; }

.kv { display: grid; grid-template-columns: max-content 1fr auto; gap: 8px 14px; align-items: center; }
.kv dt { color: var(--ink-2); font-size: 13px; }
.kv dd { margin: 0; }
.steps-ol { padding-left: 20px; margin: 0; }
.steps-ol li { margin-bottom: 6px; }

.seg { display: inline-flex; background: var(--bg); padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.radio-card { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card.active { border: 2px solid #e5c100; background: #fffbea; padding: 13px; }
.radio-card b { font-size: 14px; }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.preset { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 10px; font: inherit; cursor: pointer; display: grid; gap: 2px; text-align: center; }
.preset b { font-size: 18px; }
.preset.active { border: 2px solid #e5c100; background: #fffbea; padding: 13px 9px; }
.preset .bonus { color: var(--ok); font-size: 12px; font-weight: 700; }

table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.table td.r, .table th.r { text-align: right; }
.table-wrap { overflow-x: auto; }

/* Dialer */
.calls-grid { grid-template-columns: minmax(290px, 380px) 1fr; align-items: start; }
.dialer { display: grid; gap: 12px; }
.caller-id { display: grid; gap: 8px; padding: 14px; background: var(--bg); border-radius: 14px; }
.need-number { display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; align-items: center; column-gap: 12px; padding: 12px; border-radius: 14px; background: #fff7d6; border: 1px solid #f3e3a0; color: inherit; }
.need-number:hover { background: #fff1b8; text-decoration: none; }
.need-number .li-main { display: grid; gap: 2px; }
.need-number .li-title { font-size: 15px; white-space: normal; line-height: 1.25; }
.need-number .li-sub { line-height: 1.35; }
.need-number .li-ico { background: #fff; }
.need-number .chev { width: 18px; height: 18px; color: var(--ink-2); }
.caller-id-label { font-size: 13px; font-weight: 700; }
.caller-id-list { display: grid; gap: 6px; }
.caller-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; font-size: 16px; color: var(--ink); cursor: pointer; text-align: left; }
.caller-opt .li-flag { font-size: 22px; }
.caller-opt.active { border: 2px solid #e5c100; background: #fffbea; padding: 7px 11px; }
.mic-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.mic-state svg { width: 14px; height: 14px; }
.mic-ok { background: var(--ok-bg); color: var(--ok); }
.mic-warn { background: var(--warn-bg); color: var(--warn); }
.mic-bad { background: var(--bad-bg); color: var(--bad); }
.mic-test { display: grid; gap: 8px; justify-items: center; text-align: center; padding-top: 4px; }
.mic-meter { width: 100%; height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.mic-meter > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1fb25a, #ffd21f, #ff7a1c); transition: width .08s linear; }
.dial-input { font-size: 26px; height: 56px; text-align: center; letter-spacing: .03em; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 54px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 22px; font-weight: 600; cursor: pointer; }
.keypad button:active { background: var(--bg); }
.rate-line { min-height: 22px; text-align: center; }
.call-btn { height: 52px; font-size: 17px; background: #1fb25a; border-color: #1fb25a; color: #fff; }
.call-btn:hover { background: #179a4c; }
.call-panel { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 300px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 20px 60px rgba(20, 24, 31, .18); text-align: center; }
.call-peer { font-size: 20px; font-weight: 700; }
.call-state { color: var(--ink-2); margin: 4px 0 16px; }
.call-actions { display: flex; justify-content: center; gap: 16px; }
.round { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.round.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.round-danger, .round-ok { border: 0; color: #fff; }
.round-danger { background: #e53935; }
.round-ok { background: #1fb25a; }

/* Messages */
.chat { display: grid; grid-template-columns: 300px 1fr; min-height: 560px; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 70vh; }
.chat-list li { cursor: pointer; }
.chat-list li.active { background: #fffbea; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; gap: 10px; align-items: center; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; }
.msg { max-width: 75%; padding: 9px 13px; border-radius: 16px; background: var(--bg); white-space: pre-wrap; word-wrap: break-word; }
.msg-out { align-self: flex-end; background: #fff1b8; }
.msg-meta { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-compose textarea { min-height: 42px; height: 42px; }
.unread-dot { width: 9px; height: 9px; background: #1a6dd8; border-radius: 50%; flex: none; }

/* Modal & toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15, 17, 21, .5); display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 20px; padding: 26px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.modal h2 { margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.sum { display: grid; gap: 6px; background: var(--bg); padding: 14px; border-radius: 12px; margin: 14px 0; }
.sum > div { display: flex; justify-content: space-between; gap: 12px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--ok); font-weight: 600; padding: 12px 20px; border-radius: 12px; z-index: 90; box-shadow: 0 12px 36px rgba(20, 24, 31, .16); max-width: calc(100% - 32px); }
.toast-bad { border-left-color: var(--bad); color: var(--bad); }

@media (max-width: 860px) {
    .side { display: none; }
    .top { padding: 10px 16px; gap: 10px; margin-bottom: 12px; }
    .top-brand { display: block; }
    .top-brand img { width: 28px; height: 28px; display: block; }
    .top .btn-sm, .balance-chip span { display: none; }
    .login-foot .lang-picker-trigger, .top .lang-picker-trigger { max-width: 92px; padding: 0 8px; font-size: 13px; }
    .calls-grid { grid-template-columns: 1fr; }
    .install-card { grid-template-columns: 1fr; justify-items: center; }
    .install-body { width: 100%; }
    .top-title { font-size: 19px; }
    .view { padding: 4px 16px 100px; }
    #banner { padding: 0 16px; }
    .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--ink-2); padding: 4px 0; position: relative; }
    .tabbar a.active { color: var(--ink); font-weight: 700; }
    .tabbar a.active svg { color: #c99a00; }
    .tabbar .badge { position: absolute; top: 0; right: 22%; padding: 0 5px; font-size: 10px; }
    .chat { grid-template-columns: 1fr; }
    .chat.has-open .chat-list { display: none; }
    .chat:not(.has-open) .chat-main { display: none; }
    .call-panel { left: 16px; right: 16px; width: auto; bottom: 90px; }
    .kv { grid-template-columns: 1fr auto; }
    .kv dt { grid-column: 1 / -1; margin-top: 6px; }
    .bill-types { grid-template-columns: 1fr; }
}

.bill-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bill-type { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.bill-type:has(input:checked) { border-color: #e5c100; background: #fffbea; }
.bill-type input { margin-top: 3px; }
.bill-type span { display: grid; gap: 2px; }
.bill-type small { color: var(--ink-2); font-weight: 500; }
.bill-vat { display: flex; gap: 16px; flex-wrap: wrap; }
.addr-suggest { position: relative; }
.addr-suggest ul { position: absolute; z-index: 6; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 24, 31, .12); max-height: 220px; overflow: auto; }
.addr-suggest li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.addr-suggest li:hover { background: var(--bg); }
