/* =====================================================================
   MAP-C สำหรับอาจารย์ — ธีมใหม่ (โหลดทับ Atlantis/Bootstrap เดิม)
   ฟอนต์ Noto Sans Thai + Noto Sans · กรมท่า #192852 · ทอง #f2b632
   ===================================================================== */
@font-face { font-family: "Lec Noto Thai"; src: url("fonts/NotoSansThai-Regular.woff") format("woff"); font-weight: 400; font-display: block; unicode-range: U+0E00-0E7F; }
@font-face { font-family: "Lec Noto Thai"; src: url("fonts/NotoSansThai-Bold.woff") format("woff"); font-weight: 600 800; font-display: block; unicode-range: U+0E00-0E7F; }
@font-face { font-family: "Lec Noto"; src: url("fonts/NotoSans-Regular.woff") format("woff"); font-weight: 400; font-display: block; }
@font-face { font-family: "Lec Noto"; src: url("fonts/NotoSans-Bold.woff") format("woff"); font-weight: 600 800; font-display: block; }

:root {
    --lec-navy: #192852;
    --lec-navy-2: #233a72;
    --lec-blue: #2e5cb8;
    --lec-blue-50: #eef3fc;
    --lec-gold: #f2b632;
    --lec-ink: #172033;
    --lec-ink-2: #4a5670;
    --lec-ink-3: #7b869c;
    --lec-line: #e3e8f1;
    --lec-bg: #f5f7fb;
    --lec-card: #fff;
    --lec-ok: #17855a; --lec-ok-bg: #e8f6ef;
    --lec-warn: #b86e00; --lec-warn-bg: #fff4e0;
    --lec-bad: #c4312b; --lec-bad-bg: #fdecea;
    --lec-info: #2e5cb8; --lec-info-bg: #eaf0fc;
    --lec-radius: 16px;
    --lec-shadow: 0 1px 2px rgba(23, 32, 51, .05), 0 8px 24px rgba(23, 32, 51, .06);
    --lec-side-w: 268px;
    --lec-top-h: 76px;
    --lec-font: "Lec Noto", "Lec Noto Thai", "Noto Sans Thai", "Noto Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* ---------- พื้นฐาน ---------- */
html body.lec, .lec, .lec :is(h1, h2, h3, h4, h5, h6, p, a, span, td, th, li, label, input, select, textarea, button, .btn, .card-title, .nav-link, font, b, strong, div) {
    font-family: var(--lec-font) !important;
    letter-spacing: 0 !important;
}
body.lec { background: var(--lec-bg) !important; color: var(--lec-ink); font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.lec a { color: var(--lec-blue); }
.lec a:hover { color: var(--lec-navy); }
.lec-icon { flex: none; display: inline-block; vertical-align: middle; }
.lec [hidden] { display: none !important; }
.lec :focus-visible { outline: 3px solid rgba(46, 92, 184, .35); outline-offset: 2px; }

/* ---------- โครงหน้า ---------- */
.lec .wrapper { display: block; min-height: 100vh; }
.lec .main-header {
    position: fixed; top: 0; left: var(--lec-side-w); right: 0; z-index: 1002; width: auto;
    min-height: 0; height: var(--lec-top-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 28px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--lec-line); box-shadow: none;
}
.lec .main-panel {
    float: none; width: auto; height: auto; min-height: 100vh;
    margin-left: var(--lec-side-w); padding-top: var(--lec-top-h);
    display: flex; flex-direction: column;
}
.lec .main-panel > .container { margin: 0 auto; padding: 0 32px 32px !important; width: 100%; max-width: 1360px; min-height: 0; overflow: visible; flex: 1; }
.lec .page-inner { padding: 0 !important; margin: 0 !important; }
.lec .mt--5 { margin-top: 0 !important; }
.lec .row { margin-left: -10px; margin-right: -10px; }
.lec .row > [class*="col-"] { padding-left: 10px; padding-right: 10px; }

/* หัวหน้า (แทนแถบสีฟ้าเดิม) */
.lec-pagehead { padding: 26px 0 20px; }
.lec-crumb { display: flex; align-items: center; gap: 10px; color: var(--lec-ink-3); font-size: 13.5px; margin-bottom: 10px; }
.lec-crumb a { color: var(--lec-ink-3); text-decoration: none; }
.lec-crumb a:hover { color: var(--lec-blue); }
.lec-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--lec-blue); font-size: 11.5px; font-weight: 700; letter-spacing: .14em !important; text-transform: uppercase; }
.lec-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--lec-gold); }
.lec-pagehead h1 { margin: 0; color: var(--lec-ink); font-size: 26px; font-weight: 800; line-height: 1.3; }

/* ---------- แถบบน ---------- */
.lec-top__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lec-top__title { display: grid; line-height: 1.3; min-width: 0; }
.lec-top__title strong { color: var(--lec-ink); font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lec-top__title span { color: var(--lec-ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lec-top__burger { display: none !important; }
.lec-top__right { display: flex; align-items: center; gap: 12px; flex: none; }
.lec-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--lec-line); border-radius: 12px; background: #fff; color: var(--lec-ink-2); cursor: pointer; }
.lec-iconbtn:hover { color: var(--lec-navy); border-color: #c9d3e4; background: var(--lec-blue-50); }

.lec-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--lec-line); border-radius: 999px; background: #fff; color: var(--lec-ink-2) !important; font-size: 13.5px; text-decoration: none !important; white-space: nowrap; }
.lec-chip b { color: var(--lec-navy); }
.lec-chip:hover { border-color: #c9d3e4; background: var(--lec-blue-50); }

.lec-lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--lec-line); border-radius: 999px; background: #fff; }
.lec-lang a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; color: var(--lec-ink-3) !important; font-size: 12.5px; font-weight: 700; text-decoration: none !important; }
.lec-lang a[aria-current="true"] { background: var(--lec-navy); color: #fff !important; }
.lec-lang a:not([aria-current="true"]):hover { background: var(--lec-blue-50); color: var(--lec-navy) !important; }
.lec-flag { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

.lec-userchip { display: inline-flex; align-items: center; gap: 10px; max-width: 300px; padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--lec-ink-3); cursor: pointer; text-align: left; }
.lec-userchip:hover { border-color: var(--lec-line); background: #fff; }
.lec-userchip__text { display: grid; min-width: 0; line-height: 1.3; }
.lec-userchip__text strong { color: var(--lec-ink); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lec-userchip__text small { color: var(--lec-ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lec-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--lec-navy-2), var(--lec-blue)); color: #fff; font-size: 13.5px; font-weight: 800; }
.lec-avatar--lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------- เมนูซ้าย ---------- */
.lec-side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1010; width: var(--lec-side-w);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #1b2b58 0%, #16234a 100%); color: #cdd6ea;
}
.lec-side__brand { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 14px; }
.lec-side__brand img { display: block; width: 200px; height: auto; }
.lec-side__close { display: none !important; background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .14) !important; color: #fff !important; }
.lec-side__app { margin: 6px 20px 8px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.lec-side__app strong { display: block; color: #fff; font-size: 13.5px; font-weight: 800; letter-spacing: .08em !important; }
.lec-side__app span { display: block; margin-top: 2px; color: #8f9cbc; font-size: 11.5px; line-height: 1.45; }
.lec-side__nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.lec-side__group { margin-top: 12px; }
.lec-side__label { margin: 0 0 4px; padding: 0 10px; color: #7f8db0; font-size: 11px; font-weight: 700; letter-spacing: .1em !important; text-transform: uppercase; }
.lec .lec-side__link { position: relative; display: flex; align-items: center; gap: 12px; margin: 2px 0; padding: 10px 12px; border-radius: 11px; color: #d5ddef; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.lec .lec-side__link > .lec-icon:first-child { color: #9fb0d6; }
.lec .lec-side__link > span { flex: 1; min-width: 0; }
.lec .lec-side__link > .lec-icon:last-child:not(:first-child) { opacity: .45; }
.lec .lec-side__link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.lec .lec-side__link.is-active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--lec-gold); }
.lec .lec-side__link.is-active > .lec-icon:first-child { color: var(--lec-gold); }
.lec-side__shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .12); }
.lec .lec-side__shortcuts > * { display: grid; justify-items: center; gap: 4px; padding: 12px 4px 14px; border: 0; background: none; color: #c2cce4; font-size: 11.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.lec .lec-side__shortcuts > * + * { border-left: 1px solid rgba(255, 255, 255, .06); }
.lec .lec-side__shortcuts > *:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.lec .lec-side__shortcuts .is-active { color: var(--lec-gold); box-shadow: inset 0 2px 0 var(--lec-gold); }
.lec .lec-side__shortcuts .is-danger { color: #ff9b94; }
.lec .lec-side__shortcuts .is-danger:hover { background: rgba(255, 90, 80, .12); color: #ffb3ad; }
.lec-side__scrim { position: fixed; inset: 0; z-index: 1009; background: rgba(12, 20, 40, .5); }

/* ซ่อนส่วนประกอบเดิมของ Atlantis */
.lec .logo-header, .lec .navbar-header, .lec .sidebar, .lec .custom-template, .lec .quick-sidebar, .lec .panel-header { display: none !important; }

/* ---------- การ์ด ---------- */
.lec .row-card-no-pd { margin: 0 -10px 4px !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0; }
.lec .row-card-no-pd [class*=col] .card:before { display: none; }
.lec .row-card-no-pd .card .card-header { padding: 18px 24px !important; }
.lec .card { margin-bottom: 22px; border: 1px solid var(--lec-line) !important; border-radius: var(--lec-radius) !important; background: var(--lec-card); box-shadow: var(--lec-shadow) !important; }
.lec .card-header { padding: 18px 24px !important; border-bottom: 1px solid var(--lec-line) !important; background: transparent !important; }
.lec .card-header:empty, .lec .card-header.is-empty { display: none; }
.lec .card-title, .lec .card-header h4 { margin: 0; color: var(--lec-ink) !important; font-size: 17px !important; font-weight: 800 !important; }
.lec .card-body { padding: 22px 24px !important; }
.lec .card-action { margin-top: 18px; padding: 18px 0 0 !important; border-top: 1px solid var(--lec-line) !important; }
.lec .separator-solid, .lec hr { border-color: var(--lec-line); }

/* ---------- ตาราง ---------- */
.lec-table-wrap { box-sizing: border-box; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 18px; border: 1px solid var(--lec-line); border-radius: 14px; background: #fff; }
.lec-table-wrap > table { margin: 0 !important; border: 0 !important; }
.lec table.lec-table { width: 100% !important; border-collapse: separate !important; border-spacing: 0 !important; background: #fff !important; font-size: 14px; }
.lec table.lec-table > * > tr > :is(td, th), .lec table.lec-table > tr > :is(td, th) {
    padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid var(--lec-line) !important;
    background: transparent; color: var(--lec-ink); vertical-align: middle; text-align: left;
}
.lec table.lec-table tr:last-child > :is(td, th) { border-bottom: 0 !important; }
.lec table.lec-table :is(thead th, tr.lec-thead > *) {
    background: #f6f8fc !important; color: var(--lec-ink-2) !important; font-size: 12.5px !important; font-weight: 700 !important;
    letter-spacing: .02em !important; white-space: nowrap; border-bottom: 1px solid var(--lec-line) !important;
}
.lec table.lec-table :is(thead th, tr.lec-thead > *) :is(font, a, b, strong) { color: inherit !important; }
.lec table.lec-table tbody tr:not(.lec-thead):hover > td { background: #fafcff; }
.lec table.lec-table [align="center"], .lec table.lec-table [style*="text-align:center"], .lec table.lec-table [style*="text-align: center"] { text-align: center; }
.lec table.lec-table td[bgcolor="#e0f3f2"], .lec table.lec-table tr[bgcolor="#e0f3f2"] > td,
.lec table.lec-table td[bgcolor="#E6F4E1"], .lec table.lec-table tr[bgcolor="#E6F4E1"] > td,
.lec table.lec-table td[bgcolor="#e6f6f5"] { background: #f6f8fc !important; color: var(--lec-ink-2); font-weight: 600; }
.lec table.lec-table td[bgcolor="#FFFFFF"], .lec table.lec-table tr[bgcolor="#FFFFFF"] > td { background: #fff !important; }
.lec table.lec-table td[bgcolor="#C1C0C0"], .lec table.lec-table td[bgcolor="#CBA7A8"] { background: #f1f3f7 !important; }
.lec table.lec-table[bgcolor] { background: #fff !important; }
.lec table.lec-table font[color="#FF0000"], .lec table.lec-table font[color="red"], .lec table.lec-table font[color="#ff0000"] { color: var(--lec-bad) !important; font-weight: 600; }
/* ตารางจัดหน้า (ไม่มีเส้น, ใช้วางฟอร์ม) */
.lec table.lec-layout { width: 100%; border-collapse: collapse; }
.lec table.lec-layout > * > tr > td, .lec table.lec-layout > tr > td { padding: 8px 10px; vertical-align: top; border: 0; }
/* responsive-table เดิม: จอใหญ่เป็นตาราง / มือถือเป็นการ์ด */
@media (min-width: 761px) {
    .lec .responsive-table thead { position: static !important; clip: auto !important; height: auto !important; width: auto !important; overflow: visible !important; }
    .lec .responsive-table :is(tbody, tr, th, td) { display: revert !important; }
    .lec .responsive-table tr { display: table-row !important; }
    .lec .responsive-table :is(th, td) { display: table-cell !important; }
}

/* ตารางซ้อนในตาราง (เช่น วัน-เวลาเรียน รายชื่อผู้สอน) */
.lec table.lec-table table { border-color: var(--lec-line) !important; border-collapse: collapse; }
.lec table.lec-table table :is(td, th) { border-color: var(--lec-line) !important; padding: 6px 10px; }
.lec table.lec-table table[bgcolor] { background: #fff !important; }
.lec table.lec-table table tr[bgcolor] > td, .lec table.lec-table table td[bgcolor] { background: #f6f8fc !important; }

/* ---------- ฟอร์ม ---------- */
.lec :is(input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="tel"], input[type="search"], input:not([type]), select, textarea):not(.select2-search__field) {
    box-sizing: border-box !important; min-height: 38px; max-width: 100%; padding: 7px 12px !important; border: 1px solid #cfd8e6 !important; border-radius: 10px !important;
    background-color: #fff !important; color: var(--lec-ink) !important; font-size: 14px !important; line-height: 1.4 !important; box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s;
}
.lec textarea { min-height: 84px; width: 100%; resize: vertical; }
.lec :is(input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="tel"], input:not([type]), select):not(.select2-search__field):not(.lec-search input) { height: 38px !important; }
.lec :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus { border-color: var(--lec-blue) !important; box-shadow: 0 0 0 4px rgba(46, 92, 184, .14) !important; outline: none; }
.lec :is(input, select, textarea):disabled { background: #f3f5f9 !important; color: var(--lec-ink-3) !important; cursor: not-allowed; }
.lec select:not([multiple]):not(.select2-hidden-accessible) {
    -webkit-appearance: none; appearance: none; padding-right: 40px !important; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234a5670' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 12px center !important;
}
.lec select.form-control { height: auto !important; }
.lec input[type="checkbox"], .lec input[type="radio"] { width: 18px; height: 18px; margin: 0 6px 0 0; vertical-align: -3px; accent-color: var(--lec-navy); cursor: pointer; }
.lec label { color: var(--lec-ink-2); font-weight: 600; }
.lec .required-label, .lec .text-danger { color: var(--lec-bad) !important; }
.lec .form-group { margin-bottom: 18px; padding: 0; }
.lec .form-group > label { padding-top: 10px; }
/* select2 */
.lec .select2-container { width: 100% !important; max-width: 480px; }
.lec .select2-container--bootstrap .select2-selection--single { padding: 0 !important; height: 42px !important; }
.lec .select2-container--bootstrap .select2-selection, .lec .select2-container .select2-selection--single { min-height: 42px !important; border: 1px solid #cfd8e6 !important; border-radius: 11px !important; box-shadow: none !important; }
.lec .select2-container .select2-selection--single .select2-selection__rendered { line-height: 40px !important; padding-left: 13px !important; color: var(--lec-ink) !important; }
.lec .select2-container .select2-selection--single .select2-selection__arrow { height: 40px !important; right: 8px !important; }
.lec .select2-dropdown { border: 1px solid var(--lec-line) !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 12px 32px rgba(23, 32, 51, .14); }
.lec .select2-results__option--highlighted { background: var(--lec-blue) !important; }

/* อัปโหลดไฟล์แบบลากวาง */
.lec-drop { position: relative; display: flex; align-items: center; gap: 14px; max-width: 520px; margin: 6px 0; padding: 14px 16px; border: 1.5px dashed #b9c6dd; border-radius: 14px; background: #f9fbff; color: var(--lec-ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.lec-drop:hover, .lec-drop.is-over { border-color: var(--lec-blue); background: var(--lec-blue-50); }
.lec-drop.is-filled { border-style: solid; border-color: #9fd3b8; background: var(--lec-ok-bg); }
.lec-drop.is-disabled { opacity: .55; cursor: not-allowed; }
.lec-drop > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.lec-drop.is-disabled > input[type="file"] { cursor: not-allowed; }
.lec-drop__icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--lec-blue); box-shadow: 0 1px 3px rgba(23, 32, 51, .1); }
.lec-drop.is-filled .lec-drop__icon { color: var(--lec-ok); }
.lec-drop__text { display: grid; min-width: 0; line-height: 1.4; }
.lec-drop__text strong { color: var(--lec-ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lec-drop__text small { color: var(--lec-ink-3); font-size: 12.5px; }

/* ---------- ปุ่ม ---------- */
.lec .btn, .lec input[type="submit"], .lec input[type="button"], .lec input[type="reset"], .lec button.stamp, .lec-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 18px !important; border: 1px solid transparent !important; border-radius: 11px !important;
    font-size: 14px !important; font-weight: 700 !important; line-height: 1.3 !important; text-decoration: none !important;
    cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; box-shadow: none !important; white-space: nowrap;
}
.lec .btn:active, .lec input[type="submit"]:active, .lec-btn:active { transform: translateY(1px); }
.lec input[type="submit"], .lec input[type="button"]:not(.btn), .lec .btn-primary, .lec .btn-success:not(.stamp), .lec-btn--primary { background: var(--lec-navy) !important; color: #fff !important; }
.lec input[type="submit"]:hover, .lec input[type="button"]:not(.btn):hover, .lec .btn-primary:hover, .lec .btn-success:not(.stamp):hover, .lec-btn--primary:hover { background: var(--lec-navy-2) !important; color: #fff !important; }
.lec input[type="reset"], .lec .btn-secondary, .lec .btn-default, .lec .btn-light, .lec .btn-info, .lec-btn--ghost { background: #fff !important; border-color: #cfd8e6 !important; color: var(--lec-ink-2) !important; }
.lec input[type="reset"]:hover, .lec .btn-secondary:hover, .lec .btn-default:hover, .lec .btn-info:hover, .lec-btn--ghost:hover { background: var(--lec-blue-50) !important; color: var(--lec-navy) !important; }
.lec .btn-danger, .lec-btn--danger { background: var(--lec-bad) !important; color: #fff !important; }
.lec .btn-danger:hover, .lec-btn--danger:hover { background: #a92620 !important; color: #fff !important; }
.lec .btn-warning { background: var(--lec-warn-bg) !important; border-color: #f3d08f !important; color: var(--lec-warn) !important; }
.lec .btn-xs, .lec .btn-sm { min-height: 32px; padding: 5px 12px !important; font-size: 12.5px !important; }
.lec-btn--block { width: 100%; }
.lec .btn-link { background: none !important; color: var(--lec-blue) !important; }
.lec .card-action .btn + .btn, .lec .card-action input + .btn, .lec .card-action input + input { margin-left: 8px; }

/* ปุ่ม/ป้ายสถานะ (ใส่โดย lec.js ตามข้อความ) */
.lec .lec-status { min-height: 30px !important; padding: 4px 12px !important; border-radius: 999px !important; font-size: 12.5px !important; font-weight: 700 !important; gap: 6px; }
.lec .lec-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lec .lec-status--action { background: var(--lec-bad) !important; border-color: var(--lec-bad) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(196, 49, 43, .28) !important; }
.lec .lec-status--action::before { background: #fff; animation: lec-pulse 1.6s ease-in-out infinite; }
.lec .lec-status--action:hover { background: #a92620 !important; }
.lec .lec-status--wait { background: var(--lec-warn-bg) !important; border-color: #f3d08f !important; color: var(--lec-warn) !important; }
.lec .lec-status--ok { background: var(--lec-ok-bg) !important; border-color: #b9e2cd !important; color: var(--lec-ok) !important; }
.lec .lec-status--bad { background: var(--lec-bad-bg) !important; border-color: #f4c2bf !important; color: var(--lec-bad) !important; }
.lec .lec-status--info { background: var(--lec-info-bg) !important; border-color: #c9d7f3 !important; color: var(--lec-info) !important; }
@keyframes lec-pulse { 50% { opacity: .35; } }
.lec-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lec-badge--info { background: var(--lec-info-bg); color: var(--lec-info); }

/* ลิงก์แท็บเดิม (ตารางลิงก์ด้านบน เช่น สำหรับผู้รับผิดชอบรายวิชา / ประธานหลักสูตร) */
.lec table.lec-tabs { width: auto !important; border: 0 !important; border-collapse: separate !important; border-spacing: 0 !important; margin-bottom: 18px; padding: 4px; border-radius: 13px; background: #eef2f8; }
.lec table.lec-tabs td { padding: 0 !important; border: 0 !important; background: none !important; }
.lec table.lec-tabs td { width: auto !important; }
.lec table.lec-tabs td a { display: block; padding: 9px 18px; border-radius: 10px; color: var(--lec-ink-2) !important; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.lec table.lec-tabs td.is-active a, .lec table.lec-tabs td[bgcolor] a { background: #fff; color: var(--lec-navy) !important; box-shadow: 0 1px 3px rgba(23, 32, 51, .12); }

/* ---------- หน้าต่าง (Modal) ---------- */
.lec-modal-open { overflow: hidden !important; }
.lec-dialog, .lec-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.lec-dialog__backdrop, .lec-modal__backdrop { position: absolute; inset: 0; background: rgba(12, 20, 40, .55); backdrop-filter: blur(3px); animation: lec-fade .18s ease; }
.lec-dialog__panel, .lec-modal__dialog { position: relative; width: 100%; max-height: calc(100vh - 40px); overflow: auto; border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(12, 20, 40, .35); animation: lec-pop .2s ease; }
@keyframes lec-fade { from { opacity: 0; } }
@keyframes lec-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.lec-dialog__x { position: absolute; top: 14px; right: 14px; }
/* โปรไฟล์ */
.lec-profile { max-width: 460px; padding: 28px; }
.lec-profile__head { display: flex; align-items: center; gap: 16px; padding-right: 40px; }
.lec-profile__head h2 { margin: 0 0 8px; color: var(--lec-ink); font-size: 19px; font-weight: 800; line-height: 1.35; }
.lec-profile__roles { display: flex; flex-wrap: wrap; gap: 6px; }
.lec-profile__list { margin: 22px 0; border: 1px solid var(--lec-line); border-radius: 14px; overflow: hidden; }
.lec-profile__list > div { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 12px; padding: 12px 16px; }
.lec-profile__list > div + div { border-top: 1px solid var(--lec-line); }
.lec-profile__list dt { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--lec-ink-3); font-size: 13px; font-weight: 600; }
.lec-profile__list dd { margin: 0; color: var(--lec-ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lec-profile__list dd a { margin-left: 8px; font-size: 13px; }
/* หน้าต่างแทน popup */
.lec-modal__dialog { display: flex; flex-direction: column; overflow: hidden; }
.lec-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 14px 22px; border-bottom: 1px solid var(--lec-line); }
.lec-modal__head h2 { margin: 0; color: var(--lec-ink); font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lec-modal__body { position: relative; flex: 1; min-height: 160px; overflow: auto; background: var(--lec-bg); }
.lec-modal__body iframe { display: block; width: 100%; height: 100%; min-height: 60vh; border: 0; }
.lec-modal__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--lec-ink-3); }
.lec-modal__loading::before { content: ""; width: 34px; height: 34px; border: 3px solid var(--lec-line); border-top-color: var(--lec-blue); border-radius: 50%; animation: lec-spin .8s linear infinite; }
@keyframes lec-spin { to { transform: rotate(360deg); } }
/* ยืนยัน */
.lec-confirm { max-width: 420px; padding: 28px 26px 22px; text-align: center; }
.lec-confirm__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 50%; background: var(--lec-info-bg); color: var(--lec-info); }
.lec-confirm--danger .lec-confirm__icon { background: var(--lec-bad-bg); color: var(--lec-bad); }
.lec-confirm h2 { margin: 0 0 6px; color: var(--lec-ink); font-size: 18px; font-weight: 800; }
.lec-confirm p { margin: 0 0 22px; color: var(--lec-ink-2); }
.lec-confirm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* หน้าที่เปิดอยู่ในหน้าต่าง (popup เดิม) */
html.lec-in-modal .lec .main-header, html.lec-in-modal .lec .lec-side, html.lec-in-modal .lec .lec-side__scrim, html.lec-in-modal .lec .footer, html.lec-in-modal .lec .lec-pagehead { display: none !important; }
html.lec-in-modal .lec .main-panel { margin: 0; padding: 0; min-height: 0; }
html.lec-in-modal .lec .main-panel > .container { padding: 18px !important; }
html.lec-in-modal body.lec { background: var(--lec-bg) !important; min-height: 0 !important; }
html.lec-in-modal .lec .wrapper, html.lec-in-modal .lec .main-panel { min-height: 0 !important; }
html.lec-in-modal .lec .card { margin-bottom: 0; }

body.lec-fragment .main-panel { margin: 0 !important; padding: 18px !important; min-height: 0; }
body.lec-fragment .main-panel > .container { padding: 0 !important; }

/* ---------- ท้ายหน้า ---------- */
.lec .footer { position: static !important; width: auto !important; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 32px; padding: 18px 0 22px !important; border-top: 1px solid var(--lec-line); background: transparent !important; color: var(--lec-ink-3); font-size: 12.5px; }
.lec .footer .container-fluid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; padding: 0 !important; }
.lec .footer .nav-link { padding: 0 !important; color: var(--lec-ink-3) !important; font-size: 12.5px; }
.lec .footer .copyright { margin-left: auto; color: var(--lec-ink-3); font-size: 12.5px; }
.lec .footer .copyright a { color: var(--lec-ink-2); }

/* ---------- ข้อความแจ้ง ---------- */
.lec .alert { border: 0 !important; border-radius: 12px !important; box-shadow: none !important; }

/* ---------- มือถือ / แท็บเล็ต ---------- */
@media (max-width: 1100px) {
    .lec .main-header { left: 0; padding: 0 16px; }
    .lec .main-panel { margin-left: 0; }
    .lec-top__burger { display: inline-grid !important; }
    .lec-side { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .lec-drawer-open .lec-side { transform: none; }
    .lec-side__close { display: inline-grid !important; }
    .lec .footer { margin: 0 16px; }
}
@media (max-width: 760px) {
    :root { --lec-top-h: 64px; }
    .lec .main-panel > .container { padding: 0 14px 24px !important; }
    .lec-top__title span, .lec-top__year span, .lec-userchip__text, .lec-userchip > .lec-icon { display: none; }
    .lec-top__title strong { font-size: 14.5px; }
    .lec-top__lang a { padding: 0 8px; }
    .lec-top__lang a .lec-flag { display: none; }
    .lec-userchip { padding: 2px; }
    .lec-pagehead { padding: 18px 0 14px; }
    .lec-pagehead h1 { font-size: 21px; }
    .lec .card-header, .lec .card-body { padding: 16px !important; }
    .lec-profile { padding: 22px 18px; }
    .lec-profile__list > div { grid-template-columns: 1fr; gap: 2px; }
    .lec .footer .container-fluid { justify-content: center; text-align: center; }
    .lec .footer .copyright { margin: 0; }
    /* responsive-table เป็นการ์ด */
    .lec .responsive-table.lec-table, .lec .responsive-table.lec-table tbody, .lec .responsive-table.lec-table tr, .lec .responsive-table.lec-table td { display: block !important; width: 100% !important; }
    .lec .responsive-table.lec-table thead { display: none !important; }
    .lec .responsive-table.lec-table tr { padding: 10px 4px; border: 0 !important; border-bottom: 1px solid var(--lec-line) !important; background: #fff !important; }
    .lec .responsive-table.lec-table tr:last-child { border-bottom: 0 !important; }
    .lec .responsive-table.lec-table td[align="center"] { text-align: left !important; }
    .lec .responsive-table.lec-table td > * { justify-self: start; }
    .lec .lec-status, .lec table.lec-table .btn, .lec table.lec-table button { white-space: normal !important; text-align: left; max-width: 100%; }
    .lec .responsive-table.lec-table td { min-width: 0; overflow-wrap: anywhere; }
    .lec-top__year { padding: 0 10px; }
    .lec .responsive-table.lec-table td { display: grid !important; grid-template-columns: 38% 1fr; gap: 10px; padding: 6px 12px !important; border: 0 !important; }
    .lec .responsive-table.lec-table td::before { content: attr(data-title); color: var(--lec-ink-3); font-size: 12.5px; font-weight: 600; }
    .lec .responsive-table.lec-table td[data-title=""]::before { content: none; }
    .lec .responsive-table.lec-table td[data-title=""] { grid-template-columns: 1fr; }
}
@media print {
    .lec .main-header, .lec-side, .lec .footer, .lec-pagehead nav { display: none !important; }
    .lec .main-panel { margin: 0; padding: 0; }
}

/* =====================================================================
   หน้าเข้าสู่ระบบ
   ===================================================================== */
body.lec-login { margin: 0; background: #fff !important; }
.lec-auth { display: grid; grid-template-columns: minmax(0, 47fr) minmax(0, 53fr); min-height: 100vh; }
.lec-auth__hero {
    position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 56px 60px 40px; color: #fff;
    background: linear-gradient(110deg, rgba(8, 19, 44, .48), rgba(8, 19, 44, .13)),
        url("img/login-hero.svg") center bottom / cover no-repeat #101d38;
}
.lec-auth__hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 88px); pointer-events: none; }
.lec-auth__brand img { display: block; width: 290px; max-width: 100%; height: auto; }
.lec-auth__intro { position: relative; z-index: 1; margin-top: 64px; max-width: 560px; }
.lec-auth__eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--lec-gold); font-size: 13px; font-weight: 800; letter-spacing: .16em !important; }
.lec-auth__eyebrow::before { content: ""; width: 30px; height: 2px; border-radius: 2px; background: var(--lec-gold); }
.lec-auth__hero h1 { margin: 0 0 18px; color: #fff; font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; line-height: 1.2; }
.lec-auth__lead { margin: 0 0 6px; color: #e4eaf7; font-size: 18px; }
.lec-auth__lead--sm { color: #aebbd9; font-size: 15px; }
.lec-auth__steps { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 26px 0 0; padding: 0; list-style: none; color: #ffd77a; font-size: 13px; font-weight: 600; }
.lec-auth__steps b { margin-right: 6px; }
.lec-auth__hero .lec-auth__art { display: none; }
.lec-auth__foot { position: relative; margin: auto 0 0; padding-top: 16px; color: #d3ddf0; font-size: 13px; }

.lec-auth__panel { display: flex; flex-direction: column; padding: 32px 56px 24px; }
.lec-auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lec-auth__system { color: var(--lec-ink-3); font-size: 12px; font-weight: 700; letter-spacing: .18em !important; }
.lec-auth__box { width: 100%; max-width: 440px; margin: auto; padding: 40px 0; }
.lec-auth__logo-sm { display: none; width: 200px; height: auto; margin-bottom: 26px; }
.lec-pill { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: var(--lec-blue-50); color: var(--lec-navy); font-size: 13px; font-weight: 700; }
.lec-auth__box h2 { margin: 20px 0 8px; color: var(--lec-navy); font-size: 36px; font-weight: 800; line-height: 1.2; }
.lec-auth__sub { margin: 0 0 28px; color: var(--lec-ink-3); font-size: 15px; }
.lec-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--lec-bad-bg); color: var(--lec-bad); font-size: 14px; font-weight: 600; }
.lec-alert .lec-icon { margin-top: 2px; }
.lec-auth__form > label { display: block; margin: 0 0 8px; color: var(--lec-ink); font-size: 14.5px; font-weight: 700; }
.lec-field { position: relative; display: flex; align-items: center; margin-bottom: 20px; }
.lec-field__icon { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; width: 54px; color: var(--lec-ink-3); pointer-events: none; }
.lec-field__icon::after { content: ""; position: absolute; right: 0; top: 14px; bottom: 14px; width: 1px; background: var(--lec-line); }
.lec .lec-auth .lec-field input[name] { width: 100%; height: 56px; padding: 0 16px 0 70px !important; border: 1px solid #d6deeb !important; border-radius: 14px !important; font-size: 16px !important; }
.lec .lec-auth .lec-field input[name]:focus { background: #f6f9ff !important; }
.lec-field__eye { position: absolute; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--lec-ink-3); cursor: pointer; }
.lec-field__eye:hover { background: var(--lec-blue-50); color: var(--lec-navy); }
.lec-field__eye .lec-icon:last-child { display: none; }
.lec-field__eye[aria-pressed="true"] .lec-icon:first-child { display: none; }
.lec-field__eye[aria-pressed="true"] .lec-icon:last-child { display: inline-block; }
.lec .lec-auth .lec-field:has(.lec-field__eye) input[name] { padding-right: 56px !important; }
.lec-caps { display: flex; align-items: center; gap: 6px; margin: -12px 0 16px; color: var(--lec-warn); font-size: 13px; font-weight: 600; }
.lec-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 24px; font-size: 14px; }
.lec-check { display: inline-flex; align-items: center; margin: 0; color: var(--lec-ink-2) !important; font-weight: 500 !important; cursor: pointer; }
.lec-auth__row a { color: var(--lec-ink-3); text-decoration: none; }
.lec-auth__row a:hover { color: var(--lec-navy); text-decoration: underline; }
.lec .lec-auth__submit {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; border: 0 !important; border-radius: 999px !important;
    background: var(--lec-navy) !important; color: #fff !important; font-size: 16px !important; font-weight: 800 !important; cursor: pointer;
    box-shadow: 0 10px 24px rgba(25, 40, 82, .25) !important; transition: background .15s, transform .05s;
}
.lec .lec-auth__submit:hover { background: var(--lec-navy-2) !important; }
.lec .lec-auth__submit:active { transform: translateY(1px); }
.lec .lec-auth__submit.is-busy { opacity: .75; pointer-events: none; }
.lec-auth__guide { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 16px; border: 1px solid var(--lec-line); border-radius: 14px; color: var(--lec-ink-2) !important; font-size: 14px; font-weight: 600; text-decoration: none !important; }
.lec-auth__guide span { flex: 1; }
.lec-auth__guide:hover { border-color: #c9d3e4; background: var(--lec-blue-50); color: var(--lec-navy) !important; }
.lec-auth__copy { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; color: var(--lec-ink-3); font-size: 12.5px; }
.lec-auth__copy a { color: var(--lec-ink-3); }

@media (max-width: 980px) {
    .lec-auth { grid-template-columns: 1fr; }
    .lec-auth__hero { display: none; }
    .lec-auth__panel { min-height: 100vh; padding: 20px 20px 18px; }
    .lec-auth__logo-sm { display: block; }
    .lec-auth__box { padding: 28px 0; }
    .lec-auth__box h2 { font-size: 30px; }
    .lec-auth__system { font-size: 11px; letter-spacing: .1em !important; }
}

/* ช่องชื่อผู้ใช้: ต่อท้าย @mahidol.ac.th ให้ */
.lec-field__suffix { position: absolute; right: 1px; top: 1px; bottom: 1px; display: flex; align-items: center; padding: 0 16px; border-left: 1px solid var(--lec-line); border-radius: 0 13px 13px 0; background: #f4f6fb; color: var(--lec-ink-2); font-size: 15px; font-weight: 600; pointer-events: none; }
.lec .lec-auth .lec-field:has(.lec-field__suffix) input[name] { padding-right: 170px !important; }
@media (max-width: 420px) { .lec-field__suffix { padding: 0 10px; font-size: 13px; } .lec .lec-auth .lec-field:has(.lec-field__suffix) input[name] { padding-right: 130px !important; } }


/* ---------- กันหน้าเดิมโผล่ตอนโหลด / ไม่ให้เลย์เอาต์ขยับ ---------- */
/* Atlantis ใส่ transition: all .3s ไว้กับโครงหน้า → ตอนธีมใหม่ทับ ความกว้าง/สีจะค่อย ๆ เลื่อน */
.lec .main-panel, .lec .main-header, .lec .wrapper, .lec .footer { transition: none !important; }
html.lec-preload *, html.lec-preload *::before, html.lec-preload *::after { transition: none !important; animation-duration: 0s !important; }
/* ซ่อนเนื้อหาจนสคริปต์ปรับตาราง/ปุ่มเสร็จ (มีตัวจับเวลากันค้างใน lec-boot.php) */
html.lec-preload .lec .main-panel > .container { opacity: 0; }
.lec .main-panel > .container { transition: opacity .15s ease; }

/* หน้าต่างโปรไฟล์: ไม่ให้ล้นแนวนอน */
.lec-profile { width: min(460px, 100%); overflow-x: hidden; }
.lec-profile * { max-width: 100%; }
.lec-profile__list > div { grid-template-columns: minmax(0, 170px) minmax(0, 1fr); }
.lec-profile__list dd { min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
.lec-profile .lec-btn--block { display: flex; box-sizing: border-box; }

/* =====================================================================
   รอบปรับปรุง: อ่านง่ายขึ้น / ปุ่มคำสั่ง / ตารางหัวข้อ-ข้อมูล / ฟอร์มค้นหา
   ===================================================================== */
body.lec { font-size: 15px; }
.lec table.lec-table { font-size: 15px; line-height: 1.65; }
.lec table.lec-table > * > tr > :is(td, th), .lec table.lec-table > tr > :is(td, th) { padding: 14px 16px !important; }
.lec table.lec-table :is(thead th, tr.lec-thead > *) { font-size: 13px !important; color: var(--lec-ink-2) !important; }
.lec .card-title, .lec .card-header h4 { font-size: 18px !important; }

/* ตารางรายละเอียด: คอลัมน์หัวข้อเป็นตัวหนา มีพื้นอ่อน */
.lec table.lec-kv > * > tr > td:first-child, .lec table.lec-kv > tr > td:first-child {
    width: 30%; min-width: 180px; background: #f8fafd !important; color: var(--lec-ink) !important; font-weight: 700 !important;
}
.lec table.lec-kv > * > tr > td:nth-child(2), .lec table.lec-kv > tr > td:nth-child(2) { color: var(--lec-ink); }
.lec table.lec-kv tbody tr:hover > td { background: inherit; }
@media (max-width: 760px) {
    .lec table.lec-kv, .lec table.lec-kv tbody, .lec table.lec-kv tr, .lec table.lec-kv td { display: block; width: 100% !important; }
    .lec table.lec-kv > * > tr > td:first-child { border-bottom: 0 !important; padding-bottom: 4px !important; }
}

/* ปุ่มคำสั่งในตาราง */
.lec .lec-act {
    display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 14px !important; border: 1px solid transparent;
    border-radius: 10px !important; font-size: 13.5px !important; font-weight: 700 !important; line-height: 1.3 !important;
    text-decoration: none !important; white-space: nowrap; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s;
}
.lec .lec-act:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23, 32, 51, .12) !important; }
.lec .lec-act font { color: inherit !important; }
.lec .lec-act.lec-act--primary, .lec button.lec-act.lec-act--primary { background: var(--lec-navy) !important; color: #fff !important; }
.lec .lec-act.lec-act--primary:hover, .lec button.lec-act.lec-act--primary:hover { background: var(--lec-navy-2) !important; color: #fff !important; }
.lec .lec-act.lec-act--info, .lec button.lec-act.lec-act--info { background: var(--lec-info-bg) !important; border-color: #c9d7f3 !important; color: var(--lec-info) !important; }
.lec .lec-act.lec-act--info:hover, .lec button.lec-act.lec-act--info:hover { background: var(--lec-blue) !important; border-color: var(--lec-blue) !important; color: #fff !important; }
.lec .lec-act.lec-act--ok, .lec button.lec-act.lec-act--ok { background: var(--lec-ok) !important; color: #fff !important; }
.lec .lec-act.lec-act--ok:hover, .lec button.lec-act.lec-act--ok:hover { background: #106c48 !important; color: #fff !important; }
.lec .lec-act.lec-act--bad, .lec button.lec-act.lec-act--bad { background: var(--lec-bad-bg) !important; border-color: #f4c2bf !important; color: var(--lec-bad) !important; }
.lec .lec-act.lec-act--wait, .lec button.lec-act.lec-act--wait { background: var(--lec-warn-bg) !important; border-color: #f3d08f !important; color: var(--lec-warn) !important; white-space: normal; }
.lec .lec-act.lec-act--file, .lec button.lec-act.lec-act--file { background: #fff !important; border-color: #cfd8e6 !important; color: var(--lec-ink-2) !important; }
.lec .lec-act.lec-act--file:hover, .lec button.lec-act.lec-act--file:hover { border-color: var(--lec-blue) !important; color: var(--lec-blue) !important; }
.lec .lec-act.lec-act--ghost, .lec button.lec-act.lec-act--ghost { background: #fff !important; border-color: #cfd8e6 !important; color: var(--lec-ink-2) !important; }
.lec .lec-act.lec-act--ghost:hover, .lec button.lec-act.lec-act--ghost:hover { background: var(--lec-blue-50) !important; color: var(--lec-navy) !important; }
.lec .lec-act--static { cursor: default; }
.lec .lec-act--static:hover { transform: none; box-shadow: none !important; }
.lec .lec-act .lec-icon { flex: none; }

/* ฟอร์มสั้นในการ์ด (ปีการศึกษา + OK) */
.lec form.lec-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--lec-line); border-radius: 14px; background: #f8fafd; font-weight: 600; color: var(--lec-ink-2); }
.lec form.lec-inline-form select { min-width: 180px; margin: 0 !important; }
.lec form.lec-inline-form :is(input[type="submit"], button) { margin: 0 !important; min-width: 96px; }

/* ค้นหา (Grade Report / Certificate) */
.lec-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lec-seg { display: inline-flex; padding: 4px; border-radius: 13px; background: #eef2f8; }
.lec-seg label { margin: 0; cursor: pointer; }
.lec-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lec-seg span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 10px; color: var(--lec-ink-2); font-weight: 700; font-size: 14px; }
.lec-seg input:checked + span { background: #fff; color: var(--lec-navy); box-shadow: 0 1px 3px rgba(23, 32, 51, .12); }
.lec-seg input:focus-visible + span { outline: 3px solid rgba(46, 92, 184, .35); }
.lec-search__field { position: relative; flex: 1 1 280px; max-width: 520px; }
.lec-search__field > .lec-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--lec-ink-3); pointer-events: none; }
.lec .lec-search .lec-search__field input[name] { width: 100%; height: 46px; padding-left: 44px !important; }
.lec .lec-search .lec-btn { height: 46px; }
.lec-search-card .card-body { padding: 18px 22px !important; }

/* หน้าเลือกปีการศึกษา */
.lec-year { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.lec-year__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.lec .lec-year__btn {
    position: relative; display: grid; gap: 6px; padding: 18px 18px 16px !important; border: 1px solid var(--lec-line) !important; border-radius: 16px !important;
    background: #fff !important; color: var(--lec-ink) !important; text-align: left; cursor: pointer; min-height: 0; white-space: normal;
    transition: border-color .15s, box-shadow .15s, transform .08s;
}
.lec .lec-year__btn:hover { border-color: var(--lec-blue) !important; box-shadow: 0 10px 24px rgba(46, 92, 184, .14) !important; transform: translateY(-2px); }
.lec-year__btn .lec-year__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lec-blue-50); color: var(--lec-blue); }
.lec-year__btn small { color: var(--lec-ink-3); font-size: 12.5px; font-weight: 600; }
.lec-year__btn strong { font-size: 26px; font-weight: 800; color: var(--lec-navy); line-height: 1.1; }
.lec-year__btn .lec-year__go { position: absolute; right: 16px; top: 18px; color: var(--lec-ink-3); }
.lec-year__btn.is-latest { border-color: #c9d7f3 !important; background: linear-gradient(160deg, #f4f8ff, #fff) !important; }
.lec-year__btn.is-latest .lec-year__icon { background: var(--lec-navy); color: #fff; }
.lec-year__tag { justify-self: start; padding: 2px 9px; border-radius: 999px; background: var(--lec-gold); color: #3b2a00; font-size: 11.5px; font-weight: 800; }
.lec-year__side { display: grid; gap: 14px; }
.lec-tip { padding: 20px; border: 1px solid var(--lec-line); border-radius: 16px; background: #fff; box-shadow: var(--lec-shadow); }
.lec-tip h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--lec-ink); }
.lec-tip ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.lec-tip li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; color: var(--lec-ink-2); font-size: 14px; }
.lec-tip li b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--lec-blue-50); color: var(--lec-navy); font-size: 13px; }
.lec-tip li strong { display: block; color: var(--lec-ink); font-size: 14.5px; }
.lec-tip--navy { background: linear-gradient(150deg, #1b2b58, #243f80); border: 0; color: #dfe6f5; }
.lec-tip--navy h3 { color: #fff; }
.lec-tip--navy a { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: #ffd77a !important; font-weight: 700; text-decoration: none; }
@media (max-width: 1000px) { .lec-year { grid-template-columns: 1fr; } }

.lec table.lec-table:not(.lec-kv) > * > tr > td { vertical-align: middle !important; }
.lec table.lec-kv > * > tr > td { vertical-align: top !important; }
.lec a:has(> .lec-act) { text-decoration: none !important; }

.lec .card.is-empty { display: none; }

/* ---------- ผลประเมินรายวิชา (addLec) ---------- */
.lec-addlec main#panel, .lec-addlec .content-form { display: block; width: 100% !important; margin: 0 !important; padding: 0 !important; background: none !important; }
.lec-addlec .content-form > .title, .lec-addlec .panel-red { display: none !important; }
.lec-addlec > br, .lec-addlec main > br, .lec-addlec p:empty { display: none; }
.lec-addlec .col-md-12 { padding-left: 0; padding-right: 0; }
.lec-addlec .panel { margin: 0 0 22px; padding: 22px 24px; border: 1px solid var(--lec-line); border-radius: var(--lec-radius); background: #fff; box-shadow: var(--lec-shadow); }
.lec-addlec .panel-body { padding: 0; }
.lec-addlec .panel .card { margin: 18px 0 0; box-shadow: none !important; }
.lec-addlec h3.card-header { margin: 0; padding: 16px 20px !important; background: #f8fafd !important; color: var(--lec-ink) !important; font-size: 16px !important; font-weight: 800; border-bottom: 1px solid var(--lec-line) !important; border-radius: var(--lec-radius) var(--lec-radius) 0 0 !important; }
.lec-addlec h3.card-header u { text-decoration: none; color: var(--lec-blue); }
.lec-addlec .card-block { padding: 16px !important; }
.lec-addlec .table-responsive { overflow-x: auto; }
/* กล่องตารางชั้นนอก (table-responsive) ไม่ต้องมีแถบเลื่อนซ้อน — ให้ .lec-table-wrap ด้านในจัดการเอง */
.lec .table-responsive:has(> .lec-table-wrap), .lec .table-responsive.lec-tr-flat { overflow: visible !important; }
.lec .table-responsive > .lec-table-wrap { margin-bottom: 0; }
.lec-addlec h3.card-header * { color: inherit !important; }
.lec td.lec-empty { padding: 36px 16px !important; text-align: center !important; color: var(--lec-ink-3) !important; }
.lec td.lec-empty .lec-icon { display: block; margin: 0 auto 8px; color: #b6c1d4; }

/* =====================================================================
   รอบ 4: ปุ่มแคปซูล / ตารางผลประเมิน / ช่องค้นหา / แถบปีการศึกษา
   ===================================================================== */
/* ปุ่มทุกแบบเป็นแคปซูล โค้งมน และบางลง */
.lec .btn, .lec input[type="submit"], .lec input[type="button"], .lec input[type="reset"], .lec button.stamp, .lec-btn {
    min-height: 36px; padding: 7px 18px !important; border-radius: 999px !important; font-size: 13.5px !important;
}
.lec .btn-xs, .lec .btn-sm { min-height: 30px; padding: 4px 13px !important; }
.lec .lec-act, .lec a.lec-act, .lec button.lec-act {
    min-height: 30px; padding: 4px 13px !important; gap: 6px; border-radius: 999px !important; font-size: 13px !important; line-height: 1.25 !important;
}
.lec .lec-act .lec-icon { width: 15px; height: 15px; }
.lec .lec-status { border-radius: 999px !important; }
.lec .lec-auth__submit, .lec .lec-year__btn { border-radius: 16px !important; }
.lec .lec-auth__submit { border-radius: 999px !important; }
.lec .lec-act.lec-act--muted { background: #f1f3f7 !important; border-color: #e3e8f1 !important; color: var(--lec-ink-3) !important; font-weight: 600 !important; }

/* ช่องค้นหา: ช่องพิมพ์กับปุ่มไม่ทับกัน */
.lec-search { flex-wrap: wrap; }
.lec-search__field { display: flex; align-items: center; flex: 1 1 260px; min-width: 0; max-width: 560px; }
.lec .lec-search .lec-search__field input[name] { flex: 1 1 auto; min-width: 0; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; border-radius: 999px !important; }
.lec .lec-search .lec-btn { flex: none; position: relative; z-index: 1; height: 46px; padding: 0 22px !important; }

/* ตารางที่ใช้ colspan (ผลประเมินรายวิชา) */
.lec table.lec-table.lec-grid { table-layout: fixed; width: 100% !important; }
.lec table.lec-grid > * > tr > :is(td, th), .lec table.lec-grid > tr > :is(td, th) { padding: 11px 8px !important; font-size: 14px; overflow-wrap: anywhere; height: auto !important; }
.lec table.lec-table th { background: #f6f8fc !important; color: var(--lec-ink-2) !important; font-size: 13px !important; font-weight: 700 !important; text-align: center; vertical-align: middle !important; }
.lec table.lec-table th strong { color: inherit !important; font-weight: 700; }
.lec table.lec-table tr.lec-group > :is(td, th) {
    background: var(--lec-blue-50) !important; color: var(--lec-navy) !important; text-align: left !important; font-size: 15px !important; font-weight: 800 !important;
    padding: 13px 16px !important; border-top: 1px solid #dbe4f5 !important;
}
.lec table.lec-table tr.lec-group > * strong, .lec table.lec-table tr.lec-group > * font { color: inherit !important; }
.lec table.lec-table tr.lec-group:first-child > * { border-top: 0 !important; }
.lec table.lec-grid td[bgcolor="#efefef"], .lec table.lec-grid td[style*="#efefef"] { background: #f8fafd !important; color: var(--lec-ink) !important; font-weight: 700; }
.lec table.lec-grid td[style*="text-align:center"], .lec table.lec-grid td[style*="text-align: center"] { font-variant-numeric: tabular-nums; }
.lec table.lec-grid tbody tr:not(.lec-group):hover > td { background: #fafcff; }

/* แถบเลือกภาคการศึกษา (ผลประเมินรายวิชา) */
.lec-yearbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--lec-line); border-radius: 14px; background: #f8fafd; }
.lec-yearbar label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--lec-ink); font-weight: 700; }
.lec-yearbar label .lec-icon { color: var(--lec-blue); }
.lec .lec-yearbar select { width: auto !important; min-width: 220px; margin: 0; border-radius: 999px !important; }
.lec-addlec form#form1 + p, .lec-addlec .panel-body > p:empty { display: none; }
.lec-addlec .panel-body > br { display: none; }
.lec table.lec-grid td[style*="text-align:center"], .lec table.lec-grid td[style*="text-align: center"], .lec table.lec-grid th { padding-left: 3px !important; padding-right: 3px !important; overflow-wrap: normal; word-break: keep-all; font-size: 13px !important; }
.lec table.lec-grid tr > td[colspan="2"][style*="text-align:center"] { color: var(--lec-navy); font-weight: 800; font-size: 14px !important; background: #f4f8ff; }
.lec table.lec-grid td[style*="text-align:left"][colspan] { padding-left: 12px !important; }
/* กันแถบเลื่อนจากเศษพิกเซล (Windows ย่อ/ขยาย 125–150%) สำหรับตารางที่ล็อกความกว้างพอดีกรอบแล้ว */
.lec .lec-table-wrap:has(> table.lec-grid), .lec .lec-table-wrap:has(td.lec-empty) { overflow-x: hidden; }
.lec .lec-table-wrap > table { max-width: 100%; }
/* ปุ่ม Export Excel */
.lec .lec-act.lec-act--excel, .lec button.lec-act.lec-act--excel { background: #1d7a46 !important; border-color: #1d7a46 !important; color: #fff !important; font-weight: 700; padding-left: 14px; padding-right: 16px; box-shadow: 0 4px 12px rgba(29, 122, 70, .22); text-decoration: none !important; }
.lec .lec-act.lec-act--excel:hover { background: #166238 !important; border-color: #166238 !important; color: #fff !important; transform: translateY(-1px); }
.lec .lec-act.lec-act--excel .lec-icon, .lec .lec-act.lec-act--excel svg { color: #fff; stroke: currentColor; }
.lec td.lec-td-end { text-align: right !important; white-space: nowrap; }
/* รหัสหลักสูตร / ปี / Special Program */
.lec .lec-codes { display: inline-flex; gap: 6px; align-items: center; vertical-align: 1px; margin: 0 2px; flex-wrap: wrap; }
.lec .lec-code { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.lec .lec-code--id { background: #e8effc; color: #1d4ea8; border-color: #cbdaf6; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.lec .lec-code--year { background: #fff4dc; color: #8a5a00; border-color: #f4dfae; }
.lec .lec-code--year svg { color: currentColor; }
.lec .lec-code--sp { background: #fde8ea; color: #c0283a; border-color: #f7c6cc; margin-left: 4px; }
/* Modal: ไม่ให้มีแถบเลื่อนแนวนอน และไม่ให้ body สูงเกินเนื้อหา */
html.lec-in-modal { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; }
html.lec-in-modal body { overflow: visible !important; height: auto !important; min-height: 0 !important; max-height: none !important; }
html.lec-in-modal .lec .wrapper, html.lec-in-modal .lec .main-panel { height: auto !important; max-height: none !important; overflow: visible !important; }
html.lec-in-modal .lec .main-panel, html.lec-in-modal .lec .main-panel > .container, html.lec-in-modal .lec .page-inner { width: 100% !important; max-width: 100% !important; float: none !important; box-sizing: border-box; }
.lec-modal__body { overflow: hidden; }
html.lec-in-modal { scrollbar-width: thin; scrollbar-color: #c3ccdb transparent; }
html.lec-in-modal::-webkit-scrollbar { width: 8px; }
html.lec-in-modal::-webkit-scrollbar-thumb { background: #c3ccdb; border-radius: 8px; }
/* select + ปุ่ม ในช่องตาราง วางเรียงข้างกัน */
.lec .lec-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lec .lec-pick > select { flex: 1 1 220px; min-width: 0; width: auto !important; margin: 0 !important; }
.lec .lec-pick > :is(input, button) { flex: 0 0 auto; margin: 0 !important; }
/* สถานะการประเมินของผู้เรียน (addLec/num_register.php) */
.lec .lec-eva { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.lec .lec-eva--done { background: var(--lec-ok-bg); color: var(--lec-ok); border: 1px solid #bfe5d1; }
.lec .lec-eva--wait { background: #f1f3f7; color: var(--lec-ink-3); border: 1px solid #e3e8f1; font-weight: 600; }
/* สรุปจำนวนผู้ประเมิน / คะแนนเฉลี่ย (addLec/rs_chm.php, rs_lec.php) */
.lec table td.lec-evasum-cell { padding: 14px 16px !important; background: #f7f9fd !important; text-align: right !important; white-space: normal; overflow-wrap: normal; }
.lec .lec-evasum { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.lec .lec-evasum__item { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 18px; border: 1px solid var(--lec-line); border-radius: 14px; background: #fff; }
.lec .lec-evasum__label { color: var(--lec-ink-3); font-size: 13px; font-weight: 600; }
.lec .lec-evasum__num { color: var(--lec-navy); font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lec .lec-evasum__unit { color: var(--lec-ink-2); font-size: 13px; }
.lec .lec-evasum__link { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 12px 2px 14px; border-radius: 999px; background: var(--lec-blue-50); border: 1px solid #cddbf5; text-decoration: none !important; transition: background .15s, border-color .15s, transform .15s; }
.lec .lec-evasum__link .lec-evasum__num { color: var(--lec-blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lec .lec-evasum__link .lec-evasum__unit { color: var(--lec-blue); }
.lec .lec-evasum__link svg { align-self: center; color: var(--lec-blue); }
.lec .lec-evasum__link:hover { background: #dfe8fb; border-color: var(--lec-blue); transform: translateY(-1px); }
.lec .lec-evasum__link:focus-visible { outline: 3px solid rgba(46, 92, 184, .35); outline-offset: 2px; }
.lec .lec-evasum__item--avg { background: var(--lec-navy); border-color: var(--lec-navy); }
.lec .lec-evasum__item--avg .lec-evasum__label, .lec .lec-evasum__item--avg .lec-evasum__unit { color: rgba(255, 255, 255, .75); }
.lec .lec-evasum__item--avg .lec-evasum__num { color: #fff; }
@media (max-width: 720px) { .lec .lec-evasum { justify-content: stretch; } .lec .lec-evasum__item { flex: 1 1 100%; justify-content: space-between; } }

/* ---------- ฟอร์มรูปแบบใหม่ (ทุกหน้า) ---------- */
/* ตัวเลือก radio / checkbox เป็นการ์ด */
.lec label.lec-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding: 7px 14px 7px 12px; border: 1px solid #d6deea; border-radius: 12px; background: #fff; color: var(--lec-ink-2); font-size: 14px; font-weight: 600; line-height: 1.3; cursor: pointer; user-select: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.lec label.lec-choice:hover { border-color: #aebfdc; background: #fafbfe; }
.lec label.lec-choice input { margin: 0 !important; vertical-align: 0; flex: none; }
.lec label.lec-choice:has(input:checked) { border-color: var(--lec-blue); background: var(--lec-blue-50); color: var(--lec-navy); box-shadow: 0 0 0 3px rgba(46, 92, 184, .10); }
.lec label.lec-choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.lec label.lec-choice:has(input:focus-visible) { outline: 3px solid rgba(46, 92, 184, .35); outline-offset: 2px; }
.lec input[type="radio"], .lec input[type="checkbox"] { accent-color: var(--lec-blue); }
/* แถวตัวเลือกในตาราง (เช่น วันสอน) */
.lec tr.lec-choice-row > td { padding-top: 5px !important; padding-bottom: 5px !important; border: 0 !important; background: transparent !important; vertical-align: middle !important; }
.lec tr.lec-choice-row .lec-choice-row__label { display: inline-block; padding: 7px 0; color: var(--lec-ink-2); font-weight: 600; cursor: pointer; }
.lec tr.lec-choice-row:has(input:checked) .lec-choice-row__label { color: var(--lec-navy); }
.lec tr.lec-choice-row:has(input:checked) > td:first-child { box-shadow: inset 3px 0 0 var(--lec-blue); }
/* ช่องที่มีหลายช่องกรอก/ข้อความ → เรียงเป็นแถว */
.lec .lec-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.lec .lec-flow > :is(input, select) { width: auto !important; flex: 0 1 220px; min-width: 120px; margin: 0 !important; }
.lec .lec-flow > input[style*="width: 100%"], .lec .lec-flow > input[style*="width:100%"] { flex: 1 1 100%; }
.lec .lec-flow__text { color: var(--lec-ink-2); font-size: 14px; white-space: nowrap; }
.lec .lec-flow__br { flex-basis: 100%; height: 0; }
.lec .lec-flow > label.lec-choice + .lec-flow__text { margin-left: 6px; }
/* ปุ่ม Save / Submit พร้อมหมายเหตุ */
.lec td.lec-submits-cell { padding-top: 18px !important; padding-bottom: 18px !important; }
.lec .lec-submits { display: grid; gap: 12px; }
.lec .lec-submit { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--lec-line); border-radius: 14px; background: #fff; }
.lec .lec-submit__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.lec .lec-submit__body p { margin: 0; color: var(--lec-ink-2); font-size: 13.5px; line-height: 1.6; }
.lec .lec-submit > :is(input, button) { min-width: 120px; margin: 0 !important; }
.lec .lec-submit--save .lec-submit__icon { background: var(--lec-blue-50); color: var(--lec-blue); }
.lec .lec-submit--save > :is(input, button) { background: #fff !important; color: var(--lec-navy) !important; border: 1px solid #cfd8e6 !important; }
.lec .lec-submit--save > :is(input, button):hover { background: var(--lec-blue-50) !important; border-color: var(--lec-blue) !important; }
.lec .lec-submit--final { border-color: #f3c9c4; background: #fffafa; }
.lec .lec-submit--final .lec-submit__icon { background: var(--lec-bad-bg); color: var(--lec-bad); }
.lec .lec-submit--final .lec-submit__body p { color: #8f2a22; }
@media (max-width: 640px) { .lec .lec-submit { grid-template-columns: auto 1fr; } .lec .lec-submit > :is(input, button) { grid-column: 1 / -1; width: 100%; } }
/* กันแถบเลื่อนแนวนอนจากช่องกรอกกว้าง 100% */
.lec .main-panel :is(input, textarea, select) { max-width: 100%; }
.lec .lec-table-wrap table.lec-table td { min-width: 0; }
/* ตารางย่อยในช่องฟอร์ม (วันสอน, รายชื่อผู้สอน) → การ์ด */
.lec table.lec-table td table { border: 1px solid var(--lec-line) !important; border-radius: 12px; border-collapse: separate !important; border-spacing: 0; overflow: hidden; background: #fff !important; }
.lec table.lec-table td table > tbody > tr > td, .lec table.lec-table td table > tr > td { border: 0 !important; border-top: 1px solid #edf1f7 !important; background: #fff !important; padding: 8px 12px !important; }
.lec table.lec-table td table > tbody > tr:first-child > td { border-top: 0 !important; }
.lec table.lec-table td table > tbody > tr:first-child:has(strong) > td { background: #f6f8fc !important; color: var(--lec-ink-2); font-size: 13px; }
.lec table.lec-table td table tr.lec-choice-row:has(input:checked) > td { background: var(--lec-blue-50) !important; }
.lec label.lec-choice { margin: 0 8px 8px 0; }
.lec .lec-flow label.lec-choice { margin: 0; }
/* ปีการศึกษาก่อนหน้า (ย่อเป็นปุ่มเล็ก รองรับจำนวนปีที่เพิ่มขึ้นในอนาคต) */
.lec-year__more { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--lec-line); }
.lec-year__more-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lec-year__more-head > span { color: var(--lec-ink-2); font-size: 13.5px; font-weight: 700; }
.lec-year__more-head em { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: #eef1f6; color: var(--lec-ink-3); font-size: 11.5px; font-style: normal; font-weight: 700; }
.lec-year__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lec .lec-year__chip { min-width: 72px; min-height: 36px; padding: 0 16px !important; border: 1px solid #d6deea !important; border-radius: 999px !important; background: #fff !important; color: var(--lec-navy) !important; font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: none !important; transition: border-color .15s, background .15s, transform .15s; }
.lec .lec-year__chip:hover { border-color: var(--lec-blue) !important; background: var(--lec-blue-50) !important; transform: translateY(-1px); }
.lec .lec-year__chip[hidden] { display: none !important; }
.lec .lec-year__toggle { min-height: 36px; padding: 0 16px !important; border: 1px dashed #b9c6dc !important; border-radius: 999px !important; background: transparent !important; color: var(--lec-blue) !important; font-size: 13.5px; font-weight: 700; cursor: pointer; box-shadow: none !important; }
.lec .lec-year__toggle:hover { background: var(--lec-blue-50) !important; }
.lec-year__find { position: relative; display: inline-flex; align-items: center; margin: 0; color: var(--lec-ink-3); }
.lec-year__find .lec-icon { position: absolute; left: 12px; pointer-events: none; }
.lec .lec-year__more .lec-year__find input[data-lec-year-find] { width: 190px !important; height: 34px !important; min-height: 0; padding-left: 34px !important; border-radius: 999px !important; font-size: 13px !important; }
.lec-year__nofind { margin: 10px 0 0; color: var(--lec-ink-3); font-size: 13px; }
/* โลโก้ MAP-C ในหน้า login (แนวทางเดียวกับหน้านักศึกษา) */
.lec-auth__maplogo { display: block; width: clamp(170px, 15vw, 205px); height: auto; margin: 4px 0 18px; filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .45)); }
.lec-auth__logos-sm { display: none; align-items: center; gap: 16px; margin-bottom: 26px; }
.lec-auth__logos-sm .lec-auth__logo-sm { margin: 0; width: 170px; }
.lec-auth__maplogo-sm { width: 110px; height: auto; padding-left: 16px; border-left: 1px solid var(--lec-line); }
@media (max-width: 980px) { .lec-auth__logos-sm { display: flex; } }
/* ---------- Web guide: เลือกปีการศึกษาก่อน ---------- */
.lec-guide-ring { position: fixed; z-index: 1080; border-radius: 22px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 9999px rgba(12, 20, 40, .55); border: 3px solid var(--lec-gold); transition: opacity .25s, top .2s, left .2s, width .2s, height .2s; }
.lec-guide-ring.is-open { opacity: 1; animation: lecGuidePulse 1.8s ease-in-out infinite; }
.lec-guide-ring.is-flash { animation: lecGuideFlash .5s ease-in-out 2, lecGuidePulse 1.8s ease-in-out 1s infinite; }
.lec .lec-year__btn.lec-guide-target { position: relative; z-index: 1081; }
.lec-guide-tip { position: fixed; z-index: 1082; display: flex; align-items: center; gap: 10px; max-width: min(360px, calc(100vw - 24px)); opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.lec-guide-tip.is-open { opacity: 1; pointer-events: auto; transform: none; }
.lec-guide-tip__arrow { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--lec-gold); color: var(--lec-navy); box-shadow: 0 8px 22px rgba(0, 0, 0, .28); animation: lecGuideNudgeX 1s ease-in-out infinite; }
.lec-guide-tip.is-below { flex-direction: column; align-items: flex-start; }
.lec-guide-tip.is-below .lec-guide-tip__arrow { margin-left: 40px; transform: rotate(90deg); animation: lecGuideNudgeY 1s ease-in-out infinite; }
.lec-guide-tip__body { position: relative; padding: 16px 18px 16px 18px; border-radius: 16px; background: #fff; color: var(--lec-ink); box-shadow: 0 18px 44px rgba(10, 20, 45, .35); font-family: inherit; }
.lec-guide-tip__step { position: absolute; top: -10px; right: 14px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--lec-navy); color: #fff; font-size: 12px; font-weight: 800; }
.lec-guide-tip__body strong { display: block; margin: 0 0 4px; color: var(--lec-navy); font-size: 17px; font-weight: 800; }
.lec-guide-tip__body p { margin: 0 0 12px; color: var(--lec-ink-2); font-size: 14px; line-height: 1.6; }
.lec-guide-tip__ok { min-height: 34px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--lec-navy); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.lec-guide-tip__ok:hover { background: #233a72; }
.lec-guide-tip__ok:focus-visible { outline: 3px solid rgba(46, 92, 184, .4); outline-offset: 2px; }
.lec-guide-tip.is-shake { animation: lecGuideShake .55s ease-in-out 2; }
@keyframes lecGuideNudgeX { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }
@keyframes lecGuideNudgeY { 0%, 100% { transform: rotate(90deg) translateX(0); } 50% { transform: rotate(90deg) translateX(-10px); } }
@keyframes lecGuideShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-7px); } 80% { transform: translateX(5px); } }
@keyframes lecGuidePulse { 0%, 100% { border-color: var(--lec-gold); } 50% { border-color: #ffe08a; } }
@keyframes lecGuideFlash { 0%, 100% { border-width: 3px; } 50% { border-width: 6px; } }
@media (prefers-reduced-motion: reduce) { .lec-guide-ring, .lec-guide-tip__arrow, .lec-guide-tip.is-shake { animation: none !important; } }
