/* =============================================
   AUTH LOGIN - SEMAR LLDIKTI WILAYAH IV
   Letakkan di: resources/css/auth-login.css
   Lalu import di resources/css/app.css:
   @import './auth-login.css';
   ============================================= */

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

:root {
    --blue-50: #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-500: #2563EB;
    --blue-600: #1D4ED8;
    --blue-700: #1E40AF;
    --blue-900: #1E3A6E;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #FFFFFF;
    --red-500: #EF4444;
    --red-50: #FEF2F2;
}

body.auth-page {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #F0F4FF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 10%, #DBEAFE 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, #EDE9FE 0%, transparent 60%);
}

.login-wrapper {
    width: 100%;
    max-width: 980px;
    padding: 1rem;
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    min-height: 560px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 20px 60px -10px rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(219, 234, 254, 0.8);
}

/* ---- LEFT PANEL ---- */
.left-panel {
    flex: 1;
    background: linear-gradient(145deg, #2563EB 0%, #1D4ED8 40%, #1E3A6E 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.panel-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.panel-logo img {
    height: auto;
    max-width: 180px;
}

.panel-content {
    z-index: 1;
}

.panel-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
}

.panel-title {
    color: var(--white);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.panel-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 260px;
}

.panel-dots {
    display: flex;
    gap: 8px;
    z-index: 1;
}

.panel-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.panel-dots span:first-child {
    background: rgba(255, 255, 255, 0.85);
    width: 22px;
    border-radius: 4px;
}

/* ---- RIGHT PANEL ---- */
.right-panel {
    flex: 1;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.form-header p {
    font-size: 13.5px;
    color: var(--gray-500);
}

/* ---- FORM ELEMENTS ---- */
.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
}

.input-wrap i.left-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 14px;
    pointer-events: none;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.field input:focus {
    border-color: var(--blue-500);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.field input.is-invalid {
    border-color: var(--red-500);
    background: var(--red-50);
}

.invalid-feedback {
    font-size: 12px;
    color: var(--red-500);
    margin-top: 4px;
}

.toggle-password {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-400);
    font-size: 14px;
    padding: 4px;
}

/* ---- CAPTCHA ---- */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.captcha-row img {
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
}

.btn-refresh {
    height: 40px;
    width: 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.btn-refresh:hover {
    border-color: var(--blue-500);
    color: var(--blue-500);
}

/* ---- REMEMBER ---- */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue-500);
    cursor: pointer;
}

.remember-row label {
    font-size: 13px;
    color: var(--gray-500);
    cursor: pointer;
}

/* ---- BUTTONS ---- */
.btn-login {
    width: 100%;
    height: 46px;
    background: var(--blue-600);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.01em;
}

.btn-login:hover {
    background: var(--blue-700);
}

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

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
}

.divider span {
    font-size: 12px;
    color: var(--gray-400);
    white-space: nowrap;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.btn-secondary {
    width: 100%;
    height: 44px;
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
}

.btn-secondary:hover {
    border-color: var(--blue-500);
    color: var(--blue-600);
    background: var(--blue-50);
}

/* ---- FOOTER ---- */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.form-footer a {
    font-size: 12.5px;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.15s;
}

.form-footer a:hover {
    color: var(--blue-600);
}

/* ---- ALERTS ---- */
.alert-session {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--blue-700);
    margin-bottom: 16px;
}

.error-block {
    font-size: 12.5px;
    color: var(--red-500);
    text-align: center;
    margin-top: 8px;
}

/* ---- SSO BADGE ---- */
.sso-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blue-50);
    color: var(--blue-600);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--blue-100);
    margin-bottom: 8px;
}

/* ---- RESPONSIVE MOBILE ---- */
@media (max-width: 640px) {
    body.auth-page {
        align-items: stretch;
        padding: 0;
        background-image: none;
        background-color: #1D4ED8;
    }

    .login-wrapper {
        padding: 0;
        max-width: 100%;
        width: 100%;
        height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .login-card {
        flex-direction: column;
        border-radius: 0;
        border: none;
        box-shadow: none;
        flex: 1;
        min-height: 0;
        height: 100%;
    }

    /* ---- TOP: Blue section — logo kiri, teks kanan (vertikal center) ---- */
    .left-panel {
        display: flex;
        flex: 0 0 35%;
        flex-direction: row;
        align-items: flex-start;
        /* Logo tetap di atas */
        justify-content: space-between;
        padding: 32px 24px;
        border-radius: 0;
        min-height: 0;
    }

    .left-panel::before {
        display: none;
    }

    .left-panel::after {
        display: none;
    }

    /* Logo tanpa background lingkaran karena gambar aslinya sudah punya */
    .panel-logo {
        flex-shrink: 0;
    }

    .panel-logo img {
        height: auto;
        max-width: 130px;
    }

    .panel-content {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        /* Rata kanan horizontal */
        align-self: center;
        /* Rata tengah vertikal HANYA untuk teks ini */
        text-align: right;
        gap: 2px;
    }

    .panel-title {
        font-size: 2.2rem !important;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 2px;
        margin-bottom: 0;
    }

    .panel-sub {
        font-size: 12px;
        max-width: 190px;
        line-height: 1.4;
        opacity: 0.85;
        margin: 0;
    }

    .panel-dots {
        display: none;
    }

    /* ---- BOTTOM: White form — dengan curve atas yang besar ---- */
    .right-panel {
        flex: 1;
        min-height: 0;
        padding: 30px 24px 20px;
        overflow-y: auto;
        border-radius: 36px 36px 0 0;
        background: #fff;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        /* Tarik sedikit ke atas agar curve overlap di biru */
        margin-top: -20px;
    }

    /* Handle bar di atas form */
    .right-panel::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
        margin: 0 auto 22px;
    }

    .form-header {
        margin-bottom: 16px;
    }

    .form-header h2 {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .form-header p {
        font-size: 12.5px;
    }

    .field {
        margin-bottom: 10px;
    }

    .field input[type="email"],
    .field input[type="password"],
    .field input[type="text"] {
        height: 40px;
        font-size: 13px;
    }

    .remember-row {
        margin-bottom: 14px;
    }

    .btn-login {
        height: 42px;
        font-size: 13.5px;
    }

    .divider {
        margin: 10px 0;
    }

    .btn-secondary {
        height: 40px;
        font-size: 13px;
    }
}