/* =====================================================
   Register / Forgot Password — INFINITY X
   ลอกโทนมาจาก C:\infinityx\register.html และ forgot-password.html
   ต่างจาก login.php ตรงที่ไฟล์นี้ "ทับสไตล์ให้ markup เดิม" ไม่ได้เขียน markup ใหม่
   เพราะ 2 หน้านี้มี component ซับซ้อน (custom-select วันเกิด, terms modal, 3 ขั้นตอน)
   ที่ js/register.js และ js/forgot_password.js ผูกกับคลาสเดิมไว้หมด
   ใช้กับ register.php + forgot_password.php เท่านั้น (login.php ใช้ css/login-ix.css)
   ===================================================== */

:root {
    --ix-blue:       #1D4ED8;
    --ix-blue-deep:  #1E3A8A;
    --ix-blue-soft:  #3B82F6;
    --ix-ink:        #0F1E3D;
    --ix-ink-2:      #44557A;
    --ix-white:      #FFFFFF;
    --ix-sky:        #EAF2FC;
    --ix-line:       #DCE6F5;
    --ix-tint:       #EFF5FF;
    --ix-red:        #D92638;
    color-scheme: light;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', 'Segoe UI', sans-serif;
    color: var(--ix-ink);
    background: #DEEBFB;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img { max-width: 100%; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--ix-blue);
    outline-offset: 2px;
}

/* ==================== ฉากวิดีโอเต็มจอ ==================== */
.stage {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 0;
}

.launch-zone {
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px 28px;
    width: 100%;
    min-width: 0;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--ix-line);
    border-radius: 999px;
    color: var(--ix-ink);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 600;
    transition: background .15s ease-out, transform .15s ease-out;
}

.back-home:hover {
    background: #fff;
    transform: translateY(-1px);
}

.back-home svg { display: block; }

/* ==================== การ์ดหลัก ====================
   .login-container คือกล่องเดิมของทั้ง 2 หน้า — เปลี่ยนเป็นการ์ดขาวแบบ .card ของ infinityx */
.login-container {
    width: min(520px, 100%);
    max-width: 100%;
    background: rgba(255, 255, 255, .97);
    border: 1px solid var(--ix-line);
    border-radius: 18px;
    padding: 36px 40px;
    box-shadow: 0 30px 80px -30px rgba(10, 20, 48, .45);
}

/* ==================== ขั้นตอน ==================== */
.register-step { display: none; }
.register-step.active { display: block; }

.step-info { margin-bottom: 4px; }

.step-title {
    font-family: 'Cinzel', 'Prompt', serif;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: .03em;
    color: var(--ix-ink);
    line-height: 1.35;
}

.step-description {
    margin-top: 6px;
    font-size: .88rem;
    line-height: 1.75;
    color: var(--ix-ink-2);
}

/* แถบความคืบหน้า — ของเดิมเป็นหลอด ปรับสีให้เข้าธีม */
.step-progress { margin-top: 18px; }

.progress-bar {
    height: 5px;
    border-radius: 99px;
    background: #E9F1FB;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--ix-blue-soft), var(--ix-blue));
    transition: width .3s ease-out;
}

.step-text {
    margin-top: 8px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--ix-ink-2);
}


/* ==================== แถบขั้นตอน (โหนดเพชร) ====================
   ลอกมาจาก C:\infinityx\register.html / forgot-password.html
   ที่นี่ไม่มี JS จัดการ data-at ให้ — แต่ละ .register-step ใส่แถบของตัวเองไว้แล้ว
   และเห็นทีละอันอยู่แล้ว จึงไม่ต้องแก้ JS */
.steps {
    display: flex;
    align-items: center;
}

.st-node {
    flex: none;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1.6px solid var(--ix-line);
    border-radius: 9px;
    rotate: 45deg;
    background: #F4F8FF;
}

.st-node > span {
    rotate: -45deg;
    font-size: .82rem;
    font-weight: 700;
    color: #93A5C7;
}

.st-node svg {
    rotate: -45deg;
    display: none;
}

.st-line {
    flex: 1;
    height: 2px;
    background: var(--ix-line);
    margin: 0 6px;
}

/* ขั้นที่กำลังทำอยู่ */
.steps[data-at="1"] .st-node:nth-child(1):not(.done),
.steps[data-at="2"] .st-node:nth-child(3):not(.done),
.steps[data-at="3"] .st-node:nth-child(5):not(.done) {
    border-color: var(--ix-blue);
    background: #fff;
    box-shadow: 0 4px 14px -4px rgba(29, 78, 216, .4);
}

.steps[data-at="1"] .st-node:nth-child(1):not(.done) > span,
.steps[data-at="2"] .st-node:nth-child(3):not(.done) > span,
.steps[data-at="3"] .st-node:nth-child(5):not(.done) > span {
    color: var(--ix-blue);
}

/* ขั้นที่ผ่านมาแล้ว */
.st-node.done {
    border-color: var(--ix-blue);
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
}

.st-node.done > span { display: none; }
.st-node.done svg { display: block; }
.st-line.done { background: var(--ix-blue); }

.st-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    margin-bottom: 26px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--ix-ink-2);
}

/* ==================== หัวข้อของแต่ละขั้น ====================
   ⚠️ h1 เป็นภาษาอังกฤษเพราะฟอนต์ Cinzel ไม่มีสระ/พยัญชนะไทย
      ถ้าใส่ข้อความไทยจะตกไปใช้ฟอนต์ default ของเบราว์เซอร์ทันที (ดูเหมือนไม่มีฟอนต์)
      คำอธิบายภาษาไทยอยู่ที่ .sub ซึ่งใช้ Prompt */
.pane-title {
    font-family: 'Cinzel', 'Prompt', serif;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: .03em;
    color: var(--ix-ink);
    line-height: 1.3;
}

.pane-title span { color: var(--ix-blue); }

.sub {
    margin-top: 6px;
    font-size: .88rem;
    line-height: 1.75;
    color: var(--ix-ink-2);
}

.sub b,
.sub strong { color: var(--ix-ink); }

/* คำใบ้ใต้ช่องกรอก */
.hint {
    margin-top: 7px;
    font-size: .76rem;
    color: var(--ix-ink-2);
}

/* ==================== แถวลิงก์ท้ายการ์ด ==================== */
.foot-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ix-line);
    font-size: .88rem;
    color: var(--ix-ink-2);
    text-align: center;
}

.foot-row a,
.linkish {
    color: var(--ix-blue);
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: .88rem;
    padding: 0;
}

.foot-row a:hover,
.linkish:hover { text-decoration: underline; }
/* ==================== ฟอร์ม ==================== */
.register-form { margin-top: 4px; }

.form-group {
    position: relative;
    margin-top: 20px;
}

.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ix-ink);
    margin-bottom: 7px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 13px 46px 13px 16px;
    border: 1.5px solid var(--ix-line);
    border-radius: 9px;
    background: #F8FBFF;
    font-family: 'Prompt', sans-serif;
    font-size: .92rem;
    color: var(--ix-ink);
    transition: border-color .15s ease-out, background .15s ease-out;
}

.form-group input::placeholder { color: #93A5C7; }

.form-group input:focus {
    border-color: var(--ix-blue);
    background: #fff;
    outline: none;
}

/* ไอคอนขวาในช่องกรอก (markup เดิมวางไว้ขวาเสมอ) */
.input-icon {
    position: absolute;
    right: 14px;
    bottom: 13px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #93A5C7;
    pointer-events: none;
}

.input-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.input-icon.toggle-password {
    pointer-events: auto;
    cursor: pointer;
    transition: color .15s ease-out;
}

.input-icon.toggle-password:hover { color: var(--ix-blue); }

/* ช่อง OTP — ต้นฉบับ infinityx เป็น 6 ช่องแยก แต่ระบบเราใช้ช่องเดียว maxlength=6
   จึงจัดให้เป็นช่องใหญ่กลางการ์ด ตัวอักษรห่างกัน ให้อ่านง่ายแบบเดียวกัน */
#otp {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .5em;
    padding-left: 16px;
}

/* placeholder เป็นข้อความไทยยาว ๆ ถ้าปล่อย letter-spacing ไว้จะยืดอ่านไม่ออก */
#otp::placeholder {
    letter-spacing: normal;
    font-size: .92rem;
    font-weight: 400;
}

.otp-reference {
    margin-top: 14px;
    padding: 11px 14px;
    background: #F2F7FD;
    border: 1px dashed rgba(29, 78, 216, .4);
    border-radius: 9px;
    font-size: .8rem;
    color: var(--ix-ink-2);
    text-align: center;
}

.otp-reference #otpReference {
    color: var(--ix-blue);
    font-weight: 700;
    letter-spacing: .15em;
}

/* Edge/IE ใส่ปุ่มรูปตาของตัวเองมาในช่อง password (::-ms-reveal)
   ซ้อนกับปุ่มตาของเราจนเห็นเป็นตา 2 ดวง — ซ่อนของเบราว์เซอร์ทิ้ง
   ::-ms-clear คือกากบาทล้างค่าที่ Edge ใส่มาให้ช่อง text เหมือนกัน */
input::-ms-reveal,
input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

/* Chrome/Safari บางเวอร์ชันใส่ปุ่มกุญแจ/รหัสผ่านอัตโนมัติมาในช่องเดียวกัน */
input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

/* ==================== ปุ่ม ==================== */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 22px;
    padding: 14px 20px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-size: .96rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    box-shadow: 0 10px 26px -8px rgba(29, 78, 216, .6);
    transition: transform .18s ease-out, box-shadow .18s ease-out, filter .18s ease-out;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 14px 32px -8px rgba(29, 78, 216, .7);
}

.btn-login:disabled {
    cursor: not-allowed;
    background: #C7D6EE;
    box-shadow: none;
}

/* สถานะกำลังส่ง — js เติมคลาส loading ให้ปุ่ม */
.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ix-spin .8s linear infinite;
}

@keyframes ix-spin {
    to { transform: rotate(360deg); }
}

/* ปุ่มรอง (กลับไปเข้าสู่ระบบ / ย้อนขั้นตอน / ยกเลิก) */
.btn-register {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 20px;
    border: 1.5px solid var(--ix-line);
    border-radius: 9px;
    background: var(--ix-white);
    color: var(--ix-ink);
    font-family: 'Prompt', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}

.btn-register:hover {
    background: var(--ix-tint);
    border-color: #B7CCEC;
    color: var(--ix-blue);
}

/* ปุ่มส่งรหัสใหม่ — แบบลิงก์ */
.btn-resend {
    display: block;
    margin: 14px auto 0;
    padding: 4px 6px;
    border: 0;
    background: none;
    color: var(--ix-blue);
    font-family: 'Prompt', sans-serif;
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-resend:hover { text-decoration: underline; }

.btn-resend:disabled {
    color: #A9B7D0;
    cursor: not-allowed;
    text-decoration: none;
}

/* ==================== เส้นคั่น "หรือ" ==================== */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: var(--ix-ink-2);
    font-size: .82rem;
}

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

/* ==================== วันเกิด (custom select) ==================== */
.birthdate-container {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 8px;
}

.custom-select-wrapper { position: relative; }

.custom-select { position: relative; }

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 13px 12px;
    border: 1.5px solid var(--ix-line);
    border-radius: 9px;
    background: #F8FBFF;
    font-size: .88rem;
    color: var(--ix-ink);
    cursor: pointer;
    transition: border-color .15s ease-out, background .15s ease-out;
}

.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger {
    border-color: var(--ix-blue);
    background: #fff;
}

/* ค่าที่เลือกแล้ว — js เติมคลาส selected ให้ trigger */
.custom-select-trigger.selected { color: var(--ix-ink); font-weight: 600; }

.custom-select-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--ix-ink-2);
    transition: transform .18s ease-out;
}

.custom-select.open .custom-select-arrow { transform: rotate(180deg); }

.custom-select-options {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 10px;
    box-shadow: 0 18px 40px -18px rgba(15, 30, 61, .35);
}

.custom-select.open .custom-select-options { display: block; }

.custom-select-option {
    padding: 9px 10px;
    border-radius: 7px;
    font-size: .86rem;
    color: var(--ix-ink);
    cursor: pointer;
    transition: background .12s ease-out, color .12s ease-out;
}

.custom-select-option:hover,
.custom-select-option.selected {
    background: var(--ix-tint);
    color: var(--ix-blue-deep);
}

/* ==================== ยอมรับเงื่อนไข ==================== */
.terms-checkbox-section { margin-top: 20px; }

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .85rem;
    line-height: 1.7;
    color: var(--ix-ink-2);
}

.checkbox-container input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ix-blue);
    cursor: pointer;
}

/* markup เดิมมี span.checkmark ไว้วาดกล่องติ๊กเอง — ธีมนี้ใช้ checkbox จริงแทน จึงซ่อนไว้ */
.checkmark { display: none; }

.checkbox-label a,
.checkbox-label span[onclick],
.terms-update {
    color: var(--ix-blue);
    font-weight: 600;
    cursor: pointer;
}

/* ==================== Terms Modal ==================== */
.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    place-items: center;
    padding: 20px;
}

.terms-modal.show { display: grid; }

.terms-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 48, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.terms-modal-content {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px -30px rgba(10, 20, 48, .6);
}

.terms-modal-header {
    position: relative;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--ix-line);
}

.terms-modal-title {
    font-family: 'Cinzel', 'Prompt', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ix-ink);
}

.terms-modal-subtitle {
    margin-top: 5px;
    font-size: .84rem;
    color: var(--ix-ink-2);
}

.terms-modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: var(--ix-sky);
    color: var(--ix-ink-2);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background .15s ease-out, color .15s ease-out;
}

.terms-modal-close:hover {
    background: var(--ix-tint);
    color: var(--ix-blue);
}

.terms-modal-body {
    padding: 22px 26px;
    overflow-y: auto;
    font-size: .88rem;
    line-height: 1.85;
    color: var(--ix-ink-2);
}

.terms-section-modal + .terms-section-modal { margin-top: 20px; }

.terms-section-modal h3,
.terms-section-modal h4 {
    margin-bottom: 8px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ix-ink);
}

.terms-section-modal ul,
.terms-section-modal ol { padding-left: 20px; }

.terms-section-modal li { margin-bottom: 5px; }

/* ส่วนคำเตือน — โทนแดงอ่อนบนพื้นขาว */
.warning-section {
    padding: 14px 16px;
    border: 1px solid #F3B7B7;
    border-left: 4px solid #DC2626;
    border-radius: 0 10px 10px 0;
    background: var(--t-red, #FDECEC);
    color: #7F1D1D;
}

.warning-section h3,
.warning-section h4 { color: var(--i-red, #B91C1C); }

.warning-intro { font-weight: 600; }

.terms-modal-footer {
    padding: 18px 26px 22px;
    border-top: 1px solid var(--ix-line);
    background: #F8FBFF;
}

.terms-modal-buttons {
    display: flex;
    gap: 10px;
}

.terms-modal-btn {
    flex: 1;
    padding: 12px 18px;
    border-radius: 9px;
    border: 1.5px solid var(--ix-line);
    background: var(--ix-white);
    color: var(--ix-ink);
    font-family: 'Prompt', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease-out, filter .15s ease-out;
}

.terms-modal-btn.terms-decline:hover {
    background: var(--ix-tint);
    border-color: #B7CCEC;
}

.terms-modal-btn.terms-accept {
    border-color: transparent;
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
    color: #fff;
    box-shadow: 0 8px 22px -8px rgba(29, 78, 216, .6);
}

.terms-modal-btn.terms-accept:hover { filter: brightness(1.08); }

/* ==================== Popup แจ้งผล ====================
   id/คลาสเดิมจาก js/register.js และ js/forgot_password.js — ห้ามเปลี่ยนชื่อ */
.error-popup,
.success-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(10, 20, 48, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease-out;
}

.error-popup.show,
.success-popup.show {
    opacity: 1;
    pointer-events: auto;
}

.error-popup-content,
.success-popup-content {
    width: min(380px, 100%);
    padding: 30px 28px 26px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 16px;
    box-shadow: 0 30px 80px -30px rgba(10, 20, 48, .6);
    text-align: center;
    transform: translateY(14px) scale(.97);
    transition: transform .2s ease-out;
}

.error-popup.show .error-popup-content,
.success-popup.show .success-popup-content {
    transform: translateY(0) scale(1);
}

.error-popup-icon,
.success-popup-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.error-popup-icon {
    background: var(--t-red, #FDECEC);
    color: var(--i-red, #B91C1C);
}

.success-popup-icon {
    background: var(--t-green, #E9F8EE);
    color: var(--i-green, #15803D);
}

.error-popup-icon svg,
.success-popup-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

.error-popup-message,
.success-popup-message {
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.8;
    color: var(--ix-ink);
}

.error-popup-btn,
.success-popup-btn {
    margin-top: 20px;
    padding: 10px 30px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px -6px rgba(29, 78, 216, .5);
    transition: filter .18s ease-out;
}

.error-popup-btn:hover,
.success-popup-btn:hover { filter: brightness(1.08); }

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track { background: var(--ix-sky); }

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
    border-radius: 99px;
    border: 2px solid var(--ix-sky);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--ix-blue), var(--ix-blue-deep));
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--ix-blue-soft) var(--ix-sky);
}

/* ==================== Responsive ==================== */
@media (max-width: 520px) {
    .launch-zone { padding: 20px 16px; }
    .login-container { padding: 28px 24px; }
    .step-title { font-size: 1.3rem; }
    .birthdate-container { grid-template-columns: 1fr 1fr; }
    .birthdate-container .custom-select-wrapper:first-child { grid-column: 1 / -1; }
}

/* =====================================================
   แผงแจ้ง "ปิดชั่วคราว" — ใช้ร่วมกันที่ register.php และ login.php
   เปิด/ปิดจากหลังบ้านแอดมิน (register_enabled · login_enabled)
   ตัวอ่านค่าอยู่ที่ php/access_control.php
   ===================================================== */

.gate-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 8px 0 4px;
}

.gate-ic {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--ix-blue);
    background: var(--ix-tint);
    border: 1px solid var(--ix-line);
}

.gate-notice .pane-title { margin: 0; }

.gate-msg {
    max-width: 34ch;
    margin: 0;
    font-size: .92rem;
    line-height: 1.75;
    color: var(--ix-ink-2);
}

/* ปุ่มทางออก — ให้คนที่มาเจอหน้าปิดยังไปต่อได้ ไม่ใช่ตันอยู่ตรงนี้ */
.gate-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
}

.gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--ix-line);
    background: var(--ix-white);
    color: var(--ix-ink);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .18s, background .18s, transform .18s;
}

.gate-btn:hover {
    border-color: var(--ix-blue);
    background: var(--ix-tint);
    transform: translateY(-1px);
}

.gate-btn.is-primary {
    border-color: transparent;
    background: linear-gradient(90deg, var(--ix-blue-soft), var(--ix-blue));
    color: var(--ix-white);
}

.gate-btn.is-primary:hover { background: linear-gradient(90deg, var(--ix-blue), var(--ix-blue-deep)); }

/* แถบแจ้งเตือนเหนือฟอร์ม — ใช้ที่ login.php ที่ยังต้องโชว์ฟอร์มให้แอดมินเข้า */
.gate-bar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid var(--ix-line);
    border-left: 3px solid var(--ix-blue);
    border-radius: 10px;
    background: var(--ix-tint);
    text-align: left;
}

.gate-bar svg { flex: none; margin-top: 1px; color: var(--ix-blue); }

.gate-bar p {
    margin: 0;
    font-size: .82rem;
    line-height: 1.65;
    color: var(--ix-ink-2);
}

@media (max-width: 420px) {
    .gate-msg { max-width: none; font-size: .88rem; }
    .gate-btn { flex: 1; justify-content: center; }
}
