/* หน้าเข้าสู่ระบบ แบบ Central Gate (พอร์ตจาก D:\CentralGate\Central Gate\Pages\Account\Login.cshtml)
   - โครงหน้า/ขนาด/เอฟเฟกต์เหมือนต้นฉบับ: พื้นหลัง particles หรือ hexagon, การ์ดกระจกฝ้า, นาฬิกามุมซ้ายบน, ป้ายเตือน CAPS LOCK / แป้นพิมพ์ไทย, ฉากโหลด
   - สีอ่านจากธีมของระบบ (--ink / --accent / --app-primary จาก /branding/theme.css) แทนสีเขียวตายตัว เพื่อให้เปลี่ยนสีที่หน้า "รูปลักษณ์และโลโก้" แล้วหน้านี้เปลี่ยนตาม
   - ไม่มี inline style และไม่พึ่ง CDN (CSP 'self'): ฟอนต์ Sarabun อยู่ในเครื่อง, animate.css ต้นฉบับแทนด้วย keyframes ในไฟล์นี้
   - เอฟเฟกต์ใช้ transform/opacity เท่านั้น และปิดเมื่อผู้ใช้ตั้งค่า "ลดการเคลื่อนไหว" */

/* ── ฟอนต์ (ไฟล์ในเครื่อง; หน้านี้ไม่โหลด site.css จึงประกาศเอง) ── */
@font-face { font-family: "Sarabun"; font-weight: 400; font-style: normal; font-display: swap;
    src: url("../lib/fonts/sarabun/sarabun-thai-400-normal.woff2") format("woff2");
    unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Sarabun"; font-weight: 400; font-style: normal; font-display: swap;
    src: url("../lib/fonts/sarabun/sarabun-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sarabun"; font-weight: 600; font-style: normal; font-display: swap;
    src: url("../lib/fonts/sarabun/sarabun-thai-600-normal.woff2") format("woff2");
    unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Sarabun"; font-weight: 600; font-style: normal; font-display: swap;
    src: url("../lib/fonts/sarabun/sarabun-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sarabun"; font-weight: 700; font-style: normal; font-display: swap;
    src: url("../lib/fonts/sarabun/sarabun-thai-700-normal.woff2") format("woff2");
    unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Sarabun"; font-weight: 700; font-style: normal; font-display: swap;
    src: url("../lib/fonts/sarabun/sarabun-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --lg-ink: var(--ink, #0c2742);
    --lg-accent: var(--accent, #2cc6b0);
    --lg-primary: var(--app-primary, #0f62b6);
    --lg-primary-dark: color-mix(in srgb, var(--lg-primary) 78%, black);
    --lg-bg-deep: color-mix(in srgb, var(--lg-ink) 55%, black);
    --lg-bg-lift: color-mix(in srgb, var(--lg-ink) 72%, var(--lg-primary));
    --lg-accent-light: color-mix(in srgb, var(--lg-accent) 55%, white);
    --lg-font: "Sarabun", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--lg-font);
    overflow-x: hidden;
}

/* ── Body: Particles mode ── */
body.bg-particles {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lg-bg-deep);
}

/* ── Body: Hexagon mode ── */
body.bg-hexagon {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--lg-bg-deep);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='93' viewBox='0 0 80 93'%3E%3Cpath d='M40 0l40 23.09v46.18L40 92.36 0 69.27V23.09L40 0z' fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.04'/%3E%3C/svg%3E"),
        radial-gradient(circle at center, var(--lg-bg-lift) 0%, var(--lg-bg-deep) 100%);
    background-attachment: fixed;
    background-size: 80px 93px, cover;
    background-repeat: repeat, no-repeat;
}

/* ── Particle Canvas ── */
#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Page Wrapper ── */
.page-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 2rem 1rem;
}

/* ── Login Card ── */
.login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(240, 246, 252, 0.90);
    border-radius: 32px;
    padding: 3rem 2.5rem;
    border: 1px solid color-mix(in srgb, var(--lg-accent) 30%, transparent);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    animation: lgCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes lgCardIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Brand ── */
.brand-wrapper { text-align: center; margin-bottom: 2.25rem; }

.logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    overflow: hidden;
    background: var(--lg-ink);
    color: #fff;
    font-size: 2.6rem;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--lg-ink) 45%, transparent), 0 0 0 4px color-mix(in srgb, var(--lg-accent) 22%, transparent);
    transition: transform 0.35s, box-shadow 0.35s;
}
.logo-circle:hover {
    transform: scale(1.06);
    box-shadow: 0 16px 40px color-mix(in srgb, var(--lg-ink) 55%, transparent), 0 0 0 6px color-mix(in srgb, var(--lg-accent) 32%, transparent);
}
.logo-circle img { width: 100%; height: 100%; object-fit: cover; }

.brand-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lg-ink);
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.25;
}
.brand-tagline { font-size: 0.85rem; color: #64748b; margin: 0.25rem 0 0; }

/* ── Form Fields ── */
.form-floating > .form-control {
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    height: 62px;
    background: #f8fafc;
    font-family: var(--lg-font);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.form-floating > .form-control:focus {
    border-color: var(--lg-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--lg-accent) 18%, transparent);
    background: #fff;
}
.form-floating > label { font-size: 0.88rem; color: #94a3b8; }
.login-card .field-error { display: block; color: #a1261b; font-size: 0.85rem; margin: 0.25rem 0 0 0.25rem; }

/* ── Password Toggle ── */
.input-group-custom { position: relative; }
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.2rem;
    transition: color 0.2s;
}
.password-toggle:hover { color: var(--lg-accent); }
.password-toggle:focus-visible { outline: 2px solid var(--lg-accent); outline-offset: 0; }

/* ── Keyboard Status Badges ── */
.kbd-status-area { min-height: 26px; margin: 8px 0 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.status-badge {
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-weight: 600;
    animation: lgFadeIn 0.3s both;
}
#caps-badge { background: #ef4444; }
#lang-badge { background: #b45309; }

@keyframes lgFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── ข้อความจากเซิร์ฟเวอร์ (แสดงในหน้า; ถ้ามี SweetAlert2 จะเด้งเป็นหน้าต่างแทนแล้วซ่อนกล่องนี้) ── */
.login-alert {
    border-radius: 14px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.login-alert-error   { background: #fdecea; border-color: #f5c2bd; color: #8a1f15; }
.login-alert-warning { background: #fff4e0; border-color: #f3d79b; color: #92400e; }
.login-alert-info    { background: #e8f1fa; border-color: #bcd5ee; color: #084882; }

/* ── Submit Button ── */
.btn-submit {
    background: linear-gradient(135deg, var(--lg-primary) 0%, var(--lg-primary-dark) 100%);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    width: 100%;
    font-size: 1.05rem;
    font-family: var(--lg-font);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--lg-primary) 35%, transparent);
    transition: transform 0.25s, box-shadow 0.25s;
}
.btn-submit:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--lg-primary) 50%, transparent);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:focus-visible { outline: 3px solid var(--lg-accent); outline-offset: 2px; }

.login-help { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: #64748b; }

/* ── Loader Overlay ── */
#loader-wrapper {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--lg-bg-deep) 92%, transparent);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
#loader-wrapper.is-open { display: flex; animation: lgFadeIn 0.35s both; }
#loader-wrapper .spinner-grow { width: 3.5rem; height: 3.5rem; color: var(--lg-accent); }
.loader-text { margin: 1.5rem 0 0; color: #fff; font-size: 1.05rem; font-weight: 300; animation: lgPulse 1.6s ease-in-out infinite; }

@keyframes lgPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── Footer ── */
.footer-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1.75rem;
    font-size: 0.82rem;
    /* เงาตัวอักษร: ไม่ให้จมบนภาพพื้นหลังสว่าง (เตียง/เครื่องมือแพทย์) */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 10px rgba(0, 0, 0, 0.55);
    animation: lgCardIn 0.6s 0.2s both;
}
.footer-text p { margin: 0 0 0.25rem; }
.footer-text .footer-sub { opacity: 0.65; }
.footer-dev { margin-top: 0.6rem; font-size: 0.74rem; line-height: 1.5; color: rgba(255, 255, 255, 0.55); }
.footer-dev strong { color: rgba(255, 255, 255, 0.8); font-weight: 600; }

/* ══════════════════════════════════════════
   DATETIME CLOCK WIDGET
══════════════════════════════════════════ */
.clock-widget {
    position: fixed;
    top: 24px;
    left: 32px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    animation: lgClockIn 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes lgClockIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.clock-date {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lg-accent-light);
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 10px rgba(0, 0, 0, 0.55);
}
.clock-time {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #ffffff 0%, var(--lg-accent-light) 55%, var(--lg-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* ตัวอักษรไล่สีโปร่งใส: ห้ามใช้ text-shadow (เงาจะทะลุตัวอักษร) ใช้ drop-shadow ซ้อนเงามืดก่อนแสงเรือง */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px color-mix(in srgb, var(--lg-accent) 45%, transparent));
    transition: filter 0.5s;
}
.clock-time:hover { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 28px color-mix(in srgb, var(--lg-accent) 75%, transparent)); }
.clock-divider { width: 100%; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--lg-accent) 55%, transparent) 0%, transparent 100%); margin: 3px 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .clock-widget { position: static; align-items: center; margin-bottom: 1.25rem; animation: lgCardIn 0.6s 0.1s both; }
    .clock-time { font-size: 2.2rem; }
    .clock-date { font-size: 0.72rem; }
}
@media (max-width: 480px) {
    .login-card { padding: 2.25rem 1.5rem; border-radius: 26px; }
}

/* ── ลดการเคลื่อนไหว ── */
@media (prefers-reduced-motion: reduce) {
    .login-card, .clock-widget, .footer-text, .status-badge, #loader-wrapper.is-open, .loader-text { animation: none; }
    .logo-circle, .btn-submit, .clock-time { transition: none; }
}

/* ══════════════════════════════════════════
   หน้าอื่นในขั้นตอนเข้าสู่ระบบ (MFA, ตั้งค่า MFA, รหัสกู้คืน, เปลี่ยนรหัส, เลือกหน่วย) — ใช้การ์ดเดียวกับหน้า Login
══════════════════════════════════════════ */
.auth-heading { text-align: center; margin-bottom: 1.25rem; }
.auth-icon {
    width: 56px; height: 56px; margin: 0 auto 0.75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: var(--lg-primary);
    background: color-mix(in srgb, var(--lg-primary) 12%, white);
    border-radius: 50%;
}
.auth-title { font-size: 1.3rem; font-weight: 700; color: var(--lg-ink); margin: 0 0 0.35rem; }
.auth-sub { font-size: 0.88rem; color: #64748b; margin: 0 0 1.25rem; text-align: center; line-height: 1.55; }
.auth-heading .auth-sub { margin-bottom: 0; }
.auth-link { text-align: center; margin: 1.1rem 0 0; font-size: 0.88rem; }
.auth-link a { color: var(--lg-primary); text-decoration: none; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }
.auth-hint { font-size: 0.82rem; color: #64748b; margin: 0.4rem 0 1.1rem; text-align: center; }

.login-alert-list { margin: 0; padding-left: 1.1rem; }
.login-alert-list li + li { margin-top: 0.2rem; }
.login-alert.d-flex { align-items: flex-start; }

/* ปุ่มรอง (ขอบ) — ใช้คู่กับ .btn-submit */
.btn-auth-outline {
    --bs-btn-padding-y: 0.45rem;
    background: #fff;
    color: var(--lg-primary);
    border: 2px solid color-mix(in srgb, var(--lg-primary) 35%, white);
    border-radius: 12px;
    font-family: var(--lg-font);
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}
.btn-auth-outline:hover { background: color-mix(in srgb, var(--lg-primary) 8%, white); border-color: var(--lg-primary); color: var(--lg-primary-dark); }
.btn-auth-outline:focus-visible { outline: 3px solid var(--lg-accent); outline-offset: 2px; }
.auth-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.auth-continue { display: block; text-align: center; text-decoration: none; }

/* ตั้งค่า MFA */
.auth-steps { font-size: 0.88rem; color: #334155; padding-left: 1.2rem; margin: 0 0 1rem; line-height: 1.6; }
.qr-box { width: 224px; margin: 0 auto 0.9rem; padding: 12px; background: #fff; border-radius: 16px; border: 2px solid #e2e8f0; line-height: 0; }
.qr-box .qr { width: 200px; height: 200px; max-width: 100%; }
.key-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.88rem; color: #334155; }
.key-code { padding: 0.25rem 0.6rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; color: var(--lg-ink); font-size: 0.85rem; letter-spacing: 0.06em; word-break: break-all; }

/* รหัสกู้คืน */
.codes-grid {
    list-style: none; margin: 0 0 1rem; padding: 0.9rem;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem;
    background: #fff; border: 2px dashed #cbd5e1; border-radius: 14px;
}
.codes-grid li {
    text-align: center; padding: 0.35rem 0.25rem; border-radius: 8px;
    background: #f1f5f9; color: var(--lg-ink); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.95rem; letter-spacing: 0.06em;
    user-select: all;
}

/* เลือกหน่วยงาน */
.org-choices { display: grid; gap: 0.6rem; margin-bottom: 1.1rem; max-height: 46vh; overflow-y: auto; padding: 0.15rem; }
.org-choice {
    display: flex; align-items: flex-start; gap: 0.7rem;
    padding: 0.8rem 1rem; margin: 0; cursor: pointer;
    background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.org-choice:hover { border-color: color-mix(in srgb, var(--lg-accent) 60%, #e2e8f0); }
.org-choice:has(input:checked) {
    border-color: var(--lg-accent); background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--lg-accent) 18%, transparent);
}
.org-choice:has(input:focus-visible) { outline: 3px solid var(--lg-accent); outline-offset: 2px; }
.org-choice input[type=radio] { margin-top: 0.3rem; accent-color: var(--lg-primary); flex: none; }
.org-choice-body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; color: var(--lg-ink); }
.org-choice-body small { color: #64748b; }

/* ══════════════════════════════════════════
   โหมดแบ่งสองฝั่ง (body.bg-split) — ใช้เมื่อมีภาพพื้นหลังที่อัปโหลด (ดู _AuthLayout.cshtml)
   ซ้าย = ภาพคมชัด + เลเยอร์มืด (คลาส dim-N จาก branding-assets.css) + ชื่อระบบ; ขวา = พื้นสว่าง + ภาพจางๆ + ฟอร์ม
   ไม่มีภาพ = ไม่ใช้โหมดนี้ ห่อ .auth-shell/.auth-main ด้วย display: contents ให้หน้าเดิมเหมือนก่อนหน้า
══════════════════════════════════════════ */
.auth-shell:not(.is-split),
.auth-shell:not(.is-split) .auth-main { display: contents; }

body.bg-split { min-height: 100vh; display: block; background: #f4f8fc; }
.auth-shell.is-split { display: flex; width: 100%; min-height: 100vh; }

.auth-hero {
    position: relative;
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background: var(--lg-bg-deep);
    border-right: 4px solid var(--lg-accent);
}
.auth-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-hero-dim { position: absolute; inset: 0; background: var(--lg-ink); pointer-events: none; }
/* ไล่เฉดมืดเบาๆ ด้านล่าง/ซ้าย ให้ข้อความอ่านออกแม้ตั้งเลเยอร์มืด 0% (ภาพส่วนกลาง/ขวายังคมชัด) */
.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to top, color-mix(in srgb, var(--lg-bg-deep) 80%, transparent) 0%, transparent 45%),
        linear-gradient(to right, color-mix(in srgb, var(--lg-bg-deep) 50%, transparent) 0%, transparent 65%);
}
.auth-hero-body, .auth-hero-foot { position: relative; z-index: 2; }
.auth-hero-body { margin-block: auto; padding: 7rem 4rem 2rem; }
.auth-hero-name {
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.auth-hero-thai { margin-top: 0.75rem; font-size: 1.35rem; font-weight: 600; line-height: 1.45; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.auth-hero-eng { margin-top: 0.35rem; font-size: 0.95rem; font-weight: 600; color: var(--lg-accent-light); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
/* ชื่อหน่วยงานใต้ชื่อระบบ (แก้ได้ที่หน้า รูปลักษณ์และโลโก้) */
.auth-hero-org {
    margin-top: 1.1rem;
    padding-top: 0.85rem;
    max-width: 32rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    border-top: 2px solid color-mix(in srgb, var(--lg-accent) 70%, transparent);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
    overflow-wrap: anywhere;
}
.auth-hero-foot { margin: 0; padding: 0 4rem 1.75rem; text-align: left; animation: none; }

.auth-main {
    position: relative;
    flex: 1 1 45%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    background: #f4f8fc;
}
.auth-main-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.07; filter: saturate(0.6); pointer-events: none; }
.is-split .page-wrapper { max-width: 520px; }
/* การ์ดแบนบนพื้นสว่าง (ไม่ต้องใช้กระจกฝ้า) */
.is-split .login-card {
    max-width: 440px;
    padding: 1.5rem 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.is-split .brand-tagline { display: none; } /* ชื่อไทยแสดงที่ฝั่งซ้ายแล้ว */
.auth-main-foot { display: none; margin-top: 1rem; text-align: center; font-size: 0.75rem; color: #64748b; }

/* นาฬิกาลอยทับฝั่งซ้าย (ตำแหน่ง fixed เดิมอยู่ซ้ายบนพอดี) */
body.bg-split .clock-widget { text-shadow: none; }

@media (max-width: 991.98px) {
    .auth-shell.is-split { flex-direction: column; }
    .auth-hero { flex: 0 0 auto; max-width: none; width: 100%; min-height: 11rem; border-right: 0; border-bottom: 4px solid var(--lg-accent); }
    .auth-hero-body { margin: 0; padding: 4.75rem 1.25rem 1rem; }
    .auth-hero-name { font-size: 1.8rem; }
    .auth-hero-thai, .auth-hero-eng, .auth-hero-org, .auth-hero-foot { display: none; }
    .auth-main { flex: 1 1 auto; min-height: 0; }
    .auth-main-foot { display: block; }
    body.bg-split .clock-widget { position: absolute; top: 14px; left: 18px; align-items: flex-start; margin: 0; animation: none; }
    body.bg-split .clock-time { font-size: 1.9rem; }
    body.bg-split .clock-date { font-size: 0.7rem; }
}
@media print {
    .auth-hero, .auth-main-bg, .auth-main-foot { display: none !important; }
    body.bg-split { background: #fff; display: block; }
    .auth-main { background: #fff; min-height: 0; }
}

/* พิมพ์รหัสกู้คืน: ซ่อนทุกอย่างที่ไม่ใช่รหัส */
@media print {
    #particle-canvas, .clock-widget, #loader-wrapper, .footer-text, .brand-wrapper, .auth-actions, .auth-continue, .login-alert-warning { display: none !important; }
    body.bg-particles, body.bg-hexagon { background: #fff; display: block; }
    .login-card { box-shadow: none; border: 0; background: #fff; backdrop-filter: none; animation: none; max-width: none; }
}
