:root {
    --bg: #070b14;
    --bg-elevated: #0f172a;
    --surface: rgba(22, 32, 52, 0.72);
    --surface-solid: #162034;
    --surface-2: #1e293b;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.32);
    --text: #f1f5f9;
    --muted: #94a3b8;
    --muted-dim: #64748b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.25);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.22);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

body::before {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -60px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
}

body::after {
    width: 280px;
    height: 280px;
    bottom: 10%;
    left: -80px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}

/* Header */
.auth-header {
    padding: 18px 4px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.auth-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8125rem;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    flex-shrink: 0;
}

.auth-brand strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-brand span {
    font-size: 0.6875rem;
    color: var(--muted);
    font-weight: 500;
}

.auth-lang {
    display: flex;
    padding: 3px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border);
    border-radius: 999px;
    flex-shrink: 0;
}

.auth-lang a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-lang a.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.2));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-main {
    flex: 1;
    padding: 4px 0 28px;
}

.auth-footer {
    padding: 16px 4px 24px;
    text-align: center;
    font-size: 0.6875rem;
    color: var(--muted-dim);
    letter-spacing: 0.01em;
}

/* Cards */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    margin-bottom: 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
}

.auth-card-glow {
    position: relative;
    overflow: hidden;
}

.auth-card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
}

/* Hero / Landing */
.auth-hero {
    text-align: center;
    padding: 28px 22px 24px;
}

.auth-hero-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
}

.auth-hero-icon svg {
    width: 28px;
    height: 28px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.25);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.auth-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.auth-hero h1 {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.auth-hero .auth-lead {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.65;
    max-width: 340px;
    margin: 0 auto 20px;
}

.auth-hero-amount {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff 30%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.auth-hero-meta {
    font-size: 0.8125rem;
    color: var(--muted);
}

.auth-card h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-step-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-muted {
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.auth-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warning);
    background: var(--warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.auth-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Document preview cards (landing) */
.auth-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-dim);
    margin-bottom: 12px;
    text-align: left;
}

.auth-doc-cards {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    text-align: left;
}

.auth-doc-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, background 0.2s;
}

.auth-doc-card:hover {
    border-color: var(--border-strong);
    background: rgba(15, 23, 42, 0.75);
}

.auth-doc-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-doc-card-icon.doc-id {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.auth-doc-card-icon.doc-work {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.auth-doc-card-icon.doc-wallet {
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
}

.auth-doc-card-icon svg {
    width: 20px;
    height: 20px;
}

.auth-doc-card-body strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.auth-doc-card-body span {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.45;
}

/* Steps */
.auth-steps {
    display: grid;
    gap: 0;
    margin-top: 4px;
    text-align: left;
}

.auth-step {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    position: relative;
}

.auth-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 44px;
    bottom: -2px;
    width: 2px;
    background: linear-gradient(180deg, var(--border-strong), transparent);
}

.auth-step-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-solid);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
    z-index: 1;
}

.auth-step-body strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.auth-step-body span {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.45;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
}

.btn-outline {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-outline:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.4);
}

.btn-lg {
    padding: 15px 20px;
    font-size: 0.9375rem;
}

.auth-connect-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-wallet-btn {
    justify-content: flex-start;
    padding-left: 16px;
}

.auth-wallet-btn .wallet-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Forms */
.form-group { margin-bottom: 12px; }

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(7, 11, 20, 0.6);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder { color: var(--muted-dim); }

/* Upload zones */
.auth-doc-grid { display: grid; gap: 10px; }

.auth-doc-item {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.auth-doc-item:hover,
.auth-doc-item.is-dragover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.04);
}

.auth-doc-item.uploaded {
    border-style: solid;
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.04);
}

.auth-doc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px 0;
    font-size: 0.875rem;
}

.auth-doc-head strong {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 14px 18px;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.auth-upload-zone svg {
    width: 24px;
    height: 24px;
    color: var(--muted);
    opacity: 0.7;
}

.auth-upload-zone span {
    font-size: 0.75rem;
    color: var(--muted);
}

.auth-upload-zone em {
    font-style: normal;
    font-size: 0.6875rem;
    color: var(--muted-dim);
}

.doc-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-pending {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-approved {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.auth-doc-list {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(7, 11, 20, 0.45);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.6;
}

.auth-wallet-connected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
    margin-top: 12px;
}

.auth-wallet-connected::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.hidden { display: none !important; }

/* Review */
.auth-review-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55dvh;
}

.auth-review-card {
    text-align: center;
    padding: 36px 24px;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
}

.auth-review-card h1 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 20px 0 10px;
}

.auth-review-card p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.875rem;
}

.auth-review-spinner {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto;
}

.auth-review-spinner .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    animation: spin 1.2s linear infinite;
}

.auth-review-spinner .ring-2 {
    inset: 10px;
    border-top-color: var(--accent);
    animation-duration: 1.8s;
    animation-direction: reverse;
}

.auth-review-spinner .pulse-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.auth-review-progress { margin-top: 24px; }

.progress-bar {
    height: 6px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    animation: progress 2.5s ease-in-out infinite;
}

.auth-review-status {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 0.875rem;
}

.auth-review-eta {
    font-size: 0.8125rem;
    color: var(--warning);
}

.auth-review-meta {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.auth-review-icon.approved {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--success-bg);
    border: 2px solid rgba(52, 211, 153, 0.3);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 32px rgba(52, 211, 153, 0.2);
}

.auth-rejected h1 { color: var(--danger); margin-bottom: 10px; }

.auth-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(7, 11, 20, 0.55);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--muted);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.4; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes progress { 0% { width: 20%; } 50% { width: 75%; } 100% { width: 35%; } }

@media (min-width: 480px) {
    .auth-hero h1 { font-size: 1.75rem; }
    .auth-hero-amount { font-size: 3rem; }
}
