/* ============================================================================
 * JAKONE TAXHUB - AUTHENTICATION DESIGN SYSTEM (LOGIN & REGISTER)
 * ============================================================================
 * Desain modern, profesional, eksekutif, mobile-friendly, dan berkinerja tinggi.
 * Kompatibel penuh dengan Tabler & FontAwesome.
 * ========================================================================== */

/* Pemuatan Font Inter Lokal Bebas External Render-Blocking */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
}

:root {
    --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Brand & Accent */
    --auth-primary: #0284c7;
    --auth-primary-hover: #0369a1;
    --auth-primary-dark: #075985;
    --auth-primary-subtle: #f0f9ff;
    --auth-primary-border: #bae6fd;

    /* Corporate Navy & Dark */
    --auth-navy-950: #090d16;
    --auth-navy-900: #0f172a;
    --auth-navy-800: #1e293b;
    --auth-navy-700: #334155;
    
    /* Grays & Neutrals */
    --auth-slate-600: #475569;
    --auth-slate-500: #64748b;
    --auth-slate-400: #94a3b8;
    --auth-slate-300: #cbd5e1;
    --auth-slate-200: #e2e8f0;
    --auth-slate-100: #f1f5f9;
    --auth-slate-50:  #f8fafc;
    
    /* Semantics */
    --auth-success: #10b981;
    --auth-success-subtle: #ecfdf5;
    --auth-warning: #f59f00;
    --auth-warning-subtle: #fffbeb;
    --auth-danger: #ef4444;
    --auth-danger-subtle: #fef2f2;
    
    /* Radii & Shadows */
    --auth-radius-shell: 20px;
    --auth-radius-card: 14px;
    --auth-radius-input: 10px;
    --auth-radius-btn: 10px;
    
    --auth-shadow-shell: 0 25px 60px -15px rgba(15, 23, 42, 0.12), 0 8px 24px -6px rgba(15, 23, 42, 0.05);
    --auth-shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --auth-shadow-input-focus: 0 0 0 3.5px rgba(2, 132, 199, 0.18);
    --auth-trans: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Body Auth Canvas */
body.auth-page {
    font-family: var(--auth-font);
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(241, 245, 249, 0.6) 0px, transparent 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1e293b;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.auth-viewport {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Shell Card Pembungkus */
.auth-shell {
    width: 100%;
    max-width: 1060px;
    background: #ffffff;
    border-radius: var(--auth-radius-shell);
    border: 1px solid var(--auth-slate-200);
    box-shadow: var(--auth-shadow-shell);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    transition: var(--auth-trans);
}

.auth-shell--register {
    max-width: 1140px;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: 1.15fr 0.95fr;
    }
    
    .auth-shell--register {
        grid-template-columns: 1.22fr 0.88fr;
    }
}

/* ============================================================================
 * KOLOM KIRI: FORMULIR UTAMA (AUTH MAIN)
 * ========================================================================== */
.auth-main {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: #ffffff;
}

@media (max-width: 768px) {
    .auth-main {
        padding: 2rem 1.35rem;
    }
}

/* Brand Header */
.auth-brand-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.auth-brand-logo {
    height: 48px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    transition: var(--auth-trans);
}

.auth-brand-info {
    border-left: 2px solid var(--auth-slate-200);
    padding-left: 0.85rem;
    display: flex;
    flex-direction: column;
}

.auth-brand-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--auth-primary);
    text-transform: uppercase;
}

.auth-brand-sub {
    font-size: 0.785rem;
    color: var(--auth-slate-500);
    font-weight: 500;
}

/* Title & Subtitle */
.auth-heading {
    margin-bottom: 1.75rem;
}

.auth-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--auth-navy-900);
    letter-spacing: -0.025em;
    margin: 0 0 0.4rem 0;
    line-height: 1.25;
}

.auth-subtitle {
    font-size: 0.915rem;
    color: var(--auth-slate-500);
    margin: 0;
    line-height: 1.5;
}

/* Alert Notification */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 1.5rem;
    animation: authFadeIn 0.3s ease-out;
}

.auth-alert--danger {
    background: var(--auth-danger-subtle);
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert--success {
    background: var(--auth-success-subtle);
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-alert-icon {
    font-size: 1.05rem;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Form Controls */
.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.835rem;
    font-weight: 600;
    color: var(--auth-navy-700);
    margin-bottom: 0.45rem;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--auth-slate-400);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--auth-trans);
    z-index: 2;
}

.auth-input,
.auth-select {
    width: 100%;
    height: 48px;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    font-family: var(--auth-font);
    font-size: 0.935rem;
    color: var(--auth-navy-900);
    background: #ffffff;
    border: 1.5px solid var(--auth-slate-300);
    border-radius: var(--auth-radius-input);
    transition: var(--auth-trans);
    outline: none;
}

.auth-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 16px;
    padding-right: 2.75rem;
    cursor: pointer;
}

.auth-input:focus,
.auth-select:focus {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-shadow-input-focus);
}

.auth-input:focus + .auth-input-icon,
.auth-select:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

.auth-input::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

.auth-input.is-invalid,
.auth-select.is-invalid {
    border-color: var(--auth-danger) !important;
    background-color: #fff5f5;
}

/* Proteksi tabrakan teks kata sandi dengan tombol toggle */
.auth-input-wrap .auth-input[type="password"],
.auth-input--password,
#password-input {
    padding-right: 2.85rem !important;
}

/* Toggle Password Button - Presisi Geometris & Aksesibilitas */
.auth-toggle-pwd {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--auth-slate-400);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--auth-trans);
    z-index: 3;
}

.auth-toggle-pwd:hover {
    color: var(--auth-navy-700);
    background: var(--auth-slate-100);
}

.auth-toggle-pwd:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 1px;
}

.auth-toggle-pwd i {
    line-height: 1;
    display: block;
}

/* Captcha Module Box */
.auth-captcha-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1.5px solid var(--auth-slate-200);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.35rem;
}

.auth-captcha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.auth-captcha-header span,
.auth-captcha-label {
    font-size: 0.815rem;
    font-weight: 700;
    color: var(--auth-navy-700);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.auth-captcha-btn-reload {
    background: transparent;
    border: 1px solid var(--auth-slate-300);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--auth-slate-600);
    padding: 0.22rem 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: var(--auth-trans);
}

.auth-captcha-btn-reload:hover {
    background: var(--auth-slate-100);
    color: var(--auth-primary);
    border-color: var(--auth-primary-border);
}

.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-captcha-img-wrap {
    height: 48px;
    flex: 1 1 auto;
    background: #ffffff;
    border: 1px solid var(--auth-slate-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
}

.auth-captcha-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.auth-captcha-input {
    width: 140px;
    flex: 0 0 140px;
    height: 48px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--auth-navy-900);
    border: 1.5px solid var(--auth-slate-300);
    border-radius: 8px;
    outline: none;
    transition: var(--auth-trans);
}

.auth-captcha-input:focus {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-shadow-input-focus);
}

/* Primary CTA Button */
.btn-auth-primary {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--auth-font);
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: none;
    border-radius: var(--auth-radius-btn);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.32);
    cursor: pointer;
    transition: var(--auth-trans);
    text-decoration: none;
}

.btn-auth-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.42);
    transform: translateY(-1px);
    color: #ffffff;
}

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

.btn-auth-primary:disabled,
.btn-auth-primary.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn-auth-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 46px;
    padding: 0 1.25rem;
    font-size: 0.885rem;
    font-weight: 600;
    color: var(--auth-slate-700);
    background: #ffffff;
    border: 1.5px solid var(--auth-slate-300);
    border-radius: var(--auth-radius-btn);
    cursor: pointer;
    transition: var(--auth-trans);
    text-decoration: none;
}

.btn-auth-secondary:hover {
    background: var(--auth-slate-100);
    color: var(--auth-navy-900);
    border-color: var(--auth-slate-400);
}

/* Footer Link & Trust */
.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.885rem;
    color: var(--auth-slate-500);
}

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

.auth-footer a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-security-badge {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.745rem;
    color: var(--auth-slate-400);
}

.auth-security-badge i {
    color: var(--auth-success);
}

/* ============================================================================
 * KOLOM KANAN: EXECUTIVE BRAND SHOWCASE (AUTH ASIDE)
 * ========================================================================== */
.auth-aside {
    background: linear-gradient(150deg, #090d16 0%, #0f172a 45%, #0369a1 100%);
    padding: 3rem 2.5rem;
    color: #ffffff;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-aside {
        display: flex;
    }
}

.auth-aside::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.auth-aside::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -15%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.auth-aside-header {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.auth-aside-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7dd3fc;
    margin-bottom: 1.25rem;
}

.auth-aside-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 0.75rem 0;
    color: #ffffff;
}

.auth-aside-desc {
    font-size: 0.915rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

/* Feature Glass Cards */
.auth-features-list {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.auth-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.95rem 1.15rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    transition: var(--auth-trans);
}

.auth-feature-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-feature-content h4 {
    margin: 0 0 0.2rem 0;
    font-size: 0.885rem;
    font-weight: 700;
    color: #f8fafc;
}

.auth-feature-content p {
    margin: 0;
    font-size: 0.785rem;
    color: #94a3b8;
    line-height: 1.45;
}

/* Illustration inside Aside */
.auth-aside-illustration {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-aside-illustration img {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
}

/* Aside Footer */
.auth-aside-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    color: #94a3b8;
}

.auth-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #e2e8f0;
    font-weight: 500;
}

.auth-trust-pill i {
    color: #34d399;
}

/* ============================================================================
 * STEPPER WIZARD REGISTRASI (REGISTER.PHP)
 * ========================================================================== */
.auth-stepper-wrap {
    position: relative;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.auth-stepper-track-bg {
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--auth-slate-200);
    z-index: 1;
}

.auth-stepper-track-fill {
    position: absolute;
    top: 20px;
    left: 10%;
    height: 3px;
    background: var(--auth-primary);
    width: 0%;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.auth-stepper-steps {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
}

.auth-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: default;
    user-select: none;
}

.auth-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--auth-slate-300);
    color: var(--auth-slate-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: var(--auth-trans);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.auth-step-item.active .auth-step-circle {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.auth-step-item.completed .auth-step-circle {
    border-color: var(--auth-success);
    background: var(--auth-success);
    color: #ffffff;
}

.auth-step-title {
    font-size: 0.815rem;
    font-weight: 600;
    color: var(--auth-slate-500);
    transition: var(--auth-trans);
}

.auth-step-item.active .auth-step-title {
    color: var(--auth-navy-900);
    font-weight: 700;
}

.auth-step-item.completed .auth-step-title {
    color: var(--auth-success);
}

.auth-step-sub {
    font-size: 0.725rem;
    color: var(--auth-slate-400);
    display: block;
}

@media (max-width: 576px) {
    .auth-step-sub {
        display: none;
    }
    .auth-step-circle {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}

/* Form Steps Visibility */
.auth-step-pane {
    display: none;
}

.auth-step-pane.active {
    display: block;
    animation: authFadeIn 0.35s ease-out;
}

/* Password Strength Indicator */
.auth-pwd-meter {
    margin-top: 0.5rem;
}

.auth-pwd-meter-bars {
    display: flex;
    gap: 4px;
    height: 5px;
    margin-bottom: 0.4rem;
}

.auth-pwd-meter-seg {
    flex: 1;
    height: 100%;
    background: var(--auth-slate-200);
    border-radius: 3px;
    transition: background-color 0.25s ease;
}

.auth-pwd-meter-text {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    color: var(--auth-slate-500);
}

.auth-pwd-reqs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--auth-slate-50);
    border: 1px solid var(--auth-slate-200);
    border-radius: 8px;
    font-size: 0.75rem;
}

.auth-pwd-req-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--auth-slate-500);
    transition: var(--auth-trans);
}

.auth-pwd-req-item.valid {
    color: var(--auth-success);
    font-weight: 600;
}

.auth-pwd-req-item.valid i {
    color: var(--auth-success);
}

/* Password Match Indicator */
.auth-pwd-match-hint {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.auth-pwd-match-hint.match {
    color: var(--auth-success);
}

.auth-pwd-match-hint.nomatch {
    color: var(--auth-danger);
}

/* Animasi */
@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pencegahan Auto-Zoom iOS Safari (Font Input Minimal 16px pada Layar Seluler) */
@media (max-width: 768px) {
    .auth-input,
    .auth-select {
        font-size: 16px !important;
    }
}
