/**
 * Register Page Styles - Konsisten dengan halaman Login
 */

:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --primary: #1e88e5;
    --primary-dark: #1565c0;
    --secondary: #64b5f6;
    --accent: #ffb74d;
    --text-main: #1a237e;
    --text-muted: #546e7a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e0f2f1 0%, #e3f2fd 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 30px 15px;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* Decorative blobs - sama dengan login */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.5;
}
body::before {
    background: var(--secondary);
    top: -100px;
    right: -100px;
}
body::after {
    background: var(--accent);
    bottom: -100px;
    left: -100px;
}

/* Main card - glassmorphism sama dengan login */
.register-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
}

/* Header register */
.register-header {
    padding: 35px 35px 25px;
    text-align: center;
}

.register-header h2 {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.register-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Body */
.register-body {
    padding: 30px 35px 40px;
}

/* Section titles */
.section-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Form labels */
.form-label {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    font-size: 0.875rem;
}

/* Form controls */
.form-control, .form-select {
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 11px 15px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.5);
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
    color: var(--text-main);
}

.form-control:focus, .form-select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #b0bec5;
    font-size: 0.9rem;
}

/* Input group */
.input-group-text {
    background: rgba(30, 136, 229, 0.08);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    color: var(--primary);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border-radius: 14px 0 0 14px;
}

.input-group .form-control {
    border-radius: 0 14px 14px 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 14px;
    padding: 13px 24px;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s;
    box-shadow: 0 10px 20px -5px rgba(30, 136, 229, 0.4);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(30, 136, 229, 0.5);
    filter: brightness(1.05);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 10px -3px rgba(30, 136, 229, 0.3);
}

.btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    border-radius: 14px;
    font-weight: 600;
    background: transparent;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background: rgba(30, 136, 229, 0.06);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Verification section */
.verification-section {
    background: linear-gradient(135deg, rgba(30,136,229,0.05) 0%, rgba(30,136,229,0.1) 100%);
    border-radius: 18px;
    padding: 20px;
    margin-top: 15px;
    border: 1.5px solid rgba(30, 136, 229, 0.2);
}

.otp-input {
    font-size: 26px;
    text-align: center;
    letter-spacing: 12px;
    font-weight: 700;
    color: var(--primary);
    border: 1.5px solid rgba(30, 136, 229, 0.3);
    border-radius: 14px;
    background: white;
    font-family: 'Outfit', monospace;
}

.otp-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}

.countdown {
    font-size: 14px;
    color: #e74c3c;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Map */
.map-container {
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid rgba(30, 136, 229, 0.2);
    margin-top: 12px;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.location-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(30,136,229,0.35);
    transition: all 0.2s;
}

.location-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30,136,229,0.4);
}

/* Validation styles */
.is-valid {
    border-color: #27ae60 !important;
}
.is-invalid {
    border-color: #e74c3c !important;
}

/* Typography helpers */
.required-star {
    color: #e74c3c;
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Login link */
.login-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .register-body {
        padding: 20px 20px 30px;
    }
    .register-header {
        padding: 25px 20px 20px;
    }
    .register-header h2 {
        font-size: 1.5rem;
    }
}

/* ═══ DARK MODE (OS PREFERENCE) ═════════════════════ */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(16, 24, 39, 0.85);
        --glass-border: rgba(255, 255, 255, 0.1);
        --primary: #3b82f6;
        --primary-dark: #2563eb;
        --text-main: #f3f4f6;
        --text-muted: #9ca3af;
    }
    body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
    .form-control, .form-select, .input-group-text {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f3f4f6;
    }
    .form-control:focus, .form-select:focus {
        background: rgba(30, 41, 59, 0.9);
        color: #f3f4f6;
    }
    .register-card {
        background: var(--glass-bg);
        border-color: var(--glass-border);
    }
    .section-title {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    .otp-input {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.15);
        color: var(--primary);
    }
}