/* School Management System – full-screen School Portal app */

:root {
	--sms-primary: #0d7a5f;
	--sms-primary-600: #0a6650;
	--sms-primary-50: #ecf8f3;
	--sms-side: #0c1f1a;
	--sms-side-2: #12302a;
	--sms-side-text: #b7cbc4;
	--sms-text: #0f172a;
	--sms-muted: #64748b;
	--sms-border: #e3e8ee;
	--sms-bg: #f3f6f8;
	--sms-card: #ffffff;
	--sms-radius: 14px;
	--sms-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
	--sms-blue: #2563eb; --sms-green: #16a34a; --sms-red: #dc2626; --sms-amber: #d97706;
	--sms-violet: #7c3aed; --sms-teal: #0d9488; --sms-pink: #db2777;
}

html, body.sms-app-body { margin: 0; padding: 0; }
body.sms-app-body {
	background: var(--sms-bg); color: var(--sms-text);
	font: 14.5px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.sms-app-body *, .sms-app-body *::before, .sms-app-body *::after { box-sizing: border-box; }
.sms-app-body a { color: var(--sms-primary); text-decoration: none; }
.sms-app-body a:hover { color: var(--sms-primary-600); }
.sms-app-body h1, .sms-app-body h2, .sms-app-body h3 { color: var(--sms-text); line-height: 1.3; margin: 0 0 10px; }
.sms-app-body h1 { font-size: 22px; font-weight: 750; }
.sms-app-body h2 { font-size: 16px; font-weight: 700; }
.sms-app-body h3 { font-size: 15px; font-weight: 700; }
.sms-app-body img { max-width: 100%; height: auto; }
.sms-app-body .dashicons { vertical-align: middle; }

/* ---------------------------------------------------------------- Layout */
.sms-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sms-sidebar {
	position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--sms-side), #0a1915);
	color: var(--sms-side-text); display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #24443c transparent; z-index: 40;
}
.sms-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sms-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; }
.sms-brand strong { display: block; color: #fff; font-size: 15px; line-height: 1.25; }
.sms-brand small { color: #7fa79b; font-size: 12px; }
.sms-brand-mark {
	width: 40px; height: 40px; flex: none; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, #14a37f, #0d7a5f); color: #fff; font-weight: 800; font-size: 19px; box-shadow: 0 4px 12px rgba(13,122,95,.35);
}
.sms-ws { padding: 14px 18px 4px; }
.sms-ws > span { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #6f948a; }
.sms-ws-role { margin-top: 6px; color: #fff; font-weight: 600; background: var(--sms-side-2); border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.sms-ws-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sms-ws-list a { color: var(--sms-side-text); background: var(--sms-side-2); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; }
.sms-ws-list a.is-active, .sms-ws-list a:hover { background: var(--sms-primary); color: #fff; }
.sms-nav { padding: 6px 10px 16px; flex: 1; }
.sms-nav-group { margin-top: 14px; }
.sms-nav-title { display: block; padding: 0 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #5f857a; font-weight: 600; }
.sms-nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--sms-side-text) !important; font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; }
.sms-nav-link .dashicons { font-size: 18px; width: 18px; height: 18px; color: #6f948a; }
.sms-nav-link:hover { background: rgba(255,255,255,.05); color: #fff !important; }
.sms-nav-link.is-active { background: var(--sms-primary); color: #fff !important; box-shadow: 0 6px 16px rgba(13,122,95,.35); }
.sms-nav-link.is-active .dashicons { color: #fff; }
.sms-sidebar-foot { border-top: 1px solid rgba(255,255,255,.06); padding: 10px; }
.sms-sidebar-foot a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--sms-side-text) !important; font-size: 13.5px; }
.sms-sidebar-foot a:hover { background: rgba(255,255,255,.05); color: #fff !important; }
.sms-overlay { display: none; }

.sms-main { min-width: 0; display: flex; flex-direction: column; }
.sms-topbar {
	position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
	background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--sms-border);
}
.sms-menu-btn { display: none; border: 1px solid var(--sms-border); background: #fff; border-radius: 10px; width: 40px; height: 40px; cursor: pointer; color: var(--sms-text); }
.sms-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.sms-crumb span { color: var(--sms-muted); }
.sms-crumb .sep { color: #cbd5e1; }
.sms-crumb strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sms-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sms-today { color: var(--sms-muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.sms-user { position: relative; }
.sms-user summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--sms-border); background: #fff; font-weight: 600; font-size: 13.5px; }
.sms-user summary::-webkit-details-marker { display: none; }
.sms-user summary img { width: 30px; height: 30px; border-radius: 50%; }
.sms-user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--sms-border); border-radius: 12px; box-shadow: var(--sms-shadow); min-width: 180px; padding: 6px; z-index: 50; }
.sms-user-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--sms-text) !important; }
.sms-user-menu a:hover { background: var(--sms-bg); }
.sms-content { padding: 24px 28px 40px; flex: 1; max-width: 1480px; width: 100%; }
.sms-foot { padding: 16px 28px; color: var(--sms-muted); font-size: 12.5px; border-top: 1px solid var(--sms-border); }

/* ---------------------------------------------------------------- Cards, hero, KPIs */
.sms-card { background: var(--sms-card); border: 1px solid var(--sms-border); border-radius: var(--sms-radius); padding: 18px 20px; margin: 0 0 18px; box-shadow: var(--sms-shadow); }
.sms-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sms-card-head h2 { margin: 0; }
.sms-hero {
	display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 26px; margin-bottom: 20px;
	border-radius: 18px; color: #fff; background: radial-gradient(1200px 300px at 100% 0%, #18a983 0%, transparent 55%), linear-gradient(120deg, #0b5e4a, #0d7a5f 55%, #13906f);
	box-shadow: 0 10px 30px rgba(13,122,95,.25);
}
.sms-hero h1 { color: #fff !important; margin: 0 0 4px; font-size: 23px; }
.sms-hero p { margin: 0; color: #d4efe6; }
.sms-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sms-btn-ghost { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff !important; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.sms-btn-ghost:hover { background: rgba(255,255,255,.24); }

.sms-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; margin-bottom: 20px; }
.sms-kpi { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--sms-border); border-radius: var(--sms-radius); padding: 16px; box-shadow: var(--sms-shadow); color: var(--sms-text) !important; transition: transform .15s, box-shadow .15s; min-width: 0; }
a.sms-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.sms-kpi-icon { flex: none; width: 44px !important; height: 44px !important; border-radius: 12px; display: inline-flex !important; align-items: center; justify-content: center; font-size: 22px !important; }
.sms-kpi-body { display: flex; flex-direction: column; min-width: 0; }
.sms-kpi-label { font-size: 12.5px; color: var(--sms-muted); font-weight: 600; }
.sms-kpi-value { font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sms-kpi-sub { font-size: 12px; color: var(--sms-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sms-tone-blue .sms-kpi-icon { background: #e8efff; color: var(--sms-blue); }
.sms-tone-green .sms-kpi-icon { background: #e3f6ea; color: var(--sms-green); }
.sms-tone-red .sms-kpi-icon { background: #fde8e8; color: var(--sms-red); }
.sms-tone-amber .sms-kpi-icon { background: #fdf1dc; color: var(--sms-amber); }
.sms-tone-violet .sms-kpi-icon { background: #efe8fd; color: var(--sms-violet); }
.sms-tone-teal .sms-kpi-icon { background: #defaf6; color: var(--sms-teal); }
.sms-tone-pink .sms-kpi-icon { background: #fce7f3; color: var(--sms-pink); }

.sms-dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sms-dash-grid > .sms-panel { margin: 0; }
.sms-span-2 { grid-column: span 2; }
.sms-panel { display: flex; flex-direction: column; }
.sms-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sms-panel-head h2 { margin: 0; font-size: 15px; }
.sms-panel-link { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sms-panel-body { flex: 1; min-width: 0; }
.sms-empty-state { color: var(--sms-muted); text-align: center; padding: 22px 10px; margin: 0; background: #fafbfc; border: 1px dashed var(--sms-border); border-radius: 10px; }
.sms-empty-card { text-align: center; padding: 48px 20px; }
.sms-empty-card .dashicons { font-size: 44px; width: 44px; height: 44px; color: var(--sms-muted); }
.sms-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* Lists in panels */
.sms-rows { list-style: none; margin: 0; padding: 0; }
.sms-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef2f6; }
.sms-rows li:last-child { border-bottom: 0; }
.sms-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sms-row-main strong { font-size: 13.5px; }
.sms-row-main span, .sms-row-main em { font-size: 12.5px; color: var(--sms-muted); }
.sms-row-actions { display: flex; gap: 6px; }
.sms-avatar-sm { width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--sms-primary-50); color: var(--sms-primary); font-weight: 700; }
.sms-date-chip { flex: none; width: 46px; text-align: center; border-radius: 10px; background: var(--sms-primary-50); color: var(--sms-primary); font-size: 11px; text-transform: uppercase; line-height: 1.2; padding: 5px 0; font-weight: 600; }
.sms-date-chip b { display: block; font-size: 17px; }
.sms-btn-sm { display: inline-block; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--sms-border); background: #fff; color: var(--sms-text) !important; white-space: nowrap; }
.sms-btn-sm:hover { border-color: #cbd5e1; background: #f8fafc; }
.sms-btn-ok { background: var(--sms-primary); border-color: var(--sms-primary); color: #fff !important; }
.sms-btn-ok:hover { background: var(--sms-primary-600); }
.sms-btn-no { color: var(--sms-red) !important; }
.sms-progress { display: block; height: 6px; background: #edf1f5; border-radius: 99px; margin: 6px 0 3px; overflow: hidden; }
.sms-progress span { display: block; height: 100%; background: linear-gradient(90deg, #14a37f, #0d7a5f); border-radius: 99px; }

/* Timeline */
.sms-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.sms-timeline li { display: flex; gap: 14px; align-items: center; padding: 10px 0 10px 0; border-bottom: 1px solid #eef2f6; }
.sms-timeline li:last-child { border-bottom: 0; }
.sms-timeline li > div { flex: 1; display: flex; flex-direction: column; }
.sms-timeline li > div span { color: var(--sms-muted); font-size: 12.5px; }
.sms-tl-time { width: 78px; flex: none; font-weight: 700; font-size: 13px; display: flex; flex-direction: column; }
.sms-tl-time small { color: var(--sms-muted); font-weight: 500; }
.sms-timeline li.is-done { opacity: .55; }
.sms-timeline li.is-now { background: var(--sms-primary-50); border-radius: 10px; padding-left: 10px; padding-right: 10px; border-bottom-color: transparent; }

/* ---------------------------------------------------------------- Charts */
.sms-chart-wrap { width: 100%; overflow-x: auto; }
.sms-chart { width: 100%; height: auto; display: block; min-width: 300px; }
.sms-grid { stroke: #eef2f6; stroke-width: 1; }
.sms-bar-rect { fill: #14a37f; transition: opacity .15s; }
.sms-bar-rect.is-mid { fill: #f59e0b; }
.sms-bar-rect.is-low { fill: #ef4444; }
.sms-bar-rect:hover { opacity: .8; }
.sms-bar-val { font-size: 10.5px; fill: #475569; font-weight: 600; }
.sms-bar-lab { font-size: 10.5px; fill: #64748b; }
.sms-hbars { display: flex; flex-direction: column; gap: 9px; }
.sms-hbar { display: grid; grid-template-columns: minmax(70px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.sms-hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #334155; }
.sms-hbar-track { height: 10px; background: #edf1f5; border-radius: 99px; overflow: hidden; }
.sms-hbar-fill { display: block; height: 100%; background: linear-gradient(90deg, #34d399, #0d7a5f); border-radius: 99px; }
.sms-hbar-val { font-weight: 700; min-width: 28px; text-align: right; }
.sms-donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sms-donut { width: 150px; height: 150px; flex: none; transform: rotate(0deg); }
.sms-donut-ring { stroke: #edf1f5; }
.sms-donut-center { font-size: 7px; font-weight: 800; fill: var(--sms-text); }
.sms-donut-sub { font-size: 3.4px; fill: var(--sms-muted); text-transform: uppercase; }
.sms-legend-list { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 140px; }
.sms-legend-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.sms-legend-list strong { margin-left: auto; }
.sms-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sms-ring { display: inline-flex; align-items: center; gap: 6px; }
.sms-ring svg { width: 38px; height: 38px; }
.sms-ring-fill { stroke: var(--sms-primary); }
.sms-ring .sms-donut-center { font-size: 10px; }

/* ---------------------------------------------------------------- WordPress admin-style markup inside the app */
.sms-content .wrap { margin: 0; }
.sms-page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sms-page-head h1 { margin: 0; }
.sms-page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sms-content .wp-header-end { display: none; }
.sms-content .wrap > h1 { margin-bottom: 14px; }
.sms-content .page-title-action, .sms-content .button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--sms-border);
	background: #fff; color: var(--sms-text) !important; font-weight: 600; font-size: 13.5px; line-height: 1.3; cursor: pointer; text-decoration: none; min-height: 38px; font-family: inherit;
}
.sms-content .page-title-action:hover, .sms-content .button:hover { border-color: #c7d0da; background: #f8fafc; }
.sms-content .button-primary, .sms-content .sms-btn-primary, .sms-content input[type=submit].button-primary {
	background: var(--sms-primary) !important; border-color: var(--sms-primary) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(13,122,95,.22);
}
.sms-content .button-primary:hover, .sms-content .sms-btn-primary:hover { background: var(--sms-primary-600) !important; }
.sms-content .button-small { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.sms-content .button-link { background: none; border: 0; color: var(--sms-primary); cursor: pointer; padding: 0; font: inherit; }
.sms-content .submit { margin: 18px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }

.sms-content input[type=text], .sms-content input[type=email], .sms-content input[type=tel], .sms-content input[type=number], .sms-content input[type=date],
.sms-content input[type=time], .sms-content input[type=month], .sms-content input[type=url], .sms-content input[type=password], .sms-content input[type=search],
.sms-content select, .sms-content textarea {
	width: 100%; max-width: 100%; border: 1px solid #d5dde6; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--sms-text);
	background: #fff; min-height: 40px; transition: border-color .15s, box-shadow .15s;
}
.sms-content select { appearance: auto; }
.sms-content input:focus, .sms-content select:focus, .sms-content textarea:focus { outline: none; border-color: var(--sms-primary); box-shadow: 0 0 0 3px rgba(13,122,95,.15); }
.sms-content input[type=checkbox], .sms-content input[type=radio] { width: auto; min-height: 0; accent-color: var(--sms-primary); }
.sms-content .small-text { max-width: 110px; }
.sms-content .description { color: var(--sms-muted); font-size: 12.5px; margin: 4px 0 0; }

.sms-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 22px; }
.sms-form-grid-1 { grid-template-columns: 1fr; }
.sms-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sms-field > label { font-weight: 600; font-size: 13px; color: #334155; }
.sms-wide { grid-column: 1 / -1; }
.sms-req { color: var(--sms-red); }
.sms-check { font-weight: 400 !important; display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.sms-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sms-login-box { background: #f8fafc; border: 1px dashed var(--sms-border); padding: 12px 14px; border-radius: 10px; }
.sms-login-box p { margin: 0; }
.sms-media { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sms-media .sms-media-input { flex: 1; min-width: 180px; }
.sms-media-preview { width: 100%; }
.sms-media-preview img { max-width: 120px; max-height: 120px; border-radius: 10px; border: 1px solid var(--sms-border); }
.sms-invalid { border-color: var(--sms-red) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important; }
.sms-content .wp-editor-wrap { border-radius: 10px; overflow: hidden; }

.sms-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 16px; }
.sms-toolbar.sms-card { padding: 14px 16px; }
.sms-toolbar select, .sms-toolbar input[type=search], .sms-toolbar input[type=text] { width: auto; min-width: 170px; max-width: 260px; }
.sms-inline-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: #475569; }
.sms-inline-field select, .sms-inline-field input { min-width: 170px; font-weight: 400; }

.sms-table-wrap { width: 100%; overflow-x: auto; border-radius: 12px; }
.sms-content .widefat { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--sms-border); border-radius: 12px; overflow: hidden; font-size: 13.5px; box-shadow: var(--sms-shadow); }
.sms-content .widefat thead th { background: #f8fafc; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: #475569; font-weight: 700; padding: 11px 12px; border-bottom: 1px solid var(--sms-border); white-space: nowrap; }
.sms-content .widefat td, .sms-content .widefat th.check-column { padding: 10px 12px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.sms-content .widefat tbody tr:last-child td { border-bottom: 0; }
.sms-content .widefat tbody tr:hover td { background: #fafcfd; }
.sms-content .widefat tfoot th { padding: 10px 12px; background: #f8fafc; text-align: left; }
.sms-content .row-title { font-weight: 700; color: var(--sms-text) !important; }
.sms-content .sms-actions { white-space: nowrap; font-size: 13px; }
.sms-content .sms-actions .sep { color: #cbd5e1; margin: 0 2px; }
.sms-delete { color: var(--sms-red) !important; }
.sms-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; display: block; }
.sms-empty { text-align: center; color: var(--sms-muted); padding: 28px !important; }
.sms-compact td, .sms-compact th { padding: 7px 8px !important; }
.tablenav { display: flex; justify-content: flex-end; margin: 12px 0; }
.tablenav-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--sms-muted); font-size: 13px; }
.tablenav-pages .page-numbers { display: inline-flex; min-width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--sms-border); border-radius: 9px; background: #fff; padding: 0 8px; color: var(--sms-text); }
.tablenav-pages .page-numbers.current { background: var(--sms-primary); color: #fff; border-color: var(--sms-primary); }

.sms-content .notice { background: #fff; border: 1px solid var(--sms-border); border-left: 4px solid var(--sms-blue); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; box-shadow: var(--sms-shadow); }
.sms-content .notice p { margin: 0; }
.sms-content .notice ul { margin: 0; padding-left: 18px; }
.sms-content .notice-success { border-left-color: var(--sms-green); background: #f3fbf6; }
.sms-content .notice-error { border-left-color: var(--sms-red); background: #fef5f5; }
.sms-content .notice-warning { border-left-color: var(--sms-amber); background: #fffaf0; }
.sms-content .notice-info { border-left-color: var(--sms-blue); background: #f5f8ff; }

.sms-content .nav-tab-wrapper { display: flex; gap: 6px; border-bottom: 1px solid var(--sms-border); margin: 0 0 16px; flex-wrap: wrap; }
.sms-content .nav-tab { padding: 9px 14px; border-radius: 10px 10px 0 0; color: var(--sms-muted) !important; font-weight: 600; border: 1px solid transparent; margin-bottom: -1px; }
.sms-content .nav-tab-active { color: var(--sms-primary) !important; background: #fff; border-color: var(--sms-border); border-bottom-color: #fff; }

/* Attendance */
.sms-att-options { white-space: nowrap; }
.sms-att-opt { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; margin: 2px 4px 2px 0; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.sms-att-opt input { margin: 0 !important; }
.sms-mark-buttons .button { margin-right: 4px; }
.sms-register { border-collapse: collapse; font-size: 12px; background: #fff; }
.sms-register th, .sms-register td { border: 1px solid #e5e9ef; padding: 4px 5px; text-align: center; min-width: 24px; }
.sms-register thead th { background: #f8fafc; }
.sms-register .sms-reg-name { text-align: left; white-space: nowrap; min-width: 160px; }
.sms-register .sms-weekend { background: #fdf2f2; }
.sms-legend .sms-cell { display: inline-block; padding: 1px 6px; border-radius: 4px; font-weight: 700; }
.sms-tabulation th, .sms-tabulation td { text-align: center; white-space: nowrap; }
.sms-tabulation td:nth-child(3), .sms-tabulation th:nth-child(3) { text-align: left; }

/* Calendar */
.sms-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sms-cal-head { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--sms-muted); text-transform: uppercase; padding-bottom: 4px; }
.sms-cal-day { min-height: 70px; border: 1px solid var(--sms-border); border-radius: 10px; padding: 7px; display: flex; flex-direction: column; justify-content: space-between; background: #fff; }
.sms-cal-day.is-empty { border: 0; background: transparent; }
.sms-cal-day.is-off:not([class*="sms-att-"]) { background: #fafafa; color: #aab4c0; }
.sms-cal-day.is-today { outline: 2px solid var(--sms-primary); outline-offset: -2px; }
.sms-cal-day span { font-weight: 700; font-size: 14px; }
.sms-cal-day small { font-size: 11px; font-weight: 700; }

/* Chips / profile / misc */
.sms-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.sms-chip { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--sms-border); color: var(--sms-text) !important; font-weight: 600; font-size: 13px; }
.sms-chip.is-active { background: var(--sms-primary); border-color: var(--sms-primary); color: #fff !important; }
.sms-chips .button { margin-left: auto; }
.sms-profile { display: flex; gap: 18px; align-items: flex-start; }
.sms-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.sms-avatar-initial { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #14a37f, #0d7a5f); color: #fff; font-size: 34px; font-weight: 800; }
.sms-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 8px 0 0; }
.sms-dl dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--sms-muted); }
.sms-dl dd { margin: 0; font-weight: 600; }
.sms-account-card { text-align: center; }
.sms-account-card img { border-radius: 50%; }
.sms-account-card .sms-dl { text-align: left; }
.sms-items { display: flex; flex-direction: column; gap: 12px; }
.sms-item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sms-item-body { margin-top: 8px; }
.sms-item-body p:last-child { margin-bottom: 0; }
.sms-notice summary { cursor: pointer; display: flex; align-items: center; gap: 12px; list-style: none; }
.sms-notice summary::-webkit-details-marker { display: none; }
.sms-notice summary strong { flex: 1; }
.sms-setup-list { display: flex; flex-direction: column; gap: 10px; }
.sms-setup-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--sms-border); border-radius: 12px; cursor: pointer; }
.sms-setup-item:hover { border-color: var(--sms-primary); background: var(--sms-primary-50); }
.sms-setup-item span { display: flex; flex-direction: column; }
.sms-setup-item small { color: var(--sms-muted); }
.sms-invoice-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.sms-challans .sms-challan-set { box-shadow: var(--sms-shadow); }

/* ---------------------------------------------------------------- Login */
.sms-login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.sms-login-brand {
	position: relative; display: flex; align-items: center; padding: 56px; color: #e6f5ef; overflow: hidden;
	background: radial-gradient(800px 400px at 0% 100%, rgba(20,163,127,.55), transparent 60%), radial-gradient(700px 500px at 100% 0%, rgba(13,122,95,.6), transparent 55%), #0b1f1a;
}
.sms-login-brand::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.sms-login-brand-inner { position: relative; z-index: 1; max-width: 520px; }
.sms-login-brand h1 { color: #fff !important; font-size: 34px; margin: 20px 0 6px; letter-spacing: -.5px; }
.sms-login-tagline { color: #a7d8c7; font-size: 16px; margin: 0 0 26px; font-style: italic; }
.sms-login-logo { width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: 18px; padding: 6px; }
.sms-brand-xl { width: 72px; height: 72px; font-size: 34px; border-radius: 18px; }
.sms-login-features { list-style: none; padding: 0; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; }
.sms-login-features li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.sms-login-features .dashicons { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; color: #6ee7b7; }
.sms-login-contact { color: #7fa79b; font-size: 13px; }
.sms-login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.sms-login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; }
.sms-login-form h2 { font-size: 26px; margin: 0 0 4px; }
.sms-login-form label { font-weight: 600; font-size: 13px; margin: 16px 0 6px; color: #334155; }
.sms-login-form input[type=text], .sms-login-form input[type=password] { border: 1px solid #d5dde6; border-radius: 11px; padding: 12px 14px; font-size: 15px; font-family: inherit; }
.sms-login-form input:focus { outline: none; border-color: var(--sms-primary); box-shadow: 0 0 0 3px rgba(13,122,95,.15); }
.sms-login-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 20px; font-size: 13px; }
.sms-login-row label { margin: 0; font-weight: 500; }
.sms-login-btn { border: 0; border-radius: 11px; padding: 13px; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; background: linear-gradient(120deg, #0b5e4a, #0d7a5f 60%, #14a37f); box-shadow: 0 8px 22px rgba(13,122,95,.3); font-family: inherit; }
.sms-login-btn:hover { filter: brightness(1.05); }
.sms-login-error { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-size: 13.5px; }
.sms-login-roles { text-align: center; color: var(--sms-muted); font-size: 12px; margin-top: 22px; }

/* ---------------------------------------------------------------- Responsive */
.sms-scroll { -webkit-overflow-scrolling: touch; }
.sms-content .sms-scroll > table { min-width: 100%; }

@media (max-width: 1200px) {
	.sms-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sms-span-2 { grid-column: span 2; }
}
@media (max-width: 960px) {
	.sms-app { grid-template-columns: 1fr; }
	.sms-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
	.sms-nav-open .sms-sidebar { transform: none; }
	.sms-nav-open .sms-overlay { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
	.sms-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
	.sms-topbar { padding: 10px 16px; }
	.sms-content { padding: 18px 16px 32px; }
	.sms-today { display: none; }
	.sms-invoice-layout, .sms-grid-2 { grid-template-columns: minmax(0, 1fr); }
	.sms-invoice { overflow-x: auto; }
	.sms-login { grid-template-columns: 1fr; }
	.sms-login-brand { padding: 36px 24px; min-height: auto; }
	.sms-login-features { display: none; }
	.sms-login-brand h1 { font-size: 26px; }
}
/* ---------------------------------------------------------------- Phone bottom bar */
.sms-bottom-nav { display: none; }

@media (max-width: 960px) {
	body.sms-app-body.is-logged-in { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
	.sms-bottom-nav {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 34; gap: 2px;
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97);
		backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--sms-border); box-shadow: 0 -6px 20px rgba(15,23,42,.06);
	}
	.sms-bottom-nav a, .sms-bottom-nav button {
		flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; border: 0; background: none;
		font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; color: #64748b !important; cursor: pointer; -webkit-tap-highlight-color: transparent;
	}
	.sms-bottom-nav span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.sms-bottom-nav .dashicons { width: 54px; height: 30px; font-size: 21px; line-height: 30px; text-align: center; border-radius: 999px; transition: background .15s; }
	.sms-bottom-nav .is-active { color: var(--sms-primary) !important; }
	.sms-bottom-nav .is-active .dashicons { background: var(--sms-primary-50); color: var(--sms-primary); }
	.sms-foot { display: none; }
	.sms-sidebar { width: min(300px, 86vw); }
	.sms-crumb > span, .sms-crumb > .sep { display: none; }
	.sms-crumb strong { font-size: 16px; }
	.sms-dash-grid { gap: 14px; }
}

@media (max-width: 700px) {
	body.sms-app-body { font-size: 14px; }
	.sms-app-body h1 { font-size: 19px; }
	.sms-topbar { padding: 8px 12px; gap: 10px; }
	.sms-menu-btn { width: 38px; height: 38px; }
	.sms-content { padding: 14px 12px 24px; }
	.sms-card { padding: 14px; border-radius: 12px; margin-bottom: 14px; }
	.sms-dash-grid { grid-template-columns: minmax(0, 1fr); }
	.sms-span-2 { grid-column: auto; }
	.sms-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
	.sms-kpi { padding: 12px; gap: 8px; flex-direction: column; }
	.sms-kpi-icon { width: 34px !important; height: 34px !important; font-size: 18px !important; border-radius: 10px; }
	.sms-kpi-label { font-size: 12px; line-height: 1.3; }
	.sms-kpi-value { font-size: 19px; }
	.sms-kpi-sub { font-size: 11.5px; }
	.sms-hero { padding: 16px; border-radius: 14px; margin-bottom: 14px; gap: 12px; }
	.sms-hero h1 { font-size: 18px; }
	.sms-hero p { font-size: 13px; }
	.sms-hero-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
	.sms-btn-ghost { display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 6px; font-size: 12.5px; line-height: 1.25; }
	.sms-user summary span { display: none; }
	.sms-user summary { padding: 3px; }
	.sms-donut { width: 120px; height: 120px; }
	.sms-hbar { grid-template-columns: minmax(70px, 38%) 1fr auto; gap: 8px; font-size: 12.5px; }
	.sms-timeline li { gap: 10px; }
	.sms-tl-time { width: 64px; font-size: 12px; }

	/* Page headers & toolbars */
	.sms-page-head { margin-bottom: 12px; }
	.sms-page-head h1, .sms-content .wrap > h1 { font-size: 19px; }
	.sms-page-actions { width: 100%; }
	.sms-page-actions > * { flex: 1 1 auto; }
	.sms-toolbar { gap: 8px; }
	.sms-toolbar > *, .sms-toolbar select, .sms-toolbar input[type=search], .sms-toolbar input[type=text], .sms-inline-field, .sms-inline-field select, .sms-inline-field input { flex: 1 1 100%; max-width: none; min-width: 0; width: 100%; }
	.sms-toolbar .button, .sms-content .submit .button, .sms-content .submit input[type=submit] { width: 100%; }
	.sms-content .nav-tab-wrapper, .sms-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
	.sms-content .nav-tab, .sms-chip { white-space: nowrap; flex: none; }
	.sms-chips .button { margin-left: 0; }

	/* Forms: 16px inputs stop iOS from zooming in */
	.sms-content input[type=text], .sms-content input[type=email], .sms-content input[type=tel], .sms-content input[type=number], .sms-content input[type=date],
	.sms-content input[type=time], .sms-content input[type=month], .sms-content input[type=url], .sms-content input[type=password], .sms-content input[type=search],
	.sms-content select, .sms-content textarea, .sms-login-form input[type=text], .sms-login-form input[type=password] { font-size: 16px; min-height: 44px; }
	.sms-form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.sms-content .button, .sms-content .page-title-action { min-height: 42px; }

	/* Calendar, profile, timetable */
	.sms-cal { gap: 4px; }
	.sms-cal-day { min-height: 44px; padding: 4px; border-radius: 8px; }
	.sms-cal-day span { font-size: 13px; }
	.sms-cal-day small { display: none; }
	.sms-profile { flex-direction: column; align-items: center; text-align: center; }
	.sms-dl { text-align: left; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sms-tt, .sms-tt tbody, .sms-tt tr, .sms-tt th, .sms-tt td { display: block; width: 100% !important; }
	.sms-tt th { padding: 10px 0 4px; border: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--sms-muted); }
	.sms-tt td { padding: 0 0 10px; }
	.sms-period { min-width: 0; flex: 1 1 100%; }
	.tablenav { justify-content: center; }
	.sms-invoice .sms-simple-table { font-size: 13px; }
	.sms-invoice .sms-simple-table th, .sms-invoice .sms-simple-table td { padding: 8px 6px; }
	.sms-invoice-title { font-size: 18px; }

	/* Lists become cards: each row is a card of "label: value" lines */
	.sms-content table.sms-stack, .sms-content table.sms-stack > tbody, .sms-content table.sms-stack > tbody > tr, .sms-content table.sms-stack > tbody > tr > td,
	.sms-content table.sms-stack > tfoot, .sms-content table.sms-stack > tfoot > tr, .sms-content table.sms-stack > tfoot > tr > * { display: block; width: 100%; }
	.sms-content table.sms-stack { border: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
	.sms-content table.sms-stack > thead { display: none; }
	/* Card = 2-column grid of small "label over value" cells; title on top, actions at the bottom. */
	.sms-content table.sms-stack > tbody > tr {
		display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; align-items: start;
		background: #fff; border: 1px solid var(--sms-border); border-radius: 14px; padding: 14px; margin: 0 0 10px; box-shadow: var(--sms-shadow);
	}
	.sms-content table.sms-stack > tbody > tr > td {
		display: block; width: auto; min-width: 0; padding: 0 !important; border: 0 !important; text-align: left; white-space: normal;
		background: transparent !important; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere;
	}
	.sms-content table.sms-stack > tbody > tr > td[data-label]::before {
		content: attr(data-label); display: block; margin-bottom: 1px; font-size: 11px; font-weight: 600; color: var(--sms-muted); text-transform: uppercase; letter-spacing: .3px;
	}
	.sms-content table.sms-stack > tbody > tr > td.sms-cell-full { grid-column: 1 / -1; }
	.sms-content table.sms-stack > tbody > tr > td.sms-cell-full::before { display: none; }
	.sms-content table.sms-stack > tbody > tr > td:empty { display: none; }
	/* Title cell (record name) leads the card */
	.sms-content table.sms-stack > tbody > tr > td:has(.row-title) { grid-column: 1 / -1; order: -1; font-size: 16px; padding-bottom: 8px !important; border-bottom: 1px solid #eef2f6 !important; }
	.sms-content table.sms-stack > tbody > tr > td:has(.row-title)::before { display: none; }
	.sms-content table.sms-stack > tbody > tr > td:has(> img.sms-thumb) { display: none; }
	/* Actions become a button row */
	.sms-content table.sms-stack > tbody > tr > td.sms-actions, .sms-content table.sms-stack > tbody > tr > td:has(> .button), .sms-content table.sms-stack > tbody > tr > td:has(> a.sms-btn-sm) {
		grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px !important; border-top: 1px solid #eef2f6 !important;
	}
	.sms-content table.sms-stack > tbody > tr > td.sms-actions::before, .sms-content table.sms-stack > tbody > tr > td:has(> .button)::before, .sms-content table.sms-stack > tbody > tr > td:has(> a.sms-btn-sm)::before { display: none; }
	.sms-content table.sms-stack .sms-actions .sep { display: none; }
	.sms-content table.sms-stack .sms-actions > a { flex: 1 1 auto; text-align: center; padding: 8px 10px; border: 1px solid var(--sms-border); border-radius: 9px; font-size: 13px; background: #fff; }
	.sms-content table.sms-stack .sms-actions > a.sms-delete { border-color: #fecaca; background: #fef2f2; }
	/* Cells holding form inputs: label left, input right */
	.sms-content table.sms-stack > tbody > tr > td:has(> input:not([type=radio]):not([type=checkbox]), > select, > textarea) { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
	.sms-content table.sms-stack > tbody > tr > td:has(> input:not([type=radio]):not([type=checkbox]), > select, > textarea)::before { margin: 0; flex: none; max-width: 45%; }
	.sms-content table.sms-stack .sms-actions { white-space: normal; }
	.sms-content table.sms-stack .sms-att-options { white-space: normal; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
	.sms-content table.sms-stack input[type=number], .sms-content table.sms-stack input[type=time], .sms-content table.sms-stack input[type=text] { max-width: 150px; }
	.sms-content table.sms-stack td.sms-empty { justify-content: center; text-align: center; }
	.sms-content table.sms-stack td.sms-empty::before { display: none; }
	.sms-content table.sms-stack > tfoot > tr { background: #f8fafc; border: 1px solid var(--sms-border); border-radius: 12px; padding: 8px 14px; }
	.sms-content table.sms-stack > tfoot > tr > * { padding: 4px 0 !important; border: 0 !important; }
	.sms-content table.sms-stack .check-column { display: none !important; }
	.sms-content table.sms-stack tr:hover td { background: transparent !important; }
	.sms-table-wrap, .sms-scroll { border-radius: 12px; }

	/* Attendance sheets: compact cards with big tap targets */
	.sms-content table.sms-stack > tbody > tr:has(> td[data-label="Roll"]:first-child + td), .sms-content table.sms-att-table.sms-stack > tbody > tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: center; padding: 12px; }
	.sms-content table.sms-stack > tbody > tr:has(> td[data-label="Roll"]:first-child + td) > td, .sms-content table.sms-att-table.sms-stack > tbody > tr > td { grid-column: 1 / -1; border-bottom: 0 !important; min-height: 0; padding: 0 !important; }
	.sms-content table.sms-stack > tbody > tr > td[data-label="Roll"]:first-child {
		grid-column: 1 !important; width: auto; min-width: 34px; height: 34px; justify-content: center; border-radius: 10px; background: var(--sms-primary-50) !important; color: var(--sms-primary); font-weight: 800;
	}
	.sms-content table.sms-stack > tbody > tr > td[data-label="Roll"]:first-child::before { display: none; }
	.sms-content table.sms-stack > tbody > tr > td[data-label="Roll"]:first-child + td { grid-column: 2 !important; display: block; text-align: left; }
	.sms-content table.sms-stack > tbody > tr > td[data-label="Roll"]:first-child + td::before { display: none; }
	.sms-content table.sms-att-table.sms-stack > tbody > tr > td:first-child:not([data-label="Roll"]) { display: block; text-align: left; font-size: 15px; }
	.sms-content table.sms-att-table.sms-stack > tbody > tr > td:first-child:not([data-label="Roll"])::before { display: none; }
	.sms-content table.sms-stack > tbody > tr > td[data-label="Roll"]:first-child { display: flex !important; align-items: center; }
	.sms-content table.sms-stack > tbody > tr > td.sms-att-options { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; }
	.sms-content table.sms-stack > tbody > tr > td.sms-att-options::before { display: none; }
	.sms-content table.sms-stack .sms-att-opt { position: relative; justify-content: center; margin: 0; padding: 10px 4px; border-radius: 10px; font-size: 13px; border: 1px solid transparent; }
	.sms-content table.sms-stack .sms-att-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
	.sms-content table.sms-stack .sms-att-opt:not(:has(input:checked)) { background: #f8fafc; color: #64748b; border-color: var(--sms-border); }
	.sms-content table.sms-stack .sms-att-opt:has(input:checked) { box-shadow: inset 0 0 0 2px currentColor; }
	.sms-content table.sms-att-table.sms-stack td:has(> input[name$="[note]"])::before { display: none; }
	.sms-content table.sms-att-table.sms-stack input[name$="[note]"] { max-width: none; width: 100%; min-height: 40px; }
}

@media (max-width: 380px) {
	.sms-kpi-value { font-size: 17px; }
	.sms-bottom-nav a, .sms-bottom-nav button { font-size: 10.5px; }
	.sms-bottom-nav .dashicons { width: 46px; }
}

@media print {
	.sms-bottom-nav, .sms-topbar, .sms-sidebar { display: none !important; }
	body.sms-app-body.is-logged-in { padding-bottom: 0; }
}

/* ---------------------------------------------------------------- AI Assistant */
.sms-ai { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.sms-ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sms-ai-head h2 { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.sms-ai-head p { margin: 0; }
.sms-ai-new { white-space: nowrap; flex-shrink: 0; }
.sms-ai-log { display: flex; flex-direction: column; gap: 12px; }
.sms-ai-msg { border-radius: var(--sms-radius); padding: 12px 16px; max-width: 100%; overflow-wrap: anywhere; }
.sms-ai-q { align-self: flex-end; max-width: 78%; background: var(--sms-primary); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.sms-ai-a { align-self: stretch; background: var(--sms-card); border: 1px solid var(--sms-border); box-shadow: var(--sms-shadow); border-bottom-left-radius: 4px; }
.sms-ai-err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.sms-ai-report h2, .sms-ai-report h3, .sms-ai-report h4 { margin: 16px 0 8px; }
.sms-ai-report h2:first-child, .sms-ai-report h3:first-child { margin-top: 0; }
.sms-ai-report p { margin: 0 0 10px; }
.sms-ai-report ul, .sms-ai-report ol { margin: 0 0 10px; padding-left: 22px; }
.sms-ai-report li { margin: 2px 0; }
.sms-ai-report blockquote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--sms-primary); background: var(--sms-primary-50); border-radius: 6px; }
.sms-ai-report pre { background: var(--sms-bg); padding: 10px; border-radius: 8px; overflow-x: auto; }
.sms-ai-report code { background: var(--sms-bg); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.sms-ai-report hr { border: 0; border-top: 1px solid var(--sms-border); margin: 14px 0; }
.sms-ai-report .sms-simple-table { margin: 6px 0 14px; font-size: 13.5px; }
.sms-ai-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--sms-border); font-size: 12.5px; color: var(--sms-muted); }
.sms-ai-print { background: none; border: 1px solid var(--sms-border); border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--sms-text); font: inherit; }
.sms-ai-print:hover { border-color: var(--sms-primary); color: var(--sms-primary); }
.sms-ai-wait { display: flex; align-items: center; gap: 10px; color: var(--sms-muted); }
.sms-ai-dots { display: inline-flex; gap: 4px; }
.sms-ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sms-primary); animation: sms-ai-b 1.2s infinite ease-in-out; }
.sms-ai-dots i:nth-child(2) { animation-delay: .15s; }
.sms-ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sms-ai-b { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.sms-ai-empty { background: var(--sms-card); border: 1px dashed var(--sms-border); border-radius: var(--sms-radius); padding: 16px; }
.sms-ai-empty p { margin: 0 0 10px; color: var(--sms-muted); }
.sms-ai-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sms-ai-chip { background: var(--sms-primary-50); color: var(--sms-primary-600); border: 1px solid #cfe9df; border-radius: 999px; padding: 7px 12px; cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.sms-ai-chip:hover { border-color: var(--sms-primary); }
.sms-ai-form { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; background: var(--sms-bg); padding: 8px 0; }
.sms-ai-form textarea { flex: 1; min-height: 46px; max-height: 200px; resize: vertical; border: 1px solid var(--sms-border); border-radius: 12px; padding: 11px 14px; font: inherit; background: var(--sms-card); }
.sms-ai-form textarea:focus { outline: 2px solid var(--sms-primary-50); border-color: var(--sms-primary); }
.sms-ai-form .button { height: 46px; padding: 0 20px; border-radius: 12px; }
@media (max-width: 782px) {
	.sms-ai-head { flex-direction: column; }
	.sms-ai-q { max-width: 92%; }
	.sms-ai-msg { padding: 10px 12px; }
}
@media (max-width: 960px) {
	.sms-ai-form { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media print {
	.sms-ai-report::before { content: attr(data-school); display: block; font-weight: 700; font-size: 16px; margin-bottom: 10px; }
}

/* ---------------------------------------------------------------- Ilmora brand */
.sms-login-powered { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--sms-muted); }
.sms-login-powered a, .sms-foot a { color: var(--sms-primary); font-weight: 600; }
