/**
 * ============================================================
 * ไฟล์  : auth-histopath.css
 * ระบบ  : Histopath (ระบบย่อย PathoBio)
 * ตำแหน่ง: histopath/assets/css/auth-histopath.css
 * ============================================================
 * หน้าที่: Styles สำหรับ auth pages (forgot/reset/register/pending)
 *
 * การเปลี่ยนแปลงจากเวอร์ชันก่อน:
 *   - ย้ายมาจาก <style nonce> ใน PHP files (CSP-safe)
 *   - [2026-06-20] เพิ่ม .hp-field สำหรับ honeypot field กันบอท (ซ่อนด้วย absolute position
 *     ไม่ใช่ display:none ตรงๆ ตามมาตรฐาน — บอทอ่าน CSS ไม่ออกง่ายเท่า inline display:none)
 * ============================================================
 */

/* honeypot — ฟอร์มสาธารณะ (register/forgot/claim/reset) */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* === from auth/register.php === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Sarabun', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.card {
    background: #fff; border-radius: 20px;
    padding: 40px 36px; width: 100%; max-width: 460px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.logo { text-align: center; margin-bottom: 24px; }
.logo-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 10px;
}
.logo-name { font-size: 20px; font-weight: 700; color: #0f766e; }
.logo-sub  { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* Google button */
.google-btn {
    width: 100%; padding: 12px;
    background: #fff; color: #374151;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    text-decoration: none; margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.2s;
}
.google-btn:hover { background: #ffffff; border-color: #d1d5db; }

.divider {
    display: flex; align-items: center;
    gap: 12px; margin: 16px 0; color: #d1d5db; font-size: 13px;
}
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid #e5e7eb; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { margin-bottom: 14px; }
.form-field label {
    display: block; font-size: 12px;
    font-weight: 600; color: #374151; margin-bottom: 4px;
}
.form-field input {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-family: 'Sarabun', sans-serif; font-size: 13px;
    outline: none; transition: border-color 0.2s;
}
.form-field input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(13,115,119,0.1);
}
.optional { font-size: 11px; color: #9ca3af; font-weight: 400; margin-left: 4px; }
.hint { font-size: 11px; color: #9ca3af; margin-top: 3px; }

.btn-register {
    width: 100%; padding: 13px;
    background: #ffffff;
    color: #fff; border: none; border-radius: 10px;
    font-family: 'Sarabun', sans-serif;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; margin-top: 4px;
}
.btn-register:hover { opacity: 0.9; transform: translateY(-1px); }

.error-box {
    background: #ffffff; border: 1px solid #fecaca;
    border-radius: 8px; padding: 10px 14px;
    font-size: 13px; color: #dc2626; margin-bottom: 14px;
}
.error-box ul { margin: 4px 0 0 16px; }
.error-box li { margin-bottom: 2px; }

.success-box {
    background: #ffffff; border: 1px solid #bbf7d0;
    border-radius: 12px; padding: 24px; text-align: center;
}
.success-box .big-icon { font-size: 48px; margin-bottom: 12px; }
.success-box h3 { font-size: 18px; font-weight: 700; color: #166534; margin-bottom: 8px; }
.success-box p { font-size: 13px; color: #4b5563; line-height: 1.7; }

.back-link { text-align: center; margin-top: 16px; font-size: 12px; color: #9ca3af; }
.back-link a { color: #0f766e; text-decoration: none; font-weight: 600; }
.lang-switch { text-align: center; margin-top: 16px; font-size: 12px; color: #9ca3af; }
.lang-switch a { color: #0f766e; text-decoration: none; font-weight: 500; margin: 0 4px; }

/* === from auth/pending.php === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Sarabun', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.card {
    background: #fff; border-radius: 20px;
    padding: 48px 40px; width: 100%; max-width: 460px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(15,118,110,.12);
}
.logo-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin: 0 auto 12px;
}
.logo-name { font-size: 22px; font-weight: 700; color: #0f766e; }
.icon { font-size: 56px; margin: 24px 0 12px; }
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #ffffff; color: #92400e;
    padding: 6px 18px; border-radius: 20px;
    font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
h2 { font-size: 20px; font-weight: 700; color: #1f2937; margin-bottom: 10px; }
p  { font-size: 14px; color: #6b7280; line-height: 1.7; margin-bottom: 6px; }
.email-chip {
    display: inline-block; background: #ffffff;
    border: 1px solid #bbf7d0; border-radius: 8px;
    padding: 4px 14px; font-size: 13px; color: #166534;
    margin: 8px 0 16px; font-weight: 600;
}
hr { border: none; border-top: 1px solid #f3f4f6; margin: 20px 0; }
.steps { text-align: left; margin: 16px 0; }
.step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.step-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: #0f766e; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.step-text { font-size: 13px; color: #374151; line-height: 1.6; }
.back-btn {
    display: inline-block; margin-top: 20px;
    padding: 10px 28px; background: #0f766e; color: #fff;
    border-radius: 8px; text-decoration: none;
    font-size: 14px; font-weight: 600;
}
.contact { font-size: 12px; color: #9ca3af; margin-top: 12px; }
.contact a { color: #0f766e; text-decoration: none; }

/* === from auth/forgot_password.php === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Sarabun', sans-serif;
    background: #ffffff;
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.card {
    background: #fff; border-radius: 20px;
    padding: 48px 40px; width: 100%; max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.logo { text-align: center; margin-bottom: 24px; }
.logo-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 10px;
}
.logo-name { font-size: 20px; font-weight: 700; color: #0f766e; }
.page-title { font-size: 18px; font-weight: 700; color: #1f2937; margin-bottom: 6px; }
.page-sub { font-size: 13px; color: #6b7280; margin-bottom: 24px; line-height: 1.6; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-field input {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-family: 'Sarabun', sans-serif; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.form-field input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(13,115,119,0.1); }
.btn {
    width: 100%; padding: 13px;
    background: #ffffff;
    color: #fff; border: none; border-radius: 10px;
    font-family: 'Sarabun', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn:hover { opacity: 0.9; }
.error-box {
    background: #ffffff; border: 1px solid #fecaca;
    border-radius: 8px; padding: 10px 14px;
    font-size: 13px; color: #dc2626; margin-bottom: 16px; line-height: 1.6;
}
.success-box {
    background: #ffffff; border: 1px solid #bbf7d0;
    border-radius: 12px; padding: 24px; text-align: center;
}
.back-link { text-align: center; margin-top: 16px; font-size: 13px; color: #9ca3af; }
.back-link a { color: #0f766e; text-decoration: none; font-weight: 600; }

/* === from auth/reset_password.php === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Sarabun', sans-serif;
    background: #ffffff;
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.card {
    background: #fff; border-radius: 20px;
    padding: 48px 40px; width: 100%; max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.logo { text-align: center; margin-bottom: 24px; }
.logo-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 10px;
}
.logo-name { font-size: 20px; font-weight: 700; color: #0f766e; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-field input {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-family: 'Sarabun', sans-serif; font-size: 14px; outline: none; transition: .2s;
}
.form-field input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(13,115,119,.1); }
.btn {
    width: 100%; padding: 13px;
    background: #ffffff;
    color: #fff; border: none; border-radius: 10px;
    font-family: 'Sarabun', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer;
}
.error-box {
    background: #ffffff; border: 1px solid #fecaca;
    border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #dc2626; margin-bottom: 16px;
}
.success-box, .invalid-box {
    border-radius: 12px; padding: 24px; text-align: center;
}
.success-box { background: #ffffff; border: 1px solid #bbf7d0; }
.invalid-box { background: #ffffff; border: 1px solid #fecaca; }
.back-link { text-align: center; margin-top: 16px; font-size: 13px; }
.back-link a { color: #0f766e; text-decoration: none; font-weight: 600; }
.strength-bar {
    height: 4px; border-radius: 2px; margin-top: 4px;
    background: #ffffff; overflow: hidden;
}
.strength-fill { height: 100%; border-radius: 2px; transition: width .3s, background .3s; width: 0; }
.hint { font-size: 11px; color: #9ca3af; margin-top: 3px; }
/* pending.php */
.pending-desc { margin-bottom: 12px; }
.pending-note { border-radius: 10px; padding: 12px 16px; font-size: 13px; margin-bottom: 18px; text-align: left; }
.pending-note--yellow { background: #fef9c3; border: 1.5px solid #fde68a; color: #92400e; }
.pending-note--blue   { background: #eff6ff; border: 1.5px solid #bfdbfe; color: #1e40af; }


/* ── Responsive ── */
@media (max-width: 480px) {
    .card { padding: 28px 16px; }
    .form-row { grid-template-columns: 1fr; }
}
