:root {
    --ink: #192b3d;
    --muted: #758394;
    --line: #e8edf2;
    --canvas: #f5f7fa;
    --nav: #142b40;
    --nav-muted: #9aabba;
    --blue: #2374d2;
    --blue-dark: #195dab;
    --green: #1e9c76;
    --shadow: 0 10px 30px rgba(28, 51, 73, .045);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; }
body.app-body { width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
button, input, select { font: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
.app-shell { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 254px; height: 100vh; height: 100dvh; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; padding: 25px 17px 18px; background: var(--nav); color: #fff; }
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; color: white; }
.sidebar-brand:hover { color: white; }
.sidebar-brand strong { display: block; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; }
.sidebar-brand small { display: block; max-width: 163px; margin-top: 4px; overflow: hidden; color: var(--nav-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: #e7f1ff; color: var(--blue); font-family: 'Segoe UI', Arial, sans-serif; font-size: 16px; font-weight: 800; }
.brand-logo { object-fit: contain; padding: 3px; background: #fff; }
.brand-small { width: 39px; height: 39px; border-radius: 12px; font-size: 13px; }
.nav-label { margin: 43px 10px 14px; color: #778c9e; font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; width: 100%; align-items: center; gap: 13px; min-height: 43px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #becbd5; cursor: pointer; font-size: 13px; text-align: left; transition: background-color .32s ease, color .28s ease, box-shadow .32s ease; }
.nav-link:hover, .nav-link.active { background: #233e56; color: #fff; }
.nav-link.active { box-shadow: inset 3px 0 #62a9ff; }
.nav-icon { display: inline-grid; width: 19px; place-items: center; color: #93a9bc; font-size: 17px; }
.nav-link.active .nav-icon { color: #8dc2ff; }
.sidebar-bottom { display: grid; gap: 5px; margin-top: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; padding: 13px 8px; border-top: 1px solid #2c4153; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #dceaff; color: #2769b0; font-weight: 700; }
.user-chip strong, .user-chip small { display: block; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 4px; color: var(--nav-muted); font-size: 10px; }
.logout-link { font-family: inherit; }
.main-area { display: flex; width: calc(100% - 254px); height: 100%; min-width: 0; min-height: 0; flex-direction: column; margin-left: 254px; overflow: hidden; }
.topbar { display: flex; height: 76px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar, .footer { flex: 0 0 auto; }
.topbar > div:first-of-type { display: grid; gap: 3px; }
.topbar strong { font-family: 'Segoe UI', Arial, sans-serif; font-size: 12px; font-weight: 700; }
.topbar-kicker { color: var(--muted); font-size: 10px; }
.topbar-user { display: flex; align-items: center; gap: 9px; color: #556679; font-size: 12px; }
.avatar-light { width: 32px; height: 32px; background: #eef4fb; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; }
.content { width: 100%; max-width: 1600px; min-height: 0; flex: 1 1 auto; margin: 0 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; padding: 34px 42px 48px; }
.content::-webkit-scrollbar { display: none; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.page-heading .eyebrow { margin: 0 0 5px; }
.page-heading h1 { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; font-size: 26px; letter-spacing: -.7px; }
.eyebrow { color: #7e8d9b; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.today-date { color: var(--muted); font-size: 12px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 42px; border-top: 1px solid var(--line); color: #8b98a5; font-size: 10px; }
.footer span { margin: 0; }
.footer a, .login-copyright a { color: inherit; font-weight: 700; transition: color .2s ease; }
.footer a:hover, .login-copyright a:hover { color: var(--blue); }
.report-banner { display: flex; align-items: center; gap: 17px; margin-bottom: 20px; padding: 23px 25px; border-radius: 12px; background: linear-gradient(115deg, #1c4d78, #266eaa); color: white; box-shadow: var(--shadow); }
.report-banner-icon { display: grid; width: 47px; height: 47px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: rgba(255,255,255,.15); color: #c9e3ff; font-size: 23px; }
.report-banner > div:nth-child(2) { flex: 1; min-width: 0; }
.banner-label { color: #b9d7f2; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.report-banner h2 { margin: 5px 0 3px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 17px; }
.report-banner p { margin: 0; color: #d1e3f3; font-size: 11px; }
.report-banner p span { margin: 0 5px; }
.attendance-period-heading { flex: 1; min-width: 180px; }
.period-picker-form { display: grid; min-width: min(350px, 100%); gap: 6px; }
.period-picker-form > label { color: #d1e3f3; font-size: 10px; font-weight: 600; }
.period-picker-controls { display: flex; gap: 7px; }
.period-picker-controls select { width: min(350px, 100%); min-width: 0; min-height: 38px; padding: 0 34px 0 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 7px; appearance: none; background-color: rgba(255,255,255,.97); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23526779' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; color: #405367; font-size: 11px; }
.period-picker-controls .button { flex: 0 0 auto; }
.banner-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .15s, border .15s; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--blue-dark); color: white; }
.button-secondary { border-color: #dce4eb; background: white; color: #405367; }
.button-secondary:hover { border-color: #b7c8d8; background: #f8fafc; color: var(--ink); }
.button-danger { border-color: #f0d7d1; background: #fff6f3; color: #a8543f; }
.button-danger:hover { border-color: #e6bfb5; background: #fff0eb; color: #8f3f2e; }
.button-light { background: white; color: #27577c; }
.button-light:hover { background: #edf5ff; color: #183f61; }
.button-plain { min-height: 30px; padding: 0 9px; background: transparent; color: #607487; }
.button-small { min-height: 30px; padding: 0 10px; font-size: 11px; }
.button-wide { width: 100%; min-height: 44px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card, .panel { border: 1px solid #e9eef3; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.stat-card { min-height: 125px; padding: 18px 19px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #758493; font-size: 11px; }
.stat-card > strong { display: block; margin-top: 12px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 26px; letter-spacing: -.7px; }
.stat-card > small { display: block; margin-top: 2px; color: #9aa5b0; font-size: 10px; }
.stat-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; font-size: 15px; }
.stat-icon.blue { background: #edf5ff; color: #438bd5; }
.stat-icon.green { background: #e9f8f2; color: #269b75; }
.stat-icon.violet { background: #f1efff; color: #7769c9; }
.stat-icon.amber { background: #fff6e7; color: #d39428; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-bottom: 18px; }
.panel { min-width: 0; margin-bottom: 18px; overflow: hidden; }
.two-column .panel { margin-bottom: 0; }
.panel-heading { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; border-bottom: 1px solid #eff2f5; }
.panel-heading h2 { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; }
.panel-heading p { margin: 5px 0 0; color: #8a97a3; font-size: 10px; }
.panel-heading > a { flex: 0 0 auto; font-size: 11px; font-weight: 600; }
.panel-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #edf5ff; color: var(--blue); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 11px 15px; background: #fafbfd; color: #83909c; font-size: 9px; font-weight: 700; letter-spacing: .35px; white-space: nowrap; }
.data-table td { padding: 12px 15px; border-top: 1px solid #f0f2f5; color: #536374; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:hover { background: #eaf5ff; }
.data-table td strong { color: #293c50; font-size: 11px; font-weight: 600; }
.cell-sub { display: block; margin-top: 4px; color: #98a3ad; font-size: 9px; }
.truncate { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.align-right { text-align: right !important; white-space: nowrap; }
.score-pill { display: inline-block; min-width: 49px; padding: 5px 7px; border-radius: 20px; font-size: 10px; font-weight: 700; text-align: center; }
.score-good { background: #eaf7f1; color: #218463; }
.score-low { background: #fff0eb; color: #c2674b; }
.dashboard-bottom { margin-top: 18px; }
.report-snapshot-section { margin: 4px 0 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 11px; }
.section-heading h2 { margin: 0; color: #31495f; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; }
.section-heading p { margin: 5px 0 0; color: #8996a3; font-size: 10px; }
.section-heading > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 20px; background: #eaf3fc; color: #426f97; font-size: 9px; font-weight: 700; }
.report-snapshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); gap: 13px; }
.report-snapshot-card { --snapshot-accent: #347fcb; min-width: 0; padding: 15px 16px 13px; border: 1px solid #e4ebf1; border-top: 3px solid var(--snapshot-accent); border-radius: 10px; background: #fff; box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease; }
.report-snapshot-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(28, 51, 73, .09); }
.report-snapshot-card--1 { --snapshot-accent: #279978; }
.report-snapshot-card--2 { --snapshot-accent: #9272d5; }
.report-snapshot-card--3 { --snapshot-accent: #d28b35; }
.report-snapshot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-snapshot-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--snapshot-accent) 12%, white); color: var(--snapshot-accent); font-size: 10px; font-weight: 800; }
.report-snapshot-top small { overflow: hidden; color: #929eaa; font-size: 8px; font-weight: 700; letter-spacing: .55px; text-overflow: ellipsis; white-space: nowrap; }
.report-snapshot-card h3 { min-height: 34px; margin: 12px 0 9px; overflow: hidden; color: #344b60; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; }
.report-snapshot-primary { display: flex; align-items: baseline; gap: 8px; }
.report-snapshot-primary strong { color: var(--snapshot-accent); font-family: 'Segoe UI', Arial, sans-serif; font-size: 23px; letter-spacing: -.45px; }
.report-snapshot-primary span { color: #8492a0; font-size: 9px; }
.report-snapshot-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.report-snapshot-metrics span { padding: 5px 7px; border-radius: 6px; background: #f3f6f9; color: #617386; font-size: 8px; }
.report-snapshot-card > a { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid #edf1f5; color: var(--snapshot-accent); font-size: 10px; font-weight: 700; }
.report-snapshot-card > a span { font-size: 14px; transition: transform .2s ease; }
.report-snapshot-card > a:hover span { transform: translateX(3px); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; padding: 19px 20px; }
.metric-grid > div { min-width: 0; }
.metric-grid small, .metric-grid strong { display: block; }
.metric-grid small { margin-bottom: 7px; color: #8b98a5; font-size: 10px; }
.metric-grid strong { overflow: hidden; color: #405367; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metric-grid .source-name { font-size: 10px; }
.empty-state { padding: 58px 24px; text-align: center; }
.empty-state h2 { margin: 14px 0 7px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 18px; }
.empty-state p { max-width: 460px; margin: 0 auto 18px; color: var(--muted); line-height: 1.6; }
.empty-icon { color: #77a8d9; font-size: 32px; }
.empty-inline, .empty-table { padding: 25px 16px !important; color: #8d99a5 !important; text-align: center; }
.panel-foot { padding: 13px 18px; border-top: 1px solid #eff2f5; color: #8b98a5; font-size: 10px; }
.type-tag { display: inline-block; padding: 5px 8px; border-radius: 5px; background: #f0f5fa; color: #536c83; font-size: 9px; font-weight: 600; white-space: nowrap; }
.alert { margin: 0 0 17px; padding: 12px 14px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; line-height: 1.5; }
.alert-error { border-color: #f1d4cc; background: #fff5f1; color: #a84c35; }
.alert-success { border-color: #cae9dc; background: #effaf5; color: #287b5c; }
.alert-info { border-color: #cfdeef; background: #f0f6fd; color: #315f8d; }
.form-stack { display: grid; gap: 14px; padding: 20px; }
.form-stack label { display: grid; gap: 7px; color: #526476; font-size: 11px; font-weight: 600; }
.form-stack label small { color: #929eaa; font-size: 9px; font-weight: 400; }
.form-stack input:not([type="checkbox"]):not([type="file"]), .form-stack select, .search-form input, .filter-form select { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #dfe6ec; border-radius: 6px; outline: none; background: #fff; color: var(--ink); font-size: 12px; }
.form-stack input:focus, .form-stack select:focus, .search-form input:focus, .filter-form select:focus { border-color: #80b2e5; box-shadow: 0 0 0 3px rgba(54, 132, 207, .1); }
.upload-zone { display: grid !important; justify-items: center; gap: 8px !important; padding: 26px 15px; border: 1px dashed #c9d6e2; border-radius: 8px; background: #f9fbfd; text-align: center; cursor: pointer; }
.upload-zone input { max-width: 100%; color: #708092; font-size: 10px; }
.upload-zone strong { color: #34495d; font-size: 12px; }
.upload-zone small { color: #8b98a5; font-size: 10px; font-weight: 400 !important; }
.upload-symbol { color: #4e8ac3; font-size: 22px; }
.compact-filter { display: flex; align-items: center; gap: 8px; padding: 15px 18px 0; }
.compact-filter select { max-width: 240px; }
.summary-note { margin: 17px 18px 11px; color: #758493; font-size: 11px; line-height: 1.7; }
.summary-note strong { color: #33495d; }
.text-link { display: inline-block; margin: 0 18px 18px; font-size: 11px; font-weight: 600; }
.search-form { display: flex; width: min(355px, 100%); gap: 7px; }
.search-form input { min-width: 0; }
.panel-heading-wrap { flex-wrap: wrap; }
.table-actions { display: flex; gap: 2px; justify-content: flex-end; white-space: nowrap; }
.report-action-buttons { gap: 6px; }
.report-action-buttons .button-secondary { border-color: #c8d9e9; background: #edf5ff; color: #285b87; }
.report-action-buttons .button-secondary:hover { border-color: #8fb7db; background: #dceeff; color: #16466f; }
.button-banner-action { border: 1px solid rgba(255, 255, 255, .68); box-shadow: 0 2px 8px rgba(12, 42, 68, .12); font-weight: 700; }
.button-banner-action:hover { border-color: #fff; box-shadow: 0 5px 14px rgba(12, 42, 68, .2); transform: translateY(-1px); }
.button-return-action { border-color: #b8cde0; background: #eaf2fa; color: #2d5f88; font-weight: 700; }
.button-return-action:hover { border-color: #8eaecb; background: #dceaf7; color: #1b4c76; }
.source-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-banner { margin-bottom: 17px; }
.position-cell { max-width: 220px; }
.employee-detail .panel-heading { padding: 18px 20px; }
.employee-detail .panel-heading h2 { margin-top: 5px; }
.employee-detail .panel-heading p { font-size: 10px; }
.employee-metrics { border-bottom: 1px solid #eff2f5; }
.employee-identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: 20px; }
.employee-identity > div { display: grid; min-width: 0; gap: 6px; }
.employee-identity small { color: #8b98a5; font-size: 10px; }
.employee-identity strong { overflow-wrap: anywhere; color: #344a5f; font-size: 12px; font-weight: 600; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px; color: #8592a0; font-size: 11px; }
.pagination a { font-weight: 600; }
.user-list { padding: 0 17px 13px; }
.user-edit { border-bottom: 1px solid #edf0f3; }
.user-edit summary { display: flex; align-items: center; gap: 10px; padding: 13px 0; cursor: pointer; list-style: none; }
.user-edit summary::-webkit-details-marker { display: none; }
.user-table-identity { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.user-table-identity > strong { color: #35495d; font-size: 11px; }
.users-panel-heading { align-items: center; }
.users-heading-tools { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 10px; }
.user-table-search { display: block; width: min(340px, 100%); }
.user-table-search input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #d4dfe8; border-radius: 7px; background: #f9fbfd; color: var(--ink); font-size: 11px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.user-table-search input:focus { border-color: #7aaddb; outline: 0; background: #fff; box-shadow: 0 0 0 3px rgba(54, 132, 207, .12); }
.user-add-button { flex: 0 0 auto; min-height: 38px; }
.user-create-trigger { display: contents; }
.user-create-trigger > summary { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 15px; border-radius: 7px; background: var(--blue); color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.user-create-trigger > summary::-webkit-details-marker { display: none; }
.user-create-trigger > summary:hover { background: var(--blue-dark); }
.user-table tr[hidden], .user-table [hidden] { display: none; }
.user-table .user-edit { position: relative; border: 0; }
.user-table .user-edit > summary { display: inline-flex; padding: 0; }
.user-table .user-edit-form { padding: 0; }
.app-logo-preview { display: block; width: 76px; height: 76px; margin: 10px 0; padding: 5px; border: 1px solid #e1e8ee; border-radius: 12px; background: #fff; object-fit: contain; }
.user-summary { flex: 1; min-width: 0; }
.user-summary strong, .user-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary strong { color: #35495d; font-size: 11px; }
.user-summary small { margin-top: 4px; color: #8e9aa6; font-size: 9px; }
.status-pill { padding: 5px 7px; border-radius: 20px; font-size: 9px; font-weight: 600; }
.status-active { background: #eaf7f1; color: #218463; }
.status-inactive { background: #f0f1f3; color: #747f89; }
.user-edit-form { padding: 7px 0 16px 44px; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px !important; }
.settings-panel { max-width: 740px; }
.settings-form { max-width: 560px; }
.notice-box { margin: 4px 0; padding: 13px 15px; border: 1px solid #e4edf6; border-radius: 7px; background: #f7fafe; color: #53697e; font-size: 11px; line-height: 1.6; }
.notice-box p { margin: 6px 0 0; }
.notice-box code { color: #3a5f81; font-size: 10px; }
.password-panel { max-width: 650px; }
.auth-body { display: grid; width: 100%; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: none; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 20%, #e7f2ff 0, transparent 32%), #f4f7fb; }
.auth-body::-webkit-scrollbar { display: none; }
.auth-card { width: min(100%, 420px); padding: 37px 38px 29px; border: 1px solid #e7edf3; border-radius: 13px; background: #fff; box-shadow: 0 22px 65px rgba(37, 67, 96, .1); transition: transform .3s cubic-bezier(.2, .7, .3, 1), border-color .25s ease, box-shadow .3s ease; }
.auth-card-wide { width: min(100%, 510px); }
.auth-card > .brand-mark { margin-bottom: 22px; }
.auth-card .eyebrow { margin: 0 0 8px; }
.auth-card h1 { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; font-size: 24px; letter-spacing: -.5px; }
.muted { color: #8996a3; }
.auth-card > .muted { margin: 8px 0 23px; font-size: 12px; line-height: 1.6; }
.auth-card .form-stack { gap: 16px; padding: 0; }
.auth-foot { margin: 21px 0 0; color: #8b98a5; font-size: 10px; text-align: center; }
.auth-foot a { font-weight: 600; }
.auth-card .notice-box { margin-bottom: 15px; }
.auth-card .notice-box p { font-size: 10px; }
.auth-card a { transition: color .2s ease; }
.auth-card .auth-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-body { background-size: 150% 150%; animation: auth-background 18s ease-in-out infinite alternate; }
.auth-card:hover { transform: translateY(-3px); border-color: #dce8f3; box-shadow: 0 28px 70px rgba(37, 67, 96, .14); }
body.is-ready .auth-card { animation: page-enter .62s cubic-bezier(.2, .75, .25, 1) both; }
body.is-ready .auth-card > .brand-mark { animation: mark-pop .55s .18s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes auth-background { from { background-position: 0% 35%; } to { background-position: 100% 65%; } }
@keyframes mark-pop { from { opacity: 0; transform: translateY(6px) scale(.86) rotate(-7deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; overflow-x: hidden; padding: 28px; background: radial-gradient(ellipse at 15% 5%, #e5f0ff 0, transparent 32%), #f1f5f9; }
.login-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr); width: min(1180px, 100%); min-height: min(740px, calc(100dvh - 56px)); overflow: hidden; border: 1px solid rgba(221, 230, 239, .9); border-radius: 22px; background: #fff; box-shadow: 0 28px 90px rgba(29, 54, 78, .15); animation: login-layout-enter .65s cubic-bezier(.2, .75, .25, 1) both; }
.login-info { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 42px clamp(32px, 5vw, 66px) 26px; background: linear-gradient(145deg, #173750 0%, #12304a 55%, #10283d 100%); color: #fff; }
.login-info::before, .login-info::after { position: absolute; z-index: -1; border: 1px solid rgba(179, 217, 244, .11); border-radius: 50%; content: ""; pointer-events: none; }
.login-info::before { width: 510px; height: 510px; right: -235px; bottom: -285px; box-shadow: 0 0 0 42px rgba(179, 217, 244, .035), 0 0 0 85px rgba(179, 217, 244, .025); }
.login-info::after { width: 300px; height: 300px; top: 18%; right: -185px; background: radial-gradient(circle, rgba(41, 155, 180, .17), transparent 70%); }
.login-brand { display: flex; align-items: center; gap: 13px; width: fit-content; color: #fff; }
.login-brand:hover { color: #fff; }
.login-brand img { width: 48px; height: 48px; flex: 0 0 auto; padding: 4px; border: 1px solid rgba(255,255,255,.24); border-radius: 13px; background: #fff; object-fit: contain; }
.login-brand strong, .login-brand small { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-brand strong { font-size: 14px; font-weight: 700; }
.login-brand small { margin-top: 5px; color: #a9c0d2; font-size: 10px; letter-spacing: .25px; }
.login-intro { max-width: 480px; margin: auto 0 30px; padding-top: 62px; }
.login-kicker { display: inline-flex; align-items: center; gap: 9px; color: #a6c2d6; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.login-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #58d0af; box-shadow: 0 0 13px rgba(88, 208, 175, .7); }
.login-intro h1 { margin: 22px 0 16px; color: #fff; font-family: 'Segoe UI', Arial, sans-serif; font-size: clamp(36px, 4.2vw, 54px); font-weight: 650; letter-spacing: -1.8px; line-height: 1.08; }
.login-intro h1 span { color: #70d7c0; }
.login-intro > p { max-width: 410px; margin: 0; color: #bfd0de; font-size: 13px; line-height: 1.8; }
.login-feature-list { display: grid; gap: 12px; max-width: 440px; }
.login-feature-list > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.055); backdrop-filter: blur(8px); }
.login-feature-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(115, 210, 191, .22); border-radius: 9px; background: rgba(87, 198, 174, .12); color: #7fe0c5; font-size: 17px; }
.login-feature-list strong, .login-feature-list small { display: block; }
.login-feature-list strong { color: #f2f7fb; font-size: 11px; }
.login-feature-list small { margin-top: 4px; color: #a6bacb; font-size: 9px; line-height: 1.45; }
.login-info-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 24px; color: #8ea9bd; font-size: 9px; }
.login-form-panel { display: grid; min-width: 0; align-content: center; padding: 54px clamp(30px, 5.5vw, 72px); background: #fff; }
.login-form-content { width: min(100%, 390px); margin: 0 auto; }
.login-form-heading { margin-bottom: 27px; }
.login-form-mark { display: none; }
.login-form-heading .eyebrow { margin: 0 0 9px; color: #3489c5; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.login-form-heading h2 { margin: 0; color: #20384d; font-family: 'Segoe UI', Arial, sans-serif; font-size: 26px; letter-spacing: -.7px; }
.login-form-heading .muted { margin: 9px 0 0; font-size: 11px; line-height: 1.7; }
.login-form { gap: 18px; padding: 0; }
.login-form label { gap: 7px; color: #41576b; font-size: 10px; font-weight: 600; }
.login-form input:not([type="checkbox"]):not([type="file"]) { min-height: 46px; padding: 0 13px; border-color: #dfe7ee; border-radius: 8px; background: #fbfcfe; color: #253c51; font-size: 12px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.login-form input::placeholder { color: #a4b0bc; }
.login-form input:focus { border-color: #549bd1; background: #fff; box-shadow: 0 0 0 3px rgba(61, 145, 207, .12); outline: none; }
.login-form .button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 47px; margin-top: 5px; border-radius: 8px; box-shadow: 0 7px 16px rgba(35, 116, 210, .2); font-size: 12px; }
.login-form .button span { font-size: 17px; transition: transform .2s ease; }
.login-form .button:hover span { transform: translateX(4px); }
.login-form-panel .auth-foot { margin-top: 22px; font-size: 10px; }
.login-security-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 28px 0 0; color: #9ba8b4; font-size: 9px; }
.login-security-note span { color: #438caa; font-size: 13px; }
.login-copyright { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; margin-top: 24px; color: #95a2ae; font-size: 9px; text-align: center; }
.login-copyright > span + span { padding-left: 12px; border-left: 1px solid #c0cbd4; }
@keyframes login-layout-enter { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 900px) {
    .login-body { padding: 18px; }
    .login-layout { grid-template-columns: minmax(0, 1fr); width: min(620px, 100%); min-height: min(900px, calc(100dvh - 36px)); }
    .login-info { min-height: 370px; padding: 30px 34px 20px; }
    .login-intro { margin: auto 0 20px; padding-top: 35px; }
    .login-intro h1 { margin: 15px 0 10px; font-size: 38px; }
    .login-feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-width: none; }
    .login-feature-list > div { align-items: flex-start; padding: 10px; }
    .login-feature-icon { width: 30px; height: 30px; }
    .login-form-panel { padding: 38px 34px 24px; }
    .login-copyright { margin-top: 20px; }
}
@media (max-width: 520px) {
    .login-body { display: block; min-height: 100vh; min-height: 100dvh; padding: 0; background: #fff; }
    .login-layout { width: 100%; min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
    .login-info { min-height: 0; padding: 22px 22px 20px; }
    .login-brand img { width: 40px; height: 40px; }
    .login-brand strong { max-width: 260px; font-size: 12px; }
    .login-brand small { max-width: 260px; font-size: 8px; }
    .login-intro { margin: 28px 0 16px; padding-top: 0; }
    .login-intro h1 { margin: 12px 0 8px; font-size: 32px; letter-spacing: -1px; }
    .login-intro > p { font-size: 11px; line-height: 1.6; }
    .login-feature-list { grid-template-columns: 1fr; gap: 7px; }
    .login-feature-list > div { align-items: center; padding: 8px 10px; }
    .login-feature-list small { font-size: 8px; }
    .login-info-footer { display: none; }
    .login-form-panel { padding: 30px 23px 24px; }
    .login-form-heading { margin-bottom: 21px; }
    .login-form-heading h2 { font-size: 23px; }
    .login-form { gap: 15px; }
    .login-form-panel .auth-foot { margin-top: 18px; }
    .login-security-note { margin-top: 22px; }
}

.employee-filters { display: flex; width: 100%; flex-wrap: wrap; gap: 9px; padding: 16px 18px; }
.report-detail-filters { width: min(820px, 100%); flex-wrap: wrap; align-items: center; }
.report-detail-filters select { min-width: 180px; flex: 1 1 190px; }
.report-detail-filters input { min-width: 150px; flex: 1 1 200px; }
.employee-filters select, .employee-filters input, .selection-toolbar input, .assignment-toolbar select {
    min-height: 37px; padding: 0 11px; border: 1px solid #dfe6ec; border-radius: 6px; background: #fff; color: #405367; font-size: 11px;
}
.employee-filters select { min-width: 175px; }
.employee-filters input, .selection-toolbar input { flex: 1 1 180px; }
.employee-name-link { color: inherit; }
.employee-name-link:hover strong { color: var(--blue); }
.position-cell { max-width: 260px; }
.type-tag, .unassigned-tag { display: inline-flex; max-width: 210px; overflow: hidden; padding: 4px 8px; border-radius: 20px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.type-tag { background: #edf5ff; color: #386e9e; }
.unassigned-tag { background: #fff5e8; color: #a06a20; }
.empty-table { padding: 27px !important; color: #8996a3 !important; text-align: center; }
.empty-inline { padding: 20px; color: #758394; font-size: 12px; }
.room-admin-grid { align-items: start; }
.form-stack { display: grid; gap: 13px; padding: 18px 20px 20px; }
.form-stack label, .assignment-toolbar > label { display: grid; gap: 7px; color: #536579; font-size: 11px; font-weight: 600; }
.form-stack input, .room-name-edit input { min-height: 38px; padding: 0 11px; border: 1px solid #dfe6ec; border-radius: 6px; color: #33485c; font-size: 12px; }
.form-stack .button { justify-self: start; }
.room-list { padding: 0 16px 8px; }
.room-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #eff2f5; }
.room-rename-form { display: grid; grid-template-columns: minmax(130px, 1fr) auto; align-items: end; gap: 8px; }
.room-name-edit { display: grid; gap: 5px; color: #8996a3; font-size: 9px; }
.room-name-edit input { min-height: 34px; font-weight: 600; }
.room-count { color: #718093; font-size: 10px; white-space: nowrap; }
.selection-toolbar, .assignment-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #eff2f5; color: #7b8996; font-size: 11px; }
.selection-toolbar strong { color: #334b61; }
.assignment-toolbar { justify-content: flex-start; border: 0; }
.assignment-toolbar > label:first-child { min-width: 210px; }
.select-all-label { display: flex !important; align-items: center; gap: 8px !important; min-height: 37px; color: #718093 !important; font-weight: 400 !important; }
.select-all-label input, .assignment-list input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.assignment-list { max-height: 490px; overflow: auto; }
.assignment-list .data-table th { position: sticky; top: 0; z-index: 1; }
.assignment-list:not(.assignment-list--read-only) .data-table td:first-child,
.assignment-list:not(.assignment-list--read-only) .data-table th:first-child { width: 55px; text-align: center; }
.assignment-list tr[hidden] { display: none; }
.remove-assignment-form { display: flex; justify-content: flex-end; padding: 13px 18px 18px; border-top: 1px solid #eff2f5; }
.activity-filter-form { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(145px, 1fr)) auto auto; align-items: end; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #eff2f5; }
.activity-filter-form label { display: grid; min-width: 0; gap: 6px; color: #637589; font-size: 10px; font-weight: 600; }
.activity-filter-form input, .activity-filter-form select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #dfe6ec; border-radius: 6px; background: #fff; color: var(--ink); font-size: 11px; }
.activity-filter-form input:focus, .activity-filter-form select:focus { border-color: #80b2e5; outline: 0; box-shadow: 0 0 0 3px rgba(54, 132, 207, .1); }
.activity-filter-form .button { white-space: nowrap; }
.activity-filter-error { margin: 12px 18px 0; color: #a84c35; font-size: 11px; }
.activity-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.activity-clear-form { margin: 0; }
.activity-clear-form .button { white-space: nowrap; }
.attendance-table { min-width: 1000px; }
.attendance-table .align-right { white-space: nowrap; }
.sanction-inline-form { display: flex; min-width: 195px; align-items: center; gap: 5px; }
.sanction-inline-form select { min-width: 112px; min-height: 30px; padding: 0 5px; border: 1px solid #dfe6ec; border-radius: 5px; background: #fff; color: #405367; font-size: 10px; }
.sanction-inline-form { flex-wrap: wrap; min-width: 230px; }
.sanction-inline-form textarea { width: 100%; min-height: 42px; resize: vertical; padding: 6px 7px; border: 1px solid #dfe6ec; border-radius: 5px; color: #405367; font: inherit; font-size: 10px; }
.sanction-inline-form .button { flex: 0 0 auto; }
.period-report-form { align-content: start; }
.period-report-form .summary-note { margin: 0; }
.sanction-comment-readonly { display: block; max-width: 220px; margin-top: 5px; color: #718093; line-height: 1.4; white-space: normal; }
.attendance-summary-strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 0 18px 13px; color: #83909c; font-size: 10px; }
.attendance-summary-strip strong { color: #334b61; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px; color: #7b8996; font-size: 11px; }
.pagination a { font-weight: 600; }
.attendance-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 12px; margin: -8px 0 20px; padding: 13px 18px; border: 1px solid #e8eef3; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.attendance-overview > div { display: grid; grid-template-columns: 8px 1fr; align-items: center; gap: 3px 9px; color: #758394; font-size: 10px; }
.attendance-overview > div strong { grid-column: 2; color: #324a60; font-size: 14px; }
.overview-indicator { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: #438bd5; }
.overview-absent { background: #e58b57; }
.overview-present { background: #269b75; }
.overview-score { background: #7769c9; }
.attendance-overview > a { font-size: 10px; font-weight: 600; white-space: nowrap; }
.employee-photo, .employee-photo-placeholder { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; object-fit: cover; background: #eaf2fa; color: #3b78ae; font-size: 15px; font-weight: 700; }
.employee-master-table { min-width: 830px; }
.employee-row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.employee-select-cell { width: 54px; text-align: center !important; }
.employee-select-cell input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.bulk-employee-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid #eff2f5; border-bottom: 1px solid #eff2f5; }
.bulk-employee-actions .checkbox-label { display: inline-flex; align-items: center; gap: 8px; color: #687b8e; font-size: 11px; }
.bulk-employee-actions input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.bulk-employee-actions .button:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
.employee-edit { position: relative; }
.employee-edit > summary { list-style: none; }
.employee-edit > summary::-webkit-details-marker { display: none; }
.employee-edit[open] .employee-edit-form { position: absolute; top: 35px; right: 0; z-index: 4; width: min(360px, calc(100vw - 40px)); max-height: min(70vh, 620px); overflow: auto; border: 1px solid #dfe6ec; border-radius: 9px; background: #fff; box-shadow: 0 14px 36px rgba(26, 48, 69, .16); }
.employee-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.employee-create-form > button { align-self: end; justify-self: start; }
.employee-create-form input[type="file"] { max-width: 100%; font-size: 10px; }
.delete-inline-form { padding: 0 0 15px 44px; }
.import-comparison .comparison-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 16px 20px; }
.comparison-columns > div { min-width: 0; }
.comparison-columns h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; color: #3c5267; font-size: 12px; }
.comparison-columns h3 span { min-width: 24px; padding: 3px 7px; border-radius: 12px; background: #edf5ff; color: #386e9e; font-size: 10px; text-align: center; }
.comparison-columns ul { max-height: 280px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.comparison-columns li { display: grid; gap: 3px; padding: 8px 0; border-top: 1px solid #eff2f5; color: #405367; font-size: 11px; }
.comparison-columns li small { color: #8b98a5; font-size: 9px; }

@media (max-width: 1150px) {
    .content { padding-right: 26px; padding-left: 26px; }
    .topbar { padding: 0 26px; }
    .footer { padding-right: 26px; padding-left: 26px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .data-table th, .data-table td { padding-right: 11px; padding-left: 11px; }
    .attendance-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .activity-filter-form label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 15px 0 40px rgba(14, 34, 53, .17); }
    .sidebar.sidebar-open { transform: translateX(0); }
    .main-area { width: 100%; margin-left: 0; }
    .menu-toggle { display: block; }
    .topbar { justify-content: flex-start; gap: 15px; }
    .topbar-controls { margin-left: auto; }
    .topbar-user { margin-left: 0; }
}
@media (max-width: 680px) {
    .content { padding: 25px 15px 34px; }
    .topbar { height: 65px; padding: 0 15px; }
    .topbar strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-user > span:last-child { display: none; }
    .page-heading h1 { font-size: 22px; }
    .today-date { font-size: 10px; }
    .two-column { grid-template-columns: 1fr; }
    .stat-grid { gap: 9px; }
    .stat-card { min-height: 112px; padding: 13px; }
    .stat-card > strong { font-size: 22px; }
    .stat-top { font-size: 10px; }
    .stat-icon { width: 27px; height: 27px; }
    .report-banner { flex-wrap: wrap; gap: 11px; padding: 17px; }
    .report-banner-icon { width: 39px; height: 39px; }
    .attendance-period-heading { flex: 1 1 calc(100% - 55px); }
    .period-picker-form { width: 100%; min-width: 0; margin-left: 50px; }
    .period-picker-controls { width: 100%; }
    .period-picker-controls select { flex: 1; }
    .report-banner h2 { font-size: 14px; }
    .report-banner > .button { margin-left: 50px; }
    .banner-actions { width: 100%; margin-left: 50px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 10px; }
    .employee-identity { grid-template-columns: 1fr; gap: 13px; padding: 16px; }
    .panel-heading { padding: 15px; }
    .panel-heading-wrap > div { width: 100%; }
    .search-form { width: 100%; }
    .users-panel-heading > div:first-child,
    .users-heading-tools { width: 100%; }
    .users-heading-tools { align-items: stretch; flex-direction: column; }
    .user-table-search { width: 100%; }
    .users-heading-tools .user-add-button { width: 100%; }
    .footer { padding: 15px; }
    .auth-card { padding: 30px 23px 24px; }
    .room-row { grid-template-columns: minmax(0, 1fr) auto; }
    .room-rename-form { grid-column: 1 / -1; }
    .room-count { grid-column: 1; }
    .room-row .button { grid-column: 2; grid-row: 1 / span 2; }
    .assignment-toolbar { align-items: stretch; flex-direction: column; }
    .assignment-toolbar > label:first-child { min-width: 0; }
    .assignment-toolbar .button { width: 100%; }
    .remove-assignment-form { justify-content: stretch; }
    .remove-assignment-form .button { width: 100%; }
    .activity-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-filter-form label:first-child { grid-column: 1 / -1; }
    .activity-filter-form .button { width: 100%; }
    .activity-heading-actions { width: 100%; justify-content: space-between; }
    .activity-heading-actions .activity-clear-form { flex: 1 1 auto; }
    .activity-heading-actions .button { width: 100%; }
    .attendance-overview { grid-template-columns: 1fr 1fr; }
    .attendance-overview > a { grid-column: 1 / -1; }
    .employee-create-form, .import-comparison .comparison-columns { grid-template-columns: 1fr; }
}

/* Shared motion and feedback used by every application page. */
body.is-ready .content > .page-heading,
body.is-ready .content > .alert,
body.is-ready .content > .report-banner,
body.is-ready .content > .stat-grid,
body.is-ready .content > .chart-panel,
body.is-ready .content > .two-column,
body.is-ready .content > .panel {
    animation: page-enter .62s cubic-bezier(.2, .75, .25, 1) both;
}
body.is-ready .content > .report-banner { animation-delay: 55ms; }
body.is-ready .content > .stat-grid { animation-delay: 105ms; }
body.is-ready .content > .chart-panel { animation-delay: 155ms; }
body.is-ready .content > .two-column { animation-delay: 205ms; }
body.is-ready .content > .panel { animation-delay: 255ms; }
body.is-ready .content > .page-heading { animation-delay: 0ms; }

@keyframes page-enter {
    from { opacity: 0; transform: translate3d(0, 13px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.sidebar-brand,
.brand-mark,
.nav-link,
.nav-icon,
.user-chip,
.topbar-user,
.avatar,
.panel,
.stat-card,
.report-banner,
.report-banner-icon,
.button,
.stat-icon,
.score-pill,
.type-tag,
.status-pill,
.text-link,
.pagination a,
.user-edit summary,
.upload-zone,
.chart-switch-button,
.chart-point {
    transition:
        transform .24s cubic-bezier(.2, .7, .3, 1),
        color .2s ease,
        background-color .24s ease,
        border-color .24s ease,
        box-shadow .24s ease,
        opacity .2s ease;
}

.brand-mark { box-shadow: 0 5px 14px rgba(35, 116, 210, .10); }
.sidebar-brand:hover .brand-mark { transform: rotate(-7deg) scale(1.06); box-shadow: 0 7px 20px rgba(95, 167, 237, .25); }
.nav-link { position: relative; overflow: hidden; }
.nav-link::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 15%, rgba(255, 255, 255, .08) 48%, transparent 78%);
    content: '';
    opacity: 0;
    transform: translateX(-110%);
    transition: transform .38s ease, opacity .2s ease;
}
.nav-link:hover::after { opacity: 1; transform: translateX(110%); }
.nav-icon { transition: color .32s ease; }
.avatar { transition: transform .24s ease, box-shadow .24s ease; }
.user-chip:hover .avatar,
.topbar-user:hover .avatar { transform: translateY(-2px) scale(1.07); box-shadow: 0 5px 12px rgba(72, 121, 173, .18); }

.panel,
.stat-card { transition: transform .28s cubic-bezier(.2, .7, .3, 1), border-color .25s ease, box-shadow .28s ease; }
.panel:hover { border-color: #dce8f2; box-shadow: 0 13px 34px rgba(28, 65, 100, .075); }
.stat-card:hover { transform: translateY(-3px); border-color: #dce8f2; box-shadow: 0 15px 38px rgba(28, 65, 100, .09); }
.report-banner { position: relative; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.report-banner::after {
    position: absolute;
    inset: -90% auto -90% -35%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
    content: '';
    pointer-events: none;
    transform: rotate(20deg);
    transition: left .65s ease;
}
.report-banner:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(29, 80, 126, .16); }
.report-banner:hover::after { left: 120%; }
.report-banner-icon { transition: transform .3s cubic-bezier(.2, .7, .3, 1), background .25s ease; }
.report-banner:hover .report-banner-icon { background: rgba(255,255,255,.23); transform: rotate(-6deg) scale(1.06); }
.stat-icon { transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease; }
.stat-card:hover .stat-icon { transform: translateY(-3px) rotate(-5deg) scale(1.08); box-shadow: 0 6px 15px rgba(38, 103, 159, .12); }
.stat-card > strong { transition: color .2s ease, transform .25s ease; }
.stat-card:hover > strong { color: var(--blue); transform: translateX(2px); }

.button { position: relative; overflow: hidden; }
.button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(33, 86, 137, .12); }
.button:active { transform: translateY(0) scale(.98); box-shadow: none; }
.button:focus-visible,
.nav-link:focus-visible,
.chart-switch-button:focus-visible,
.user-edit summary:focus-visible,
.pagination a:focus-visible { outline: 3px solid rgba(68, 146, 222, .45); outline-offset: 3px; }
.data-table tbody tr { transition: background-color .34s cubic-bezier(.2, .7, .3, 1); }
.data-table tbody tr > td {
    background-color: transparent;
    transition: background-color .34s cubic-bezier(.2, .7, .3, 1), color .3s ease;
}
.data-table tbody tr:hover { background-color: #c9e8ff; }
.data-table tbody tr:hover > td { background-color: #c9e8ff; color: #173f60; }
.data-table tbody tr:hover > td:first-child { box-shadow: inset 4px 0 #1682cf; }
.data-table tbody tr:hover > td strong { color: #104f7e; }
.data-table tbody tr :is(.button, .score-pill, .type-tag, .status-pill):hover { transform: none; box-shadow: none; }
.score-pill:hover,
.type-tag:hover,
.status-pill:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 4px 12px rgba(45, 78, 107, .1); }
.panel-heading > a,
.text-link,
.pagination a { transition: color .2s ease, gap .2s ease, transform .2s ease; }
.panel-heading > a:hover,
.text-link:hover,
.pagination a:hover { transform: translateX(2px); }
.pagination a:hover { color: var(--blue-dark); }

.form-stack input:not([type="checkbox"]):not([type="file"]),
.form-stack select,
.search-form input,
.filter-form select { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.form-stack input:not([type="checkbox"]):not([type="file"]):hover,
.form-stack select:hover,
.search-form input:hover,
.filter-form select:hover { border-color: #bdcddd; }
.upload-zone { transition: transform .24s ease, border-color .24s ease, background-color .24s ease, box-shadow .24s ease; }
.upload-zone:hover { transform: translateY(-2px); border-color: #79a9d7; background: #f2f8ff; box-shadow: 0 8px 20px rgba(46, 108, 164, .08); }
.upload-zone:hover .upload-symbol { transform: translateY(-3px); }
.user-edit { transition: background-color .2s ease; }
.user-edit[open] { background: #f8fbfe; }
.user-edit summary:hover { color: var(--blue); }
.user-edit summary:hover .avatar { transform: scale(1.07); }
.alert { animation: alert-enter .4s ease both; }
@keyframes alert-enter {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Interactive dashboard wave chart. */
.chart-panel { --chart-series: #3281d7; }
.chart-heading { min-height: 74px; }
.chart-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid #e9eef3; border-radius: 9px; background: #f7f9fc; }
.chart-switch-button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: #758493; cursor: pointer; font-size: 10px; font-weight: 600; }
.chart-switch-button:hover { background: #edf3fa; color: #3b566f; }
.chart-switch-button.is-active { background: #fff; color: var(--chart-series); box-shadow: 0 2px 7px rgba(35, 57, 79, .1); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 9px; padding: 15px 22px 0; color: #758493; font-size: 10px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.chart-report-legend-item { max-width: min(280px, 100%); }
.chart-report-legend-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-report-swatch, .chart-tooltip-series > i { display: inline-block; width: 18px; height: 3px; flex: 0 0 auto; border-radius: 3px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-frequency { background: #3884da; box-shadow: 0 0 0 3px rgba(56, 132, 218, .1); }
.legend-employees { background: #896be3; box-shadow: 0 0 0 3px rgba(137, 107, 227, .1); }
.wave-chart-wrap { position: relative; padding: 4px 13px 0 4px; }
.wave-chart { display: block; width: 100%; overflow: visible; }
.chart-grid-line { stroke: #edf1f5; stroke-dasharray: 3 6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-grid-line.is-baseline { stroke: #dfe7ee; stroke-dasharray: none; }
.chart-axis-label { fill: #8492a0; font-family: 'Segoe UI', Arial, sans-serif; font-size: 11px; }
.chart-y-label { text-anchor: end; }
.chart-x-label { fill: #8492a0; font-size: 10px; transition: fill .2s ease; }
.chart-x-label:hover { fill: var(--chart-series); }
.chart-area { fill: url(#wave-fill-gradient); opacity: .88; animation: chart-area-appear .85s ease both; }
.chart-line { fill: none; stroke-dasharray: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-line-appear { animation: chart-line-appear .45s ease both; }
.chart-line-flow { fill: none; stroke-dasharray: .06 .94; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4.5; opacity: .85; pointer-events: none; vector-effect: non-scaling-stroke; animation: chart-line-flow 3.6s linear infinite; }
.chart-beacon { fill: #fff; stroke: var(--chart-series); stroke-width: 3; filter: url(#wave-glow); pointer-events: none; vector-effect: non-scaling-stroke; }
.chart-hover-line { stroke: var(--chart-series); stroke-dasharray: 3 5; stroke-opacity: .48; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-point { fill: #fff; stroke: var(--chart-series); stroke-width: 2.4; vector-effect: non-scaling-stroke; cursor: crosshair; }
.chart-point:hover,
.chart-point:focus,
.chart-point.is-selected { fill: var(--chart-series); r: 6; filter: url(#wave-glow); outline: none; }
.chart-tooltip { position: absolute; z-index: 2; display: grid; gap: 5px; width: max-content; max-width: min(300px, 75vw); max-height: min(280px, 55vh); overflow: auto; padding: 10px 12px; border: 1px solid rgba(224, 233, 241, .9); border-radius: 9px; background: rgba(255, 255, 255, .97); box-shadow: 0 9px 26px rgba(31, 57, 80, .14); pointer-events: none; animation: tooltip-enter .16s ease both; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong { color: #344a5f; font-size: 11px; line-height: 1.4; }
.chart-tooltip span { color: #718194; font-size: 10px; }
.chart-tooltip .chart-tooltip-category { padding-bottom: 4px; border-bottom: 1px solid #e9eef3; }
.chart-tooltip .chart-tooltip-series { display: flex; align-items: center; gap: 7px; }
.chart-tooltip-series > i { width: 10px; height: 10px; border-radius: 50%; }
.chart-caption { display: flex; justify-content: space-between; gap: 12px; padding: 0 22px 16px; color: #97a2ad; font-size: 9px; }
.chart-unavailable .wave-chart { display: none; }
.chart-unavailable .wave-chart-wrap::after { display: block; padding: 42px 15px; color: #8996a3; content: 'Rincian kategori grafik belum tersedia untuk laporan ini.'; font-size: 11px; text-align: center; }
@keyframes chart-line-appear { from { opacity: .25; } to { opacity: 1; } }
@keyframes chart-line-flow { to { stroke-dashoffset: -1; } }
@keyframes chart-area-appear { from { opacity: .2; } to { opacity: .88; } }
@keyframes tooltip-enter { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 680px) {
    .section-heading { align-items: flex-start; }
    .report-snapshot-grid { grid-template-columns: 1fr; }
    .report-snapshot-card h3 { min-height: 0; }
    .chart-heading { align-items: flex-start; flex-direction: column; }
    .chart-switch { width: 100%; }
    .chart-switch-button { flex: 1; }
    .chart-legend { gap: 10px; padding: 12px 15px 0; font-size: 9px; }
    .wave-chart-wrap { padding-right: 7px; padding-left: 0; }
    .chart-caption { flex-direction: column; padding-right: 15px; padding-left: 15px; }
    .chart-x-label { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.modal-open-button { margin: 12px 20px 18px; }
.employee-row-actions .modal-open-button { margin: 0; }
.room-row .modal-open-button { margin: 0; }
.room-archived-name { display: grid; gap: 5px; min-width: 0; }
.room-archived-name span { color: #8b98a5; font-size: 9px; }
.room-archived-name strong { overflow: hidden; color: #536579; font-size: 12px; text-overflow: ellipsis; }
.user-modal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f3; }
.user-modal-row .user-edit summary { flex: 1; min-width: 0; cursor: default; }
.user-modal-row .modal-open-button { flex: 0 0 auto; margin: 0; }
.app-modal {
    width: min(620px, calc(100vw - 30px));
    max-width: none;
    max-height: min(88dvh, 900px);
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(218, 228, 237, .9);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 24px 80px rgba(17, 39, 59, .28);
    animation: modal-enter .22s cubic-bezier(.2, .75, .25, 1) both;
}
.app-modal::backdrop { background: rgba(15, 31, 46, .48); backdrop-filter: blur(3px); }
.app-modal-shell { overflow: hidden; border-radius: inherit; }
.app-modal-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 19px 23px;
    border-bottom: 1px solid #edf1f5;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}
.app-modal-kicker { color: #7d91a3; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.app-modal-header h2 { margin: 5px 0 0; color: #253b50; font-size: 18px; font-weight: 700; }
.app-modal-close, .floating-toast-close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #f2f5f8;
    color: #6d7e8e;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
    transition: background .18s, color .18s, transform .18s;
}
.app-modal-close:hover, .floating-toast-close:hover { transform: rotate(5deg); background: #e7eef5; color: #263e54; }
.app-modal-form { display: grid; gap: 14px; max-height: calc(88dvh - 78px); overflow-y: auto; padding: 21px 23px 25px; }
.app-modal-form.form-stack { padding: 21px 23px 25px; }
.app-modal-form .button { margin-top: 3px; }
.app-modal-form .assignment-list { max-height: 45dvh; }
.app-modal-form textarea { width: 100%; min-height: 82px; padding: 10px 11px; border: 1px solid #dfe6ec; border-radius: 7px; color: var(--ink); font: inherit; resize: vertical; }
.employee-edit-modal { width: min(900px, calc(100vw - 40px)); }
.employee-edit-modal .employee-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.employee-edit-modal .employee-edit-form > button { grid-column: 1 / -1; justify-self: end; min-width: 190px; }
.confirm-modal { width: min(440px, calc(100vw - 30px)); text-align: center; }
.confirm-shell { display: grid; justify-items: center; padding: 31px 28px 26px; }
.confirm-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 5px solid #fff0d5;
    border-radius: 50%;
    background: #fff7e9;
    color: #d58a1c;
    font-size: 27px;
    font-weight: 700;
}
.confirm-shell h2 { margin: 17px 0 7px; font-size: 19px; }
.confirm-shell p { margin: 0; color: #708092; font-size: 13px; line-height: 1.65; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 24px; }
.floating-notifications {
    position: fixed;
    z-index: 2000;
    top: 22px;
    right: 22px;
    display: grid;
    width: min(410px, calc(100vw - 28px));
    gap: 10px;
    pointer-events: none;
}
.floating-toast {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border: 1px solid #d9eee5;
    border-radius: 13px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 14px 38px rgba(26, 49, 70, .17);
    color: #30485d;
    pointer-events: auto;
    animation: toast-enter .34s cubic-bezier(.2, .75, .25, 1) both;
    backdrop-filter: blur(14px);
}
.floating-toast-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: #e9f8f1; color: #18845f; font-size: 15px; font-weight: 800; }
.floating-toast-message { font-size: 12px; font-weight: 600; line-height: 1.55; }
.floating-toast-close { width: 27px; height: 27px; border-radius: 8px; font-size: 20px; }
.floating-toast-error { border-color: #f2d9d3; }
.floating-toast-error .floating-toast-icon { background: #fff0ec; color: #c75f49; }
.floating-toast-info { border-color: #d8e6f3; }
.floating-toast-info .floating-toast-icon { background: #edf5fd; color: #3979b6; }
.floating-toast.is-dismissing { animation: toast-exit .2s ease both; }
@keyframes modal-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-enter { from { opacity: 0; transform: translateX(18px) scale(.98); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toast-exit { to { opacity: 0; transform: translateX(16px); } }
@media (max-width: 680px) {
    .floating-notifications { top: 10px; right: 10px; width: calc(100vw - 20px); }
    .app-modal-form, .app-modal-form.form-stack { padding: 16px; }
    .app-modal-header { padding: 16px; }
    .confirm-shell { padding: 25px 20px 22px; }
    .employee-edit-modal .employee-edit-form { grid-template-columns: 1fr; }
    .employee-edit-modal .employee-edit-form > button { grid-column: auto; justify-self: stretch; }
}

.form-stack select,
.employee-filters select,
.assignment-toolbar select,
.search-form select,
.sanction-inline-form select,
.filter-form select {
    appearance: none;
    padding-right: 38px;
    border: 1px solid #d7e1ea;
    border-radius: 9px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2367798b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #344b60;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.form-stack select { width: 100%; min-height: 40px; padding-left: 12px; font-size: 12px; }
.employee-filters select, .search-form select, .assignment-toolbar select { min-height: 39px; padding-left: 12px; font-size: 11px; }
.sanction-inline-form select { min-height: 34px; border-radius: 7px; background-position: right 8px center; }
.form-stack select:hover, .employee-filters select:hover, .assignment-toolbar select:hover, .search-form select:hover, .sanction-inline-form select:hover { border-color: #9ab6ce; background-color: #fbfdff; }
.form-stack select:focus, .employee-filters select:focus, .assignment-toolbar select:focus, .search-form select:focus, .sanction-inline-form select:focus { border-color: #6da5d7; outline: 0; box-shadow: 0 0 0 3px rgba(54, 132, 207, .12); }
select option { padding: 9px 10px; background: #fff; color: #344b60; }
.form-stack input[type="file"] {
    display: block;
    width: 100%;
    min-height: 43px;
    padding: 5px;
    border: 1px solid #dce5ed;
    border-radius: 9px;
    background: #f8fafc;
    color: #6e8091;
    font-size: 11px;
}
.form-stack input[type="file"]::file-selector-button {
    min-height: 31px;
    margin-right: 10px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    background: #eaf3fc;
    color: #28679f;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: background .18s ease, color .18s ease;
}
.form-stack input[type="file"]::file-selector-button:hover { background: #dcecff; color: #174e7f; }
.upload-zone { gap: 11px !important; padding: 25px 18px; border-radius: 13px; background: linear-gradient(160deg, #fbfdff, #f5f9fd); }
.upload-zone input[type="file"] { max-width: 390px; background: #fff; text-align: left; }
.report-filters { width: min(600px, 100%); align-items: center; }
.report-filters select { min-width: 175px; flex: 1 1 190px; }
.report-filters input { flex: 1 1 170px; }
.user-avatar-photo { object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(24, 49, 71, .13); }
.profile-photo-upload { padding: 12px; border: 1px dashed #d5e1eb; border-radius: 11px; background: #f9fbfd; }
.profile-photo-upload small { display: block; }
.profile-photo-upload > label { display: block; margin-bottom: 6px; color: #526476; font-size: 11px; font-weight: 600; }
.upload-zone, .profile-photo-upload { position: relative; }
.visually-hidden-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}
.file-picker { display: flex; width: min(100%, 390px); align-items: center; justify-content: center; gap: 12px; padding: 7px; border: 1px solid #e1e8ef; border-radius: 10px; background: #fff; }
.file-picker-button { min-height: 35px; padding: 0 14px; border: 1px solid #d2e3f2; border-radius: 8px; background: #edf6ff; color: #28679f; cursor: pointer; font-size: 11px; font-weight: 700; transition: transform .18s, background .18s, box-shadow .18s; }
.file-picker-button:hover { transform: translateY(-1px); background: #e1f0ff; box-shadow: 0 4px 12px rgba(40, 103, 159, .12); }
.file-picker-name { max-width: min(250px, 55vw); overflow: hidden; color: #8897a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-picker.has-file { border-color: #bdd8ef; background: #f7fbff; }
.file-picker.has-file .file-picker-name { color: #3d627f; font-weight: 600; }
.profile-photo-upload .file-picker { width: 100%; justify-content: flex-start; margin-top: 9px; }
@media (max-width: 680px) {
    .upload-zone .file-picker { justify-content: center; gap: 7px; }
    .file-picker { gap: 7px; }
    .file-picker-button { padding: 0 10px; }
}
.employee-profile-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 25px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid #e5edf4;
    border-radius: 16px;
    background: linear-gradient(130deg, #fff 10%, #f7faff 100%);
    box-shadow: 0 12px 34px rgba(28, 51, 73, .07);
}
.employee-portrait { display: grid; align-content: start; justify-items: center; gap: 12px; }
.employee-portrait img, .employee-portrait > span {
    display: grid;
    width: 190px;
    height: 230px;
    place-items: center;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 15px;
    background: linear-gradient(145deg, #dbeafa, #b9d2ec);
    box-shadow: 0 10px 28px rgba(33, 73, 111, .16);
    color: #2b6190;
    font-size: 66px;
    font-weight: 700;
}
.employee-portrait img { object-fit: cover; }
.employee-portrait small { color: #8697a7; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.employee-profile-content { min-width: 0; }
.employee-profile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.employee-profile-top h2 { margin: 6px 0; color: #233b51; font-size: clamp(19px, 2.3vw, 27px); letter-spacing: -.45px; }
.employee-profile-top p { margin: 0; color: #7c8d9d; font-size: 11px; }
.employee-profile-top .banner-actions { justify-content: flex-end; }
.employee-profile-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 20px; margin-top: 23px; padding: 19px 0; border-top: 1px solid #eaf0f5; border-bottom: 1px solid #eaf0f5; }
.employee-profile-details > div, .employee-score-cards > div { display: grid; min-width: 0; gap: 6px; }
.employee-profile-details small, .employee-score-cards small { color: #8796a4; font-size: 9px; font-weight: 700; letter-spacing: .45px; }
.employee-profile-details strong { overflow-wrap: anywhere; color: #344b60; font-size: 11px; font-weight: 650; }
.employee-score-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.employee-score-cards > div { min-height: 94px; align-content: center; padding: 13px; border: 1px solid #e7edf3; border-radius: 11px; background: rgba(255, 255, 255, .85); }
.employee-score-cards strong { color: #2c455b; font-size: 19px; letter-spacing: -.3px; }
.employee-score-cards span { color: #92a0ad; font-size: 9px; line-height: 1.4; }
.employee-score-cards .employee-score-total { border-color: #d9eafa; background: linear-gradient(145deg, #edf6ff, #fff); }
.employee-score-cards .employee-score-total strong { color: #246baa; font-size: 24px; }
.score-text-good { color: #218463 !important; }
.score-text-low { color: #c2674b !important; }
.employee-profile-card + .panel .metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .employee-profile-card { grid-template-columns: 170px minmax(0, 1fr); gap: 19px; padding: 19px; }
    .employee-portrait img, .employee-portrait > span { width: 155px; height: 195px; }
    .employee-score-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .employee-profile-card + .panel .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .report-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .report-filters select, .report-filters input { width: 100%; min-width: 0; }
    .report-filters select { grid-column: 1 / -1; }
    .employee-profile-card { grid-template-columns: minmax(0, 1fr); justify-items: stretch; padding: 16px; }
    .employee-portrait img, .employee-portrait > span { width: 155px; height: 190px; }
    .employee-profile-top { flex-direction: column; }
    .employee-profile-top .banner-actions { justify-content: flex-start; }
    .employee-profile-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .employee-score-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .employee-profile-card + .panel .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.topbar-controls { display: flex; align-items: center; gap: 18px; }
.theme-toggle {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #dce5ed;
    border-radius: 20px;
    background: #f7f9fc;
    color: #40566a;
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
    transition: color .3s ease, background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.theme-toggle:hover { border-color: #9abde0; background: #eaf4ff; box-shadow: 0 4px 14px rgba(37, 105, 163, .12); }
.theme-toggle-icon { display: inline-grid; width: 17px; place-items: center; color: #3479b5; font-size: 16px; }
.theme-toggle-label { min-width: 33px; text-align: left; }

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e2ebf4;
    --muted: #a1b2c3;
    --line: #2a3d50;
    --canvas: #111c28;
    --nav: #0c1722;
    --nav-muted: #9aabba;
    --blue: #71b7ff;
    --blue-dark: #9bceff;
    --green: #61d4aa;
    --shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] body.app-body { color: var(--ink); background: var(--canvas); }
html[data-theme="dark"] .sidebar { background: var(--nav); }
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active { background: #1b3348; color: #f0f7ff; }
html[data-theme="dark"] .nav-link.active { box-shadow: inset 3px 0 #55b3ff; }
html[data-theme="dark"] .main-area,
html[data-theme="dark"] .content { background: var(--canvas); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .footer { border-color: var(--line); background: #172432; color: #a8b8c8; }
html[data-theme="dark"] .topbar strong,
html[data-theme="dark"] .topbar-user { color: #e0eaf3; }
html[data-theme="dark"] .menu-toggle { color: #dce8f3; }
html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] .panel-heading h2,
html[data-theme="dark"] .empty-state h2,
html[data-theme="dark"] .empty-state h3 { color: #e1ebf5; }
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .today-date,
html[data-theme="dark"] .muted { color: #9aabbd; }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .employee-profile-card,
html[data-theme="dark"] .app-modal,
html[data-theme="dark"] .floating-toast { border-color: #2a3e52; background-color: #1a2938; color: #dce6f0; }
html[data-theme="dark"] .panel-heading { border-color: #2a3d50; background: #1a2938; }
html[data-theme="dark"] .panel-heading p,
html[data-theme="dark"] .stat-top,
html[data-theme="dark"] .stat-card small,
html[data-theme="dark"] .empty-state p,
html[data-theme="dark"] .empty-inline,
html[data-theme="dark"] .summary-note,
html[data-theme="dark"] .cell-sub,
html[data-theme="dark"] .employee-profile-details small,
html[data-theme="dark"] .employee-score-cards span { color: #9aabbd; }
html[data-theme="dark"] .stat-card > strong,
html[data-theme="dark"] .summary-note strong,
html[data-theme="dark"] .employee-profile-details strong,
html[data-theme="dark"] .employee-score-cards strong { color: #e0eaf4; }
html[data-theme="dark"] .data-table { color: #d4e0eb; }
html[data-theme="dark"] .data-table th { background: #1b2b3a; color: #aab9c8; }
html[data-theme="dark"] .data-table td { border-color: #2a3b4c; color: #c0cedb; }
html[data-theme="dark"] .data-table td strong { color: #e0eaf4; }
html[data-theme="dark"] .data-table tbody tr:hover,
html[data-theme="dark"] .data-table tbody tr:hover > td { background-color: #174b70; color: #f0f8ff; }
html[data-theme="dark"] .data-table tbody tr:hover > td:first-child { box-shadow: inset 4px 0 #65c1ff; }
html[data-theme="dark"] .data-table tbody tr:hover > td strong { color: #fff; }
html[data-theme="dark"] .data-table tbody tr :is(.button, .score-pill, .type-tag, .status-pill):hover { transform: none; box-shadow: none; }
html[data-theme="dark"] .type-tag { background: #26394b; color: #c4d5e5; }
html[data-theme="dark"] .unassigned-tag { background: #49391f; color: #f2c77c; }
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .button-plain { border-color: #3a5065; background: #223446; color: #d9e5f0; }
html[data-theme="dark"] .button-secondary:hover,
html[data-theme="dark"] .button-plain:hover { border-color: #6388a8; background: #2b4358; color: #fff; }
html[data-theme="dark"] .report-action-buttons .button-secondary { border-color: #497092; background: #263f54; color: #d9edff; }
html[data-theme="dark"] .report-action-buttons .button-secondary:hover { border-color: #70a9d5; background: #315a78; color: #fff; }
html[data-theme="dark"] .button-return-action { border-color: #54728c; background: #263d52; color: #d9edff; }
html[data-theme="dark"] .button-return-action:hover { border-color: #78a8ce; background: #31536e; color: #fff; }
html[data-theme="dark"] .button-banner-action { border-color: rgba(220, 238, 255, .8); box-shadow: 0 2px 9px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .button-danger { border-color: #69423e; background: #3c2a2a; color: #ffb9a8; }
html[data-theme="dark"] .button-danger:hover { border-color: #9c5c51; background: #4b302f; color: #ffd3c9; }
html[data-theme="dark"] .button-light { background: #e4f2ff; color: #204c70; }
html[data-theme="dark"] .form-stack input:not([type="checkbox"]):not([type="file"]),
html[data-theme="dark"] .form-stack select,
html[data-theme="dark"] .search-form input,
html[data-theme="dark"] .search-form select,
html[data-theme="dark"] .filter-form select,
html[data-theme="dark"] .employee-filters input,
html[data-theme="dark"] .employee-filters select,
html[data-theme="dark"] .assignment-toolbar select,
html[data-theme="dark"] .sanction-inline-form select,
html[data-theme="dark"] .sanction-inline-form textarea,
html[data-theme="dark"] .room-name-edit input,
html[data-theme="dark"] .form-stack textarea { border-color: #3a5064; background-color: #142230; color: #e0eaf4; }
html[data-theme="dark"] .user-table-search input { border-color: #3a5064; background: #142230; color: #e0eaf4; }
html[data-theme="dark"] .user-table-search input:focus { border-color: #6da5d7; background: #182b3c; }
html[data-theme="dark"] .content input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
html[data-theme="dark"] .content select,
html[data-theme="dark"] .content textarea,
html[data-theme="dark"] .activity-filter-form input,
html[data-theme="dark"] .activity-filter-form select { border-color: #3a5064; background-color: #142230; color: #e0eaf4; }
html[data-theme="dark"] .form-stack label,
html[data-theme="dark"] .assignment-toolbar > label,
html[data-theme="dark"] .selection-toolbar,
html[data-theme="dark"] .checkbox-label,
html[data-theme="dark"] .activity-filter-form label { color: #c3d0dc; }
html[data-theme="dark"] .form-stack label small { color: #9aabbd; }
html[data-theme="dark"] .button-primary { background: #286fae; color: #fff; }
html[data-theme="dark"] .button-primary:hover { background: #347fbe; color: #fff; }
html[data-theme="dark"] .form-stack input::placeholder,
html[data-theme="dark"] .search-form input::placeholder,
html[data-theme="dark"] .sanction-inline-form textarea::placeholder { color: #8ea1b3; }
html[data-theme="dark"] .upload-zone,
html[data-theme="dark"] .profile-photo-upload,
html[data-theme="dark"] .file-picker { border-color: #3a5064; background: #172634; }
html[data-theme="dark"] .upload-zone strong,
html[data-theme="dark"] .profile-photo-upload > label { color: #e1ebf4; }
html[data-theme="dark"] .file-picker-button { border-color: #3b5b77; background: #233d53; color: #c5e3ff; }
html[data-theme="dark"] .file-picker-name { color: #a6b7c7; }
html[data-theme="dark"] .room-row,
html[data-theme="dark"] .user-edit,
html[data-theme="dark"] .employee-identity,
html[data-theme="dark"] .employee-metrics,
html[data-theme="dark"] .bulk-employee-actions,
html[data-theme="dark"] .remove-assignment-form,
html[data-theme="dark"] .selection-toolbar,
html[data-theme="dark"] .assignment-toolbar,
html[data-theme="dark"] .panel-foot { border-color: #2a3d50; }
html[data-theme="dark"] .room-name-edit,
html[data-theme="dark"] .room-archived-name span,
html[data-theme="dark"] .room-archived-name strong,
html[data-theme="dark"] .user-summary strong,
html[data-theme="dark"] .user-summary small,
html[data-theme="dark"] .user-table-identity > strong,
html[data-theme="dark"] .pagination { color: #bdcbd8; }
html[data-theme="dark"] .room-count { color: #9aabbd; }
html[data-theme="dark"] .bulk-employee-actions .checkbox-label { color: #c3d0dc; }
html[data-theme="dark"] .user-edit summary:hover,
html[data-theme="dark"] .user-modal-row { color: #e0eaf4; }
html[data-theme="dark"] .report-banner { box-shadow: 0 10px 30px rgba(0, 0, 0, .23); }
html[data-theme="dark"] .metric-grid small { color: #9aabbd; }
html[data-theme="dark"] .metric-grid strong { color: #dce7f1; }
html[data-theme="dark"] .section-heading h2 { color: #e1ebf5; }
html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .report-snapshot-top small,
html[data-theme="dark"] .report-snapshot-primary span { color: #9aabbd; }
html[data-theme="dark"] .section-heading > span { background: #263b50; color: #bedcff; }
html[data-theme="dark"] .report-snapshot-card { border-color: #2a3e52; background: #1a2938; }
html[data-theme="dark"] .report-snapshot-mark { background: color-mix(in srgb, var(--snapshot-accent) 24%, #1a2938); }
html[data-theme="dark"] .report-snapshot-card h3 { color: #e0eaf4; }
html[data-theme="dark"] .report-snapshot-metrics span { background: #223446; color: #c1d0de; }
html[data-theme="dark"] .report-snapshot-card > a { border-color: #2a3d50; }
html[data-theme="dark"] .chart-tooltip .chart-tooltip-category { border-color: #34495c; }
html[data-theme="dark"] .employee-profile-card { background: linear-gradient(130deg, #1a2938 10%, #1c2d3f 100%); }
html[data-theme="dark"] .employee-profile-top h2 { color: #e8f2fc; }
html[data-theme="dark"] .employee-profile-top p { color: #b4c4d3; }
html[data-theme="dark"] .employee-score-cards > div { border-color: #344a5e; background: #203244; }
html[data-theme="dark"] .employee-score-cards .employee-score-total { border-color: #3a5b78; background: linear-gradient(145deg, #203a50, #1b2c3c); }
html[data-theme="dark"] .employee-score-cards .employee-score-total strong { color: #8fcaff; }
html[data-theme="dark"] .app-modal-header { border-color: #2a3d50; background: rgba(26, 41, 56, .96); }
html[data-theme="dark"] .app-modal-header h2,
html[data-theme="dark"] .app-modal-kicker { color: #dce7f1; }
html[data-theme="dark"] .app-modal-close,
html[data-theme="dark"] .floating-toast-close { background: #293c4e; color: #c1d0dd; }
html[data-theme="dark"] .floating-toast-message { color: #dce7f1; }
html[data-theme="dark"] .comparison-columns h3,
html[data-theme="dark"] .comparison-columns li { color: #d5e0ea; }
html[data-theme="dark"] .comparison-columns li { border-color: #2a3d50; }
html[data-theme="dark"] .comparison-columns h3 span { background: #253b50; color: #b8d9f7; }
html[data-theme="dark"] .theme-toggle { border-color: #3b5268; background: #24374a; color: #e7d79c; }
html[data-theme="dark"] .theme-toggle:hover { border-color: #7895ae; background: #2c4359; }
html[data-theme="dark"] .theme-toggle-icon { color: #ffdb78; }
html[data-theme="dark"] .avatar-light { background: #293e52; color: #c4e2ff; }
html[data-theme="dark"] .chart-tooltip { border-color: #3a5064; background: #1a2938; color: #e0eaf4; }
html[data-theme="dark"] .chart-legend,
html[data-theme="dark"] .chart-caption { color: #aab9c8; }

@media (max-width: 680px) {
    .topbar-controls { gap: 8px; }
    .theme-toggle { min-height: 34px; gap: 5px; padding: 0 9px; }
    .theme-toggle-label { min-width: 0; }
}
