:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #17233e; background: #f3f8fb; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% -10%, #d9f6fb 0, transparent 34%), #f3f8fb; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { max-width: 1220px; margin: 0 auto; padding: 38px 22px 70px; }
.topbar { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; margin-bottom: 30px; }
.eyebrow, .card-kicker { color: #079bb9; font-size: 11px; font-weight: 850; letter-spacing: .15em; margin: 0 0 7px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.7rem); letter-spacing: -.055em; line-height: .98; }
h2, h3 { margin: 0; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
.lede { max-width: 710px; line-height: 1.6; color: #587087; margin: 16px 0 0; }
.header-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.connection, .pill, .mini-status { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; white-space: nowrap; font-weight: 800; }
.connection { color: #547083; font-size: .8rem; padding: 9px 6px; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #e1a12c; box-shadow: 0 0 0 4px rgba(225,161,44,.13); }
.connection.online .connection-dot { background: #21a35a; box-shadow: 0 0 0 4px rgba(33,163,90,.14); }
.connection.offline .connection-dot { background: #d54b4b; box-shadow: 0 0 0 4px rgba(213,75,75,.14); }
.pill { background: #e6f5f8; color: #087e98; border: 1px solid #b9e9f0; padding: 9px 13px; }
.pill[data-phase="authenticated"] { background: #eaf8ee; color: #19723b; border-color: #c7ebd4; }
.pill[data-phase="error"], .pill[data-phase="otp_error"] { background: #fff0f0; color: #a33b3b; border-color: #f3caca; }
.pill[data-phase="loading"] { background: #eef4ff; color: #285b9f; border-color: #d4e2ff; }
.card { background: rgba(255,255,255,.95); border: 1px solid #deebef; border-radius: 22px; padding: 25px; box-shadow: 0 15px 40px rgba(25,73,95,.07); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.wide { grid-column: 1 / -1; }
.card-title { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.number { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: #09b5cd; color: white; font-weight: 850; }
.stack { display: grid; gap: 13px; }
label { display: grid; gap: 7px; font-size: .87rem; color: #587087; font-weight: 750; }
.optional { color: #8ca0ad; font-weight: 600; }
input { width: 100%; padding: 12px 13px; border: 1px solid #c9dbe3; border-radius: 11px; outline: none; color: #17233e; background: #fff; transition: border .2s, box-shadow .2s; }
input::placeholder { color: #9aabb6; }
input:focus { border-color: #09abc7; box-shadow: 0 0 0 4px rgba(9,171,199,.13); }
button, .link-button { border: 0; border-radius: 11px; padding: 12px 16px; background: #04a8c6; color: #fff; font-weight: 850; cursor: pointer; text-align: center; text-decoration: none; transition: background .2s, transform .15s, opacity .2s; }
button:hover:not(:disabled), .link-button:hover { background: #058ca6; transform: translateY(-1px); }
button:disabled { opacity: .46; cursor: not-allowed; }
button.secondary, .secondary { background: #edf4f6; color: #355064; border: 1px solid #d5e6eb; }
button.secondary:hover:not(:disabled), .secondary:hover { background: #dcebed; }
.button-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.is-loading .button-label::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.hint-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; border: 1px solid #d8edf1; border-radius: 11px; background: #f5fbfc; color: #587087; }
.hint-box p { margin: 0; line-height: 1.45; font-size: .86rem; }
.info-icon { display: grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; border-radius: 50%; background: #d9f2f5; color: #078aa4; font-size: .75rem; font-weight: 850; }
.status, .hint { color: #587087; line-height: 1.5; font-size: .9rem; margin: 0; }
.progress { display: flex; align-items: center; gap: 9px; color: #3d6b86; font-size: .85rem; margin-top: 14px; }
.spinner { width: 15px; height: 15px; border: 2px solid #a6dbe4; border-right-color: #079bb9; border-radius: 50%; animation: spin .7s linear infinite; }
.captcha-frame { display: grid; place-items: center; min-height: 108px; padding: 9px; border: 1px dashed #c9e1e7; border-radius: 11px; background: #f9fcfd; }
.captcha { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; object-fit: contain; }
.muted { color: #91a6b1; font-size: .84rem; }
.qr-result { margin-top: 20px; padding-top: 18px; border-top: 1px solid #e0ecef; }
.result-heading, .table-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mini-status { padding: 6px 9px; background: #eef4ff; color: #285b9f; font-size: .75rem; }
.mini-status.verified { background: #eaf8ee; color: #18723a; }
.mini-status.pending { background: #fff8e8; color: #8a5a10; }
.mini-status.paid { background: #eaf8ee; color: #18723a; }
.mini-status.expired { background: #fff8e8; color: #8a5a10; }
.qr-layout { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 20px; align-items: center; margin-top: 15px; }
.qr-image-frame { position: relative; display: grid; place-items: center; padding: 12px; border: 1px solid #d8e7eb; border-radius: 14px; background: #fff; min-height: 206px; overflow: hidden; }
.qr-image-frame img { display: block; width: min(230px, 100%); height: auto; border-radius: 8px; transition: opacity .25s, filter .25s; }
.qr-closed-overlay { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; text-align: center; padding: 20px; background: rgba(255,255,255,.92); color: #18723a; }
.qr-closed-overlay.expired { color: #8a5a10; }
.checkmark { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 4px; border-radius: 50%; background: #d9f2df; font-size: 1.65rem; font-weight: 900; }
.qr-closed-overlay.expired .checkmark { background: #fff0c9; color: #a46c06; }
.qr-closed-overlay strong { font-size: .95rem; }
.qr-closed-overlay span:last-child { color: #607b70; font-size: .76rem; }
.qr-timer { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 10px; border-radius: 9px; background: #eef4ff; color: #285b9f; font-size: .82rem; font-weight: 800; }
.qr-timer.expired { background: #fff8e8; color: #8a5a10; }
.timer-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.payment-links { display: grid; gap: 8px; padding-top: 2px; }
.payment-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.app-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 10px; border: 1px solid #cfe4e9; border-radius: 9px; background: #f7fbfc; color: #1d536a; font-size: .8rem; font-weight: 850; text-decoration: none; transition: background .2s, border .2s, transform .15s; }
.app-link:hover { background: #e7f6f8; border-color: #8fd5df; transform: translateY(-1px); }
.app-link.disabled { pointer-events: none; opacity: .45; }
.qr-copy { display: grid; gap: 14px; }
.qr-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.qr-actions .link-button, .qr-actions button { padding: 10px 12px; font-size: .83rem; }
.empty-state { display: flex; gap: 10px; align-items: center; margin-top: 20px; padding: 14px; color: #698292; background: #f5fafb; border: 1px dashed #d3e7eb; border-radius: 11px; font-size: .86rem; }
.empty-state p { margin: 0; line-height: 1.45; }
.empty-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #dff2f5; color: #078ba5; font-weight: 900; }
.inline-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 280px; }
.verification { display: flex; align-items: center; gap: 9px; margin: 18px 0 11px; padding: 13px 15px; border-radius: 11px; background: #f2f8fa; color: #355064; min-height: 48px; }
.verification.verified { background: #eaf8ee; color: #18723a; }
.verification.pending { background: #fff8e8; color: #8a5a10; }
.verification.watching { background: #eef4ff; color: #285b9f; }
.verification-icon { font-size: 1.3rem; line-height: 1; }
.table-meta { color: #77909e; font-size: .78rem; margin: 0 0 8px; }
.table-wrap { overflow: auto; border: 1px solid #e3eef1; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid #e5eef1; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: #527083; background: #f4fafb; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.table-empty { display: grid; place-items: center; min-height: 82px; color: #8ba0ab; font-size: .86rem; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); padding: 12px 15px; border: 1px solid #cfe4e9; border-radius: 11px; background: #fff; color: #355064; box-shadow: 0 14px 35px rgba(25,73,95,.14); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.error { margin-top: 18px; padding: 14px 16px; border-radius: 11px; background: #fff0f0; color: #9e2828; border: 1px solid #f0cccc; line-height: 1.45; }
.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .topbar { display: block; } .header-actions { justify-content: flex-start; margin-top: 18px; } .grid { grid-template-columns: 1fr; } .wide { grid-column: auto; } }
@media (max-width: 560px) { .shell { padding: 26px 14px 50px; } .card { padding: 19px; border-radius: 17px; } .qr-layout { grid-template-columns: 1fr; } .qr-image-frame { max-width: 270px; margin: 0 auto; } .inline-form button { width: 100%; } .topbar h1 { font-size: 2.35rem; } .payment-link-grid { grid-template-columns: 1fr 1fr; } }

.auth-shell { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(100%, 500px); }
.auth-card h1 { margin: 0 0 10px; }
.auth-card .lede { margin-bottom: 26px; }
.auth-card .status:empty { display: none; }
