/* Giao diện di động đồng bộ với giao diện máy tính (theme edu) - THPT Tuần Giáo */
:root { --m-blue: #1f5bd6; --m-navy: #0b3d91; --m-deep: #0b2f78; --m-red: #e02b2b; --m-gold: #ffc83d; --m-bg: #eef3fb; --m-text: #1c2f58; --m-muted: #6b7690; }
body { background: var(--m-bg) !important; color: var(--m-text); font-family: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a, a:link, a:active, a:visited { color: var(--m-navy); }
a:hover { color: var(--m-red); }

/* Header */
#header { background: linear-gradient(135deg, var(--m-deep), var(--m-blue)) !important; border-bottom: 3px solid var(--m-gold); min-height: 48px; }
#header .logo a { display: flex; align-items: center; gap: 8px; text-decoration: none; height: 48px; }
#header .logo img { height: 36px; width: 36px; max-height: none; border-radius: 50%; background: #fff; padding: 1px; flex: 0 0 auto; }
.tg-m-name { display: block; color: #fff; font-weight: 800; font-size: 14px; line-height: 1.1; letter-spacing: .2px; }
.tg-m-name small { display: block; margin-top: 2px; color: var(--m-gold); font-weight: 600; font-size: 10px; letter-spacing: 0; }
#header .site-buttons .mbt, #header .site-buttons a, #header .site-buttons em { color: #fff !important; }
/* Thanh tìm kiếm, nút */
.btn-primary, .btn-info { background: linear-gradient(135deg, var(--m-blue), var(--m-navy)) !important; border-color: var(--m-navy) !important; color: #fff !important; }
.btn-danger { background: var(--m-red) !important; border-color: var(--m-red) !important; }
.btn-default { background: #fff; color: var(--m-navy); border-color: #d7e1f3; }
.btn { border-radius: 10px; }
.btn-xs { border-radius: 8px; }
.form-control { border: 1.5px solid #dfe6f3; border-radius: 10px; background: #fff; box-shadow: none; color: var(--m-text); }
.form-control:focus { border-color: var(--m-blue); box-shadow: 0 0 0 3px rgba(31, 91, 214, .14); }
.headerSearch input { border-color: #dfe6f3; border-radius: 10px 0 0 10px; }
.headerSearch .btn-info { border-radius: 0 10px 10px 0; }

/* Đường dẫn (breadcrumb) */
.breadcrumbs { background: #fff !important; border: 0 !important; border-bottom: 1px solid #e3eaf7 !important; color: var(--m-muted); }
.breadcrumbs .home-icon a, .breadcrumbs a { color: var(--m-navy) !important; }

/* Khung nội dung dạng thẻ */
.panel, .well { border: 0 !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 4px 16px rgba(20, 80, 181, .10) !important; overflow: hidden; }
.panel-default > .panel-heading, .panel-heading { background: linear-gradient(135deg, var(--m-deep), var(--m-blue)) !important; color: #fff !important; border: 0 !important; font-weight: 700; }
.panel-heading a { color: #fff !important; }
.panel-body { color: var(--m-text); }
.panel-body h2, .panel-body h3, .panel-body h4 { color: var(--m-navy); font-weight: 700; line-height: 1.35; }
.panel-body h2 a, .panel-body h3 a, .panel-body h4 a { color: var(--m-navy) !important; }
.panel-body h2 a:hover, .panel-body h3 a:hover { color: var(--m-red) !important; }
.img-thumbnail { border: 0 !important; border-radius: 10px !important; padding: 0 !important; box-shadow: 0 2px 8px rgba(20, 80, 181, .18); }
.text-muted, .text-muted a { color: var(--m-muted) !important; }
hr { border-top-color: #e3eaf7; }

/* Phân trang */
.pagination > li > a, .pagination > li > span { color: var(--m-navy); border: 0; margin: 0 2px; border-radius: 10px !important; background: #fff; box-shadow: 0 1px 4px rgba(20, 80, 181, .12); }
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover { background: linear-gradient(135deg, var(--m-blue), var(--m-navy)); color: #fff; }

/* Bảng, danh sách, tab */
.table > thead > tr > th { background: #e7efff; color: var(--m-navy); border-bottom: 2px solid #c9d9f5; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #f6f9ff; }
.list-group-item { border-color: #e3eaf7; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover { color: var(--m-red); border-bottom-color: var(--m-red); }
.label-primary, .label-info { background: var(--m-blue); }
.alert-info { background: #eef3fb; border-color: #cfdcf3; color: var(--m-navy); }

/* Thanh dưới cùng */
.footer { background: linear-gradient(135deg, var(--m-deep), var(--m-blue)) !important; border-top: 3px solid var(--m-gold); box-shadow: 0 -4px 14px rgba(11, 47, 120, .25); }
.footer a, .footer .mbt, .footer em, .mbt, .mbt-lg { color: #fff !important; }
.mbt:hover, .mbt-lg:hover, .footer a:hover { color: var(--m-gold) !important; }

/* Cửa sổ menu (Help window) */
#winHelp { background: rgba(8, 24, 60, .55); }
#winHelp .winHelp { background: #fff; border: 0; width: 270px; box-shadow: 4px 0 24px rgba(8, 24, 60, .35); border-radius: 0 20px 20px 0; }
#winHelp .winHelp a { color: var(--m-text); }
#winHelp .winHelp a:hover { color: var(--m-red); }
#winHelp .panel { box-shadow: none !important; border-radius: 0 !important; }
#winHelp .panel-heading { padding: 10px 14px; }
#winHelp .panel-body .menu > li { border-bottom: 1px solid #edf1f8; }
#winHelp .panel-body .menu > li > a { background: #fff; line-height: 40px; padding: 0 14px; font-weight: 600; }
#winHelp .panel-body .menu > li > a:after { color: var(--m-blue); }
.theme-change { border-bottom: 1px solid #e3eaf7; color: var(--m-muted); }
.company_info { color: var(--m-text); }
.company_info .company_name { color: var(--m-navy); font-weight: 800; font-size: 13px; }
.company_info em { color: var(--m-blue); width: 18px; text-align: center; }

/* Menu chính (nút ba gạch) */
.metismenu, .site-buttons .dropdown-menu { font-family: inherit; }
/* Khoảng cách nội dung */
#body { padding: 0 10px 14px; }
#body .breadcrumbs, #body > div > .breadcrumbs { margin-left: -10px; margin-right: -10px; }
.breadcrumbs .toggle { color: var(--m-blue) !important; }
.sub-breadcrumbs, .breadcrumbs .breadcrumb { background: transparent; }
.sub-breadcrumbs { background: #fff; border-bottom: 1px solid #e3eaf7; }
#body label { color: var(--m-navy); font-weight: 600; }
select.form-control { border-radius: 10px; height: 40px; }
.form-control.input-sm { border-radius: 8px; }
.tip { color: var(--m-text); }
header.first-child { background: var(--m-deep) !important; }
#tip { background: #e7efff; color: var(--m-navy); }

/* Menu sổ xuống (nút ba gạch) */
.metismenu { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.metismenu .sidebar { background: transparent !important; }
nav.sidebar-nav { background: linear-gradient(160deg, var(--m-deep), var(--m-blue)) !important; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 28px rgba(8, 24, 60, .35); border: 0; margin: 6px 8px; }
nav.sidebar-nav a { color: #fff !important; font-weight: 600; }
nav.sidebar-nav li { border-color: rgba(255, 255, 255, .14) !important; }
nav.sidebar-nav li > a:hover, nav.sidebar-nav li.active > a, nav.sidebar-nav li > a:focus { background: rgba(255, 255, 255, .14) !important; color: var(--m-gold) !important; }
nav.sidebar-nav ul ul { background: rgba(0, 0, 0, .18) !important; }
nav.sidebar-nav ul ul a { font-weight: 400; }

/* Cửa sổ menu: phần đầu */
#winHelp .logo-small { background: linear-gradient(135deg, var(--m-deep), var(--m-blue)); border-bottom: 3px solid var(--m-gold); padding: 12px 14px; }
#winHelp .logo-small a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
#winHelp .logo-small img { width: 46px !important; height: 46px !important; max-width: none; border-radius: 50%; background: #fff; padding: 1px; flex: 0 0 auto; }
#winHelp .logo-small a { color: #fff !important; }
#winHelp .tg-m-name { font-size: 15px; }
#winHelp .panel-primary > .panel-heading { background: #e7efff !important; color: var(--m-navy) !important; border: 0; font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .4px; }
.panel-primary { border-radius: 0; }
#winHelp .padding { padding: 12px 14px; }
#body input.form-control, #body textarea.form-control { width: 100%; }
#body input.form-control[type=text], #body input.form-control[type=email], #body input.form-control[type=password] { height: 40px; }

/* ===== Thời khóa biểu (module tkb) - đồng bộ giao diện máy tính ===== */
:root {
    --tg-blue: #1450b5;
    --tg-blue-d: #0b3d91;
    --tg-navy: #12306b;
    --tg-blue-l: #e8f0fc;
    --tg-red: #e5252f;
    --tg-red-d: #c8102e;
    --tg-gold: #f5b301;
    --tg-text: #27385f;
    --tg-muted: #6b7690;
    --tg-line: #e6edf8;
    --tg-radius: 18px;
    --tg-shadow: 0 4px 18px rgba(20, 80, 181, .10);
}

/* ==========================================================
   THá»œI KHÃ“A BIá»‚U (module tkb)
   ========================================================== */
.tkb-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tkb-title { display: flex; align-items: center; gap: 14px; }
.tkb-ic { flex: 0 0 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; background: linear-gradient(135deg, #2a6be0, #0f4aad); box-shadow: 0 8px 18px rgba(20, 80, 181, .3); }
.tkb-title h2 { margin: 0; font-size: 24px; font-weight: 800; color: #12306b; line-height: 1.25; }
.tkb-title p { margin: 3px 0 0; font-size: 13.5px; color: #6b7690; }
.tkb-title p b { color: #e5252f; }
.tkb-actions { display: flex; gap: 8px; }
.tkb-tabs { display: inline-flex; padding: 5px; gap: 4px; background: #eef3fb; border-radius: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.tkb-tabs button { border: 0; background: transparent; padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: #4a5878; transition: background .2s, color .2s, box-shadow .2s; }
.tkb-tabs button:hover { color: #1450b5; }
.tkb-tabs button.active { background: #fff; color: #e5252f; box-shadow: 0 4px 12px rgba(20, 80, 181, .15); }
.tkb-tabs .fa { margin-right: 6px; }
.tkb-pane { display: none; }
.tkb-pane.active { display: block; animation: tkbIn .3s ease; }
@keyframes tkbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tkb-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.tkb-pick { min-width: 200px; }
.tkb-pick label { display: block; margin-bottom: 4px; font-size: 12.5px; color: #6b7690; }
.tkb-grow { flex: 1; min-width: 240px; }
.tkb-search { position: relative; }
.tkb-search .fa { position: absolute; left: 14px; top: 13px; color: #9aa7c4; }
.tkb-search input { padding-left: 38px; }
.tkb-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tkb-chips button { border: 1px solid #d3deef; background: #fff; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: #27385f; transition: all .15s; }
.tkb-chips button:hover { border-color: #1450b5; color: #1450b5; }
.tkb-chips button.on { background: linear-gradient(180deg, #2a6be0, #1450b5); border-color: #1450b5; color: #fff; box-shadow: 0 4px 10px rgba(20, 80, 181, .25); }
.tkb-classes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; max-height: 150px; overflow-y: auto; padding: 2px; }
.tkb-classes button { border: 1px solid #e3ebf8; background: #f6f9ff; padding: 6px 13px; border-radius: 10px; font-weight: 600; font-size: 13px; color: #27385f; transition: all .15s; }
.tkb-classes button:hover { background: #eef4ff; border-color: #1450b5; }
.tkb-classes button.on { background: #e5252f; border-color: #e5252f; color: #fff; box-shadow: 0 4px 10px rgba(229, 37, 47, .3); }
.tkb-card { border: 1px solid #e3ebf8; border-radius: 18px; overflow: hidden; background: #fff; }
.tkb-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, #f6f9ff, #eaf2ff); border-bottom: 1px solid #e3ebf8; }
.tkb-big { font-size: 22px; font-weight: 800; color: #12306b; }
.tkb-ses { margin-left: 12px; padding: 3px 12px; border-radius: 999px; background: #fff; border: 1px solid #d3deef; font-size: 12.5px; font-weight: 600; color: #1450b5; }
.tkb-note { font-size: 13.5px; color: #6b7690; }
.tkb-note b { color: #e5252f; font-size: 17px; }
.tkb-scroll { overflow-x: auto; }
.tkb-t { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 720px; }
.tkb-t th, .tkb-t td { border-right: 1px solid #edf1f9; border-bottom: 1px solid #edf1f9; text-align: center; vertical-align: middle; padding: 6px; }
.tkb-t thead th { background: linear-gradient(180deg, #1a5fd0, #0f4aad); color: #fff; padding: 12px 8px; font-size: 14px; border-color: rgba(255, 255, 255, .15); position: relative; }
.tkb-t thead th em { display: block; font-style: normal; font-size: 10.5px; font-weight: 600; color: #ffd666; }
.tkb-t thead th.today { background: linear-gradient(180deg, #ee3640, #c8102e); }
.tkb-t .tkb-p { width: 64px; background: #f6f9ff; color: #1450b5; font-weight: 800; font-size: 15px; }
.tkb-t thead .tkb-p { color: #fff; background: #0b3d91; }
.tkb-t td.today { background: #fff8f8; }
.tkb-t tr:last-child td, .tkb-t tr:last-child th { border-bottom: 0; }
.tkb-cell { --h: 210; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; padding: 8px 6px; border-radius: 12px; background: hsl(var(--h), 85%, 94%); border-left: 4px solid hsl(var(--h), 70%, 48%); text-align: left; align-items: flex-start; transition: transform .15s, box-shadow .15s; }
.tkb-cell:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(20, 80, 181, .16); }
.tkb-cell b { font-size: 14px; color: hsl(var(--h), 70%, 26%); line-height: 1.25; }
.tkb-gv { font-size: 12.5px; color: #5d6a85; line-height: 1.25; }
.tkb-gv[data-gv], .tkb-gv[data-lop] { cursor: pointer; text-decoration: underline dotted; }
.tkb-gv[data-gv]:hover, .tkb-gv[data-lop]:hover { color: #e5252f; }
.tkb-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 14px 20px; background: #fafcff; border-top: 1px solid #edf1f9; }
.tkb-lg { --h: 210; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #27385f; }
.tkb-lg i { width: 12px; height: 12px; border-radius: 4px; background: hsl(var(--h), 70%, 48%); }
.tkb-lg small { color: #8a96ad; }
.tkb-lg2 { font-size: 13px; color: #5d6a85; }
.tkb-lg2 b { color: #12306b; }
.tkb-all { min-width: 1200px; table-layout: auto; }
.tkb-all thead th a { color: #fff; }
.tkb-all .tkb-cell { min-height: 48px; padding: 4px 5px; border-left-width: 3px; }
.tkb-all .tkb-cell b { font-size: 12.5px; }
.tkb-all .tkb-gv { font-size: 11px; }
.tkb-all td { padding: 3px; min-width: 76px; }
.tkb-empty { text-align: center; padding: 50px 20px; color: #7a869f; }
.tkb-empty .fa { font-size: 46px; color: #c8d3ea; margin-bottom: 10px; }
.tkb-admin { margin-top: 26px; padding: 18px 20px; border-radius: 16px; background: #f6f9ff; border: 1px dashed #b8c9e8; }
.tkb-admin h4 { margin: 0 0 10px; font-size: 16px; color: #1450b5; }
.tkb-admin h4 small { color: #9aa7c4; font-size: 12px; font-weight: 500; }
.tkb-up { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tkb-up input[type=file] { flex: 1; min-width: 240px; height: auto; padding: 8px 12px; }
@media (max-width: 767px) { .tkb-title h2 { font-size: 19px; } .tkb-tabs button { padding: 9px 12px; font-size: 13px; } .tkb-pick { min-width: 100%; } .tkb-actions { width: 100%; } }
@media print {
    .tg-topbar, .tg-hero, .section-nav, .third-nav, #footer, .section-footer-bottom, .tkb-tabs, .tkb-tools, .tkb-classes, .tkb-actions, .tkb-admin, .bttop, .fix_banner_left, .fix_banner_right { display: none !important; }
    .tg-main { box-shadow: none; padding: 0; } .tkb-pane { display: none !important; } .tkb-pane.active { display: block !important; }
    .tkb-t thead th { background: #0f4aad !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .tkb-cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.tkb-week { width: auto; min-width: 180px; height: 38px; border-radius: 999px; padding: 4px 14px; }
.tkb-oldbn { margin-bottom: 14px; } .tkb-oldbn a { font-weight: 700; text-decoration: underline; }

.tkb-arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 6px; }
.tkb-arch-i { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid #e3ebf8; border-radius: 16px; background: linear-gradient(135deg, #fff, #f3f8ff); color: #27385f !important; transition: transform .2s, box-shadow .2s; }
.tkb-arch-i:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 80, 181, .16); }
.tkb-arch-i > .fa { font-size: 24px; color: #1450b5; }
.tkb-arch-i b { font-size: 16px; color: #12306b; }
.tkb-arch-i span { font-size: 12.5px; color: #7a869f; }
.tkb-arch-i em { margin-top: 6px; font-style: normal; font-weight: 700; color: #e5252f; font-size: 13px; }
.tkb-old { margin-top: 18px; color: #6b7690; font-size: 13.5px; }

.tkb-old a { font-weight: 700; color: #e5252f; text-decoration: underline; }

