/* =========================================
   HALAMAN AUTH - I-SOFTWARE NEXGEN ACADEMY
   Dipakai oleh: login.php, register.php,
   lupa_password.php, reset_password.php
   Nuansa mengikuti shell dashboard (navy)
   ========================================= */

:root {
    --auth-navy: #061b55;
    --auth-navy-mid: #082d79;
    --auth-blue: #075bea;
    --auth-cyan: #08b9ed;
    --auth-purple: #7045e8;
    --auth-sky: #a8eaff;
    --auth-text: #eaf2ff;
    --auth-muted: #aebfdf;
    --auth-glass: rgba(6, 27, 85, .62);
    --auth-glass-soft: rgba(255, 255, 255, .08);
    --auth-line: rgba(255, 255, 255, .18);
    --auth-radius: 16px;
    --auth-shadow: 0 22px 55px rgba(3, 14, 43, .45);
}

/* SHELL */

body.auth-body {
    min-height: 100vh;
    margin: 0;
    padding: 30px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 14px;
    color: var(--auth-text);
    background: var(--auth-navy) url("../img/bg.jpg") center / cover no-repeat fixed;
}

/* Cahaya dekoratif mengikuti glow sidebar dashboard */
body.auth-body::before,
body.auth-body::after {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .38;
    pointer-events: none;
    z-index: 0;
}

body.auth-body::before {
    background: var(--auth-cyan);
    top: -130px;
    left: -110px;
}

body.auth-body::after {
    background: var(--auth-purple);
    bottom: -160px;
    right: -110px;
}

/* KARTU */

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 34px 32px;
    background: var(--auth-glass);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: authAppear .55s ease;
}

.auth-card.auth-card-wide {
    max-width: 820px;
    padding: 30px 34px;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        var(--auth-cyan),
        var(--auth-blue),
        var(--auth-purple),
        var(--auth-cyan)
    );
}

@keyframes authAppear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BRAND */

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 6px 14px rgba(8, 185, 237, .35));
}

.auth-brand h3 {
    margin: 0;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .4px;
}

.auth-brand p {
    margin: 7px 0 0;
    color: var(--auth-sky);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.auth-title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.auth-subtitle {
    margin: 0 0 20px;
    color: var(--auth-muted);
    font-size: 12px;
}

/* FORM */

.auth-card .form-label {
    margin-bottom: 7px;
    color: var(--auth-text);
    font-size: 12px;
    font-weight: 600;
}

.auth-card .form-control,
.auth-card .form-select {
    min-height: 47px;
    padding: 11px 14px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    background: var(--auth-glass-soft);
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    transition: .22s ease;
}

.auth-card textarea.form-control {
    min-height: 88px;
}

.auth-card .form-control::placeholder {
    color: rgba(234, 242, 255, .5);
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border-color: var(--auth-cyan);
    box-shadow: 0 0 0 4px rgba(8, 185, 237, .18);
}

/* Tombol lihat password */
.auth-card .btn-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    font-size: 15px;
    cursor: pointer;
    transition: .2s ease;
}

.auth-card .btn-eye:hover {
    color: var(--auth-sky);
    background: rgba(255, 255, 255, .12);
}

.auth-card .form-select option {
    color: #253858;
    background: #fff;
}

.auth-card .form-check-label,
.auth-card .form-text {
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-card .form-check-input {
    width: 1.15em;
    height: 1.15em;
    background-color: var(--auth-glass-soft);
    border: 1px solid var(--auth-line);
    cursor: pointer;
}

.auth-card .form-check-input:checked {
    background-color: var(--auth-blue);
    border-color: var(--auth-cyan);
}

.auth-card .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(8, 185, 237, .22);
    border-color: var(--auth-cyan);
}

/* TOMBOL */

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 11px 20px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(110deg,
        var(--auth-blue) 0%, var(--auth-cyan) 52%, var(--auth-purple) 100%);
    box-shadow: 0 8px 20px rgba(7, 91, 234, .25);
    transition: .25s ease;
}

.auth-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(7, 91, 234, .35);
    background: linear-gradient(110deg,
        #0645c5 0%, #0878ed 55%, #5b32cf 100%);
}

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

.auth-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 20px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    background: var(--auth-glass-soft);
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
}

.auth-btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border-color: var(--auth-cyan);
}

.auth-btn-sm {
    width: auto;
    min-height: 40px;
    padding: 8px 16px;
    font-size: 12px;
}

/* LINK & TEKS */

.auth-card a {
    color: var(--auth-cyan);
    font-weight: 600;
    text-decoration: none;
}

.auth-card a:hover {
    color: var(--auth-sky);
    text-decoration: underline;
}

.auth-hint {
    margin-top: 18px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 11px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--auth-muted);
    font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

/* ALERT */

.auth-card .alert {
    border-radius: 11px;
    border: 1px solid var(--auth-line);
    font-size: 12px;
    padding: 13px 15px;
}

.auth-card .alert-success {
    color: #9cf3d3;
    background: rgba(8, 168, 120, .16);
    border-color: rgba(50, 214, 164, .45);
}

.auth-card .alert-info {
    color: var(--auth-sky);
    background: rgba(8, 185, 237, .14);
    border-color: rgba(8, 185, 237, .4);
}

.auth-card .alert-warning {
    color: #ffe1a6;
    background: rgba(245, 155, 37, .16);
    border-color: rgba(255, 208, 92, .45);
}

.auth-card .alert-danger {
    color: #ffc2cc;
    background: rgba(220, 53, 69, .18);
    border-color: rgba(255, 128, 149, .45);
}

.auth-card .alert a {
    color: inherit;
    text-decoration: underline;
}

/* WAJAK MULTISTEP REGISTRASI */

.auth-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 24px 0 26px;
}

.auth-steps::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .16);
}

.step-item {
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.step-circle {
    width: 38px;
    height: 38px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--auth-line);
    background: rgba(6, 27, 85, .8);
    color: var(--auth-muted);
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}

.step-item.active .step-circle,
.step-item.done .step-circle {
    color: #fff;
    border-color: var(--auth-cyan);
    background: linear-gradient(135deg, var(--auth-blue), var(--auth-cyan));
    box-shadow: 0 4px 12px rgba(8, 185, 237, .35);
}

.step-item small {
    display: block;
    margin-top: 8px;
    color: var(--auth-muted);
    font-size: 11px;
}

.step-item.active small {
    color: var(--auth-sky);
    font-weight: 600;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: authFadeIn .3s ease;
}

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

.auth-section-title {
    margin: 0 0 4px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.auth-section-note {
    margin: 0 0 16px;
    color: var(--auth-muted);
    font-size: 12px;
}

/* PILIHAN ROLE */

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.role-option {
    position: relative;
}

.role-option input {
    position: absolute;
    opacity: 0;
}

.role-card {
    height: 100%;
    padding: 17px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-glass-soft);
    cursor: pointer;
    transition: .2s ease;
}

.role-card:hover {
    border-color: rgba(8, 185, 237, .6);
    background: rgba(255, 255, 255, .13);
}

.role-option input:checked + .role-card {
    border-color: var(--auth-cyan);
    background: rgba(7, 91, 234, .28);
    box-shadow: 0 0 0 3px rgba(8, 185, 237, .18);
}

.role-option input:focus-visible + .role-card {
    outline: 3px solid rgba(8, 185, 237, .55);
    outline-offset: 2px;
}

.role-card i {
    font-size: 27px;
    color: var(--auth-sky);
}

.role-card h6 {
    margin: 11px 0 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.role-card p {
    margin: 4px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
}

/* RINGKASAN & AKSI */

.auth-summary {
    padding: 13px 15px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    background: var(--auth-glass-soft);
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-summary strong {
    color: var(--auth-sky);
}

.auth-summary span {
    color: #fff;
    font-weight: 600;
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 28px;
}

/* TAUTAN PEMULIHAN PASSWORD (MODE LOKAL) */

.auth-devlink {
    margin-top: 6px;
    padding: 14px 15px;
    border: 1px dashed rgba(8, 185, 237, .55);
    border-radius: 11px;
    background: rgba(6, 27, 85, .55);
    font-size: 12px;
    word-break: break-all;
}

.auth-devlink code {
    display: block;
    color: var(--auth-sky);
    font-size: 11px;
    line-height: 1.7;
    margin: 8px 0 10px;
}

.auth-devlink .small {
    color: var(--auth-muted);
    font-size: 11px;
}

/* RESPONSIF */

@media (max-width: 550px) {
    body.auth-body {
        align-items: flex-start;
        padding: 16px 10px;
    }

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

    .auth-card.auth-card-wide {
        padding: 22px 16px;
    }

    .auth-brand img {
        width: 78px;
        height: 78px;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }

    .step-item small {
        font-size: 10px;
    }

    .auth-actions {
        margin-top: 20px;
    }
}
