/* ==========================================================================
   Halaman Autentikasi Guest (Login, Lupa Password, Password Baru)
   Layout dua kolom: panel branding + kartu form.
   Tidak bergantung pada utility framework tertentu.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Dasar halaman
   -------------------------------------------------------------------------- */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #eef4f9;
    font-family: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #33424f;
    -webkit-font-smoothing: antialiased;
}

.auth-body *,
.auth-body *::before,
.auth-body *::after {
    box-sizing: border-box;
}

.auth-page {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* --------------------------------------------------------------------------
   2. Panel branding (kiri)
   -------------------------------------------------------------------------- */
.auth-aside {
    flex: 0 0 42%;
    max-width: 42%;
    background: linear-gradient(160deg, #0d3b66 0%, #10527f 55%, #0b6b5f 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    position: relative;
    overflow: hidden;
}

/* Ornamen lingkaran dekoratif */
.auth-aside::before,
.auth-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.auth-aside::before {
    width: 320px;
    height: 320px;
    top: -110px;
    right: -90px;
}

.auth-aside::after {
    width: 240px;
    height: 240px;
    bottom: -80px;
    left: -70px;
}

.auth-aside-inner {
    position: relative;
    z-index: 1;
    max-width: 400px;
    width: 100%;
}

.auth-aside-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 34px;
}

.auth-aside-brand:hover,
.auth-aside-brand:focus {
    text-decoration: none;
}

.auth-aside-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.auth-aside-brand-name {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.auth-aside-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px;
    color: #ffffff;
}

.auth-aside-text {
    font-size: 14.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 28px;
}

.auth-aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-aside-list > li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.auth-aside-list > li:last-child {
    margin-bottom: 0;
}

.auth-aside-list i {
    color: #5ddbc4;
    font-size: 15px;
    line-height: 1.55;
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   3. Panel form (kanan)
   -------------------------------------------------------------------------- */
.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    padding: 34px 34px 26px;
    box-shadow: 0 18px 48px rgba(13, 59, 102, 0.13);
    border: 1px solid #e5edf5;
}

.auth-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.auth-card-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.auth-card-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7b8a;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    background: #f1f6fa;
    transition: background 0.2s ease, color 0.2s ease;
}

.auth-card-home:hover,
.auth-card-home:focus {
    background: #e2eef7;
    color: #0d3b66;
    text-decoration: none;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #0d3b66;
    margin: 0 0 6px;
    line-height: 1.3;
}

.auth-subtitle {
    font-size: 14px;
    color: #6b7b8a;
    margin: 0 0 22px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. Alert
   -------------------------------------------------------------------------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.auth-alert i {
    flex: 0 0 auto;
    font-size: 15px;
    margin-top: 2px;
}

.auth-alert-success {
    background: #e7f8f4;
    border: 1px solid #a8e3d6;
    color: #0d6b57;
}

.auth-alert-danger {
    background: #fdecec;
    border: 1px solid #f5c2c2;
    color: #8f1f1f;
}

.auth-alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-alert-list > li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 3px;
}

.auth-alert-list > li:last-child {
    margin-bottom: 0;
}

.auth-alert-list > li::before {
    content: "\f111";
    font-family: FontAwesome;
    font-size: 4px;
    position: absolute;
    left: 0;
    top: 7px;
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   5. Field
   -------------------------------------------------------------------------- */
.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #33424f;
    margin-bottom: 6px;
}

.auth-req {
    color: #d9534f;
}

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

.auth-input-icon {
    position: absolute;
    left: 14px;
    font-size: 14px;
    color: #8fa2b3;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 40px;
    font-size: 14px;
    color: #22303c;
    background: #f8fbfd;
    border: 1px solid #d5e2ee;
    border-radius: 9px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.auth-input::placeholder {
    color: #a3b4c2;
}

.auth-input:hover {
    border-color: #bcd2e4;
}

.auth-input:focus {
    background: #ffffff;
    border-color: #00A693;
    box-shadow: 0 0 0 3px rgba(0, 166, 147, 0.14);
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: #00A693;
}

.auth-input.is-invalid {
    border-color: #dc3545;
    background: #fffafa;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.14);
}

/* Input dengan tombol mata */
.auth-input-password {
    padding-right: 46px;
}

.auth-toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #8fa2b3;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-toggle-password:hover,
.auth-toggle-password:focus {
    color: #0d3b66;
    background: #eef4f9;
    outline: none;
}

/* Pesan error & hint */
.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #c9302c;
    line-height: 1.5;
}

.auth-error i {
    margin-top: 2px;
    flex: 0 0 auto;
}

.auth-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: #7a8b99;
    line-height: 1.5;
}

.auth-hint.is-ok {
    color: #17846b;
    font-weight: 600;
}

.auth-hint.is-error {
    color: #c9302c;
    font-weight: 600;
}

.auth-turnstile {
    margin: 18px 0 16px;
}

/* --------------------------------------------------------------------------
   6. Tombol
   -------------------------------------------------------------------------- */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 11px 20px;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 9px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    font-family: inherit;
    transition: background 0.22s ease, color 0.22s ease,
        border-color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
}

.auth-btn:hover,
.auth-btn:focus {
    text-decoration: none;
}

.auth-btn-primary {
    background: #00A693;
    border-color: #00A693;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 166, 147, 0.26);
}

.auth-btn-primary:hover,
.auth-btn-primary:focus {
    background: #00897b;
    border-color: #00897b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 166, 147, 0.34);
}

.auth-btn-primary:disabled {
    background: #8ecfc6;
    border-color: #8ecfc6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-btn-outline {
    background: #ffffff;
    border-color: #cfdeea;
    color: #0d3b66;
}

.auth-btn-outline:hover,
.auth-btn-outline:focus {
    background: #f4f9fd;
    border-color: #00A693;
    color: #00776a;
}

/* --------------------------------------------------------------------------
   7. Divider & footer kartu
   -------------------------------------------------------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: #93a4b2;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e5edf5;
}

.auth-foot {
    margin: 18px 0 0;
    text-align: center;
    font-size: 13px;
    color: #6b7b8a;
    line-height: 1.6;
}

.auth-foot a {
    color: #00A693;
    font-weight: 700;
    text-decoration: none;
}

.auth-foot a:hover,
.auth-foot a:focus {
    text-decoration: underline;
}

.auth-copy {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eef3f8;
    text-align: center;
    font-size: 11.5px;
    color: #93a4b2;
}

/* Contact Person pendaftaran (WhatsApp Only) */
.auth-cp {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 11px 14px;
    border: 1px solid #d7f2e3;
    border-radius: 10px;
    background: #f2fcf7;
    font-size: 12.5px;
    line-height: 1.55;
    color: #4a5b68;
}

.auth-cp > i {
    color: #25D366;
    font-size: 15px;
    line-height: 1.45;
    flex: 0 0 auto;
}

.auth-cp a {
    color: #128450;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: break-word;
}

.auth-cp a:hover,
.auth-cp a:focus {
    text-decoration: underline;
}

.auth-cp-note {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 10px;
    background: #d9f7e6;
    color: #1a9e56;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   8. Aksesibilitas
   -------------------------------------------------------------------------- */
.auth-input:focus-visible,
.auth-btn:focus-visible,
.auth-toggle-password:focus-visible,
.auth-card-home:focus-visible {
    outline: 2px solid #00A693;
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   9. Responsif
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-aside {
        flex: 0 0 auto;
        max-width: 100%;
        padding: 30px 24px;
        text-align: center;
    }

    .auth-aside-inner {
        max-width: 520px;
    }

    .auth-aside-brand {
        justify-content: center;
        margin-bottom: 18px;
    }

    .auth-aside-logo {
        height: 44px;
    }

    .auth-aside-title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .auth-aside-text {
        font-size: 13.5px;
        margin-bottom: 0;
    }

    /* Daftar fitur disembunyikan agar panel atas ringkas */
    .auth-aside-list {
        display: none;
    }

    .auth-main {
        padding: 26px 18px 36px;
    }

    .auth-card {
        padding: 26px 22px 22px;
        border-radius: 14px;
    }
}

@media (max-width: 575px) {
    .auth-aside {
        padding: 24px 18px;
    }

    .auth-aside-title {
        font-size: 19px;
    }

    .auth-aside-text {
        display: none;
    }

    .auth-main {
        padding: 18px 14px 30px;
    }

    .auth-card {
        padding: 22px 18px 18px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-input {
        height: 44px;
        font-size: 16px;
        /* cegah auto-zoom iOS saat fokus */
    }

    .auth-card-home span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .auth-btn,
    .auth-input,
    .auth-toggle-password,
    .auth-card-home {
        transition: none !important;
    }
}
