/* ============================================================
   ShowOff — shared dark theme for auth + billing pages
   ============================================================ */

@font-face {
    font-family: 'Open Runde';
    src: url('/assets/fonts/OpenRunde-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Open Runde';
    src: url('/assets/fonts/OpenRunde-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Open Runde';
    src: url('/assets/fonts/OpenRunde-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Open Runde';
    src: url('/assets/fonts/OpenRunde-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg-card: #1b1e25;
    --bg-tile: #252932;
    --border: #2d2d36;
    --border-light: rgba(255, 255, 255, 0.1);
    --text: #f1f1f1;
    --text-dim: #c4c4c4;
    --accent: #1264d7;
    --accent-hover: #1873f0;
    --radius-card: 8px;
    --radius-tile: 6px;
    --font: 'Open Runde', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

/* Dark base so iOS Safari never flashes white in the status-bar /
   home-indicator safe areas or during overscroll. */
html {
    background-color: rgb(7, 6, 16);
}

html,
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: linear-gradient(220.7deg, rgb(25, 22, 48) 29.2%, rgb(0, 0, 0) 64.5%) fixed;
    background-color: rgb(7, 6, 16);
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Subtle dot texture, matching the app stage */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.5px, transparent 0.5px);
    background-size: 8px 8px;
    pointer-events: none;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

a {
    color: var(--text);
    text-decoration: none;
}

/* ---------- Card ---------- */

.auth-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.auth-head {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    display: block;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--text);
}

.auth-sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-dim);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* ---------- Fields ---------- */

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field {
    width: 100%;
    background: var(--bg-tile);
    border: 1px solid var(--border);
    border-radius: var(--radius-tile);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    padding: 12px;
    outline: none;
    transition: border-color 0.15s;
}

.auth-field::placeholder {
    color: var(--text-dim);
    opacity: 0.7;
}

.auth-field:focus {
    border-color: var(--accent);
}

.auth-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pass-indicator {
    display: block;
    text-align: right;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
    margin-top: 6px;
    transition: color 0.15s;
}

.pass-indicator.ok {
    color: #46c98a;
}

/* ---------- Buttons ---------- */

.auth-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 12px;
    border-radius: var(--radius-tile);
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s, opacity 0.15s;
}

.auth-btn:hover {
    background: var(--accent-hover);
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-btn.secondary {
    background: var(--bg-tile);
    border: 1px solid var(--border);
    color: var(--text);
}

.auth-btn.secondary:hover {
    background: #2b303b;
}

/* ---------- Links + alert ---------- */

.auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-link {
    color: var(--accent);
    font-weight: 500;
}

.auth-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.auth-muted {
    color: var(--text-dim);
    font-size: 12px;
}

.auth-muted:hover {
    color: var(--text);
}

.auth-alert {
    margin-top: 16px;
    padding: 11px 12px;
    border-radius: var(--radius-tile);
    font-size: 13px;
    text-align: center;
    line-height: 1.45;
}

.auth-alert.hidden {
    display: none;
}

.auth-alert.error {
    background: rgba(220, 60, 60, 0.12);
    border: 1px solid rgba(220, 60, 60, 0.35);
    color: #ff8a8a;
}

.auth-alert.success {
    background: rgba(40, 180, 110, 0.12);
    border: 1px solid rgba(40, 180, 110, 0.35);
    color: #5fd99f;
}

/* ---------- Billing ---------- */

.plan-card {
    background: var(--bg-tile);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 18px;
    margin-bottom: 20px;
}

.plan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plan-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.plan-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin: 2px 0 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.status-badge.active {
    background: rgba(40, 180, 110, 0.14);
    border-color: rgba(40, 180, 110, 0.4);
    color: #5fd99f;
}

.status-badge.trial {
    background: rgba(18, 100, 215, 0.16);
    border-color: rgba(18, 100, 215, 0.45);
    color: #7fb0ff;
}

.status-badge.confirming {
    background: rgba(230, 170, 40, 0.14);
    border-color: rgba(230, 170, 40, 0.4);
    color: #e6c050;
}

.plan-msg {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 14px;
    line-height: 1.5;
}

.plan-msg.error {
    color: #ff8a8a;
}

.plan-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-debug {
    display: block;
    text-align: center;
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--text-dim);
    opacity: 0.55;
    margin-top: 12px;
}

.billing-footer {
    text-align: center;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logout-link {
    font-size: 12px;
    color: #ff7b7b;
    background: none;
    border: none;
    width: 100%;
}

.logout-link:hover {
    text-decoration: underline;
}

/* ---------- 404 ---------- */

.notfound {
    text-align: center;
}

.notfound-code {
    font-size: 64px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.notfound-text {
    font-size: 15px;
    color: var(--text-dim);
    margin: 8px 0 20px;
}
