/**
 * Sentra Aplikasi - Authentication Pages Styles
 * Login, Register, Forgot Password
 */

/* ============================================
   AUTH SECTION — Split Layout
   ============================================ */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Left Panel ─────────────────────────────── */
.auth-panel-left {
    flex: 0 0 42%;
    background: linear-gradient(145deg, #1D4ED8 0%, #2563EB 45%, #3B82F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    right: -150px;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    bottom: -80px;
    left: -80px;
}

.auth-panel-left-inner {
    position: relative;
    z-index: 1;
    max-width: 360px;
    width: 100%;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 3rem;
}

.auth-brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-brand span {
    font-weight: 800;
    font-size: 1.125rem;
    color: white;
    letter-spacing: 0.5px;
}

.auth-panel-headline h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.25;
    margin: 0 0 0.625rem 0;
}

.auth-panel-headline p {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.auth-feature-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-features li div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.auth-features li strong {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-features li span {
    color: rgba(255,255,255,0.7);
    font-size: 0.775rem;
    line-height: 1.4;
}

.auth-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* ── Right Panel ────────────────────────────── */
.auth-panel-right {
    flex: 1;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 1.25rem;
}

.auth-form-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.375rem 0;
}

.auth-form-header p {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0;
}

/* ── Alerts ─────────────────────────────────── */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.auth-alert-danger {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

.auth-alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}

/* ── Links ──────────────────────────────────── */
.auth-link {
    color: #2563EB;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}
.auth-link:hover { color: #1D4ED8; text-decoration: underline; }

.auth-link-small {
    font-size: 0.875rem;
    color: #2563EB;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.auth-link-small:hover { color: #1D4ED8; text-decoration: underline; }

/* ── Fields ─────────────────────────────────── */
.auth-field {
    margin-bottom: 0.875rem;
}

.auth-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.auth-field label i {
    color: #9CA3AF;
    font-size: 0.8125rem;
    width: 14px;
    text-align: center;
}

.auth-field input {
    width: 100%;
    padding: 0.55rem 0.875rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    background: #FFFFFF;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.auth-field.has-error input {
    border-color: #EF4444;
}

.auth-field.has-error input:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.auth-field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #DC2626;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

/* Password toggle */
.auth-field-password {
    position: relative;
}

.auth-field-password input {
    padding-right: 3rem;
}

.auth-pw-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 0.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.auth-pw-toggle svg {
    display: block;
    pointer-events: none;
}

.auth-pw-toggle:hover { color: #2563EB; }

/* ── Password Strength Bar ────────────────────────────────────── */
.pw-strength-bar {
    height: 4px;
    background: #E5E7EB;
    border-radius: 100px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 100px;
    transition: width 0.3s ease, background 0.3s ease;
}

.pw-strength-text {
    display: block;
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.25rem;
    transition: color 0.3s;
}

/* ── Remember / Forgot row ──────────────────── */
.auth-row-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    user-select: none;
}

.auth-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-checkbox-box {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid #D1D5DB;
    border-radius: 5px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.auth-checkbox input:checked + .auth-checkbox-box {
    background: #2563EB;
    border-color: #2563EB;
}

.auth-checkbox input:checked + .auth-checkbox-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* ── Submit Button ──────────────────────────── */
.auth-submit-btn {
    width: 100%;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    margin-bottom: 1.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    box-shadow: 0 6px 16px rgba(37,99,235,0.4);
    transform: translateY(-1px);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Back Link ──────────────────────────────── */
.auth-back-link {
    text-align: center;
}

.auth-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-back-link a:hover { color: #2563EB; }

/* ── Legacy compat (register/forgot) ────────── */
.auth-wrapper { max-width: 480px; margin: 0 auto; }
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 1px solid #E5E7EB;
    position: relative;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563EB 0%, #3B82F6 100%);
    border-radius: 16px 16px 0 0;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-title { font-size: 1.75rem; font-weight: 700; color: #111827; margin-bottom: 0.75rem; }
.auth-subtitle { color: #6B7280; margin: 0; }
.auth-form { margin-bottom: 1.5rem; }
.auth-divider { position: relative; text-align: center; margin: 1.5rem 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #E5E7EB; }
.auth-divider span { position: relative; display: inline-block; padding: 0 1rem; background: #fff; color: #9CA3AF; font-size: 0.8125rem; text-transform: uppercase; font-weight: 600; }
.password-input-wrapper { display: flex; gap: 0.5rem; align-items: center; }
.password-input-wrapper .form-control { flex: 1; }
.password-toggle { background: #F3F4F6; border: 1px solid #D1D5DB; cursor: pointer; padding: 10px; color: #6B7280; transition: all 0.15s; display: flex; align-items: center; justify-content: center; border-radius: 8px; height: 48px; width: 48px; flex-shrink: 0; }
.password-toggle:hover { color: #2563EB; background: #EFF6FF; border-color: #2563EB; }
.form-group-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input { width: 18px; height: 18px; cursor: pointer; accent-color: #2563EB; }
.form-check-label { font-size: 0.875rem; color: #374151; cursor: pointer; margin-bottom: 0; }
.form-control.is-invalid { border-color: #EF4444; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.alert-danger { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.875rem; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #15803D; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.875rem; }
.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.875rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .auth-panel-left { display: none; }
    .auth-panel-right {
        background: #F8FAFC;
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .auth-form-wrap { max-width: 100%; }
    .auth-form-header h1 { font-size: 1.5rem; }
    .auth-row-flex { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .auth-section { min-height: auto; }
}
