:root {
    color-scheme: light;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    color: #242424;
    background: #f5f5f5;
    --brand: #0f6cbd;
    --brand-hover: #115ea3;
    --stroke: #d1d1d1;
    --subtle: #616161;
    --shadow: 0 12px 40px rgb(0 0 0 / 10%);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }

.shell { min-height: 100vh; }
.eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.form-panel { display: grid; min-height: 100vh; place-items: center; padding: 48px 24px; background: #fafafa; }
.auth-card { width: min(100%, 400px); }
.auth-card header h2 { margin: 0 0 8px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.auth-card header > p:last-child { margin: 0; color: var(--subtle); }
.auth-card > header { margin-bottom: 28px; }
.auth-card .eyebrow, .dashboard .eyebrow { color: var(--brand); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 26px; padding: 4px; border-radius: 8px; background: #ebebeb; }
.tab { padding: 8px 12px; border: 0; border-radius: 5px; color: var(--subtle); background: transparent; cursor: pointer; }
.tab.active { color: #242424; background: white; box-shadow: 0 1px 3px rgb(0 0 0 / 12%); font-weight: 600; }

.field { display: grid; gap: 7px; margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.field input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--stroke); border-bottom-color: #8a8a8a; border-radius: 4px; outline: 0; background: white; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-bottom: 2px solid var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 64px; }
.reveal { position: absolute; top: 4px; right: 4px; height: 36px; padding: 0 9px; border: 0; color: var(--brand); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; }

.button { width: 100%; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-weight: 600; }
.button.primary { color: white; background: var(--brand); }
.button.primary:hover { background: var(--brand-hover); }
.button.secondary { border-color: var(--stroke); color: #242424; background: white; }
.button.secondary:hover { background: #f5f5f5; }
.button:disabled { cursor: wait; opacity: .65; }
.message { margin-bottom: 18px; padding: 11px 12px; border: 1px solid #d13438; border-radius: 4px; color: #a4262c; background: #fdf3f4; font-size: 13px; }
.dashboard { width: min(100%, 760px); }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.dashboard-header h1 { margin: 0; font-size: 30px; font-weight: 600; }
.logout { width: auto; white-space: nowrap; }
.balance-card { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding: 22px 24px; border: 1px solid #e0e0e0; border-radius: 8px; background: white; box-shadow: 0 2px 8px rgb(0 0 0 / 6%); }
.balance-card span { color: var(--subtle); }
.balance-card strong { font-size: 26px; font-weight: 600; }
.plans-section { margin-top: 30px; }
.section-heading { margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 21px; font-weight: 600; }
.dashboard-message { margin-bottom: 16px; }
.dashboard-message.success { border-color: #107c10; color: #0e700e; background: #f1faf1; }
.list-shell { overflow: hidden; border: 1px solid #dedede; border-radius: 8px; background: white; }
.product-row, .skeleton-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 120px; align-items: center; gap: 20px; padding: 0 20px; }
.product-row { min-height: 66px; border-bottom: 1px solid #ededed; }
.product-row:last-child { border-bottom: 0; }
.product-row:hover { background: #fafafa; }
.product-row h2 { overflow: hidden; margin: 0; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.product-row p { margin: 0; color: #242424; font-size: 15px; font-weight: 600; }
.extract-button { width: auto; min-width: 104px; }
.loading { padding: 24px; color: var(--subtle); text-align: center; }
.skeleton-row { min-height: 66px; border-bottom: 1px solid #ededed; }
.skeleton-row i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #ededed 25%, #f7f7f7 50%, #ededed 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton-row i:first-child { width: min(240px, 75%); }
.skeleton-row i:nth-child(2) { width: 58px; }
.skeleton-row i:last-child { width: 104px; height: 34px; border-radius: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 58px; padding: 10px 16px; border-top: 1px solid #dedede; background: #fafafa; }
.page-button { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--stroke); border-radius: 4px; color: #242424; background: white; cursor: pointer; }
.page-button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.page-button.current { border-color: var(--brand); color: white; background: var(--brand); }
.page-button:disabled { cursor: default; opacity: .45; }
.page-ellipsis { min-width: 20px; color: var(--subtle); text-align: center; }

@media (max-width: 560px) {
    .dashboard-header { align-items: stretch; flex-direction: column; }
    .logout { width: 100%; }
    .product-row, .skeleton-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 16px; }
    .product-row h2 { white-space: normal; }
    .product-row p { grid-column: 1; }
    .product-row .extract-button { grid-column: 2; grid-row: 1 / 3; }
    .skeleton-row i:nth-child(2) { grid-column: 1; }
    .skeleton-row i:last-child { grid-column: 2; grid-row: 1 / 3; }
    .pagination { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
