@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@300;400;500;600;700&family=Chakra+Petch:wght@300;400;500;600;700&family=Charm:wght@400;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Itim&family=Kanit:wght@300;400;500;600;700&family=Kodchasan:wght@300;400;500;600;700&family=Krub:wght@300;400;500;600;700&family=Mali:wght@300;400;500;600;700&family=Mitr:wght@300;400;500;600;700&family=Niramit:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Noto+Serif+Thai:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&family=Sriracha&family=Trirong:wght@300;400;500;600;700&display=swap');


* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Sarabun', sans-serif; background-color: var(--bg); color: var(--text); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* Navbar UI & Intelligent Dropdown */
.navbar { background-color: var(--header-bg); color: var(--header-text); padding: 0 20px; position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; height: 70px; }
.logo { font-size: 1.4rem; font-weight: 700; color: var(--header-text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--header-icon); }
.nav-links { display: flex; align-items: center; list-style: none; gap: 5px; }
.nav-links a { color: var(--header-text-muted); text-decoration: none; padding: 10px 15px; border-radius: 6px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; }
.nav-links a:hover { color: var(--header-text); background-color: color-mix(in srgb, var(--header-text) 8%, transparent); }

/* Dropdown Menu when menu overflows */
.dropdown { position: relative; }
.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background-color: var(--dropdown-bg); min-width: 200px; list-style: none; border-radius: 6px; box-shadow: var(--shadow-md); padding: 5px 0; }
.dropdown-content a { border-radius: 0; padding: 12px 20px; }
.dropdown:hover .dropdown-content { display: block; }

.menu-toggle, .hamburger { display: none; }

/* Elements styling */
.main-wrapper { flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 30px 20px; }
.container { width: 100%; }
.welcome-box { background: linear-gradient(135deg, var(--header-bg), color-mix(in srgb, var(--header-bg) 70%, var(--text-strong))); color: var(--header-text); padding: 40px; border-radius: 12px; margin-bottom: 30px; box-shadow: var(--shadow-md); }
.welcome-box h1 { font-size: 1.8rem; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.welcome-box h1 i { color: var(--header-icon); }

/* Grid Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.stat-card { background-color: var(--card-bg); padding: 25px; border-radius: 12px; display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.stat-card i { font-size: 2.5rem; padding: 15px; border-radius: 10px; background-color: var(--surface-subtle); }
.stat-card i.icon-main { color: var(--icon-accent, var(--accent)); }
.stat-card i.icon-warning { color: var(--icon-warning, var(--warning)); }
.stat-card i.icon-danger { color: var(--icon-danger, var(--danger)); }
.stat-card h3 { font-size: 1.6rem; font-weight: 700; color: var(--primary); }

/* Forms & UI Controls */
.layout-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
@media (max-width: 900px) { .layout-grid { grid-template-columns: 1fr; } }
.card { background-color: var(--card-bg); padding: 30px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); height: fit-content; }
.card h3 { margin-bottom: 20px; font-size: 1.2rem; border-bottom: 2px solid var(--bg); padding-bottom: 10px; color: var(--primary); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.form-control { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 1rem; color: var(--text); background-color: var(--surface-muted); transition: all 0.3s ease; }
.form-control:focus { outline: none; border-color: var(--accent); background-color: var(--surface-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 35%, transparent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.3s ease; }
.btn-primary { background-color: var(--button-bg); color: var(--button-text); }
.btn-primary:hover { background-color: var(--button-hover); color: var(--button-text); }
.btn-block { width: 100%; display: flex; }

/* Login Box UI */
.login-container { display: flex; justify-content: center; align-items: center; padding: 60px 0; }
.login-box { background-color: var(--card-bg); padding: 40px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); width: 100%; max-width: 450px; }
.login-box h2 { text-align: center; margin-bottom: 25px; color: var(--primary); font-size: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* Data Tables */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--border); }
.table th { background-color: var(--table-header-bg); font-weight: 700; color: var(--table-header-text); }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.status-badge.available { background-color: var(--success-bg); color: var(--success-text); }
.status-badge.borrowed { background-color: var(--warning-bg); color: var(--warning-text); }

/* Alerts */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.alert-danger { background-color: var(--danger-bg); color: var(--danger-text); border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); }
.alert-success { background-color: var(--success-bg); color: var(--success-text); border: 1px solid color-mix(in srgb, var(--success) 48%, var(--border)); }

/* Footer UI */
.footer { background-color: var(--surface-card); border-top: 1px solid var(--border); padding: 20px; font-size: 0.9rem; color: var(--text-light); margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.footer-stats { display: flex; gap: 20px; }
.footer-stats span { display: flex; align-items: center; gap: 6px; }
.footer-stats strong { color: var(--primary); }

/* Errors */
.error-container { text-align: center; padding: 60px 20px; }
.error-icon { font-size: 4rem; color: var(--danger); margin-bottom: 20px; }

/* Animations */
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Responsive Dropdown Collapse */
@media (max-width: 768px) {
    .hamburger { display: block; font-size: 1.5rem; cursor: pointer; color: var(--header-text); }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background-color: var(--drawer-bg); padding: 20px; border-top: 1px solid color-mix(in srgb, var(--header-text) 12%, transparent); box-shadow: var(--shadow-md); gap: 10px; }
    .nav-links li, .dropdown { width: 100%; }
    .dropdown-content { position: static; display: none; background-color: color-mix(in srgb, var(--drawer-text) 9%, transparent); width: 100%; box-shadow: none; padding-left: 15px; }
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown-btn:focus + .dropdown-content, .dropdown-content:hover { display: block; }
    .menu-toggle:checked ~ .nav-links { display: flex; }
    .footer-container { flex-direction: column; text-align: center; }
}

/* =========================================================
   Migrated legacy page CSS (centralized)
   ========================================================= */

/* Migrated from views/pages/barcode.php */

        body.page-barcode .card{ background: var(--surface-card); padding: 20px; border-radius: 12px; box-shadow: var(--shadow-sm); }
        body.page-barcode .form-control{ width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; }
        body.page-barcode .btn{ padding: 10px 20px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; transition: background 0.3s; }
        body.page-barcode .btn-primary{ background-color: var(--button-bg); color: var(--button-text); }
        body.page-barcode .table{ width: 100%; border-collapse: collapse; margin-top: 20px; }
        body.page-barcode .table th, body.page-barcode .table td{ padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
        body.page-barcode .status-badge{ padding: 4px 8px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }

        

        /* รูปแบบฉลาก (ปรับ flex-shrink และ line-height ป้องกันข้อความโดนบัง) */
        body.page-barcode .print-label{ width: 140px; height: 110px; border: 1px dashed var(--border); display: flex; flex-direction: column; justify-content: center; padding: 4px; box-sizing: border-box; background: var(--surface-card); page-break-inside: avoid; margin: 0; }
        body.page-barcode .barcode-area{ height: 50px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 2px; }
        body.page-barcode .barcode-area canvas, body.page-barcode .barcode-area svg{ width: 100%; height: 100%; object-fit: contain; }
        body.page-barcode .code-text{ font-family: monospace; font-size: 11px; text-align: center; letter-spacing: 1px; color: var(--text-strong); flex-shrink: 0; }
        body.page-barcode .book-title{ font-size: 10px; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-strong); font-weight: bold; flex-shrink: 0; line-height: 1.3; }
        
        /* Grid พื้นที่สำหรับเรนเดอร์ตอนพิมพ์ */
        body.page-barcode .label-grid{ display: grid; grid-template-columns: repeat(auto-fill, 140px); gap: 10px; justify-content: center; }
    

/* Migrated from views/pages/books.php */

body.page-books .tab-wrapper{ display: flex; flex-wrap: wrap; background: var(--surface-card); padding: 20px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
body.page-books .tab-wrapper input[type="radio"]{ display: none; }
body.page-books .tab-wrapper label{ padding: 12px 24px; font-weight: 600; cursor: pointer; border-radius: 8px; margin-right: 5px; transition: all 0.3s ease; color: var(--text-light); display: inline-flex; align-items: center; gap: 8px; }
body.page-books .tab-wrapper label:hover{ background-color: var(--surface-subtle); color: var(--primary); }
body.page-books .tab-wrapper input[type="radio"]:checked + label{ background-color: var(--button-bg); color: var(--button-text); }

body.page-books .tab-panels{ display: none; width: 100%; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
body.page-books input[name="tabs"]:checked ~ .tab-panels{ display: block; }
body.page-books .tab-panel{ display: none; animation: fadeIn 0.4s ease-out; }

body.page-books #tab1:checked ~ .tab-panels #panel1, body.page-books #tab2:checked ~ .tab-panels #panel2, body.page-books #tab3:checked ~ .tab-panels #panel3, body.page-books #tab5:checked ~ .tab-panels #panel5, body.page-books #tab4:checked ~ .tab-panels #panel4{ display: block; }


/* Migrated from views/pages/home.php */

body.page-home .tab-wrapper{ display: flex; flex-wrap: wrap; background: var(--surface-card); padding: 20px; border-radius: 12px; border: 1px solid var(--border); }
body.page-home .tab-wrapper input[type="radio"]{ display: none; }
body.page-home .tab-wrapper label{ padding: 12px 24px; font-weight: 600; cursor: pointer; border-radius: 8px; margin-right: 5px; transition: all 0.3s ease; color: var(--text-light); display: inline-flex; align-items: center; gap: 8px; }
body.page-home .tab-wrapper label:hover{ background-color: var(--surface-subtle); color: var(--primary); }
body.page-home .tab-wrapper input[type="radio"]:checked + label{ background-color: var(--button-bg); color: var(--button-text); }
body.page-home .tab-panels{ width: 100%; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
body.page-home .tab-panel{ display: none; animation: fadeIn 0.4s ease-out; }

/* ควบคุมการเปิดปิด Tab ตาม id ที่ถูก check */
body.page-home #htab1:checked ~ .tab-panels #hpanel1, body.page-home #htab_ebook:checked ~ .tab-panels #hpanel_ebook, body.page-home #htab_borrow:checked ~ .tab-panels #hpanel_borrow, body.page-home #htab_return:checked ~ .tab-panels #hpanel_return, body.page-home #htab2:checked ~ .tab-panels #hpanel2{ display: block; }

body.page-home .modal-overlay{ display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: var(--overlay-bg); align-items: center; justify-content: center; backdrop-filter: blur(3px); }
body.page-home .modal-content{ background-color: var(--surface-card); padding: 30px; border-radius: 12px; width: 90%; position: relative; box-shadow: var(--shadow-lg); }
body.page-home .close-btn{ position: absolute; top: 15px; right: 20px; color: var(--text-muted); font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.2s; }
body.page-home .close-btn:hover{ color: var(--danger); }


/* Migrated from views/pages/members - สำเนา.php */

body.page-members---copy .photo-preview-box{ width: 120px; height: 150px; border: 2px dashed var(--border); border-radius: 6px; overflow: hidden; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; }
body.page-members---copy .photo-preview-box img{ width: 100%; height: 100%; object-fit: cover; }
body.page-members---copy .filter-controls input[type="range"]{ width: 100%; margin-bottom: 8px; }

body.page-members---copy .btn-sm{ padding: 4px 10px; font-size: 0.9rem; background: var(--surface-strong); color: var(--primary); border: none; border-radius: 4px; cursor: pointer; }
body.page-members---copy .btn-sm:hover{ background: var(--button-bg); color: var(--button-text); }

body.page-members---copy .tab-wrapper{ display: flex; flex-wrap: wrap; background: var(--surface-card); padding: 20px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
body.page-members---copy .tab-wrapper input[type="radio"]{ display: none; }
body.page-members---copy .tab-wrapper label{ padding: 12px 24px; font-weight: 600; cursor: pointer; border-radius: 8px; margin-right: 5px; transition: all 0.3s ease; color: var(--text-light); display: inline-flex; align-items: center; gap: 8px; }
body.page-members---copy .tab-wrapper label:hover{ background-color: var(--surface-subtle); color: var(--primary); }
body.page-members---copy .tab-wrapper input[type="radio"]:checked + label{ background-color: var(--button-bg); color: var(--button-text); }

body.page-members---copy .tab-panels{ display: none; width: 100%; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
body.page-members---copy input[name="tabs"]:checked ~ .tab-panels{ display: block; }
body.page-members---copy .tab-panel{ display: none; animation: fadeIn 0.4s ease-out; }

body.page-members---copy #tab1:checked ~ .tab-panels #panel1, body.page-members---copy #tab2:checked ~ .tab-panels #panel2, body.page-members---copy #tab3:checked ~ .tab-panels #panel3, body.page-members---copy #tab5:checked ~ .tab-panels #panel5, body.page-members---copy #tab6:checked ~ .tab-panels #panel6, body.page-members---copy #tab4:checked ~ .tab-panels #panel4{ display: block; }

body.page-members---copy .id-card-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; width: 100%; }
body.page-members---copy .id-card{ width: 325px; height: 204px; border: 2px solid var(--text-strong); border-radius: 8px; background: var(--surface-card); position: relative; box-sizing: border-box; overflow: hidden; page-break-inside: avoid; background-image: linear-gradient(135deg, var(--surface-card) 0%, var(--surface-subtle) 100%); color: var(--text-strong); }
body.page-members---copy .id-card-header{ background: var(--header-bg); color: var(--header-text); text-align: center; padding: 6px; font-weight: bold; font-size: 13px; letter-spacing: 1px; }
body.page-members---copy .id-card-body{ display: flex; padding: 10px; align-items: center; gap: 12px; height: 140px; box-sizing: border-box; }
body.page-members---copy .id-card-photo-slot{ width: 75px; height: 95px; border: 1px solid var(--border); background: var(--surface-strong); border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.page-members---copy .id-card-photo-slot img{ width: 100%; height: 100%; object-fit: cover; }
body.page-members---copy .id-card-info{ flex: 1; min-width: 0; }
body.page-members---copy .id-card-info h4{ margin: 0 0 4px 0; font-size: 14px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.page-members---copy .id-card-info p{ margin: 2px 0; font-size: 11px; color: var(--text); }
body.page-members---copy .id-card-barcode-area{ position: absolute; bottom: 22px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-card); padding: 4px 0; border-top: 1px dashed var(--border); }
body.page-members---copy .id-card-barcode-area canvas{ height: 32px; max-width: 90%; }
body.page-members---copy .id-card-footer{ position: absolute; bottom: 0; width: 100%; background: var(--button-bg); color: var(--header-text); text-align: center; font-size: 10px; padding: 3px 0; font-weight: bold; }


@media screen{ body.page-members---copy .print-only-zone{ display: none; } }


/* Migrated from views/pages/members.php */

body.page-members .photo-preview-box{ width: 120px; height: 150px; border: 2px dashed var(--border); border-radius: 6px; overflow: hidden; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; }
body.page-members .photo-preview-box img{ width: 100%; height: 100%; object-fit: cover; }
body.page-members .filter-controls input[type="range"]{ width: 100%; margin-bottom: 8px; }

body.page-members .btn-sm{ padding: 4px 10px; font-size: 0.9rem; background: var(--surface-strong); color: var(--primary); border: none; border-radius: 4px; cursor: pointer; }
body.page-members .btn-sm:hover{ background: var(--button-bg); color: var(--button-text); }

body.page-members .tab-wrapper{ display: flex; flex-wrap: wrap; background: var(--surface-card); padding: 20px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
body.page-members .tab-wrapper input[type="radio"]{ display: none; }
body.page-members .tab-wrapper label{ padding: 12px 24px; font-weight: 600; cursor: pointer; border-radius: 8px; margin-right: 5px; transition: all 0.3s ease; color: var(--text-light); display: inline-flex; align-items: center; gap: 8px; }
body.page-members .tab-wrapper label:hover{ background-color: var(--surface-subtle); color: var(--primary); }
body.page-members .tab-wrapper input[type="radio"]:checked + label{ background-color: var(--button-bg); color: var(--button-text); }

body.page-members .tab-panels{ display: none; width: 100%; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
body.page-members input[name="tabs"]:checked ~ .tab-panels{ display: block; }
body.page-members .tab-panel{ display: none; animation: fadeIn 0.4s ease-out; }

body.page-members #tab1:checked ~ .tab-panels #panel1, body.page-members #tab2:checked ~ .tab-panels #panel2, body.page-members #tab3:checked ~ .tab-panels #panel3, body.page-members #tab5:checked ~ .tab-panels #panel5, body.page-members #tab6:checked ~ .tab-panels #panel6, body.page-members #tab4:checked ~ .tab-panels #panel4{ display: block; }

body.page-members .id-card-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; width: 100%; }
body.page-members .id-card{ width: 325px; height: 204px; border: 2px solid var(--text-strong); border-radius: 8px; background: var(--surface-card); position: relative; box-sizing: border-box; overflow: hidden; page-break-inside: avoid; background-image: linear-gradient(135deg, var(--surface-card) 0%, var(--surface-subtle) 100%); color: var(--text-strong); }
body.page-members .id-card-header{ background: var(--header-bg); color: var(--header-text); text-align: center; padding: 6px; font-weight: bold; font-size: 13px; letter-spacing: 1px; }
body.page-members .id-card-body{ display: flex; padding: 10px; align-items: center; gap: 12px; height: 140px; box-sizing: border-box; }
body.page-members .id-card-photo-slot{ width: 75px; height: 95px; border: 1px solid var(--border); background: var(--surface-strong); border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.page-members .id-card-photo-slot img{ width: 100%; height: 100%; object-fit: cover; }
body.page-members .id-card-info{ flex: 1; min-width: 0; }
body.page-members .id-card-info h4{ margin: 0 0 4px 0; font-size: 14px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.page-members .id-card-info p{ margin: 2px 0; font-size: 11px; color: var(--text); }
body.page-members .id-card-barcode-area{ position: absolute; bottom: 22px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-card); padding: 4px 0; border-top: 1px dashed var(--border); }
/* [UPDATED] เปลี่ยนจาก canvas เป็น svg หรือ canvas เพื่อรองรับไลบรารีใหม่ */
body.page-members .id-card-barcode-area svg, body.page-members .id-card-barcode-area canvas{ height: 35px; max-width: 90%; }
body.page-members .id-card-footer{ position: absolute; bottom: 0; width: 100%; background: var(--button-bg); color: var(--header-text); text-align: center; font-size: 10px; padding: 3px 0; font-weight: bold; }


@media screen{ body.page-members .print-only-zone{ display: none; } }


/* Migrated from views/pages/reports.php */

/* CSS ปรับการพิมพ์ A4 */


/* Generated utility classes migrated from inline style attributes */
.u-00d4255055{background:var(--surface-subtle); color:var(--text-strong); margin-bottom:10px; display:inline-block;}
.u-0234a98c11{box-shadow: var(--shadow-sm); margin-bottom: 30px;}
.u-02d0fc7517{padding: 10px 8px 0 8px;}
.u-0403157f6d{background:var(--surface-card); padding:25px; border-radius:12px; width:400px; max-width:90%; position:relative;}
.u-047a5e5af9{background:var(--surface-subtle); font-size:0.85rem;}
.u-04cae5767c{width:100%; height:100%; object-fit:cover;}
.u-05ad4e215a{font-size: 2.5rem; color: var(--success); margin-bottom: 10px;}
.u-05ee32208e{color:var(--primary); font-size:1.1rem; border-bottom:2px solid var(--accent); padding-bottom:10px; display:inline-block;}
.u-070895ac45{color:var(--success); font-size:1.8rem; padding:10px;}
.u-072f651c1a{background:var(--accent); color:var(--button-text); font-size:0.85rem;}
.u-08ee4bf136{padding:15px; font-size:1.1rem;}
.u-092feb7da4{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px;}
.u-0985eaa715{font-size:0.9rem; color:var(--text-light); margin-bottom:10px;}
.u-098701688e{background: var(--surface-strong); position: sticky; top: 0; z-index: 10;}
.u-0a8850bd6f{display: flex; align-items: center; gap: 10px; background: var(--surface-card); padding: 10px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer;}
.u-0c417ff653{margin:0; font-size:0.85rem;}
.u-0cd28ce9ba{display:inline;}
.u-0d54737a02{text-align:left; background:var(--surface-muted); padding:15px; border-radius:8px; border:1px solid var(--border); margin-top:15px; font-size:0.9rem; line-height:1.6;}
.u-0d7010b773{color:var(--danger);}
.u-0e5fd57dd0{background-color:var(--danger); padding:15px; font-size:1.1rem;}
.u-0e9dd50f52{width:120px; height:160px; background:var(--surface-strong); margin:0 auto 15px auto; border-radius:6px; overflow:hidden; display:flex; align-items:center; justify-content:center;}
.u-0f32bfa91a{margin: 0; color: var(--primary); font-size: 1.8rem;}
.u-10e19acaa3{border:none;}
.u-119a627c4d{display:grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap:15px; margin-top:15px;}
.u-129167270a{text-align:center; vertical-align:middle;}
.u-130c117f16{font-size:3rem; color:var(--text-muted);}
.u-1386c47098{width: 100%; max-width: 480px; padding: 40px; border-top: 5px solid var(--primary); box-shadow: var(--shadow-md); border-radius: 12px; background: var(--surface-card);}
.u-14112a4aa1{border-left: 4px solid var(--warning); padding:15px;}
.u-14426a5b24{display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px;}
.u-148ea2aa49{display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px;}
.u-1519d1576d{font-weight:600; display:block; text-align:center; margin-bottom:10px;}
.u-158947d153{border-left: 4px solid var(--danger); padding:15px;}
.u-169e03a652{text-align:center; color:var(--text-light); padding:20px;}
.u-16edcfb33f{background:var(--danger); color:var(--button-text); font-size:0.8rem; width:100%; margin-top:15px; padding:6px;}
.u-17180470c1{background:var(--surface-muted); padding:20px; border-radius:8px; border:1px solid var(--border); margin-bottom:25px;}
.u-173e380a43{background:var(--surface-strong); color:var(--text-strong); display:inline-block; font-size:0.75rem;}
.u-188b5f39d0{width: 80px; text-align: center;}
.u-189a0085fb{background:var(--success); padding:6px 15px;}
.u-18a2c3d845{font-size:0.8rem; color:var(--text-light); margin-bottom:5px;}
.u-198090b9fa{width:80px; height:110px; border:1px solid var(--border); border-radius:4px; overflow:hidden; background:var(--surface-strong); margin:0 auto 10px auto;}
.u-1988f84759{padding: 4px 8px; background: var(--danger); color: var(--header-text);}
.u-1ac281d5b0{text-align:center; background:var(--surface-card); padding:15px; border:1px solid var(--border); border-radius:8px;}
.u-1da9facb4d{margin:0;}
.u-1e3f6d6135{padding:8px 12px;}
.u-1f05649aec{background:var(--surface-muted); padding:15px; border-radius:8px; border:1px solid var(--border); margin-bottom:20px;}
.u-1f345de5a7{padding: 14px; font-size: 1.1rem; border-radius: 8px;}
.u-1f83a4fcf5{font-size:0.75rem; color:var(--text-light);}
.u-1fbabc9be8{font-size:4rem; color:var(--text-muted); margin-top:25px; display:block;}
.u-205024ba49{padding:4px 8px; background:var(--danger); color:var(--button-text);}
.u-207bb28334{font-size:1.1rem; padding:15px; border-color:var(--accent);}
.u-21d91b7027{display:block;}
.u-22d055cd63{font-size:0.85rem;}
.u-236f8663b3{display:none; margin-top:20px; text-align:center; padding:15px; background:var(--surface-muted); border-radius:8px; border:1px solid var(--border);}
.u-244c25e218{margin-bottom:15px; color:var(--danger-text); border-bottom:2px solid var(--danger); padding-bottom:5px;}
.u-2511aed0b6{background-color: var(--success); font-size:1rem; padding:10px 20px;}
.u-2534d3917c{background:var(--surface-card); border:1px solid var(--border); border-radius:8px; padding:20px; padding-bottom:5px;}
.u-266d882f21{background: var(--surface-subtle); position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow-sm);}
.u-27231daefd{display:flex; align-items:center; gap:8px;}
.u-274420d375{background-color: var(--surface-strong); color: var(--primary); text-decoration: none;}
.u-274fac7901{flex:1; min-width:250px;}
.u-27649b76d2{background:var(--success);}
.u-2775dfe213{font-size:0.9rem; color:var(--text-light);}
.u-27895aa49c{font-size: 0.9rem;}
.u-27daf9b9b7{display:grid; grid-template-columns:1fr 1fr; gap:10px; font-size:0.85rem; line-height:1.6;}
.u-28113263e5{margin-top: 25px; display:none; background:var(--success-bg); border:1px solid color-mix(in srgb, var(--success) 48%, var(--border));}
.u-291b7bbb01{margin-top:0;}
.u-29dbf95ce3{width:130px;}
.u-2ad17b1c95{text-align: center; width: 140px;}
.u-2d50f4d5cd{display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; flex-wrap:wrap; gap:15px;}
.u-2d98adf5c6{margin-bottom: 10px;}
.u-2e3432a039{border:1px solid var(--border); padding:8px;}
.u-2e6acc396f{display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:15px;}
.u-2fbb913e23{font-weight:700; color:var(--primary); font-size:1.05rem;}
.u-2ff4c49d57{list-style:none; padding:0; margin:0;}
.u-31b64934cb{color: var(--warning); border-bottom-color: color-mix(in srgb, var(--warning) 35%, var(--border));}
.u-31dd06cff5{margin: 0; padding-left: 20px;}
.u-321dd4d270{width:50px; height:65px; background:var(--surface-strong); border:1px solid var(--border); border-radius:4px; overflow:hidden; margin:0 auto; display:flex; align-items:center; justify-content:center;}
.u-333497cba2{width:100px; height:120px; border:2px solid var(--accent); border-radius:6px; overflow:hidden; background:var(--surface-strong); margin:0 auto 10px auto;}
.u-33708ade20{position:absolute; top:15px; right:20px; font-size:28px; cursor:pointer; color:var(--text-muted);}
.u-33c65c795b{width:40px; height:55px; background:var(--surface-strong); border-radius:4px; overflow:hidden; flex-shrink:0;}
.u-33caeade25{border-left: 4px solid var(--secondary); padding:15px;}
.u-34ff509269{display:flex; justify-content:space-between; color:var(--accent);}
.u-3578f38b37{font-size:1.8rem; padding:10px;}
.u-35b966b391{text-decoration:none; padding:8px 15px;}
.u-36e71424e4{margin-top:5px; display:block;}
.u-3741807137{text-align:left; background:var(--surface-muted); padding:10px; border-radius:8px; margin-bottom:15px; font-size:0.85rem;}
.u-3885f9170e{background:var(--success); color:var(--button-text); font-size:0.85rem;}
.u-39ffb6238c{margin-bottom: 25px;}
.u-3a1ce64ead{flex:2; min-width:300px;}
.u-3afd7cfbed{padding:10px 15px;}
.u-3b1b7ecca8{padding: 4px 8px; background: var(--warning); color: var(--header-text);}
.u-3b21b9868f{color:var(--text-strong);}
.u-3bd5137543{color: var(--primary); display: block; margin-bottom: 5px;}
.u-3c3f239084{color:var(--text-muted); font-size:1.5rem;}
.u-3c5a730d74{margin-top: 30px;}
.u-3dfa1048c0{color:var(--warning);}
.u-3e557b768d{background:var(--surface-muted); border:1px solid var(--border); border-radius:8px; overflow:hidden;}
.u-3e60c200fa{margin-top:10px; padding:8px; font-size:0.85rem;}
.u-3f0434746b{font-size:0.8rem; padding:4px;}
.u-3fcf8a178b{font-size:0.7rem; padding:1px 5px; background:var(--surface-strong); color:var(--text-strong);}
.u-40e4b50249{margin:0; color:var(--primary); font-size:1.1rem;}
.u-4173cf2b59{font-size:0.9rem; line-height:1.7;}
.u-41f999b3fb{display:flex; justify-content:space-between; align-items:center;}
.u-434f1922b0{display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));}
.u-43eb93215b{border:1px solid var(--border); padding:8px; font-weight:bold;}
.u-44482d9a91{font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px;}
.u-44f703adcc{text-align:center; padding: 20px; color:var(--text-light);}
.u-457244cd6f{padding:5px 15px;}
.u-45852c5f58{text-align:center; color:var(--primary); margin-bottom:15px;}
.u-45ae5b581e{margin-top: 15px; padding: 12px 25px;}
.u-4751f14153{background:var(--surface-subtle); color:var(--text-strong); font-weight:bold; font-size:0.8rem; margin-bottom:10px; display:inline-block;}
.u-481ed7e754{padding:10px;}
.u-48b1cc7758{display:flex; gap:10px;}
.u-493e1d3df5{margin-top: 15px; text-align: right;}
.u-49e4866e17{margin-top: 5px;}
.u-4a18c6bd7d{margin:5px 0 0 0; color:var(--text-light); font-size:0.9rem;}
.u-4a53ec0bd1{grid-template-columns: 1fr 1fr; margin-top: 20px;}
.u-4a66e9082f{background: var(--surface-card); padding: 20px; border-radius: 8px; border:1px solid var(--border); margin-bottom: 20px;}
.u-4b8f0db99c{font-weight: 600; color: var(--text); margin-bottom: 8px; display: block;}
.u-4bb11d69f0{font-size: 0.75rem; color: var(--warning); font-weight:600; background:var(--warning-bg); padding:2px 8px; border-radius:10px;}
.u-4bbc72eda6{background:var(--surface-strong); color:var(--text-strong); font-weight:600;}
.u-4cbb13c6ae{background-color:var(--danger);}
.u-4e78a6e531{padding:6px 12px;}
.u-4ed15aab33{max-height: 400px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted);}
.u-50150adf30{text-align: center; font-size: 1.1rem; display:block;}
.u-507ba1c264{background-color:var(--danger-bg); color:var(--danger-text); font-weight:bold; display:block; margin-bottom:5px;}
.u-50b2e82150{font-size:1.1rem; padding:15px; border-color:var(--warning);}
.u-50f3a68f99{text-align:center; padding:30px; color:var(--text-light);}
.u-521e8357ca{text-align:center; padding:15px; color:var(--text-light);}
.u-52e1eb89a4{color:var(--success); font-weight:bold;}
.u-54be67a10d{background:var(--danger-bg); color:var(--danger-text); padding:6px 12px;}
.u-55640a6280{background-color:var(--danger-bg); color:var(--danger-text); font-weight:bold;}
.u-559c256738{color:var(--text-light);}
.u-55c2facb68{margin:0 0 5px 0; color:var(--primary);}
.u-563c0eaceb{font-size: 0.8rem; font-weight: bold; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom:4px;}
.u-564e090bbc{width:120px; height:150px; border:3px solid var(--primary); border-radius:8px; overflow:hidden; background:var(--surface-strong); margin:0 auto 10px auto;}
.u-56f9815547{color:var(--text-light); font-weight:600;}
.u-5828300254{display:flex; gap:5px;}
.u-590a460c94{max-width: 500px; text-align:center;}
.u-5dfad3370e{margin:10px auto;}
.u-5e41735af0{font-size:1.1rem; color:var(--success);}
.u-5efb2661e2{text-align: center; margin-bottom: 20px;}
.u-5fa693f3d4{margin-top: 20px;}
.u-611bf920db{width: 160px;}
.u-6188fe8b2d{color:var(--text-muted); font-size:1.2rem;}
.u-61a2eefa53{font-size:0.8rem; background:var(--surface-muted); padding:10px; border-radius:6px; border:1px solid var(--border); text-align:left;}
.u-6221ced1fe{color:var(--success);}
.u-6261e4d9bd{padding:0; overflow:hidden; height: 750px; border:1px solid var(--border);}
.u-62802ea1e2{margin: 5px 0; border: 0; border-top: 1px solid var(--border);}
.u-62c9fb4170{border-left: 4px solid var(--accent); padding:15px;}
.u-63283a5b54{width:100px; height:120px; border:2px solid var(--accent); border-radius:6px; overflow:hidden; background:var(--surface-strong); margin:10px auto 15px auto;}
.u-63d058f849{cursor:pointer;}
.u-6446672185{color:var(--danger); font-size:0.75rem;}
.u-64df0d9fe1{display:block; text-align:center; line-height:55px; color:var(--text-muted);}
.u-64f11042e8{text-align:center; color:var(--danger);}
.u-651ccf0b1e{color:var(--text-light); font-size:0.75rem;}
.u-65705a3ce2{padding-bottom: 10px; color: var(--text-muted);}
.u-65827f8665{width: 80px; height: 80px; background: var(--surface-subtle); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto;}
.u-6693e03223{margin-top:0; color:var(--text); border-bottom:1px solid var(--border); padding-bottom:5px;}
.u-66a036f830{text-align: center; margin-bottom: 30px;}
.u-67713d1975{padding:0; overflow:hidden;}
.u-6921dc362f{border-left: 4px solid var(--success); padding:15px;}
.u-6a945c4e39{width:100%; height:230px; background:var(--surface-strong); border:1px solid var(--border); border-radius:6px; overflow:hidden; display:flex; align-items:center; justify-content:center;}
.u-6bd482e8e1{display:grid; grid-template-columns: 2fr 1fr; gap:15px; align-items:end;}
.u-6c97ff5554{padding: 4px; font-size: 0.8rem;}
.u-6cb4e1e96b{font-size:0.8rem; background:var(--surface-strong); color:var(--text-strong); display:inline-block;}
.u-6ccde805ba{grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 30px;}
.u-6d0379bf0d{margin-top:0; color:var(--primary);}
.u-6eb28feab6{display:none; align-items:center; gap:5px;}
.u-6f56d0fa2d{width:100%; height:190px; background:var(--surface-strong); border:1px solid var(--border); border-radius:6px; overflow:hidden; display:flex; align-items:center; justify-content:center;}
.u-6f5c085212{font-size:4rem; color:var(--text-muted); margin-top:35px; display:block;}
.u-700a77bf73{background:var(--surface-strong); color:var(--text-strong); margin-bottom:15px; display:inline-block;}
.u-71a7d19c42{text-align:center; margin-top:15px; font-size:0.9rem; font-weight:bold;}
.u-724a0ea396{display:none; margin-top:20px; text-align:center; padding:15px; background:var(--surface-card); border-radius:8px; border:1px solid color-mix(in srgb, var(--warning) 35%, var(--border));}
.u-72a68ac344{text-align: center;}
.u-72b66b786a{flex: 1; min-width: 200px;}
.u-742c236234{text-align:center; width:100px;}
.u-744e5e9903{grid-template-columns: 1fr 2fr;}
.u-760cbffd65{display: flex; gap: 20px; align-items: flex-end; background: var(--surface-muted); padding: 20px; border-radius: 8px; border: 1px dashed var(--border); flex-wrap: wrap;}
.u-7623f05545{flex:1;}
.u-76386b9e64{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.u-76ec6ae8d8{margin-top:4px; font-size:0.75rem; color:var(--danger); font-weight:bold;}
.u-76f6250080{font-size:0.8rem; color:var(--text-light);}
.u-78ab58477a{display:flex; justify-content:space-between; align-items:center; background:var(--surface-muted); padding:15px; border-radius:8px; border:1px solid var(--border); margin-bottom:20px; flex-wrap:wrap; gap:10px;}
.u-79485cfefb{color: var(--text-light);}
.u-7adb5e919d{vertical-align:middle;}
.u-7add302f6b{background:var(--surface-strong); font-size:0.85rem;}
.u-7c40d2b5b8{background-color: var(--success); padding: 10px 20px;}
.u-7ce8ff0e76{background:var(--surface-card); padding:25px; border-radius:8px; width:400px; max-width:90%;}
.u-7d9af1bf37{background:var(--surface-card); padding:25px; border-radius:12px; width:700px; max-width:90%; position:relative; max-height:90vh; overflow-y:auto;}
.u-7dde5e56b3{margin-bottom:20px;}
.u-7e87af5cc4{color:var(--secondary); background:color-mix(in srgb, var(--secondary) 14%, var(--surface-card)); font-size:1.8rem; padding:10px; border-radius:10px;}
.u-7ed5734099{max-width: 600px; margin: 0 auto; background-color: var(--surface-muted); border: 2px solid var(--border);}
.u-7f038f906a{border:1px solid var(--border); padding:8px; color:var(--text);}
.u-7f84ba2800{font-weight:600; font-size:0.9rem; margin-bottom:6px; display:block;}
.u-8010c69017{background-color: var(--success); width:100%; font-size:1.1rem; padding:12px;}
.u-80ed4165e7{grid-template-columns: 1fr 1fr;}
.u-81c81bf318{border-color:var(--danger);}
.u-823f950fa3{width:100%; font-size:0.9rem; line-height:1.8;}
.u-8265dc5dc1{background:var(--info); color:var(--button-text); padding:8px 12px; text-decoration:none;}
.u-83914cb0e1{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; background:var(--surface-muted); padding:10px; border-radius:8px; border:1px solid var(--border);}
.u-83e8959c15{background-color:var(--danger); font-size:0.85rem;}
.u-84d4a01e1b{background:var(--warning-bg); color:var(--warning-text);}
.u-851833c44e{display:none; position:fixed; z-index:2000; left:0; top:0; width:100%; height:100%; background:var(--overlay-bg); align-items:center; justify-content:center;}
.u-85cd715048{padding:12px 25px;}
.u-85f15d7ec9{display:none; background:var(--surface-muted); padding:15px; border-radius:8px; margin-bottom:15px;}
.u-870b963e5d{display: flex; gap: 10px; margin-bottom: 10px;}
.u-8770571d37{background:var(--surface-subtle); color:var(--text-strong); font-weight:bold; font-size:0.8rem; margin-bottom:15px; display:inline-block;}
.u-888e779ff1{background-color: var(--warning); padding:10px 20px;}
.u-88b3fdfd58{height: 160px; background: var(--surface-strong); display: flex; align-items: center; justify-content: center; overflow: hidden;}
.u-89c11ce9f7{border: 2px solid var(--warning); background-color: var(--surface-card);}
.u-89f20176ee{padding: 15px; font-size: 1.1rem; border-radius: 8px; width: 100%; cursor: pointer;}
.u-89fdb8ee75{background:var(--accent); color:var(--button-text); padding:2px 8px; border-radius:10px; font-size:0.9rem;}
.u-8b602fe6f3{color:var(--primary); font-weight:600;}
.u-8b9a00ffce{color:var(--text-muted); font-size:3rem;}
.u-8c123c8917{background: var(--surface-muted); padding: 10px; border-radius: 8px; border: 1px solid var(--border);}
.u-90010faf15{color:var(--primary);}
.u-905907d31f{background:var(--warning-bg); color:var(--warning-text);}
.u-91fb2887b2{width:160px; flex-shrink:0;}
.u-933a8ef29e{font-size: 0.85rem;}
.u-9350e510df{background:var(--accent); color:var(--button-text); margin-bottom:10px; width:100%; padding:8px;}
.u-942111c5aa{font-size:0.85rem; cursor:pointer;}
.u-9474abdcfd{background:var(--warning); color:var(--button-text); padding:4px 8px;}
.u-94780d75a5{background:var(--surface-strong);}
.u-94c730902f{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; margin-bottom:15px; gap:10px;}
.u-9549346367{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;}
.u-95d936b223{color:var(--primary); font-weight:bold; text-decoration:none;}
.u-9739e6eb45{margin-top: 30px; font-size: 0.85rem; color: var(--text-light); text-align: left; background: var(--surface-muted); padding: 15px 20px; border-radius: 8px; border: 1px solid var(--border); line-height: 1.6;}
.u-988820b8c2{border-top: 4px solid var(--primary);}
.u-994d26f4d2{display:none; flex-direction:column; gap:10px; margin-top:10px;}
.u-99ba7716d7{display:flex; justify-content:flex-end; gap:10px; margin-top:20px;}
.u-9a4ea19c1f{width:250px; padding:8px;}
.u-9a92149cac{width: 100px; text-align: center;}
.u-9b049ee79e{padding:5px;}
.u-9c9b1cbe38{margin-top: 10px; padding: 12px 25px;}
.u-9eb125f52f{margin-top:20px;}
.u-9f7a871649{width:250px; padding:6px;}
.u-9fe45cd88c{width:120px;}
.u-9fef1d7024{text-align: center; font-size: 1.2rem; padding: 15px;}
.u-a01a8671b2{text-align:center; color:var(--primary); border-bottom:2px solid var(--primary); padding-bottom:10px; margin-bottom:20px;}
.u-a07d14a63a{font-size:0.85rem; color:var(--text-light);}
.u-a08ef0bd09{background:var(--danger); color:var(--button-text); padding:4px 8px;}
.u-a1481b821f{display:flex; justify-content:space-between; color:var(--warning); margin-top:8px;}
.u-a19108f68b{font-size:0.8rem; background:var(--surface-strong); color:var(--text-strong); display:inline-block; margin-top:5px;}
.u-a226c4a3b2{color: var(--text-light); font-size: 0.95rem; margin-top: 8px;}
.u-a388befb69{min-height: 80vh; display: flex; align-items: center; justify-content: center; background-color: var(--surface-muted); padding: 20px;}
.u-a3c2c371fa{display: grid; grid-template-columns: 1fr 2fr; gap: 20px; align-items: start;}
.u-a40b8c3ca2{text-align:center; padding:20px;}
.u-a527bac1ee{text-align:right;}
.u-a551163f8c{background-color:var(--success); font-size:1.1rem; padding:15px;}
.u-a5e19f8b05{margin:0; font-size:0.9rem;}
.u-a5fcd0886e{display:none; width: 100%; max-height: 350px; background: var(--surface-strong); margin-bottom:10px; overflow:hidden; border-radius:6px;}
.u-a613ec0350{position:absolute; top:10px; right:15px; font-size:24px; cursor:pointer; color:var(--text-muted);}
.u-a633956043{text-align:center; padding:20px; color:var(--text-light);}
.u-a952d53ef7{display:none; position:fixed; z-index:2100; left:0; top:0; width:100%; height:100%; background:var(--overlay-bg); align-items:center; justify-content:center;}
.u-a9c3106332{width:40px; height:50px; background:var(--surface-strong); border-radius:4px; display:flex; align-items:center; justify-content:center; margin:0 auto;}
.u-a9c3e44607{display:flex; gap:10px; align-items:center; margin:0;}
.u-a9e0c4017b{font-size:0.8rem; padding:5px;}
.u-aa95233b4d{display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;}
.u-aaa1e235f3{max-height: 400px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px;}
.u-ab3b0f5305{padding:5px 12px; font-size:0.85rem;}
.u-ab6aa034d1{cursor:pointer; transition:0.2s;}
.u-ac72c0c0b9{font-size:0.75rem; color:var(--text-muted);}
.u-ac8de055b2{display: grid; grid-template-columns: 1fr 2.5fr; gap: 20px; align-items: start;}
.u-af1d164402{width:100px;}
.u-af3fee87a1{margin-bottom:10px;}
.u-afd5d07901{margin-bottom:15px; color:var(--primary); font-size:1.1rem;}
.u-afe0dc34ed{background:var(--warning);}
.u-afed312096{padding:4px 8px; font-size:0.85rem;}
.u-b0ee418226{transform: scale(0.8); transform-origin: top left; margin: -10px 0;}
.u-b1285b4cfa{max-width: 650px;}
.u-b2172b4715{background:var(--surface-strong); color:var(--text);}
.u-b21f550cc8{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:15px; align-items:center; background:var(--surface-muted); padding:15px; border-radius:8px; border:1px solid var(--border);}
.u-b40ee48164{max-height: 350px; overflow-y: auto; border: 1px solid var(--border); padding: 10px; border-radius: 8px; background: var(--surface-muted);}
.u-b41aeb94ba{max-width: 600px; margin: 0 auto; background-color: var(--surface-muted); border: 2px solid var(--border); padding:30px;}
.u-b4dddabc15{background-color:var(--text);}
.u-b58461d79b{background-color: var(--success); padding: 15px; font-size: 1.1rem;}
.u-b5f0122725{display:none; grid-column:1/-1; color:var(--danger); background:var(--danger-bg); padding:5px 10px; border-radius:4px;}
.u-b64f105eab{width:120px; height:150px; border:3px solid var(--primary); border-radius:8px; overflow:hidden; background:var(--surface-strong); margin:0 auto 15px auto; position:relative;}
.u-b6a7721507{margin:0 0 5px 0; color:var(--primary); font-size:1.1rem;}
.u-b6af64de2a{font-size:3rem; color:var(--text-muted); margin-top:30px; display:block;}
.u-b75fad0009{margin-bottom: 20px;}
.u-b8075645d3{display:flex; justify-content:center; gap:5px; flex-wrap:wrap;}
.u-b8e0b1fa55{color:var(--text-muted);}
.u-b900e25d75{background-color: var(--success);}
.u-b94b1589d7{background:var(--danger); color:var(--button-text); font-size:0.85rem;}
.u-b98a73b4fc{border-top: 4px solid var(--danger);}
.u-bad7d7f42e{margin-bottom:15px; color:var(--primary);}
.u-bada262a94{display:flex; justify-content:space-between; color:var(--warning);}
.u-baee52f457{background-color: var(--surface-strong); color: var(--primary); text-decoration: none; padding:10px 20px;}
.u-bb6d063984{width:40px; height:50px; background:var(--surface-card); border:1px solid var(--border); border-radius:4px; overflow:hidden; margin:0 auto; display:flex; align-items:center; justify-content:center;}
.u-bbadc917e8{margin-top: 15px; display: flex; gap: 10px;}
.u-bc1ba2d678{color:var(--text-light); font-size:0.8rem;}
.u-bcfb66d5de{display:flex; align-items:center; gap:15px; padding:10px; border-bottom:1px solid var(--border);}
.u-bd0fbe19a2{width:120px; color:var(--text-light); font-weight:600;}
.u-bd5d2bd0e3{width:50px;}
.u-bd613d56e4{display:grid; grid-template-columns: 2fr 1fr auto; gap:15px; align-items:end;}
.u-bda9996f7a{width:90px; text-align:center;}
.u-be57ec606a{background:var(--danger-bg); color:var(--danger-text);}
.u-beb1f3153e{vertical-align: middle; text-align: center;}
.u-bf687e7507{text-align:center; padding:15px;}
.u-bfa3e0f6a6{display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:var(--overlay-bg); z-index:9999; align-items:center; justify-content:center;}
.u-c05ee0675e{text-align: center; font-size: 1.1rem;}
.u-c125b00116{display:grid; grid-template-columns:140px 1fr; gap:5px;}
.u-c1aef668d9{padding:4px 8px; background:var(--success); color:var(--button-text);}
.u-c299073994{width: 50px; text-align: center;}
.u-c2ded44f39{background: var(--bg); padding: 20px; border-radius: 8px; text-align: center; border:1px dashed var(--border);}
.u-c36b3d6a99{width: 250px;}
.u-c3ad517140{border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-card); text-align: center; padding-bottom: 10px; box-shadow: var(--shadow-sm); cursor: pointer; transition: 0.3s;}
.u-c3ca395883{color:var(--primary); width:20px; text-align:center; margin:0;}
.u-c42c7ce4c9{width:150px; padding:8px;}
.u-c466b9638f{width:100%; height:100%; object-fit:cover; display:none;}
.u-c4b2bc0ed3{font-weight:bold;}
.u-c4db147a80{border-top: 4px solid var(--warning);}
.u-c4e1ffd88a{background:var(--surface-subtle); color:var(--text-strong); font-weight:bold; font-size:0.75rem;}
.u-c5ef811356{color:var(--primary); margin-top:0; margin-bottom:5px; font-size:1.4rem;}
.u-c6bd80fef1{background:var(--danger); color:var(--button-text);}
.u-c871393177{background-color: var(--warning);}
.u-c8be1ccba6{display:none;}
.u-c8c98870e7{width:100%; background:var(--surface-strong); height:8px; border-radius:4px; overflow:hidden;}
.u-c9ba4bbac4{margin-bottom: 20px; background-color: var(--surface-muted); border:1px solid var(--border);}
.u-c9e4f2e875{border-top: 4px solid var(--accent);}
.u-cad980f4b7{width:100%;}
.u-cbc311ab4f{font-size:0.8rem; color:var(--danger); font-weight:bold;}
.u-ccc79665f6{margin: 0; font-size: 0.85rem;}
.u-ccd0585d0d{background:var(--surface-card); padding:25px; border-radius:12px; width:800px; max-width:95%; position:relative; max-height:90vh; overflow-y:auto;}
.u-cdabf8c1f7{font-size: 1.5rem;}
.u-cf3267f317{display:flex; gap:20px; flex-wrap:wrap; margin-top:10px;}
.u-cfbd263ad6{font-size:0.8rem; color:var(--text-light); margin-top:10px;}
.u-d1e3b864ee{display:flex; gap:20px; flex-wrap:wrap; border-bottom:2px solid var(--bg); padding-bottom:15px; margin-bottom:15px;}
.u-d2dae4fdb6{margin:0; color:var(--primary);}
.u-d327c84da5{text-align:center; padding:15px; color:var(--danger);}
.u-d4b5f1ba0c{display:flex; gap:15px; flex-wrap:wrap; margin-bottom:15px;}
.u-d5800fe58c{margin-top:30px;}
.u-d5b43342a2{grid-column: 1 / -1;}
.u-d63636ef69{max-height: 400px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 15px;}
.u-d772f0f2ef{font-size:9px; font-family:monospace; letter-spacing:1px; margin-top:2px;}
.u-d8a81eac84{margin-top:10px;}
.u-d90bed4a18{flex:1; min-width:200px;}
.u-d984349f8c{display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;}
.u-d9daedb3be{border:1px solid var(--border); padding:8px; text-align:center;}
.u-da0d36d342{color: var(--primary);}
.u-da303dcf86{margin-bottom:15px;}
.u-da57c5e81e{vertical-align: middle;}
.u-da71aab0cc{font-size:1.2rem;}
.u-da7d37f72d{text-align:center; width:130px;}
.u-dac4fe6c9b{text-align:center;}
.u-dcc4f77a50{background-color: var(--surface-strong); color: var(--text);}
.u-dd7272cd7c{margin-bottom: 30px;}
.u-de8dfb90ed{font-size:0.85rem; font-weight:bold; margin-bottom:5px; display:block;}
.u-ded3cbc97d{color:var(--warning); font-weight:bold;}
.u-defa93481e{color:var(--danger);}
.u-e2c32ba3a5{width:140px; flex-shrink:0;}
.u-e31d5935f7{display:none; color:var(--danger); font-size:0.9rem; margin-top:10px;}
.u-e3766f6d8c{color:var(--text-muted); font-size:4rem;}
.u-e3a348c299{background:var(--surface-subtle);}
.u-e40a42aded{padding:4px 8px; background:var(--warning); color:var(--button-text);}
.u-e4a9b7bd82{display: flex; gap: 10px; margin-bottom: 15px; background: var(--surface-subtle); padding: 10px; border-radius: 8px; border: 1px solid var(--border); flex-wrap: wrap;}
.u-e524d64c1c{height: 350px; width: 100%;}
.u-e554494d84{background:var(--surface-muted); padding:20px; border-radius:8px; border:1px solid var(--border); margin-bottom:20px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px;}
.u-e8602f5c02{display:none; width: 100%; max-height: 350px; background: var(--surface-strong); margin-bottom:10px; overflow:hidden;}
.u-eabd49824f{background:var(--surface-strong); color:var(--text);}
.u-eadadc4827{display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap;}
.u-ecb5ba1517{text-align: center; vertical-align: middle;}
.u-eda87698c1{background:var(--warning); color:var(--button-text); font-size:0.8rem; padding:4px 10px;}
.u-edc5ed8dbc{flex: 1; min-width: 250px;}
.u-eef7eae8da{max-width: 100%;}
.u-f05cc836ba{font-size: 2.5rem; color: var(--primary);}
.u-f0b39a5f51{background-color:var(--warning);}
.u-f0d9464680{background: var(--surface-card); border: 1px solid var(--border); color: var(--text); font-size:0.9rem;}
.u-f1831083c7{display:flex; justify-content:space-between; color:var(--text-muted); margin-top:8px;}
.u-f1e129687a{font-weight:600; display:block; margin-bottom:10px;}
.u-f24884fdfb{margin:5px 0; color:var(--primary);}
.u-f2892a2e8a{display: none;}
.u-f414f0dd69{font-size:0.85rem; width:100%; border-collapse:collapse;}
.u-f4564fc34a{font-size: 0.85rem; color: var(--text-light); margin-bottom: 15px;}
.u-f5b46d9d24{text-align:center; border:1px solid var(--border); padding:15px;}
.u-f5bdb74950{text-align: center; padding: 12px; border-radius: 8px; margin-bottom: 20px; background-color: var(--danger-bg); color: var(--danger-text); border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));}
.u-f67e560b06{display:grid; grid-template-columns: 1fr 2fr; gap:20px; border-bottom:2px solid var(--bg); padding-bottom:20px; margin-bottom:15px;}
.u-f72341e1dd{display:flex; justify-content:space-between; margin-bottom:5px; font-size:0.9rem;}
.u-f821f5f09a{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; margin-bottom:15px; border-bottom:2px solid var(--bg); padding-bottom:15px;}
.u-f8cb0be370{width:25px; height:25px; border-radius:50%; overflow:hidden; border:1px solid color-mix(in srgb, var(--header-text) 50%, transparent);}
.u-f9f0ebc1c8{padding-top:10px;}
.u-fa527d15e4{color:var(--primary); font-size:1.1rem; margin-bottom:10px;}
.u-fa8eed6b3d{font-size:0.9rem; color:var(--text-light); margin-bottom:20px;}
.u-fbdd03017b{width:160px; padding:8px;}
.u-fcdef707b5{width:70px; display:inline-block; padding:4px;}
.u-fcea6ea68a{font-size: 4rem; color: var(--accent);}
.u-ff227d0632{margin: 0;}

/* =========================================================
   LMS centralized layout and component architecture
   All page layout rules live here. Theme colors live in theme.css.
   ========================================================= */

:where(html) {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

:where(body) {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    overflow-x: clip;
    min-height: 100vh;
    font-family: var(--font-family, 'Sarabun', sans-serif);
}

:where(button, input, select, textarea) { font: inherit; }
:where(button, [role="button"], a) { -webkit-tap-highlight-color: transparent; }
:where(img, svg, video, canvas) { max-width: 100%; }
:where(a) { color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    z-index: var(--z-skip-link);
    transform: translateY(-160%);
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--surface-card);
    color: var(--text-strong);
    box-shadow: var(--shadow-md);
}
.skip-link:focus { transform: translateY(0); }

.theme-background,
.theme-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.theme-background { z-index: var(--z-background); }
.theme-effects { z-index: var(--z-effects); }
.theme-background,
.theme-effects {
    width: 100vw;
    max-width: 100%;
    contain: strict;
    overflow: hidden;
    overflow: clip;
}

.site-header { z-index: var(--z-header); }
.drawer-overlay { z-index: var(--z-overlay); }
.mobile-drawer { z-index: var(--z-drawer); }
.dropdown-content { z-index: var(--z-dropdown); }
.modal-overlay { z-index: var(--z-modal); }
#global-progress-overlay { z-index: var(--z-loading); }

.main-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin-inline: auto;
    padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 24px);
}

/* Header */
.site-header {
    position: sticky;
    inset-block-start: 0;
    width: 100%;
    padding: 0;
    min-height: var(--header-height, 70px);
}

.nav-container {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    max-width: 1440px;
    min-height: var(--header-height, 70px);
    height: auto;
    margin-inline: auto;
    padding-inline: clamp(12px, 2.5vw, 28px);
}

.logo {
    min-width: max-content;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
}

.theme-symbol { font-size: 1.05rem; line-height: 1; }
.primary-navigation { min-width: 0; }

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    list-style: none;
}

.nav-links > li > a,
.dropdown-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 13px;
    border: 0;
    border-radius: var(--radius-sm, 8px);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-btn > span { display: inline-flex; align-items: center; gap: 8px; }
.dropdown-chevron { transition: transform .2s ease; }
.dropdown.mobile-active .dropdown-chevron,
.dropdown:focus-within .dropdown-chevron { transform: rotate(180deg); }

.dropdown { position: relative; }
.dropdown-content {
    position: absolute;
    inset-block-start: calc(100% + 6px);
    inset-inline-start: 0;
    min-width: 260px;
    max-width: min(92vw, 340px);
    display: none;
    padding: 8px;
    list-style: none;
    border: 1px solid;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
}
.dropdown:hover > .dropdown-content,
.dropdown.desktop-active > .dropdown-content { display: block; }
.dropdown-content li { width: 100%; }
.dropdown-content a {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: calc(var(--radius-sm, 8px) - 2px);
    text-decoration: none;
}
.dropdown-divider { height: 1px; margin: 6px 4px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.icon-button {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}
.hamburger { display: none; }
.mode-icon { display: none; }
.color-mode-toggle[data-mode="light"] .mode-icon-light,
.color-mode-toggle[data-mode="dark"] .mode-icon-dark,
.color-mode-toggle[data-mode="system"] .mode-icon-system { display: inline-block; }

.nav-avatar {
    width: 28px;
    height: 28px;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 50%;
}
.nav-avatar-image { width: 100%; height: 100%; object-fit: cover; }
.nav-user-icon { font-size: 1.2rem; }

.drawer-overlay {
    position: fixed;
    inset: var(--drawer-top, var(--header-height, 70px)) 0 0;
    display: none;
    opacity: 0;
    transition: opacity .22s ease;
}
.drawer-overlay.is-visible { opacity: 1; }
body.drawer-open { overflow: hidden; touch-action: none; }

/* Loading ---------------------------------------------------------------
   การโหลดหน้าเว็บใช้สถานะแบบลอยที่ไม่รับ Pointer จึงเลื่อนหน้า กดปุ่ม
   และอ่านข้อมูลที่โหลดมาแล้วได้ทันที ส่วนงานอัปโหลด/ประมวลผลยังคงใช้
   Overlay แบบ Blocking ตามเดิมผ่านคลาส .is-blocking */
#global-progress-overlay {
    position: fixed;
    right: clamp(10px, 2vw, 24px);
    bottom: clamp(10px, 2vw, 24px);
    left: auto;
    top: auto;
    display: none;
    width: min(90vw, 370px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
    transform: translateY(10px);
}
#global-progress-overlay.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
#global-progress-overlay.is-hiding {
    opacity: 0;
    transform: translateY(10px);
}
#global-progress-overlay.is-page-loading .progress-container {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-lg);
    text-align: left;
}
#global-progress-overlay.is-page-loading .progress-spinner {
    margin: 0;
    font-size: 1.2rem;
}
#global-progress-overlay.is-page-loading .progress-text {
    min-width: 0;
    margin: 0;
    font-size: .95rem;
    line-height: 1.35;
}
#global-progress-overlay.is-page-loading .progress-bar-bg {
    grid-column: 1 / -1;
    height: 6px;
}

#global-progress-overlay.is-blocking {
    inset: 0;
    width: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transform: none;
}
#global-progress-overlay.is-blocking.is-visible { display: flex; }
#global-progress-overlay.is-blocking.is-hiding { transform: none; }
#global-progress-overlay.is-blocking .progress-container {
    width: min(86vw, 340px);
    text-align: center;
}
#global-progress-overlay.is-blocking .progress-spinner {
    margin-bottom: 15px;
    font-size: 3rem;
}
#global-progress-overlay.is-blocking .progress-text {
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.progress-spinner { animation: spin 1s linear infinite; }
.progress-text { font-weight: 700; }
.progress-bar-bg { width: 100%; height: 9px; overflow: hidden; border-radius: 999px; }
.progress-bar-fill { width: 0; height: 100%; transition: width .2s ease; }

@media (max-width: 600px) {
    #global-progress-overlay.is-page-loading {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
    }
}

/* Components */
.container { width: 100%; }
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.card,
.stat-card,
.tab-wrapper,
.login-box {
    position: relative;
    height: fit-content;
}
.card { padding: clamp(18px, 3vw, 30px); }
.card h3 { line-height: 1.45; }

.layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(18px, 3vw, 30px); }
.layout-grid > *,
.dashboard-grid > *,
.settings-two-column > *,
.card,
.stat-card,
.tab-wrapper { min-width: 0; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }

.table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border-radius: inherit;
}
.table { width: 100%; border-collapse: collapse; }
.table th,
.table td { vertical-align: middle; }
.table th { white-space: nowrap; }

.form-group { min-width: 0; }
.form-control,
select,
textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="search"],
input[type="file"] {
    min-height: 46px;
}
textarea.form-control { min-height: 110px; resize: vertical; }

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 52px;
    min-width: 52px;
    height: 44px;
    min-height: 44px;
    cursor: pointer;
    touch-action: manipulation;
}
.toggle-switch input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-switch-track {
    position: relative;
    width: 100%;
    height: 30px;
    border-radius: 999px;
    transition: background .2s ease;
}
.toggle-switch-track::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    inset-block-start: 3px;
    inset-inline-start: 3px;
    border-radius: 50%;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease;
}
.toggle-switch input:checked + .toggle-switch-track::after { transform: translateX(22px); }

.btn { min-height: 44px; touch-action: manipulation; }
.btn-sm { min-height: 36px; }
.btn-danger { background: var(--danger); color: var(--danger-button-text); }
.btn-success { background: var(--success); color: var(--success-button-text); }
.btn-warning { background: var(--warning); color: var(--warning-button-text); }

.status-badge,
.badge,
.tag-cat { line-height: 1.35; }

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
}
.modal-content {
    width: min(94vw, 760px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
}
.close-btn,
.modal-close {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.tooltip { position: relative; }
.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    inset-block-end: calc(100% + 8px);
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 7px 10px;
    border-radius: 7px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease;
}
.tooltip:hover::after,
.tooltip:focus-visible::after { opacity: 1; visibility: visible; }

.footer {
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.footer-container { position: relative; z-index: 1; max-width: 1280px; }
.footer-decoration { position: absolute; inset: 0; pointer-events: none; }

/* Login */
.page-login .main-wrapper { max-width: none; padding: 0; }
.login-page-shell {
    min-height: calc(100vh - var(--header-height, 70px));
    display: grid;
    place-items: center;
    padding: clamp(20px, 5vw, 56px) 16px;
}
.login-card { width: min(100%, 480px); padding: clamp(24px, 5vw, 42px); }
.login-brand { text-align: center; margin-bottom: 28px; }
.login-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    font-size: 2.45rem;
}
.login-help { margin-top: 28px; padding: 16px 20px; line-height: 1.65; }
.login-help ul { margin: 0; padding-inline-start: 20px; }

/* Settings */
.settings-hero { margin-bottom: 24px; }
.settings-layout { display: grid; gap: 22px; }
.settings-section { padding: clamp(18px, 3vw, 28px); }
.settings-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px;
}
.theme-option { position: relative; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-md, 12px);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.theme-option:hover .theme-option-card { transform: translateY(-3px); }
.theme-option.is-selected .theme-option-card { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.theme-option-icon { font-size: 2rem; }
.theme-swatch { display: flex; gap: 5px; }
.theme-swatch span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); }
.theme-swatch span:nth-child(1) { background: var(--swatch-1); }
.theme-swatch span:nth-child(2) { background: var(--swatch-2); }
.theme-swatch span:nth-child(3) { background: var(--swatch-3); }

.mode-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-option { position: relative; }
.mode-option input { position: absolute; opacity: 0; }
.mode-option span {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
}
.mode-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.settings-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.range-setting { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 18px; }
.range-setting input { grid-column: 1 / -1; width: 100%; }
.range-value { min-width: 54px; text-align: end; font-weight: 700; }
.font-preview { margin-top: 12px; padding: 18px; font-size: 1.15rem; line-height: 1.8; }
.custom-color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.color-control { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 10px; }
.color-control input[type="color"] { width: 46px; height: 42px; padding: 2px; border: 1px solid; border-radius: 8px; cursor: pointer; }
.settings-preview { overflow: hidden; }
.preview-header,
.preview-footer { padding: 14px 18px; }
.preview-body { padding: 18px; }
.preview-card { padding: 18px; }
.preview-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.settings-actions { position: sticky; inset-block-end: 12px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px; }
.settings-save-status { padding: 10px 14px; border-radius: 8px; }

/* Utility replacements for data-driven presentation */
.is-hidden { display: none; }
.dynamic-block { display: block; }
.dynamic-flex { display: flex; }
.photo-filter-image { object-fit: cover; }
.member-thumb { width: 40px; height: 50px; object-fit: cover; border-radius: 4px; }
.report-progress-fill { height: 100%; border-radius: 4px; }
.report-progress-fill.is-leading { background: var(--warning); }
.report-progress-fill:not(.is-leading) { background: var(--primary); }
.status-lost { color: var(--danger); font-weight: 700; }
.status-damaged { color: var(--warning); font-weight: 700; }
.hover-lift { transition: transform .3s ease, box-shadow .3s ease; }
.hover-lift:hover { transform: translateY(-5px); }
.interactive-row { cursor: pointer; transition: background-color .2s ease; }
.interactive-row:hover { background: var(--surface-subtle); }
.pagination-button { padding: 4px 10px; }
.pagination-label { padding: 5px 10px; font-weight: 700; }


/* Touch and keyboard accessibility */
button,
a,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }
.form-control,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea { min-height: 44px; }
input[type="checkbox"],
input[type="radio"] { min-width: 20px; min-height: 20px; }

@media (max-width: 1100px) {
    .logo-text { display: none; }
    .nav-links > li > a,
    .dropdown-btn { padding-inline: 10px; }
}

@media (max-width: 900px) {
    :root { --header-height: 64px; }
    .icon-button { width: 48px; height: 48px; min-width: 48px; min-height: 48px; }
    .nav-container { grid-template-columns: auto 1fr auto; }
    .hamburger { display: inline-grid; grid-column: 1; grid-row: 1; }
    .logo { justify-self: center; grid-column: 2; grid-row: 1; }
    .logo-text { display: inline; }
    .primary-navigation {
        position: absolute;
        inset: 0 auto auto 0;
        width: 0;
        height: 0;
        overflow: visible;
    }
    .header-actions { grid-column: 3; grid-row: 1; }
    .settings-shortcut { display: none; }

    .mobile-drawer.nav-links {
        position: fixed;
        inset-block-start: var(--drawer-top, var(--header-height, 64px));
        inset-block-end: 0;
        inset-inline-start: 0;
        width: min(88vw, 360px);
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-lg);
    }
    .mobile-drawer.is-open { transform: translateX(0); }
    .drawer-overlay { display: block; pointer-events: none; }
    .drawer-overlay.is-visible { pointer-events: auto; }

    .nav-links > li,
    .dropdown { width: 100%; }
    .nav-links > li > a,
    .dropdown-btn {
        width: 100%;
        min-height: 50px;
        justify-content: flex-start;
        white-space: normal;
        text-align: start;
    }
    .dropdown-btn { justify-content: space-between; }
    .dropdown:hover > .dropdown-content,
    .dropdown.desktop-active > .dropdown-content { display: none; }
    .dropdown.mobile-active > .dropdown-content {
        position: static;
        display: block;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin-top: 4px;
        padding: 6px;
        border-radius: var(--radius-sm, 8px);
        box-shadow: none;
    }
    .dropdown-content a { min-height: 48px; padding-inline-start: 18px; }

    .layout-grid,
    .settings-two-column { grid-template-columns: 1fr; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-stats { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .logo-text { display: none; }
    .theme-symbol { display: none; }
    .nav-container { gap: 6px; padding-inline: 8px; }
    .main-wrapper { padding-inline: 10px; }
    .card { padding: 16px; }
    .mode-selector { grid-template-columns: 1fr; }
    .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-option-card { min-height: 132px; padding: 12px; }
    .settings-actions { justify-content: stretch; }
    .settings-actions .btn { flex: 1; }
}

@media (max-width: 380px) {
    .theme-grid { grid-template-columns: 1fr; }
}

.settings-help { margin-bottom: 16px; color: var(--text-muted); }
.install-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.install-card { width: min(100%, 720px); }
.install-success { color: var(--success); margin-bottom: 16px; }
.install-warning { color: var(--danger); margin-top: 18px; }
.profile-photo-image { width: 100%; height: 100%; object-fit: cover; }
.login-brand h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 1.9rem); color: var(--text-strong); }
.login-brand p { margin-top: 6px; color: var(--text-muted); }
.login-input { padding: 14px; font-size: 1.05rem; }
.login-submit { min-height: 52px; width: 100%; font-size: 1.05rem; }
.login-help strong { color: var(--text-strong); }
.login-help li + li { margin-top: 8px; }

/* PWA offline fallback */
.offline-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding-block: 32px;
}
.offline-card {
    width: min(100%, 560px);
    text-align: center;
}
.offline-card h1 { margin-bottom: 12px; color: var(--card-text); }
.offline-card p { margin-bottom: 24px; color: var(--card-text-muted, var(--text-muted)); }
.offline-symbol { margin-bottom: 16px; font-size: clamp(3rem, 12vw, 5rem); line-height: 1; }

/* --------------------------------------------------------------------------
   Header / Drawer / Branding reliability fixes
   -------------------------------------------------------------------------- */
.brand-logo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}
.logo-mark.has-custom-logo {
    overflow: hidden;
    padding: 3px;
    background: color-mix(in srgb, var(--header-text) 14%, transparent);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: min(100%, 280px);
}
.footer-brand-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 12px;
    padding: 4px;
    background: color-mix(in srgb, var(--footer-text) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--footer-text) 18%, transparent);
}
.footer-brand p { margin: 0; }
.footer-brand-name { font-weight: 800; color: var(--footer-text); }
.footer-brand-text,
.footer-school-name { margin-top: 2px; color: var(--footer-muted); font-size: .86rem; }

.branding-settings { margin-bottom: 24px; }
.branding-settings-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.branding-logo-panel { display: grid; gap: 14px; }
.branding-logo-preview {
    width: min(100%, 220px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-inline: auto;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
    color: var(--primary);
    font-size: 4rem;
}
.branding-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.check-option {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

@media (min-width: 901px) {
    /* Keep the hover menu alive while the pointer crosses the visual gap. */
    .dropdown::after {
        content: '';
        position: absolute;
        inset-block-start: 100%;
        inset-inline-start: 0;
        width: max(100%, 270px);
        height: 12px;
        display: none;
        background: transparent;
    }
    .dropdown:hover::after,
    .dropdown:focus-within::after,
    .dropdown.hover-active::after,
    .dropdown.desktop-active::after { display: block; }
    .dropdown.hover-active > .dropdown-content,
    .dropdown:focus-within > .dropdown-content { display: block; }
}

@media (max-width: 900px) {
    /* Active desktop styles use header colors; force all drawer states back to
       drawer-specific tokens so light themes never render white-on-white. */
    .mobile-drawer.nav-links .dropdown.is-active > .dropdown-btn,
    .mobile-drawer.nav-links .dropdown.mobile-active > .dropdown-btn,
    .mobile-drawer.nav-links .dropdown.desktop-active > .dropdown-btn,
    .mobile-drawer.nav-links > li > a.profile-link,
    .mobile-drawer.nav-links > li > a.btn-nav {
        color: var(--drawer-text);
    }
    .mobile-drawer.nav-links .dropdown.is-active > .dropdown-btn,
    .mobile-drawer.nav-links .dropdown.mobile-active > .dropdown-btn {
        background: color-mix(in srgb, var(--drawer-text) 10%, transparent);
    }
    .mobile-drawer.nav-links .dropdown-content a,
    .mobile-drawer.nav-links .dropdown-content i,
    .mobile-drawer.nav-links .dropdown-btn i,
    .mobile-drawer.nav-links > li > a i {
        color: currentColor;
    }
    .mobile-drawer.nav-links .dropdown-content a {
        color: var(--drawer-text);
    }
    .mobile-drawer.nav-links .dropdown-content a:hover,
    .mobile-drawer.nav-links .dropdown-content a:focus-visible,
    .mobile-drawer.nav-links .dropdown-content a.is-active {
        color: var(--drawer-text);
        background: color-mix(in srgb, var(--drawer-text) 10%, transparent);
    }
    .dropdown.hover-active > .dropdown-content { display: none; }
    .dropdown.mobile-active > .dropdown-content { display: block; }

    .branding-settings-grid { grid-template-columns: 1fr; }
    .footer-brand { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
    .footer-brand { flex-direction: column; }
    .footer-brand-logo { width: 48px; height: 48px; }
}

/* Profile account fallback and accessible modal */
.account-only-profile,
.profile-empty-state { text-align: center; }
.account-avatar {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--primary);
    border: 1px solid var(--border);
    font-size: 3.4rem;
}
.account-details { margin: 20px 0; text-align: start; }
.account-details > div {
    display: grid;
    grid-template-columns: minmax(100px, .7fr) 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.account-details dt { color: var(--text-muted); font-weight: 700; }
.account-details dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }
.profile-empty-state { display: grid; place-items: center; min-height: 320px; padding: 30px; color: var(--text-muted); }
.profile-empty-state > i { font-size: 4rem; color: var(--primary); margin-bottom: 12px; }
.profile-empty-state h4 { color: var(--text-strong); margin: 0; }
.profile-book-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--link, var(--primary));
    font: inherit;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}
.profile-book-link:hover,
.profile-book-link:focus-visible { text-decoration: underline; }
.modal-close-button {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-end: 10px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--text-strong);
    cursor: pointer;
}
.profile-book-modal-card { position: relative; }
.profile-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 5rem;
    background: var(--surface-muted);
}
