:root {
    --primary-purple: #7C4DFF;
    --bg-gray: #F9FAFB;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --border-color: #E5E7EB;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: Inter, -apple-system, sans-serif; }

body { background-color: #fff; height: 100vh; overflow: hidden; color: var(--text-dark); }

.container-register { display: flex; height: 100%; width: 100%; }

/* Kiri: gambar + quote */
.image-side {
    flex: 1;
    position: relative;
    background: #2D2D2D;
    display: flex;
    align-items: flex-end;
    padding: 60px;
    color: #fff;
}

.image-side::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?auto=format&fit=crop&q=80&w=1000');
    background-size: cover;
    background-position: center;
    opacity: 0.85;
    z-index: 0;
}

.brand-overlay {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    z-index: 2;
}

.quote-content { position: relative; z-index: 2; max-width: 450px; }
.quote-content h2 { font-size: 2rem; margin-bottom: 20px; line-height: 1.3; font-weight: 800; }
.author-name { font-weight: 600; font-size: 1.1rem; }
.author-title { font-size: 0.9rem; opacity: 0.85; }

/* Kanan: form */
.form-side {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 40px;
    background-color: #fff;
    /* Supaya jika form kepanjangan, panel kanan bisa scroll sendiri */
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.form-container { width: 100%; max-width: 100%; }

.header-text { text-align: center; margin-bottom: 40px; }
.header-text h1 { font-size: 2rem; color: var(--text-dark); margin-bottom: 10px; }
.header-text p { color: var(--text-gray); line-height: 1.5; }

.auth-alert {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    background: #F9FAFB;
    color: var(--text-gray);
    text-align: center;
}

.input-group { margin-bottom: 18px; position: relative; }
.input-group label { display: block; font-size: 0.85rem; color: var(--text-gray); margin-bottom: 6px; margin-left: 12px; }
.input-group input, .input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.input-group input:focus, .input-group select:focus { border-color: var(--primary-purple); box-shadow: 0 0 0 2px rgba(124,77,255,0.08); }

.field-error { color: #B91C1C; font-size: 0.85rem; margin-top: 6px; padding-left: 12px; }

.forgot-pass { display: block; text-align: left; color: var(--primary-purple); text-decoration: none; font-size: 0.9rem; font-weight: 600; margin-bottom: 14px; }

.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: "";
    height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-purple); }
input:checked + .slider:before { transform: translateX(20px); }

.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-purple);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 18px;
}
.btn-primary:hover { filter: brightness(1.03); }

.divider {
    display: flex; align-items: center; text-align: center;
    margin: 20px 0; color: #ccc; font-size: 0.8rem;
}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }

.footer-text { text-align: center; margin-top: 14px; font-size: 0.92rem; color: var(--text-gray); }
.footer-text a { color: var(--primary-purple); text-decoration: none; font-weight: 700; }

/* =========================
   Konfirmasi Register Modal
   ========================= */
#registerConfirmModal .modal-content {
    border-radius: 16px;
    border: 1px solid rgba(124, 77, 255, 0.15);
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
    overflow: hidden;
}

#registerConfirmModal .modal-header {
    border-bottom: 0;
    padding: 16px 20px;
}

#registerConfirmModal .modal-title {
    font-weight: 800;
    color: var(--text-dark);
}

#registerConfirmModal .modal-body {
    padding: 0 20px 14px;
    color: var(--text-gray);
    font-size: 0.98rem;
    line-height: 1.55;
}

#registerConfirmModal .modal-footer {
    padding: 12px 20px 20px;
    display: flex;
    gap: 12px;
    border-top: 0;
}

#registerConfirmModal .modal-footer .btn {
    flex: 1;
    border-radius: 12px;
    font-weight: 800;
    padding: 10px 14px;
}

#registerConfirmModal .btn-register-cancel {
    background: #F3F4F6;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

#registerConfirmModal .btn-register-confirm {
    background: var(--primary-purple);
    border: 1px solid var(--primary-purple);
    color: #fff;
}

/* =========================
   Error Register Modal
   ========================= */
#registerErrorModal .modal-content {
    border-radius: 16px;
    border: 1px solid rgba(124, 77, 255, 0.15);
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
    overflow: hidden;
}

#registerErrorModal .modal-header {
    border-bottom: 0;
    padding: 16px 20px;
}

#registerErrorModal .modal-title {
    font-weight: 800;
    color: var(--text-dark);
}

#registerErrorModal .modal-body {
    padding: 0 20px 14px;
    color: var(--text-gray);
    font-size: 0.98rem;
}

#registerErrorModal .modal-footer {
    padding: 12px 20px 20px;
    border-top: 0;
}

#registerErrorModal .modal-footer .btn {
    border-radius: 12px;
    font-weight: 800;
    padding: 10px 14px;
}

@media (max-width: 1024px) {
    .image-side { display: none; }
    body { overflow: auto; }
    .container-register { height: auto; min-height: 100vh; }
    .form-side { max-height: none; overflow-y: visible; }
}
