/* NWS App — shared layout styles */
body, h1, h2, h3, h4, h5, h6 { font-family: "Kanit", "Roboto", sans-serif; }
body { background-color: #f8fafc; color: #334155; font-size: 14px; margin: 0; }

.w3-card, .w3-card-2, .w3-card-4 {
	box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
	border-radius: 12px; border: none !important;
}
.w3-button { border-radius: 8px !important; transition: all 0.2s ease; font-weight: 500; }
.w3-table, .w3-table-all {
	border-collapse: separate !important; border-spacing: 0; border-radius: 12px;
	overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.04);
	border: 1px solid #e2e8f0 !important;
}
.w3-table th { background: #f1f5f9; color: #475569; font-weight: 600; font-size: 13px; }
.w3-table td, .w3-table th { border: none !important; border-bottom: 1px solid #e2e8f0 !important; padding: 12px 14px !important; }

.app-header {
	background: linear-gradient(135deg,#1e40af 0%,#3b82f6 60%,#06b6d4 100%);
	color: #fff; padding: 14px 24px; position: sticky; top: 0; z-index: 5;
	box-shadow: 0 2px 10px rgba(2,6,23,.15);
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.app-header h1 { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.app-header .ah-btn {
	background: rgba(255,255,255,.18); color: #fff; border: none; border-radius: 8px;
	padding: 8px 12px; cursor: pointer; font-size: 14px; text-decoration: none;
}
.app-header .ah-btn:hover { background: rgba(255,255,255,.28); }
.app-header .ah-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.app-header .ah-year-form { margin: 0; display: inline-flex; align-items: center; }
.app-header .ah-year-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; margin: 0; }
.app-header .ah-year-label select {
	background: rgba(255,255,255,.95); color: #1e293b; border: none; border-radius: 8px;
	padding: 7px 10px; font-size: 13px; max-width: 220px; cursor: pointer;
}
.app-header .ah-year-ro {
	font-size: 12px; background: rgba(251,191,36,.25); color: #fef3c7;
	padding: 4px 8px; border-radius: 6px; white-space: nowrap;
}
.app-header .ah-class-form { margin: 0; display: inline-flex; align-items: center; }
.app-header .ah-class-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; margin: 0; }
.app-header .ah-class-label select {
	background: rgba(255,255,255,.95); color: #1e293b; border: none; border-radius: 8px;
	padding: 7px 10px; font-size: 13px; max-width: 180px; cursor: pointer;
}

.sb {
	position: fixed; left: 0; top: 0; width: 260px; height: 100%;
	background: linear-gradient(180deg,#0f172a 0%,#1e293b 100%);
	color: #cbd5e1; z-index: 20; overflow-y: auto; transition: transform .25s ease;
}
.sb-hero { padding: 22px 16px 14px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-hero img { width: 56px; height: 56px; border-radius: 12px; }
.sb-hero h3 { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: #f1f5f9; line-height: 1.35; }
.sb-item {
	display: flex; align-items: center; gap: 10px; padding: 11px 16px; margin: 2px 8px;
	color: #94a3b8; text-decoration: none; border-radius: 8px; font-size: 13px; font-weight: 500;
}
.sb-item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.sb-item.active { background: rgba(96,165,250,.15); color: #93c5fd; }
.sb-item.danger { color: #f87171; }
.sb-sec { padding: 14px 16px 4px; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: #64748b; font-weight: 700; }
.sb-login-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin: 12px 16px; padding: 12px 16px; border-radius: 10px;
	background: linear-gradient(135deg,#2563eb,#1d4ed8); color: #fff !important; text-decoration: none; font-weight: 600;
	font-size: 14px; line-height: 1.35;
}
.sb-login-btn span { color: #fff; }
.nws-checkin-save-btn {
	font-size: 14px !important; padding: 10px 20px !important;
	overflow: visible !important; white-space: normal !important; min-width: 11rem;
}
.nws-checkin-save-btn .nws-btn-label { margin-left: 6px; }

/* ── Modal ยืนยัน (check-in และอื่น ๆ) ── */
body.nws-modal-open { overflow: hidden; }
.nws-confirm-modal {
	position: fixed; inset: 0; z-index: 1200;
	display: flex; align-items: center; justify-content: center;
	padding: 20px; opacity: 0; visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}
.nws-confirm-modal.is-open { opacity: 1; visibility: visible; }
.nws-confirm-modal__backdrop {
	position: absolute; inset: 0;
	background: rgba(15, 23, 42, .48);
	backdrop-filter: blur(4px);
}
.nws-confirm-modal__card {
	position: relative; width: 100%; max-width: 400px;
	background: #fff; border-radius: 20px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
	padding: 0 24px 22px; text-align: center;
	transform: translateY(14px) scale(.97);
	transition: transform .22s ease;
}
.nws-confirm-modal.is-open .nws-confirm-modal__card { transform: none; }
.nws-confirm-modal__accent {
	height: 5px; margin: 0 -24px 18px;
	border-radius: 20px 20px 0 0;
	background: linear-gradient(90deg, #2563eb, #3b82f6);
}
.nws-confirm-modal__accent--purple {
	background: linear-gradient(90deg, #7c3aed, #9333ea, #a855f7);
}
.nws-confirm-modal__icon {
	width: 56px; height: 56px; margin: 4px auto 14px;
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 24px;
}
.nws-confirm-modal__icon--purple {
	background: linear-gradient(135deg, #ede9fe, #f3e8ff);
	color: #7c3aed;
}
.nws-confirm-modal__title {
	margin: 0 0 10px; font-size: 1.2rem; font-weight: 600; color: #0f172a;
}
.nws-confirm-modal__text {
	margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: #475569;
}
.nws-confirm-modal__text strong { color: #1e293b; font-weight: 600; }
.nws-confirm-modal__meta {
	display: inline-block; margin-top: 8px; padding: 4px 12px;
	font-size: 12px; font-weight: 600; color: #6d28d9;
	background: #f5f3ff; border-radius: 999px;
}
.nws-confirm-modal__actions {
	display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.nws-confirm-modal__btn {
	flex: 1; min-width: 120px; padding: 11px 16px; border-radius: 12px;
	font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
	border: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.nws-confirm-modal__btn:active { transform: scale(.98); }
.nws-confirm-modal__btn--ghost {
	background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
}
.nws-confirm-modal__btn--ghost:hover { background: #e2e8f0; }
.nws-confirm-modal__btn--purple {
	background: linear-gradient(135deg, #7c3aed, #9333ea); color: #fff;
	box-shadow: 0 4px 16px rgba(124, 58, 237, .35);
}
.nws-confirm-modal__btn--purple:hover {
	box-shadow: 0 6px 20px rgba(124, 58, 237, .42);
}
.nws-confirm-modal__accent--blue {
	background: linear-gradient(90deg, #2563eb, #3b82f6, #06b6d4);
}
.nws-confirm-modal__icon--blue {
	background: linear-gradient(135deg, #dbeafe, #e0f2fe);
	color: #2563eb;
}
.nws-confirm-modal__btn--blue {
	background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
	box-shadow: 0 4px 16px rgba(37, 99, 235, .35);
}
.nws-confirm-modal__btn--blue:hover {
	box-shadow: 0 6px 20px rgba(37, 99, 235, .42);
}
.nws-confirm-modal__accent--amber {
	background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24);
}
.nws-confirm-modal__icon--amber {
	background: linear-gradient(135deg, #fef3c7, #fde68a);
	color: #b45309;
}
.nws-confirm-modal__btn--amber {
	background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff;
	box-shadow: 0 4px 16px rgba(217, 119, 6, .35);
}
.nws-confirm-modal__btn--amber:hover {
	box-shadow: 0 6px 20px rgba(217, 119, 6, .42);
}
.sb-tabs { display: flex; gap: 4px; padding: 8px 12px; }
.sb-tab { flex: 1; padding: 8px 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent; color: #64748b; }
.sb-tab.active { background: rgba(96,165,250,.2); color: #93c5fd; border-color: #3b82f6; }
.sb-theme-wrap { padding: 10px 12px 6px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
.sb-theme-lbl { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: #64748b; font-weight: 700; padding: 0 4px 6px; }
.sb-theme-row { display: flex; gap: 4px; }
.sb-theme-opt { flex: 1; padding: 8px 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: transparent; color: #64748b; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.sb-theme-opt.active { background: rgba(96,165,250,.2); color: #93c5fd; border-color: #3b82f6; }
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 15; }
.sb-overlay.open { display: block; }
.w3-main { margin-left: 260px; min-height: 100vh; }
@media (max-width: 1024px) {
	.sb { transform: translateX(-260px); }
	.sb.open { transform: translateX(0); }
	.w3-main { margin-left: 0 !important; }
}

.modern-hero {
	margin: 20px; background: linear-gradient(135deg,#1e3a8a 0%,#3b82f6 50%,#06b6d4 100%);
	border-radius: 20px; padding: 50px 40px; color: #fff; text-align: center; position: relative; overflow: hidden;
	box-shadow: 0 10px 30px rgba(30,58,138,.25);
}
.modern-hero::before {
	content: ''; position: absolute; inset: 0; background-image: url("../../images/nws.jpg");
	background-size: cover; background-position: center; opacity: .15; z-index: 0;
}
.modern-hero > * { position: relative; z-index: 1; }
.modern-hero h2 { margin: 0 0 8px; font-size: 32px; font-weight: 600; }
.modern-hero p { margin: 0 0 20px; font-size: 16px; opacity: .95; }
.hero-cta, .hero-cta-secondary {
	display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 10px;
	font-size: 16px; font-weight: 600; text-decoration: none; transition: .2s; margin: 4px;
}
.hero-cta { background: #fff; color: #1e40af; }
.hero-cta-secondary { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.hero-cta:hover, .hero-cta-secondary:hover { transform: translateY(-2px); }

.info-card {
	background: #fff; border-radius: 14px; padding: 18px 22px;
	box-shadow: 0 4px 14px rgba(15,23,42,.06); border: 1px solid #eef2f7; margin: 18px 20px;
}
.info-card.gradient { background: linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%); border-color: #bfdbfe; }
.info-card h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: #1e40af; }

.section-title {
	margin: 20px 20px 10px; color: #1e40af; font-weight: 600; font-size: 18px;
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.chart-card, .summary-table-wrap {
	background: #fff; border-radius: 14px; margin: 0 20px 20px; padding: 20px;
	box-shadow: 0 4px 14px rgba(15,23,42,.06); border: 1px solid #eef2f7;
}
.summary-table-wrap { overflow-x: auto; padding: 0; }
.summary-table-wrap table { margin: 0; width: 100%; }
.row-level { background: #dbeafe !important; font-weight: 600; }
.row-group { background: #dcfce7 !important; font-weight: 600; }
.row-grand { background: #fee2e2 !important; font-weight: 700; }
.row-pending td { background: #fff7ed !important; }

.dp-card {
	background: #fff; border-radius: 16px; border: 1px dashed #cbd5e1;
	padding: 28px; text-align: center; max-width: 520px; margin: 18px auto;
	box-shadow: 0 6px 20px rgba(15,23,42,.05);
}
.dp-card .dp-input {
	width: 100%; padding: 14px 18px; border-radius: 10px; border: 2px solid #e2e8f0;
	background: #f8fafc; color: #1e40af; font-weight: 600; font-size: 15px; cursor: pointer; text-align: center;
}
.dp-go {
	margin-top: 14px; padding: 10px 28px; background: #3b82f6; color: #fff; border: none;
	border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}

.cal-section { margin: 14px 20px; background: #fff; border-radius: 14px; padding: 16px 18px; border: 1px solid #eef2f7; }
.cal-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-pill { min-width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; background: #f1f5f9; color: #475569; }
.cal-pill.done { background: #dcfce7; color: #15803d; }
.cal-pill.miss { background: #fee2e2; color: #b91c1c; cursor: pointer; }

.kpi-strip { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin: 14px 20px; }
.kpi-cell { background: #fff; border-radius: 12px; padding: 12px; border: 1px solid #eef2f7; text-align: center; }
.kpi-cell .kpi-num { font-size: 26px; font-weight: 700; }
.kpi-cell .kpi-lbl { font-size: 12px; color: #64748b; }
.kpi-cell.come { border-top: 3px solid #10b981; }
.kpi-cell.miss { border-top: 3px solid #ef4444; }
.kpi-cell.late { border-top: 3px solid #f97316; }
.kpi-cell.leave { border-top: 3px solid #8b5cf6; }
.kpi-cell.sick { border-top: 3px solid #6b7280; }

.date-banner {
	background: linear-gradient(135deg,#10b981 0%,#0d9488 100%); color: #fff; border-radius: 14px;
	padding: 16px 24px; margin: 18px 20px; text-align: center;
}
.date-banner.edit { background: linear-gradient(135deg,#f59e0b 0%,#d97706 100%); }

.qa-row { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.qa-btn { padding: 8px 14px; border-radius: 8px; border: 2px solid transparent; font-weight: 600; cursor: pointer; font-size: 13px; min-width: 60px; background: #f1f5f9; color: #475569; }
.qa-btn[data-active="1"] { background: #10b981; color: #fff; }
.qa-btn[data-active="2"] { background: #ef4444; color: #fff; }
.qa-btn[data-active="3"] { background: #f97316; color: #fff; }
.qa-btn[data-active="4"] { background: #8b5cf6; color: #fff; }
.qa-btn[data-active="5"] { background: #6b7280; color: #fff; }
.row-absent { background: #fef2f2 !important; }
.row-late { background: #fff7ed !important; }
.row-leave { background: #f5f3ff !important; }
.row-sick { background: #f9fafb !important; }

.flash-banner {
	margin: 14px 20px; padding: 14px 18px; border-radius: 12px; display: flex; align-items: center; gap: 12px;
	font-weight: 500; animation: flashIn .35s ease;
}
.flash-banner.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-banner.info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.hub-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 14px; margin: 18px 20px; }
.hub-card {
	background: #fff; border-radius: 14px; padding: 20px; border: 1px solid #eef2f7;
	box-shadow: 0 4px 14px rgba(15,23,42,.06); text-decoration: none; color: inherit; transition: .15s;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.1); }
.hub-card i { font-size: 28px; color: #3b82f6; margin-bottom: 10px; display: block; }
.hub-card h4 { margin: 0 0 6px; color: #1e40af; }
.hub-card p { margin: 0; font-size: 13px; color: #64748b; }
.hub-card.hub-card-featured {
	border: 2px solid #f97316;
	background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
	box-shadow: 0 6px 20px rgba(249, 115, 22, .18);
}
.hub-card.hub-card-featured i { color: #ea580c; }
.hub-card.hub-card-featured h4 { color: #c2410c; }
.hub-card.hub-card-featured-2 {
	border: 2px solid #0d9488;
	background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
	box-shadow: 0 6px 20px rgba(13, 148, 136, .18);
}
.hub-card.hub-card-featured-2 i { color: #0d9488; }
.hub-card.hub-card-featured-2 h4 { color: #115e59; }
.hub-card.alert-card { border: 2px solid #f59e0b; background: #fffbeb; }
.hub-card.alert-card i { color: #d97706; }
.hub-card.alert-card h4 { color: #92400e; }
.hub-card.hub-card-featured.alert-card {
	border-color: #f97316;
	background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}
.hub-card.hub-card-featured-2.alert-card {
	border-color: #0d9488;
	background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
}
.sb-badge {
	display: inline-block;
	min-width: 18px;
	padding: 2px 7px;
	margin-left: auto;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	color: #fff;
	background: #dc2626;
	border-radius: 999px;
}
.ep-admin-alert {
	margin: 12px 20px 0;
	padding: 14px 18px;
	background: linear-gradient(135deg, #fff7ed, #ffedd5);
	border: 1px solid #fdba74;
	border-radius: 12px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}
.ep-admin-alert strong { color: #9a3412; }
.ep-admin-alert a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #ea580c;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
}
.ep-admin-alert a:hover { background: #c2410c; }
.ep-admin-alert ul { margin: 0; padding: 0 0 0 18px; font-size: 13px; color: #78350f; flex: 1 1 100%; }
.sb-item-ep-alert {
	background: rgba(234, 88, 12, .35) !important;
	color: #ffedd5 !important;
	font-weight: 600;
}
.sb-item-ep-alert:hover { background: rgba(234, 88, 12, .5) !important; }
.sb-tab .sb-badge-tab {
	display: inline-block;
	min-width: 16px;
	margin-left: 4px;
	padding: 1px 5px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	background: #dc2626;
	border-radius: 999px;
	vertical-align: middle;
}
.ah-ep-alert {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #ea580c;
	color: #fff !important;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
}
.ah-ep-alert:hover { background: #c2410c; }
.ah-ep-alert .ah-ep-badge {
	min-width: 18px;
	padding: 2px 6px;
	font-size: 11px;
	background: #fff;
	color: #9a3412;
	border-radius: 999px;
	text-align: center;
}
body.ep-login-open { overflow: hidden; }
.ep-login-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 12000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.ep-login-modal.open { display: flex; }
.ep-login-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
}
.ep-login-card {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 85vh;
	overflow: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
	padding: 22px 24px 18px;
}
.ep-login-card h2 {
	margin: 0 0 16px;
	font-size: 1.15rem;
	color: #9a3412;
}
.ep-login-card h3 {
	margin: 0 0 8px;
	font-size: .95rem;
	color: #1e293b;
}
.ep-login-sec {
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #e2e8f0;
}
.ep-login-sec:last-of-type { border-bottom: none; }
.ep-login-sec p { margin: 0 0 10px; font-size: 14px; color: #475569; }
.ep-login-list {
	margin: 0 0 12px;
	padding: 0 0 0 18px;
	font-size: 13px;
	color: #334155;
	line-height: 1.5;
}
.ep-login-note { color: #b91c1c; font-size: 12px; }
.ep-login-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 8px;
}
.ep-login-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	background: #f1f5f9;
	color: #334155;
}
.ep-login-btn-primary { background: #ea580c; color: #fff; }
.ep-login-btn-primary:hover { background: #c2410c; color: #fff; }
.ep-login-btn-muted:hover { background: #e2e8f0; }
.ep-login-x {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
}
.ep-teacher-notices {
	margin: 0 0 18px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #eff6ff, #e0e7ff);
	border: 1px solid #93c5fd;
	border-radius: 12px;
}
.ep-teacher-notices h3 { margin: 0 0 10px; font-size: 1rem; color: #1e40af; }
.ep-teacher-notices ul { margin: 0 0 10px; padding: 0 0 0 18px; font-size: 13px; }
.ep-teacher-notices .ep-dismiss {
	font-size: 12px;
	color: #2563eb;
	cursor: pointer;
	border: none;
	background: none;
	padding: 0;
	font-weight: 600;
}

[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .w3-main { background: #0f172a; }
[data-theme="dark"] .info-card, [data-theme="dark"] .chart-card, [data-theme="dark"] .summary-table-wrap,
[data-theme="dark"] .dp-card, [data-theme="dark"] .cal-section, [data-theme="dark"] .kpi-cell, [data-theme="dark"] .hub-card {
	background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0;
}
[data-theme="dark"] .hub-card.hub-card-featured {
	background: linear-gradient(135deg, #431407 0%, #7c2d12 100%) !important;
	border-color: #f97316 !important;
}
[data-theme="dark"] .hub-card.hub-card-featured h4 { color: #fed7aa; }
[data-theme="dark"] .hub-card.hub-card-featured i { color: #fb923c; }
[data-theme="dark"] .hub-card.hub-card-featured p { color: #fdba74; }
[data-theme="dark"] .hub-card.hub-card-featured-2 {
	background: linear-gradient(135deg, #042f2e 0%, #134e4a 100%) !important;
	border-color: #14b8a6 !important;
}
[data-theme="dark"] .hub-card.hub-card-featured-2 h4 { color: #99f6e4; }
[data-theme="dark"] .hub-card.hub-card-featured-2 i { color: #2dd4bf; }
[data-theme="dark"] .hub-card.hub-card-featured-2 p { color: #5eead4; }
[data-theme="dark"] .w3-table th { background: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .w3-table td { border-color: #334155 !important; color: #cbd5e1 !important; }

@media (max-width: 640px) {
	.modern-hero { padding: 36px 20px; }
	.modern-hero h2 { font-size: 22px; }
	.kpi-strip { grid-template-columns: repeat(5,1fr); gap: 6px; }
	.kpi-cell .kpi-num { font-size: 18px; }
	.hide-on-mobile { display: none !important; }
}
