/* =============================================================
   auth.css — Halaman Login & Register | TOKO MADURA
   Simpan di: assets/css/auth.css
   Dipakai bersama oleh login.php dan register.php
   ============================================================= */

.auth-layout {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 48px 0;
    background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 60%);
}

.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(27,122,62,.08);
}
/* Register sedikit lebih lebar karena field lebih banyak */
.auth-card.wide { max-width: 480px; }

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .brand {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: var(--primary);
}
.auth-logo .sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.auth-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.auth-sub a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-sub a:hover { text-decoration: underline; }

/* ===== FORM ===== */
.form-label { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.form-label .req { color: var(--primary); }
.form-label .opt { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.form-control {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    padding: 11px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,122,62,.10);
}

/* Password input + toggle */
.input-group-pw { position: relative; }
.input-group-pw .form-control { padding-right: 44px; }
.toggle-pw {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: color .2s;
}
.toggle-pw:hover { color: var(--primary); }

/* Password strength meter (register) */
.pw-strength {
    height: 4px;
    border-radius: 4px;
    margin-top: 6px;
    transition: all .3s;
    background: #eee;
}
.pw-strength.weak   { background: #DC2626; width: 33%; }
.pw-strength.medium { background: #F59E0B; width: 66%; }
.pw-strength.strong { background: #16A34A; width: 100%; }
.pw-strength-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Lupa password link */
.forgot-pw {
    text-align: right;
    margin-top: 6px;
}
.forgot-pw a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
}
.forgot-pw a:hover { color: var(--primary); }

/* ===== TOMBOL ===== */
.btn-auth {
    display: block;
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    margin-top: 20px;
}
.btn-auth:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(27,122,62,.28);
}

/* ===== DIVIDER & SWITCH ===== */
.auth-divider {
    text-align: center;
    font-size: 13px;
    color: #ccc;
    margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    display: inline-block;
    width: 38%; height: 1px;
    background: var(--border);
    vertical-align: middle;
    margin: 0 8px;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
}
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.terms-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

/* ===== ALERT ===== */
.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #DC2626;
    margin-bottom: 18px;
}
.alert-error ul { margin: 0; padding-left: 16px; }
.alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #16A34A;
    margin-bottom: 18px;
}