/* cabinet.css — the client's hub on kexit.kz/cabinet (js/cabinet.js).
   One status = one card; the invoice is its own card; hairlines, no shadows.
   Tokens come from base.css (--surface, --border, --accent …). */

body.cab { margin: 0; background: var(--bg); color: var(--text-2); font-family: var(--font-ui); min-height: 100vh; -webkit-font-smoothing: antialiased; }
.cab-wrap { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }

/* Header: brand · business · sign out. The language switcher is fixed top-right (lang.css). */
.cab-head { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 20px; padding-right: 96px; }
.cab-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: 2px; font-weight: 700; text-decoration: none; min-height: 44px; }
.cab-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cab-biz { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-biz:empty { display: none; }
.cab-out { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; padding: 0 4px; }
.cab-out:hover { color: var(--text-1); }

/* Cards */
.cab-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 12px; }
.cab-card h1 { font-size: 22px; line-height: 1.25; margin: 10px 0 8px; color: var(--text-1); letter-spacing: -0.01em; }
.cab-card h2 { font-size: 15px; margin: 0 0 10px; color: var(--text-1); }
.cab-lead { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0 0 16px; }
.cab-fine { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 10px 0 0; }
.cab-fine a { color: var(--accent-text); text-decoration: none; }

/* Status pill with a dot */
.cab-status { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.cab-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.cab-status.ok { color: var(--accent-text); border-color: transparent; background: var(--accent-soft); }
.cab-status.ok::before { background: var(--accent); }
.cab-status.wait { color: var(--warn-text); border-color: transparent; background: var(--warn-soft); }
.cab-status.wait::before { background: var(--warn); }
.cab-status.bad { color: var(--danger-text); border-color: transparent; background: var(--danger-soft); }
.cab-status.bad::before { background: var(--danger); }
.cab-status.live::before { animation: cabPulse 1.6s ease-in-out infinite; }
@keyframes cabPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Progress: days of the demo / grace left */
.cab-progress { height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 0 0 14px; }
.cab-progress i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width 0.4s; }
.cab-progress.wait i { background: var(--warn); }

/* Buttons: one primary per card, the rest quiet */
.cab-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-1); margin-top: 10px; cursor: pointer; font-family: inherit; transition: background 0.15s, border-color 0.15s; }
.cab-btn:hover { border-color: var(--muted); }
.cab-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cab-btn.primary:hover { filter: brightness(1.05); }
.cab-btn.kaspi { background: var(--kaspi); border-color: var(--kaspi); color: #fff; }
.cab-btn.ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.cab-btn[disabled] { opacity: 0.55; cursor: default; }
.cab-btn.wa::before { content: ''; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: #25d366; flex: none; }

/* Invoice card */
.cab-inv { border-color: var(--border-strong); }
.cab-inv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cab-amount { font-size: 32px; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em; line-height: 1.1; }
.cab-inv-num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.cab-inv-to { color: var(--text-2); font-size: 14px; margin: 10px 0 0; }
.cab-inv-wait { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.cab-inv-wait::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: cabPulse 1.6s ease-in-out infinite; }
.cab-inv-hint { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--text-2); margin-top: 12px; }

/* Checklist «что дальше» */
.cab-check { list-style: none; margin: 0; padding: 0; }
.cab-check li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); line-height: 1.45; }
.cab-check li:first-child { border-top: 0; padding-top: 0; }
.cab-check i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }
.cab-check li.done i { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.cab-check li.done { color: var(--muted); }
.cab-check li.now i { border-color: var(--warn); color: var(--warn-text); }
.cab-check li.now i::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: cabPulse 1.6s ease-in-out infinite; }
.cab-check li.now { color: var(--text-1); }
.cab-check small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Rows: label — value */
.cab-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 40px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.cab-row:first-of-type { border-top: 0; }
.cab-row span:first-child { color: var(--muted); }
.cab-row b { color: var(--text-1); font-weight: 600; text-align: right; }

/* Help and footer */
.cab-help-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.cab-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.cab-foot a { color: var(--text-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }

/* Login: phone → code */
.cab-login .cab-lead { margin-bottom: 14px; }
.cab-field { display: block; margin-bottom: 10px; }
.cab-label { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.cab-sent { font-size: 14px; color: var(--text-2); margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.cab-sent button { background: none; border: 0; color: var(--accent-text); font: inherit; font-size: 13px; cursor: pointer; padding: 0; min-height: 24px; }
.cab-resend { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 8px; min-height: 44px; font-size: 13px; color: var(--muted); }
.cab-resend button { background: none; border: 0; color: var(--accent-text); font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; padding: 0 6px; }
.cab-resend button[disabled] { color: var(--muted); cursor: default; }
.reg-result { min-height: 20px; font-size: 14px; font-weight: 600; text-align: center; margin-top: 6px; }
.reg-result.error { color: var(--danger-text); }
.reg-result.success { color: var(--accent-text); }

/* Skeleton while /me loads — no words, no language */
.cab-skel { padding: 20px; }
.cab-skel i { display: block; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: cabShimmer 1.2s linear infinite; }
.cab-skel i:nth-child(1) { width: 90px; height: 26px; border-radius: var(--radius-pill); }
.cab-skel i:nth-child(2) { width: 70%; height: 24px; margin: 14px 0 10px; }
.cab-skel i:nth-child(3) { width: 100%; height: 15px; margin-bottom: 6px; }
.cab-skel i:nth-child(4) { width: 85%; height: 15px; margin-bottom: 16px; }
.cab-skel i:nth-child(5) { width: 100%; height: 48px; }
@keyframes cabShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 360px) {
  .cab-amount { font-size: 28px; }
  .cab-card { padding: 16px; }
}

/* --- Вход через Telegram (cabinet.js, api/qural/tg/*) --- */
.cab-or { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.cab-or::before, .cab-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cab-btn.tg { background: #2aabee; border-color: #2aabee; color: #fff; gap: 8px; }
.cab-btn.tg:hover { filter: brightness(1.05); }
.cab-link { background: none; border: 0; color: var(--accent-text); font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; padding: 0 6px; width: 100%; }
