/* ==========================================================================
   auth-pages.css
   สไตล์ร่วมของหน้ายืนยันตัวตนที่อยู่นอกแดชบอร์ด:
   forgot_password.html, reset_password.html, change_password.html
   โทนสีเดียวกับหน้า login (index.php)
   ========================================================================== */

body {
    font-family: var(--font-sans, 'Sarabun', sans-serif);
    background-color: #f5f3ff;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    font-variation-settings: "GRAD" 0;
    font-optical-sizing: auto;
}

.auth-card {
    background: #fff;
    border-radius: 32px;
    width: 100%;
    max-width: 480px;
    padding: 44px 40px 32px;
    box-shadow: 0 24px 60px rgba(30, 60, 114, .12);
}

/* ---------- ส่วนหัว ---------- */
.auth-head {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(30, 60, 114, .25);
}

.auth-head h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1e3c72;
    margin: 0 0 10px;
}

.auth-head p {
    font-size: .92rem;
    color: #64748b;
    line-height: 1.75;
    margin: 0;
}

/* ---------- ฟอร์ม ---------- */
.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.auth-field label span {
    color: #dc2626;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap>i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .95rem;
    pointer-events: none;
}

.auth-input-wrap input {
    width: 100%;
    padding: 16px 48px 16px 46px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: .98rem;
    font-family: inherit;
    background: #f8fafc;
    transition: .2s;
}

.auth-input-wrap input:focus {
    outline: none;
    border-color: #1e3c72;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, .08);
}

.auth-input-wrap input:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ปุ่มสลับแสดง/ซ่อนรหัสผ่าน */
.auth-toggle-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 10px 12px;
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
}

.auth-toggle-pw:hover {
    color: #1e3c72;
}

.auth-hint {
    display: block;
    margin-top: 7px;
    font-size: .78rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* ---------- ตัววัดความแข็งแรงรหัสผ่าน ---------- */
.auth-meter {
    height: 6px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 10px 0 6px;
}

.auth-meter-bar {
    height: 100%;
    width: 0;
    border-radius: 99px;
    transition: width .25s, background-color .25s;
}

.auth-meter-label {
    font-size: .78rem;
    font-weight: 700;
    color: #94a3b8;
}

/* ---------- กล่องแจ้งเตือน ---------- */
.auth-alert {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: .87rem;
    font-weight: 600;
    line-height: 1.7;
    margin-bottom: 18px;
}

.auth-alert-error {
    background: #fef2f2;
    color: #b91c1c;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #047857;
}

.auth-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.auth-alert-warn {
    background: #fffbeb;
    color: #b45309;
}

/* ---------- ปุ่มหลัก ---------- */
.auth-btn {
    width: 100%;
    border: none;
    border-radius: 18px;
    background: #1e3c72;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    font-family: inherit;
    padding: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: .25s;
}

.auth-btn:hover:not(:disabled) {
    background: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(30, 60, 114, .22);
}

.auth-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ---------- ส่วนท้าย ---------- */
.auth-foot {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.auth-foot a {
    color: #64748b;
    font-size: .87rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-foot a:hover {
    color: #1e3c72;
}

/* ---------- มือถือ ---------- */
@media (max-width: 520px) {
    .auth-card {
        padding: 34px 24px 26px;
        border-radius: 26px;
    }

    .auth-head h1 {
        font-size: 1.35rem;
    }
}
