:root {
    --primary-color: #e9571c;
    --secondary-color: #1a1c23;
    --auth-bg: #f4f7fa;
}

.auth-body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: #444;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(at 0% 0%, color-mix(in srgb, var(--primary-color) 12%, transparent) 0, transparent 50%),
        radial-gradient(at 100% 100%, hsla(210, 100%, 90%, 0.35) 0, transparent 50%);
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.auth-wrap.auth-wrap-wide {
    max-width: 640px;
}

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

.auth-logo img {
    max-height: 64px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}

.auth-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-card .subtitle {
    color: #777;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--secondary-color);
    opacity: 0.75;
    margin-bottom: 8px;
}

.auth-input-group {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.auth-input-group .icon {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #adb5bd;
}

.auth-input-group input,
.auth-input-group select {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 14px 14px 0;
    font-weight: 500;
    background: transparent;
}

.btn-auth-primary {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 75%, #fff));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-color) 30%, transparent);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 12px 22px color-mix(in srgb, var(--primary-color) 38%, transparent);
}

.btn-auth-outline {
    border: 2px solid #e5e9ef;
    background: #fff;
    color: var(--secondary-color);
    border-radius: 14px;
    padding: 12px 20px;
    font-weight: 700;
}

.auth-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.auth-alert-danger {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.auth-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

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

.auth-footer-links {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: #888;
}

/* Wizard steps */
.auth-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
}

.auth-step-dot {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: #e9ecef;
    transition: background 0.3s;
}

.auth-step-dot.active,
.auth-step-dot.done {
    background: var(--primary-color);
}

.auth-step-panel {
    display: none;
}

.auth-step-panel.active {
    display: block;
}

.auth-step-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.auth-step-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-step-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.auth-step-actions .btn-auth-primary,
.auth-step-actions .btn-auth-outline {
    flex: 1;
}

/* Camera */
.camera-box {
    position: relative;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    max-height: 320px;
}

.camera-box video,
.camera-box canvas,
.camera-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    gap: 10px;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.camera-actions button {
    flex: 1;
    min-width: 120px;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    border: none;
}

.btn-cam-start {
    background: var(--primary-color);
    color: #fff;
}

.btn-cam-capture {
    background: #16a34a;
    color: #fff;
}

.btn-cam-retake {
    background: #64748b;
    color: #fff;
}

.camera-note {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    line-height: 1.45;
}

.camera-note i {
    color: var(--primary-color);
}

/* Geolocation */
.geo-status {
    border: 2px dashed #e5e9ef;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    background: #fafbfc;
}

.geo-status.ok {
    border-color: #86efac;
    background: #f0fdf4;
}

.geo-status.error {
    border-color: #fecaca;
    background: #fef2f2;
}

.geo-status .geo-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: #94a3b8;
}

.geo-status.ok .geo-icon {
    color: #16a34a;
}

.geo-status.error .geo-icon {
    color: #dc2626;
}

.geo-coords {
    font-family: monospace;
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Signature */
.signature-wrap {
    border: 2px solid #e5e9ef;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    touch-action: none;
}

.signature-wrap canvas {
    display: block;
    width: 100%;
    height: 180px;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.signature-actions button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    background: #e9ecef;
    color: #495057;
}

.anti-fraud-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 16px;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 28px 20px;
    }

    .auth-wrap {
        max-width: 100%;
    }
}
