/* ===========================
   AUTH PAGES (Login & Register)
   =========================== */

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

body.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1e;
    color: #1a1a2e;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Layout Split ---------- */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ==================
   FORM SIDE (KIRI)
   ================== */
.auth-form-side {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    overflow-y: auto;
    max-height: 100vh;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Brand */
.auth-brand { margin-bottom: 32px; }
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(102,126,234,0.35);
}
.brand-name {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a2e;
}

/* Header */
.auth-header { margin-bottom: 28px; }
.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.auth-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.4;
}
.alert svg { flex-shrink: 0; }
.alert-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}
.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.alert a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Form */
.auth-form { margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.2s;
}
.input-wrap input {
    width: 100%;
    padding: 13px 44px 13px 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fafafa;
    transition: all 0.2s;
}
.input-wrap input::placeholder { color: #9ca3af; }
.input-wrap input:hover { border-color: #d1d5db; background: #fff; }
.input-wrap input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.12);
}
.input-wrap input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon {
    color: #667eea;
}

.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: all 0.2s;
}
.toggle-pass:hover { color: #667eea; background: #f3f4f6; }
.toggle-pass:active { transform: scale(0.95); }

.form-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Button */
.btn-auth {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(102,126,234,0.35);
    letter-spacing: 0.2px;
}
.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(102,126,234,0.45);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth svg { transition: transform 0.2s; }
.btn-auth:hover svg { transform: translateX(3px); }

/* Alt & Footer */
.auth-alt {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}
.auth-alt a {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
}
.auth-alt a:hover { text-decoration: underline; }

.auth-footer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

/* ==================
   BG SIDE (KANAN)
   ================== */
.auth-bg-side {
    position: relative;
    background-image: url('/assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}
.auth-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.85) 0%, rgba(118,75,162,0.88) 100%);
    z-index: 1;
}
.auth-bg-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 480px;
    width: 100%;
}

.bg-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}
.bg-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74,222,128,0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74,222,128,0.7); }
    70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.auth-bg-content h2 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.auth-bg-content > p {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
}

.bg-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}
.bg-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
}
.bg-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.bg-feature strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.bg-feature span {
    font-size: 12px;
    opacity: 0.85;
}

.bg-testimonial {
    padding: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
}
.bg-stars {
    color: #fbbf24;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.bg-testimonial p {
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
    opacity: 0.95;
    margin-bottom: 8px;
}
.bg-author {
    font-size: 12px;
    opacity: 0.75;
    font-weight: 600;
}

/* ==================
   RESPONSIVE (MOBILE)
   ================== */
@media (max-width: 900px) {
    .auth-split {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }
    .auth-bg-side { display: none; }

    .auth-form-side {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 24px 16px;
        min-height: 100vh;
        max-height: none;
        position: relative;
        overflow: hidden;
    }

    /* Background image di mobile (opsional) */
    .auth-form-side::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url('/assets/bg.jpg');
        background-size: cover;
        background-position: center;
        opacity: 0.15;
        z-index: 0;
    }
    .auth-form-side::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(102,126,234,0.92) 0%, rgba(118,75,162,0.95) 100%);
        z-index: 1;
    }

    .auth-form-wrapper {
        position: relative;
        z-index: 2;
        background: #fff;
        padding: 32px 24px;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.25);
        max-width: 440px;
        margin: auto;
    }

    .auth-brand { display: none; }
    .auth-header h1 { font-size: 24px; }
    .auth-bg-content h2 { font-size: 28px; }
    .auth-footer { display: none; }
}

@media (max-width: 400px) {
    .auth-form-wrapper { padding: 24px 18px; }
    .auth-header h1 { font-size: 22px; }
    .input-wrap input { padding: 12px 40px 12px 40px; font-size: 13px; }
    .btn-auth { padding: 13px 18px; font-size: 14px; }
}
/* ==================
   EXTRA STYLE UNTUK LOGIN
   ================== */

/* Form extra row (remember + forgot) */
.form-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #4b5563;
    font-weight: 500;
    user-select: none;
}
.remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
}
.forgot-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive tweak untuk layout reverse */
@media (max-width: 900px) {
    .auth-split.reverse .auth-form-wrapper {
        margin: auto;
    }
}
/* ==================
   BACK TO HOME LINK
   ================== */

/* Brand wrapper jadi flex horizontal */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* Link kembali ke beranda */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    white-space: nowrap;
}
.back-home:hover {
    color: #667eea;
    background: #f0f4ff;
    border-color: #c7d2fe;
    transform: translateX(-2px);
}
.back-home svg {
    transition: transform 0.2s;
}
.back-home:hover svg {
    transform: translateX(-3px);
}

/* Auth footer dengan link */
.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Mobile: brand center, back-home full width */
@media (max-width: 900px) {
    .auth-brand {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .back-home {
        justify-content: center;
        padding: 10px 14px;
    }
}