/* ============================================================
   auth.css  —  Shared styles: login.php & register.php
   Modul Pembelajaran Statistik Digital Berbasis STEM
   ============================================================ */

/* ── Page background ── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
    display: flex;
    flex-direction: column;
}

/* ── Decorative blobs ── */
.auth-page::before,
.auth-page::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.auth-page::before {
    width: 420px; height: 420px;
    background: rgba(245, 158, 11, .15);
    top: -120px; right: -80px;
}
.auth-page::after {
    width: 320px; height: 320px;
    background: rgba(96, 165, 250, .12);
    bottom: -60px; left: -60px;
}

/* ── Wrapper ── */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    position: relative;
    z-index: 1;
}

/* ── Card ── */
.auth-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
    animation: slideUp .5s ease both;
}

.auth-card--login    { max-width: 440px; }
.auth-card--register { max-width: 480px; }

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

/* ── Card header ── */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .icon-ring {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, .35);
}

.auth-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.5;
}

/* ── Divider ── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.form-divider span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .35);
    white-space: nowrap;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .12);
}

/* ── Field group ── */
.field-group { margin-bottom: 16px; }

.field-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .65);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.field-group label span.required {
    color: #f59e0b;
    margin-left: 2px;
}

/* ── Input wrapper ── */
.input-wrap { position: relative; }

.input-wrap .input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    pointer-events: none;
    opacity: .6;
}

.input-wrap input,
.input-wrap select {
    width: 100%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 9px;
    padding: 11px 14px 11px 38px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    color: #ffffff;
    outline: none;
    transition: border-color .2s, background .2s;
    -webkit-appearance: none;
}

.input-wrap input::placeholder  { color: rgba(255, 255, 255, .3); }

.input-wrap input:focus,
.input-wrap select:focus {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, .06);
}

.input-wrap input.is-invalid,
.input-wrap select.is-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, .06);
}

.input-wrap select option { background: #1e3a8a; color: #fff; }

/* ── Toggle password ── */
.input-wrap .toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, .45);
    padding: 0;
    letter-spacing: .04em;
    transition: color .2s;
    font-family: 'Poppins', sans-serif;
}

.input-wrap .toggle-pw:hover { color: #f59e0b; }

.input-wrap input[type="password"],
.input-wrap input[type="text"].pw-field { padding-right: 50px; }

/* ── Forgot password ── */
.forgot-wrap {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 18px;
}

.forgot-wrap a {
    font-size: 12px;
    color: rgba(255, 255, 255, .45);
    text-decoration: none;
    transition: color .2s;
}

.forgot-wrap a:hover { color: #f59e0b; }

/* ── Submit buttons ── */
.btn-auth {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    border: none;
    border-radius: 50px;
    padding: 13px;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, .3);
    text-decoration: none;
}

.btn-auth:hover   { opacity: .92; transform: translateY(-1px); }
.btn-auth:active  { transform: translateY(0); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-auth--secondary {
    margin-top: 10px;
    background: rgba(255, 255, 255, .1);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: none;
}

/* ── Auth footer link ── */
.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .45);
}

.auth-footer a {
    color: #f59e0b;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Alerts ── */
.alert {
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 12.5px;
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.alert-error {
    background: rgba(239, 68, 68, .15);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #fca5a5;
}

.alert-error ul {
    margin: 4px 0 0 16px;
    padding: 0;
    list-style: disc;
}

.alert-error ul li { margin-bottom: 2px; }

.alert-success {
    background: rgba(16, 185, 129, .15);
    border: 1px solid rgba(16, 185, 129, .3);
    color: #6ee7b7;
}

/* ── Page footer override ── */
.auth-page footer {
    background: rgba(0, 0, 0, .25);
    border-top: 1px solid rgba(255, 255, 255, .07);
    position: relative;
    z-index: 1;
}

.auth-page footer a   { color: rgba(255, 255, 255, .4); }
.auth-page footer a:hover { color: #f59e0b; }
.auth-page footer div { color: rgba(255, 255, 255, .3); }

/* ── Register-only extras ── */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pw-strength { margin-top: 7px; }

.pw-strength-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width .3s, background .3s;
}

.pw-strength-label {
    font-size: 11px;
    margin-top: 4px;
    color: rgba(255, 255, 255, .4);
    transition: color .3s;
}

.check-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
}

.check-group input[type="checkbox"] {
    accent-color: #f59e0b;
    width: 15px; height: 15px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.check-group label {
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.5;
    cursor: pointer;
}

.check-group label a { color: #f59e0b; text-decoration: none; }
.check-group label a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 540px) {
    .auth-card         { padding: 32px 22px; }
    .form-row-2        { grid-template-columns: 1fr; }
}
