/*
 * Auth Pages — Login & Register
 * Split layout, clean minimal, professional
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

:root {
    --auth-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --auth-primary: #0d9488;
    --auth-primary-hover: #0f766e;
    --auth-primary-light: #f0fdfa;
    --auth-bg: #f5f7fa;
    --auth-surface: #ffffff;
    --auth-text: #111827;
    --auth-text-secondary: #6b7280;
    --auth-text-tertiary: #9ca3af;
    --auth-border: #e5e7eb;
    --auth-input-bg: #f9fafb;
    --auth-input-focus: rgba(13, 148, 136, 0.12);
    --auth-radius: 16px;
    --auth-radius-sm: 10px;
}

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

body.auth-page-body {
    font-family: var(--auth-font);
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--auth-bg);
    color: var(--auth-text);
    display: flex;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== SPLIT LAYOUT ===== */
.auth-wrap {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---- Left Panel: Branding ---- */
.auth-brand {
    flex: 1;
    background: linear-gradient(160deg, #0c1821 0%, #122a3a 40%, #0d3d34 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
    top: 20%;
    left: 30%;
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
    bottom: 10%;
    right: 10%;
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 380px;
}

.auth-brand-logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.2));
}

.auth-brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.auth-brand-desc {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    font-weight: 400;
}

.auth-brand-features {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.auth-brand-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.8125rem;
    font-weight: 500;
}

.auth-brand-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(13,148,136,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-brand-feature-icon i {
    font-size: 0.75rem;
    color: #2dd4bf;
}

.auth-brand-decoration {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    gap: 6px;
    z-index: 1;
}

.auth-brand-decoration span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.auth-brand-decoration span:first-child {
    background: var(--auth-primary);
    width: 24px;
    border-radius: 3px;
}

/* ---- Right Panel: Form ---- */
.auth-form-panel {
    width: 520px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--auth-surface);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    /* remove old card styles */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: 0;
}

/* Header */
.auth-header {
    margin-bottom: 2rem;
    text-align: left;
}

.auth-logo {
    display: none;
}

.auth-header-logo-mobile {
    display: none;
    height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--auth-text);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--auth-text-secondary);
    font-weight: 400;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--auth-radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
}

.auth-alert i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* WA Verifikasi Box */
.auth-wa-verifikasi {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--auth-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.auth-wa-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 0.25rem;
}

.auth-wa-desc {
    font-size: 0.8125rem;
    color: var(--auth-text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.auth-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #25d366;
    color: #fff;
    border-radius: var(--auth-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--auth-font);
    transition: background 0.15s;
}

.auth-wa-btn:hover {
    color: #fff;
    background: #1fb855;
}

.auth-wa-btn i {
    font-size: 1.125rem;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-text);
    letter-spacing: 0.01em;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.75rem;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    color: var(--auth-text);
    font-size: 0.875rem;
    font-family: var(--auth-font);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
    color: var(--auth-text-tertiary);
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-input-focus);
    background: #fff;
}

.auth-input.auth-input-otp {
    text-align: center;
    letter-spacing: 0.5em;
    font-size: 1.25rem;
    font-weight: 600;
}

.auth-hint {
    font-size: 0.75rem;
    color: var(--auth-text-tertiary);
    text-align: center;
    margin-top: 0.5rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-tertiary);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: color 0.15s;
}

.auth-password-toggle:hover {
    color: var(--auth-text-secondary);
}

.auth-password-toggle i {
    font-size: 0.875rem;
    display: block;
}

/* Row */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auth-checkbox-wrap input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-checkbox-wrap span {
    font-size: 0.8125rem;
    color: var(--auth-text-secondary);
}

.auth-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* Button */
.auth-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    margin-top: 0.5rem;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: var(--auth-radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    font-family: var(--auth-font);
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s;
}

.auth-btn:hover {
    background: var(--auth-primary-hover);
}

.auth-btn:active {
    transform: scale(0.99);
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    font-size: 0.8125rem;
    color: var(--auth-text-secondary);
}

.auth-footer a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-footer a:hover {
    color: var(--auth-primary-hover);
}

.auth-footer .auth-back-home {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--auth-border);
}

.auth-footer .auth-back-home a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-secondary);
}

.auth-footer .auth-back-home a:hover {
    color: var(--auth-primary);
}

.auth-copy {
    position: absolute;
    bottom: 1.5rem;
    text-align: center;
    width: 100%;
    left: 0;
    font-size: 0.6875rem;
    color: var(--auth-text-tertiary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .auth-form-panel {
        width: 440px;
        padding: 2.5rem;
    }

    .auth-brand { padding: 2rem; }
    .auth-brand-title { font-size: 1.5rem; }
    .auth-brand-logo { height: 60px; }
}

@media (max-width: 768px) {
    body.auth-page-body {
        background: var(--auth-surface);
    }

    .auth-wrap {
        flex-direction: column;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        width: 100%;
        flex: 1;
        padding: 2rem 1.5rem;
        justify-content: flex-start;
        padding-top: 3rem;
    }

    .auth-header-logo-mobile {
        display: block;
    }

    .auth-header {
        text-align: center;
    }

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

    .auth-copy {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 1.5rem 1.25rem;
        padding-top: 2rem;
    }

    .auth-title { font-size: 1.3rem; }

    .auth-header-logo-mobile {
        height: 42px;
        margin-bottom: 1.25rem;
    }
}

/* ===== ENTRY ANIMATION ===== */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: authFadeUp 0.4s ease both;
}

.auth-card .auth-header { animation: authFadeUp 0.4s ease 0.05s both; }
.auth-card .auth-form { animation: authFadeUp 0.4s ease 0.1s both; }
.auth-card .auth-footer { animation: authFadeUp 0.4s ease 0.15s both; }

@keyframes brandFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-brand-content {
    animation: brandFadeIn 0.6s ease 0.1s both;
}