:root {
    --navy: #12233f;
    --navy-soft: #1a3155;
    --blue: #2f6fed;
    --blue-soft: #eaf1ff;
    --ink: #192235;
    --muted: #6c7890;
    --line: #e4e9f1;
    --surface: #ffffff;
    --background: #f4f7fb;
    --success: #17865b;
    --danger: #b42335;
    --shadow: 0 18px 45px rgba(23, 38, 68, .10);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--background); }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.guest-body { display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 15% 10%, #dce9ff 0, transparent 34%), var(--background); }
.guest-shell { width: min(1080px, 100%); }
.login-card { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 650px; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.login-visual { display: flex; flex-direction: column; justify-content: space-between; padding: 54px; color: white; background: linear-gradient(145deg, #12233f, #234f8c); position: relative; overflow: hidden; }
.login-visual::after { content: ""; position: absolute; width: 340px; height: 340px; right: -150px; bottom: -110px; border: 70px solid rgba(255,255,255,.06); border-radius: 50%; }
.login-visual h1 { max-width: 500px; margin: 12px 0 18px; font-size: clamp(32px, 4vw, 52px); line-height: 1.08; letter-spacing: -.035em; }
.login-visual p { max-width: 450px; color: #dbe7fa; line-height: 1.7; }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: .05em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: white; background: var(--blue); font-weight: 900; }
.brand-mark.large { width: 44px; height: 44px; background: white; color: var(--navy); }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 64px; }
.form-heading { margin-bottom: 30px; }
.form-heading h2 { margin: 8px 0; font-size: 30px; letter-spacing: -.02em; }
.form-heading p:last-child { color: var(--muted); }
.eyebrow { margin: 0; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.light { color: #bcd3f6; }
.form-stack { display: grid; gap: 20px; }
.form-stack label { display: grid; gap: 8px; color: #354058; font-size: 14px; font-weight: 700; }
.form-stack input { width: 100%; padding: 14px 16px; border: 1px solid #d7deea; border-radius: 11px; outline: none; transition: border .2s, box-shadow .2s; }
.form-stack input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px; font-weight: 750; cursor: pointer; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(47,111,237,.24); }
.button-primary:hover { background: #265fc8; }
.button-block { width: 100%; min-height: 50px; margin-top: 6px; }
.button-quiet { color: #536079; background: #edf1f7; }
.alert { margin-bottom: 22px; padding: 13px 15px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.alert-error { color: var(--danger); background: #fff0f1; border: 1px solid #ffd4d8; }
.alert-success { color: var(--success); background: #eaf9f2; border: 1px solid #c7efde; }

.app-body { display: flex; background: var(--background); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 275px; padding: 26px 18px 34px; color: white; background: #000000; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #405779 transparent; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand span:last-child { display: grid; }
.brand small { color: #90a2bf; font-size: 11px; }
.navigation { display: grid; gap: 6px; }
.nav-caption { margin: 20px 12px 7px; color: #6f84a4; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 0 11px; border-radius: 10px; color: #c8d3e3; font-size: 14px; }
.nav-item > span { display: grid; place-items: center; flex: 0 0 40px; width: 40px; min-height: 40px; color: #91a7c8; font-size: 28px; line-height: 1; text-align: center; }
.nav-item.active { color: white; background: var(--blue); }
.nav-item.active > span { color: white; }
.nav-item small { margin-left: auto; color: #7085a4; font-size: 9px; }
.nav-item.disabled { cursor: default; }
.app-shell { width: calc(100% - 275px); min-height: 100vh; margin-left: 275px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 90px; padding: 18px 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.topbar h1 { margin: 4px 0 0; font-size: 24px; }
.user-menu { display: flex; align-items: center; gap: 12px; }
.theme-toggle { display:flex; align-items:center; gap:7px; min-height:40px; margin-left:0; padding:0 11px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--surface); cursor:pointer; }
.theme-toggle span { font-size:20px; line-height:1; }.theme-toggle small { color:var(--muted); font-size:10px; font-weight:800; }
.manual-button { display:flex; align-items:center; gap:7px; min-height:40px; margin-left:auto; padding:0 11px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--surface); }
.manual-button span { display:grid; place-items:center; width:21px; height:21px; border-radius:50%; color:white; background:var(--blue); font-size:12px; font-weight:900; }
.manual-button small { color:var(--muted); font-size:10px; font-weight:800; }.manual-button.active { border-color:var(--blue); background:var(--blue-soft); }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-weight: 850; }
.employee-photo, .profile-photo, .photo-preview { object-fit: cover; background: #eef3fb; }
.employee-photo { display: block; flex: 0 0 42px; }
.profile-photo { display: block; }
.photo-upload-row { display: flex; align-items: center; gap: 14px; }
.photo-upload-row > span { flex: 1; }
.photo-preview { width: 76px; height: 76px; border-radius: 18px; border: 1px solid var(--line); }
.user-copy { display: grid; min-width: 115px; font-size: 13px; }
.user-copy small { color: var(--muted); }
.content { width: 100%; margin: 0; padding: 34px 38px 60px; }
.welcome-panel { display: flex; align-items: center; justify-content: space-between; padding: 30px 34px; border-radius: 18px; color: white; background: linear-gradient(120deg, #18365f, #2e6dd5); box-shadow: var(--shadow); }
.welcome-panel h2 { margin: 8px 0; font-size: 28px; }
.welcome-panel p:last-child { margin-bottom: 0; color: #d9e6fa; }
.status-pill { flex: 0 0 auto; padding: 9px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0; }
.stat-card { display: flex; align-items: center; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.stat-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-weight: 850; }
.stat-icon.blue { color: #2463d4; background: #eaf1ff; }
.stat-icon.orange { color: #ad6118; background: #fff2df; }
.stat-icon.green { color: #16815a; background: #e3f7ef; }
.stat-card div { display: grid; gap: 4px; }
.stat-card small { color: var(--muted); }
.stat-card strong { font-size: 27px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 5px 0 0; }
.badge { padding: 7px 11px; border-radius: 99px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 750; }
.checklist { display: grid; }
.check-row { display: flex; align-items: center; gap: 15px; padding: 19px 0; border-bottom: 1px solid #edf0f5; }
.check-row:last-child { border: 0; padding-bottom: 0; }
.check-row > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #77849a; background: #edf1f6; font-weight: 800; }
.check-row.complete > span { color: white; background: var(--success); }
.check-row div { display: grid; gap: 4px; }
.check-row small { color: var(--muted); }
.error-card { padding: 60px; border-radius: 20px; background: white; box-shadow: var(--shadow); text-align: center; }
.error-code { margin: 0; color: var(--blue); font-size: 72px; font-weight: 900; }
.error-card .button { margin-top: 18px; }
.module-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.module-hero h2 { margin: 7px 0; font-size: 27px; }
.module-hero p:last-child { max-width: 700px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.empty-module { display: grid; justify-items: center; padding: 70px 30px; text-align: center; }
.empty-module h3 { margin: 16px 0 7px; font-size: 23px; }
.empty-module p { max-width: 580px; margin: 0 0 24px; color: var(--muted); line-height: 1.7; }
.empty-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; color: var(--blue); background: var(--blue-soft); font-size: 30px; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { padding: 10px 14px; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 800; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel { position: absolute; z-index: 20; top: 48px; right: 0; display: grid; width: min(320px, 85vw); max-height: 70vh; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); overflow-y: auto; }
.mobile-menu-panel strong { margin: 13px 10px 5px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.mobile-menu-panel a { padding: 10px; border-radius: 8px; font-size: 13px; }
.mobile-menu-panel a.active { color: white; background: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-actions.compact { align-items: flex-start; }
.page-actions h2 { margin: 7px 0 3px; font-size: 28px; }
.page-actions p { margin: 0; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--blue); font-size: 13px; font-weight: 750; }
.table-panel { padding: 0; overflow: hidden; }
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.filter-bar label { flex: 0 0 190px; }
.filter-bar .search-field { flex: 1 1 auto; }
.filter-bar input, .filter-bar select, .status-panel select { width: 100%; min-height: 42px; padding: 0 13px; border: 1px solid #d7deea; border-radius: 9px; color: var(--ink); background: white; outline: none; }
.button-link { color: var(--blue); background: transparent; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.data-table th { padding: 13px 18px; color: var(--muted); background: #f8fafd; font-size: 11px; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 16px 18px; border-top: 1px solid #edf0f5; vertical-align: middle; font-size: 13px; }
.data-table td > small, .table-primary { display: block; }
.data-table td > small { margin-top: 3px; color: var(--muted); }
.person-cell { display: flex; align-items: center; gap: 11px; min-width: 215px; }
.person-cell > span:last-child { display: grid; gap: 3px; }
.person-cell small { color: var(--muted); font-size: 11px; }
.table-action { text-align: right; }
.table-action a { color: var(--blue); font-weight: 750; }
.empty-cell { padding: 50px !important; color: var(--muted); text-align: center; }
.status-badge { display: inline-flex; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-active { color: #137653; background: #e4f7ef; }
.status-inactive { color: #68748a; background: #edf0f5; }
.status-resigned { color: #9b4d18; background: #fff0df; }
.status-retired { color: #6c46a2; background: #f1eafa; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination a { color: var(--blue); font-weight: 750; }
.employee-form { display: grid; gap: 20px; }
.form-section { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.form-section-heading { display: flex; gap: 14px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.form-section-heading > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 850; }
.form-section-heading h3 { margin: 0 0 4px; font-size: 18px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; gap: 20px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid label { display: grid; align-content: start; gap: 7px; color: #39445a; font-size: 12px; font-weight: 750; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #d7deea; border-radius: 9px; color: var(--ink); background: white; outline: none; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,237,.1); }
.form-grid .span-two { grid-column: span 2; }
.field-error { min-height: 14px; color: var(--danger); font-size: 10px; font-weight: 650; }
.form-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: 0 -8px 25px rgba(23,38,68,.06); }
.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.profile-identity { display: flex; align-items: center; gap: 17px; }
.profile-avatar { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 20px; color: white; background: linear-gradient(135deg, #2f6fed, #153d83); font-size: 28px; font-weight: 900; }
.profile-identity h2 { margin: 2px 0 4px; font-size: 27px; }
.profile-identity p { margin: 0; color: var(--muted); }
.profile-actions { display: flex; align-items: center; gap: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.detail-card { padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.detail-card h3 { margin: 0 0 17px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 17px; }
.detail-card dl { display: grid; gap: 0; margin: 0; }
.detail-card dl > div { display: grid; grid-template-columns: 145px 1fr; gap: 15px; padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.detail-card dl > div:last-child { border: 0; }
.detail-card dt { color: var(--muted); font-size: 11px; }
.detail-card dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.status-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; }
.status-panel h3 { margin: 0 0 5px; }
.status-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.status-panel form { display: flex; gap: 9px; }
.status-panel select { min-width: 170px; }
.organization-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
.organization-section { display: grid; gap: 20px; min-width: 0; }
.organization-form-panel { padding: 22px; }
.compact-heading { padding-bottom: 16px; }
.compact-heading h3 { margin: 5px 0 0; }
.master-form { display: grid; gap: 16px; padding-top: 20px; }
.master-form label { display: grid; gap: 7px; color: #39445a; font-size: 12px; font-weight: 750; }
.master-form input, .master-form select { width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid #d7deea; border-radius: 9px; color: var(--ink); background: white; outline: none; }
.master-form input:focus, .master-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,237,.1); }
.master-form-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 13px; }
.master-form .button { justify-self: end; }
.section-table-title { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; }
.organization-table { min-width: 610px; }
.organization-table-panel { overflow: hidden; }
.organization-table .table-action { min-width: 125px; }
.organization-table .table-action > a, .inline-form { display: inline-block; margin-left: 8px; }
.organization-table .table-action > a:first-child { margin-left: 0; }
.text-button { padding: 0; border: 0; color: var(--muted); background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--danger); }
.readonly-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.device-ready { color: var(--success); background: #e7f8f0; border-color: #c6eddd; }
.device-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.device-guide { display: flex; align-items: center; gap: 13px; padding: 17px; }
.device-guide-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 850; }
.device-guide div { display: grid; gap: 3px; }
.device-guide small, .section-table-title small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.device-layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.device-form-panel { padding: 22px; }
.device-endpoint-row { display: grid; grid-template-columns: 1fr 95px; gap: 12px; }
.form-hint { color: var(--muted); font-size: 10px; font-weight: 500; }
.device-list-panel { min-width: 0; }
.section-table-title > div { display: grid; gap: 3px; }
.device-card-list { display: grid; }
.device-card { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; padding: 20px; border-top: 1px solid var(--line); }
.device-card-main { display: flex; align-items: center; gap: 13px; }
.device-card-main > div, .device-metrics { display: grid; gap: 4px; }
.device-card-main small, .device-metrics small { color: var(--muted); font-size: 11px; }
.device-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 23px; }
.device-metrics { justify-items: end; text-align: right; }
.connection-state { padding: 5px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.connection-online { color: var(--success); background: #e4f7ef; }
.connection-offline { color: var(--danger); background: #fff0f1; }
.connection-unknown { color: var(--muted); background: #edf0f5; }
.device-error { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-radius: 8px; color: var(--danger); background: #fff4f5; font-size: 11px; }
.device-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.device-actions .button { min-height: 36px; padding: 0 13px; font-size: 11px; }
.button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.sync-history-panel { margin-top: 20px; }
.sync-badge { display: inline-flex; padding: 5px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.sync-completed { color: var(--success); background: #e4f7ef; }
.sync-failed { color: var(--danger); background: #fff0f1; }
.sync-running { color: #9b6418; background: #fff2df; }
.shift-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.shift-stats article { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.shift-stats small { color: var(--muted); }
.shift-stats strong { font-size: 24px; }
.shift-layout { display: grid; grid-template-columns: 450px 1fr; gap: 20px; align-items: start; }
.shift-form-panel { padding: 22px; }
.time-fieldset, .day-fieldset { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; transition: opacity .2s; }
.time-fieldset legend, .day-fieldset legend { padding: 0 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fieldset-disabled { opacity: .4; }
.time-input-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 13px; }
.time-input-grid:last-child { margin-bottom: 0; }
.toggle-row { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.toggle-row label { display: flex; align-items: center; grid-template-columns: auto 1fr; gap: 7px; }
.toggle-row input { width: auto; min-height: 0; }
.day-selector { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-selector label { display: block; }
.day-selector input { position: absolute; opacity: 0; pointer-events: none; }
.day-selector span { display: grid; place-items: center; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: white; font-size: 10px; cursor: pointer; }
.day-selector input:checked + span { color: white; border-color: var(--blue); background: var(--blue); }
.shift-meta-row { display: grid; grid-template-columns: 1fr 70px; gap: 12px; }
.shift-meta-row input[type="color"] { padding: 5px; }
.shift-list { display: grid; gap: 15px; min-width: 0; }
.shift-card { position: relative; display: grid; gap: 15px; padding: 22px 22px 19px 28px; overflow: hidden; }
.shift-disabled { opacity: .68; }
.shift-color { position: absolute; inset: 0 auto 0 0; width: 6px; }
.shift-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.shift-card-heading h3 { margin: 4px 0 0; font-size: 19px; }
.shift-code { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .09em; }
.shift-time { display: grid; gap: 4px; }
.shift-time strong { font-size: 25px; letter-spacing: -.02em; }
.shift-time small { color: var(--muted); }
.shift-days { display: flex; gap: 6px; }
.shift-days span { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 7px; color: #9aa4b5; background: #f0f3f7; font-size: 9px; font-weight: 800; }
.shift-days span.selected { color: var(--blue); background: var(--blue-soft); }
.shift-details { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.shift-actions { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.shift-actions .button { min-height: 35px; font-size: 11px; }
.calendar-layout { display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.calendar-form-panel { padding: 22px; }
.calendar-form-panel textarea { width: 100%; padding: 10px 12px; border: 1px solid #d7deea; border-radius: 9px; color: var(--ink); font: inherit; resize: vertical; }
.calendar-date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calendar-panel { padding: 0; overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; border-bottom: 1px solid var(--line); text-align: center; }
.calendar-toolbar h3 { margin: 4px 0 0; }
.calendar-nav { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-weight: 850; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays span { padding: 10px 4px; color: var(--muted); background: #f8fafd; font-size: 10px; font-weight: 800; text-align: center; }
.calendar-day { min-width: 0; min-height: 104px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: white; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside-month { background: #fafbfd; opacity: .55; }
.calendar-date-number { display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 5px; border-radius: 50%; font-size: 11px; font-weight: 750; }
.calendar-day.today .calendar-date-number { color: white; background: var(--blue); }
.calendar-day-events { display: grid; gap: 3px; }
.calendar-event-pill { display: block; padding: 3px 5px; border-left: 3px solid var(--event-color); border-radius: 4px; color: #364158; background: color-mix(in srgb, var(--event-color) 10%, white); font-size: 8px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-inactive { opacity: .42; text-decoration: line-through; }
.calendar-day-events small { color: var(--muted); font-size: 8px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 13px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.calendar-legend span { display: flex; align-items: center; gap: 5px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-national_holiday i { background: #D6455D; }
.legend-collective_leave i { background: #8B5CF6; }
.legend-company_holiday i { background: #F59E0B; }
.legend-special_workday i { background: #17865B; }
.calendar-list-panel { margin-top: 20px; }
.calendar-table td:first-child { position: relative; padding-left: 32px; }
.event-title-dot { position: absolute; top: 20px; left: 17px; width: 7px; height: 7px; border-radius: 50%; }
.operation-layout { display: grid; grid-template-columns: 350px 1fr; gap: 20px; align-items: start; }
.operation-layout.module-work_schedule { grid-template-columns:440px 1fr; }
.operation-layout.module-payroll { grid-template-columns:440px 1fr; }
.operation-layout.without-form { grid-template-columns: 1fr; }
.database-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.database-summary .panel { display:grid; gap:7px; padding:20px 22px; }
.database-summary small { color:var(--muted); font-size:11px; font-weight:750; text-transform:uppercase; }
.database-summary strong { overflow-wrap:anywhere; font-size:20px; }
.database-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.database-action-panel > p { margin:20px 0 0; color:var(--muted); line-height:1.65; }
.restore-warning { margin-top:20px; padding:14px 16px; border-left:4px solid var(--danger); background:#fff5f5; }
.restore-warning strong { color:var(--danger); }
.restore-warning p { margin:5px 0 0; color:#5d3440; font-size:12px; line-height:1.55; }
.button-danger { color:#fff; background:var(--danger); }
.button:disabled { cursor:not-allowed; opacity:.5; }
.smtp-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.smtp-stats article { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; }
.smtp-stats small { color:var(--muted); font-size:11px; font-weight:750; text-transform:uppercase; }
.smtp-stats strong { font-size:21px; }
.smtp-layout { display:grid; grid-template-columns:minmax(480px,1.2fr) minmax(300px,.8fr); gap:20px; align-items:start; }
.smtp-form,.smtp-test-panel { padding:22px; }
.smtp-toggle { display:flex!important; align-items:flex-start; gap:10px; padding:13px; border:1px solid var(--line); border-radius:8px; }
.smtp-toggle input { width:auto!important; min-height:0!important; margin-top:3px; }
.smtp-toggle span { display:grid; gap:3px; }.smtp-toggle small { color:var(--muted); font-weight:500; }
.smtp-test-panel > p { margin:20px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.smtp-notes { display:grid; gap:6px; margin-top:22px; padding-top:18px; border-top:1px solid var(--line); }
.smtp-notes small { color:var(--muted); }
.payroll-email-status { display:block; margin-top:6px; font-size:9px; font-weight:750; }
.email-sent { color:var(--success); }.email-failed,.email-skipped { color:var(--danger); }.email-queued,.email-sending { color:var(--muted); }
.access-layout { display:grid; grid-template-columns:240px 1fr; gap:20px; align-items:start; }
.access-roles { display:grid; gap:8px; padding:18px; }.access-roles > strong { margin:0 8px 8px; }
.access-roles > a { display:flex; align-items:center; gap:10px; padding:10px; border-radius:8px; color:var(--muted); }.access-roles > a span { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; color:#fff; background:var(--blue); }.access-roles > a.active { color:var(--blue); background:#edf4ff; }
.access-admin-note { display:grid; gap:3px; margin-top:8px; padding:14px 10px 4px; border-top:1px solid var(--line); }.access-admin-note small { color:var(--muted); }
.access-permissions { padding:22px; }.access-permissions form { padding-top:18px; }.permission-group { margin:0 0 20px; padding:0; border:0; }.permission-group legend { width:100%; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--line); font-weight:800; }
.permission-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.permission-grid label { display:flex; align-items:flex-start; gap:10px; min-width:0; padding:11px; border:1px solid var(--line); border-radius:8px; }.permission-grid input { flex:0 0 auto; margin-top:3px; }.permission-grid span { display:grid; min-width:0; gap:3px; }.permission-grid small { color:var(--muted); overflow-wrap:anywhere; }
.salary-grade-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.salary-grade-stats article { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; }
.salary-grade-stats small { color:var(--muted); }.salary-grade-stats strong { font-size:20px; }
.salary-grade-layout { display:grid; grid-template-columns:minmax(330px,.85fr) minmax(390px,1.15fr); gap:20px; align-items:start; margin-bottom:20px; }
.salary-grade-form,.salary-assignment-form { padding:22px; }
.salary-money-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.salary-money-grid label:first-child { grid-column:1/-1; }
.salary-check { display:flex!important; align-items:center; gap:9px; }.salary-check input { width:auto!important; }
.salary-overrides { padding:13px 14px; border:1px solid var(--line); border-radius:10px; }
.salary-overrides summary { cursor:pointer; font-size:11px; font-weight:800; }.salary-overrides > p { margin:8px 0 13px; color:var(--muted); font-size:9px; }
.salary-grade-table { margin-bottom:20px; }.salary-grade-table .data-table td:nth-child(2) small { display:block; margin:3px 0; }
.operation-form-panel { padding: 22px; }
.operation-form-panel textarea { width:100%; padding:10px 12px; border:1px solid #d7deea; border-radius:9px; font:inherit; resize:vertical; }
.operation-table-panel { min-width:0; }
.operation-detail { display:block; margin:2px 0!important; }
.operation-detail b { color:#4a566d; }
.operation-status-form { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin-top:7px; }
.operation-status-form select { max-width:125px; padding:5px; border:1px solid var(--line); border-radius:6px; font-size:10px; }
.employee-picker { display:grid; gap:8px; }
.employee-picker-label { color:#39445a; font-size:12px; font-weight:750; }
.employee-picker-toolbar { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:9px; }
.employee-picker-toolbar > input[type="search"] { width:100%; min-height:40px; padding:8px 11px; border:1px solid #d7deea; border-radius:9px; color:var(--ink); background:white; }
.employee-picker-toolbar label { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; white-space:nowrap; }
.employee-picker-toolbar input[type="checkbox"],.employee-picker-option input[type="checkbox"] { flex:0 0 16px; width:16px; min-height:16px; margin:0; accent-color:var(--blue); }
.employee-picker-toolbar > small { color:var(--muted); font-size:9px; white-space:nowrap; }
.employee-picker-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; max-height:310px; padding:8px; border:1px solid var(--line); border-radius:10px; background:#f8fafd; overflow-y:auto; }
.employee-picker-list > p { grid-column:1/-1; margin:20px; color:var(--muted); font-size:11px; text-align:center; }
.employee-picker-option { display:flex!important; align-items:center!important; grid-template-columns:none!important; gap:8px!important; min-width:0; padding:9px; border:1px solid transparent; border-radius:8px; color:var(--ink)!important; background:white; cursor:pointer; }
.employee-picker-option:has(input:checked) { border-color:#9bbaff; background:var(--blue-soft); }
.employee-picker-option > span { display:grid; gap:2px; min-width:0; }
.employee-picker-option strong,.employee-picker-option small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.employee-picker-option strong { font-size:10px; }.employee-picker-option small { color:var(--muted); font-size:9px; }
.employee-picker-option[hidden] { display:none!important; }
.report-filter { display:flex; align-items:end; gap:14px; margin-bottom:20px; padding:18px; }
.report-filter label { display:grid; gap:6px; color:var(--muted); font-size:11px; font-weight:700; }
.report-filter input { min-height:40px; padding:8px 11px; border:1px solid var(--line); border-radius:8px; }
.report-stats { grid-template-columns:repeat(3,1fr); }

.dashboard-hero { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:30px 34px; border-radius:20px; color:white; background:linear-gradient(120deg,#17345c 0%,#2459a4 58%,#2f6fed 100%); box-shadow:var(--shadow); overflow:hidden; position:relative; }
.dashboard-hero::after { content:""; position:absolute; width:240px; height:240px; right:-80px; bottom:-150px; border:38px solid rgba(255,255,255,.07); border-radius:50%; }
.dashboard-hero > * { position:relative; z-index:1; }
.dashboard-hero h2 { margin:7px 0 8px; font-size:29px; letter-spacing:-.02em; }
.dashboard-hero p:last-child { margin:0; color:#dbe7fa; font-size:13px; }
.dashboard-hero-actions { display:grid; justify-items:end; gap:12px; }
.hero-link { color:white; font-size:12px; font-weight:800; }
.dashboard-stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; margin:20px 0; }
.dashboard-stat-card { display:flex; align-items:center; gap:14px; min-width:0; padding:20px; border:1px solid var(--line); border-radius:16px; background:white; transition:transform .18s,box-shadow .18s; }
.dashboard-stat-card:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(23,38,68,.09); }
.dashboard-stat-icon { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border-radius:13px; font-size:14px; font-weight:900; }
.dashboard-stat-icon.blue { color:#2463d4; background:#eaf1ff; }
.dashboard-stat-icon.green { color:#16815a; background:#e3f7ef; }
.dashboard-stat-icon.orange { color:#ad6118; background:#fff2df; }
.dashboard-stat-icon.red { color:#b42335; background:#fff0f1; }
.dashboard-stat-card > span:last-child { display:grid; min-width:0; }
.dashboard-stat-card small { color:var(--muted); font-size:11px; }
.dashboard-stat-card strong { margin:2px 0; font-size:27px; line-height:1; }
.dashboard-stat-card em { color:#8a95a8; font-size:9px; font-style:normal; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fingerprint-live { display:grid; gap:16px; margin-bottom:18px; padding:18px 22px; border-color:#cfe8dc; background:linear-gradient(90deg,#fbfffd,#f4fbf8); }
.live-heading { display:flex; align-items:center; gap:11px; }
.live-heading > div { display:grid; gap:2px; }
.live-heading h3 { margin:0; font-size:16px; }
.live-heading > small { margin-left:auto; color:var(--success); font-size:9px; font-weight:750; }
.live-pulse { position:relative; width:10px; height:10px; border-radius:50%; background:#20a36e; }
.live-pulse::after { content:""; position:absolute; inset:-5px; border:1px solid #20a36e; border-radius:50%; animation:live-pulse 1.8s infinite; }
@keyframes live-pulse { 0%{transform:scale(.6);opacity:.8} 100%{transform:scale(1.5);opacity:0} }
.fingerprint-live.live-error { border-color:#f0ccd1; background:#fffafb; }
.fingerprint-live.live-error .live-pulse { background:var(--danger); }.fingerprint-live.live-error .live-pulse::after { border-color:var(--danger); }
.fingerprint-live.live-error .live-heading > small { color:var(--danger); }
.live-event { display:grid; grid-template-columns:56px 1fr auto; align-items:center; gap:14px; padding-top:14px; border-top:1px solid rgba(23,134,91,.13); }
.live-avatar,.toast-photo { display:grid; place-items:center; overflow:hidden; color:white; background:linear-gradient(135deg,#2f6fed,#153d83); font-weight:900; }
.live-avatar { width:56px; height:56px; border-radius:15px; font-size:20px; }
.live-avatar img,.toast-photo img { width:100%; height:100%; object-fit:cover; }
.live-person,.live-event-time { display:grid; gap:4px; min-width:0; }
.live-person strong { font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.live-person small,.live-event-time small { color:var(--muted); font-size:9px; }
.live-event-time { justify-items:end; text-align:right; }.live-event-time strong { color:var(--success); font-size:12px; }
.fingerprint-toast { position:fixed; z-index:100; right:28px; bottom:28px; display:grid; grid-template-columns:58px 1fr auto; align-items:center; gap:13px; width:min(390px,calc(100vw - 32px)); padding:16px; border:1px solid #bfe8d6; border-radius:17px; background:white; box-shadow:0 22px 60px rgba(23,38,68,.22); animation:toast-enter .25s ease-out; }
.fingerprint-toast[hidden] { display:none; }
@keyframes toast-enter { from{transform:translateY(18px);opacity:0} to{transform:translateY(0);opacity:1} }
.toast-photo { width:58px; height:58px; border-radius:15px; font-size:20px; }
.fingerprint-toast > span:nth-child(2) { display:grid; gap:2px; min-width:0; }
.fingerprint-toast small { color:var(--success); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.fingerprint-toast strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fingerprint-toast em { color:var(--muted); font-size:10px; font-style:normal; }
.fingerprint-toast button { align-self:start; padding:2px 5px; border:0; color:var(--muted); background:transparent; font-size:20px; cursor:pointer; }
.dashboard-primary-grid { display:grid; grid-template-columns:1.55fr .85fr; gap:18px; margin-bottom:18px; }
.dashboard-secondary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:18px; }
.dashboard-bottom-grid { display:grid; grid-template-columns:1.35fr .85fr; gap:18px; margin-bottom:18px; }
.dashboard-primary-grid .panel,.dashboard-secondary-grid .panel,.dashboard-bottom-grid .panel { padding:22px; min-width:0; }
.dashboard-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:18px; }
.dashboard-panel-heading h3 { margin:4px 0 0; font-size:19px; }
.dashboard-panel-heading > a { flex:0 0 auto; color:var(--blue); font-size:10px; font-weight:800; }
.attendance-progress { height:9px; margin:3px 0 23px; border-radius:99px; background:#edf1f6; overflow:hidden; }
.attendance-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#1b9769,#35bc89); }
.attendance-breakdown { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.attendance-breakdown > div { display:flex; align-items:center; gap:9px; min-width:0; }
.attendance-breakdown span { display:grid; }
.attendance-breakdown strong { font-size:19px; }
.attendance-breakdown small { color:var(--muted); font-size:9px; }
.dot { flex:0 0 8px; width:8px; height:8px; border-radius:50%; }
.dot.green { background:#23a574; }.dot.orange { background:#e4963d; }.dot.blue { background:#2f6fed; }.dot.red { background:#d14b5d; }
.dashboard-note { margin:15px 0 0; color:var(--muted); font-size:10px; line-height:1.5; }
.system-health { display:flex; align-items:center; gap:13px; margin-bottom:18px; }
.health-ring { display:grid; place-items:center; flex:0 0 54px; width:54px; height:54px; border:5px solid #dce3ed; border-radius:50%; font-size:12px; font-weight:900; }
.health-ring.online { color:var(--success); border-color:#aee3cc; }.health-ring.offline { color:var(--danger); border-color:#f2bbc2; }
.system-health > div { display:grid; gap:3px; min-width:0; }
.system-health small { color:var(--muted); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.system-mini-stats { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.system-mini-stats div { display:grid; gap:3px; padding:12px; border-radius:10px; background:#f7f9fc; }
.system-mini-stats small { color:var(--muted); font-size:9px; }.system-mini-stats strong { font-size:18px; }
.readiness-list { display:grid; }
.readiness-list a { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid #edf0f5; color:#465168; font-size:11px; }
.readiness-list a:last-child { border:0; }
.readiness-list strong { display:grid; place-items:center; min-width:28px; height:25px; padding:0 7px; border-radius:8px; color:#a55b18; background:#fff2df; font-size:11px; }
.payroll-status-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:17px; }
.payroll-status-grid div { display:grid; gap:3px; padding:11px; border-radius:10px; background:#f7f9fc; text-align:center; }
.payroll-status-grid strong { font-size:18px; }.payroll-status-grid small { color:var(--muted); font-size:9px; }
.division-bars { display:grid; gap:13px; }
.division-bars > div { display:grid; gap:6px; }
.division-bars span { display:flex; justify-content:space-between; gap:10px; font-size:10px; }
.division-bars small { color:var(--muted); }
.division-bars i { display:block; height:6px; border-radius:99px; background:#edf1f6; overflow:hidden; }
.division-bars u { display:block; height:100%; border-radius:inherit; background:var(--blue); text-decoration:none; }
.activity-list,.upcoming-list { display:grid; }
.activity-list > a { display:grid; grid-template-columns:8px 1fr auto; align-items:center; gap:11px; padding:12px 0; border-bottom:1px solid #edf0f5; }
.activity-list > a:last-child,.upcoming-list > div:last-child { border:0; }
.activity-mark { width:7px; height:7px; border-radius:50%; background:var(--blue); box-shadow:0 0 0 4px var(--blue-soft); }
.activity-list > a > span:nth-child(2),.upcoming-list span { display:grid; gap:3px; min-width:0; }
.activity-list strong,.upcoming-list strong { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.activity-list small,.upcoming-list small { color:var(--muted); font-size:9px; }
.dashboard-status { padding:5px 7px; border-radius:99px; color:#68748a; background:#edf0f5; font-size:8px; font-style:normal; font-weight:800; }
.dashboard-status.status-pending,.dashboard-status.status-draft { color:#9b6418; background:#fff2df; }
.dashboard-status.status-approved,.dashboard-status.status-paid,.dashboard-status.status-completed,.dashboard-status.status-active { color:var(--success); background:#e4f7ef; }
.dashboard-status.status-rejected,.dashboard-status.status-cancelled { color:var(--danger); background:#fff0f1; }
.upcoming-list > div { display:grid; grid-template-columns:45px 1fr; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid #edf0f5; }
.upcoming-list time { display:grid; place-items:center; padding:7px 4px; border-radius:10px; color:var(--blue); background:var(--blue-soft); }
.upcoming-list time strong { font-size:16px; }.upcoming-list time small { color:var(--blue); font-size:8px; font-weight:800; text-transform:uppercase; }
.dashboard-quick-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; padding:15px 18px; border:1px solid var(--line); border-radius:14px; background:white; }
.dashboard-quick-actions > strong { margin-right:auto; font-size:12px; }
.dashboard-quick-actions a { padding:8px 11px; border-radius:8px; color:var(--blue); background:var(--blue-soft); font-size:9px; font-weight:800; }
.manual-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:20px; padding:28px 32px; border-radius:18px; color:white; background:linear-gradient(120deg,#172d4d,#2f6fed); box-shadow:var(--shadow); }
.manual-hero h2 { margin:6px 0 8px; font-size:28px; }.manual-hero p:last-child { margin:0; color:#dbe7fa; }
.manual-print { color:var(--navy); background:white; box-shadow:none; }
.manual-layout { display:grid; grid-template-columns:230px minmax(0,1fr); gap:20px; align-items:start; }
.manual-toc { position:sticky; top:20px; padding:20px; }
.manual-toc > strong { display:block; margin-bottom:13px; font-size:13px; }
.manual-toc nav { display:grid; gap:3px; }
.manual-toc a { padding:8px 9px; border-radius:7px; color:var(--muted); font-size:10px; font-weight:700; }.manual-toc a:hover { color:var(--blue); background:var(--blue-soft); }
.manual-content { display:grid; gap:18px; min-width:0; }
.manual-section { padding:27px; scroll-margin-top:20px; }
.manual-section-heading { display:flex; align-items:center; gap:12px; margin-bottom:18px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.manual-section-heading > span { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:11px; color:var(--blue); background:var(--blue-soft); font-size:11px; font-weight:900; }
.manual-section-heading h3 { margin:3px 0 0; font-size:20px; }
.manual-section > p,.manual-section li { color:var(--muted); font-size:12px; line-height:1.7; }
.manual-section h4 { margin:22px 0 6px; font-size:14px; }.manual-section h4:first-of-type { margin-top:4px; }
.manual-section ol,.manual-section ul { padding-left:22px; }
.manual-steps { display:grid; gap:9px; padding:0!important; list-style:none; counter-reset:manual-step; }
.manual-steps li { display:grid; grid-template-columns:145px 1fr; gap:15px; padding:12px 14px; border-radius:10px; background:#f7f9fc; counter-increment:manual-step; }
.manual-steps b::before { content:counter(manual-step) ". "; color:var(--blue); }
.manual-card-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:11px; margin:15px 0; }
.manual-card-grid article { display:grid; gap:5px; padding:15px; border:1px solid var(--line); border-radius:11px; }
.manual-card-grid b { font-size:12px; }.manual-card-grid span { color:var(--muted); font-size:10px; line-height:1.6; }
.manual-tip,.manual-warning { margin-top:17px; padding:13px 15px; border-radius:10px; font-size:11px; line-height:1.6; }
.manual-tip { color:#176a4c; border:1px solid #c6eddd; background:#eaf9f2; }.manual-warning { color:#8e531d; border:1px solid #f3d3a7; background:#fff6e8; }
.manual-table { width:100%; margin-top:16px; border-collapse:collapse; font-size:11px; }
.manual-table th,.manual-table td { padding:11px 12px; border:1px solid var(--line); text-align:left; }.manual-table th { color:var(--muted); background:#f7f9fc; }
.manual-section details { border-bottom:1px solid var(--line); }.manual-section details:last-child { border:0; }
.manual-section summary { padding:13px 0; font-size:12px; font-weight:800; cursor:pointer; }.manual-section details p { margin:0 0 14px; color:var(--muted); font-size:11px; line-height:1.7; }
.manual-section code { padding:2px 5px; border-radius:5px; color:var(--blue); background:var(--blue-soft); font-size:10px; }

html[data-theme="dark"] {
    color-scheme:dark;
    --navy:#080f1c;
    --navy-soft:#101d31;
    --blue:#6598ff;
    --blue-soft:#172b4d;
    --ink:#e6edf7;
    --muted:#94a3b8;
    --line:#273449;
    --surface:#121c2b;
    --background:#0b1320;
    --success:#47c996;
    --danger:#ff7b8a;
    --shadow:0 18px 45px rgba(0,0,0,.32);
}
html[data-theme="dark"] body,html[data-theme="dark"] .app-body { background:var(--background); }
html[data-theme="dark"] .sidebar { background:#000000; scrollbar-color:#34445d transparent; }
html[data-theme="dark"] .topbar { border-color:var(--line); background:rgba(18,28,43,.96); }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .dashboard-stat-card,
html[data-theme="dark"] .dashboard-quick-actions,
html[data-theme="dark"] .module-hero,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .profile-header,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .error-card,
html[data-theme="dark"] .mobile-menu-panel,
html[data-theme="dark"] .login-card { background:var(--surface); border-color:var(--line); }
html[data-theme="dark"] .guest-body { background:radial-gradient(circle at 15% 10%,#132847 0,transparent 34%),var(--background); }
html[data-theme="dark"] .login-form-panel { background:var(--surface); }
html[data-theme="dark"] .form-heading p:last-child,html[data-theme="dark"] .form-stack label { color:var(--muted); }
html[data-theme="dark"] .form-grid label,html[data-theme="dark"] .master-form label { color:#c7d2e2; }
html[data-theme="dark"] .employee-picker-label { color:#c7d2e2; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-stack input,
html[data-theme="dark"] .filter-bar input,
html[data-theme="dark"] .filter-bar select,
html[data-theme="dark"] .status-panel select,
html[data-theme="dark"] .form-grid input,
html[data-theme="dark"] .form-grid select,
html[data-theme="dark"] .form-grid textarea,
html[data-theme="dark"] .master-form input,
html[data-theme="dark"] .master-form select { color:var(--ink); border-color:#34435a; background:#0e1725; }
html[data-theme="dark"] .employee-picker-toolbar > input[type="search"],html[data-theme="dark"] .employee-picker-list { color:var(--ink); border-color:#34435a; background:#0e1725; }
html[data-theme="dark"] .employee-picker-option { color:var(--ink)!important; background:#121c2b; }
html[data-theme="dark"] .employee-picker-option:has(input:checked) { border-color:#496fae; background:#172b4d; }
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color:#64748b; }
html[data-theme="dark"] .button-quiet { color:#c5d0df; background:#202c3e; }
html[data-theme="dark"] .data-table th,html[data-theme="dark"] .calendar-weekdays span { background:#0e1725; }
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .check-row,
html[data-theme="dark"] .detail-card dl > div,
html[data-theme="dark"] .activity-list > a,
html[data-theme="dark"] .upcoming-list > div,
html[data-theme="dark"] .readiness-list a { border-color:#243146; }
html[data-theme="dark"] .calendar-day,html[data-theme="dark"] .day-selector span { background:var(--surface); }
html[data-theme="dark"] .calendar-day.outside-month { background:#0d1623; }
html[data-theme="dark"] .calendar-event-pill { color:#d9e3f0; background:color-mix(in srgb,var(--event-color) 20%,#121c2b); }
html[data-theme="dark"] .form-actions { border-color:var(--line); background:rgba(18,28,43,.96); box-shadow:0 -8px 25px rgba(0,0,0,.22); }
html[data-theme="dark"] .system-mini-stats div,
html[data-theme="dark"] .payroll-status-grid div,
html[data-theme="dark"] .manual-steps li { background:#0e1725; }
html[data-theme="dark"] .attendance-progress,html[data-theme="dark"] .division-bars i { background:#263347; }
html[data-theme="dark"] .readiness-list a { color:#c8d3e3; }
html[data-theme="dark"] .fingerprint-live { border-color:#274d43; background:linear-gradient(90deg,#101f20,#111d29); }
html[data-theme="dark"] .fingerprint-live.live-error { border-color:#56303a; background:#21151c; }
html[data-theme="dark"] .fingerprint-toast { color:var(--ink); border-color:#315b4e; background:var(--surface); box-shadow:0 22px 60px rgba(0,0,0,.5); }
html[data-theme="dark"] .employee-photo,html[data-theme="dark"] .profile-photo,html[data-theme="dark"] .photo-preview { background:#1d293b; }
html[data-theme="dark"] .stat-icon.blue,html[data-theme="dark"] .dashboard-stat-icon.blue { color:#8cb2ff; background:#172b4d; }
html[data-theme="dark"] .stat-icon.green,html[data-theme="dark"] .dashboard-stat-icon.green { color:#70d9ae; background:#14382d; }
html[data-theme="dark"] .stat-icon.orange,html[data-theme="dark"] .dashboard-stat-icon.orange { color:#f3b66f; background:#412a17; }
html[data-theme="dark"] .dashboard-stat-icon.red { color:#ff9ca7; background:#351820; }
html[data-theme="dark"] .shift-days span { color:#8290a5; background:#1b2738; }
html[data-theme="dark"] .status-inactive,html[data-theme="dark"] .connection-unknown,html[data-theme="dark"] .dashboard-status { color:#b4c0d0; background:#263347; }
html[data-theme="dark"] .status-active,html[data-theme="dark"] .sync-completed,html[data-theme="dark"] .connection-online { color:#70d9ae; background:#14382d; }
html[data-theme="dark"] .status-resigned,html[data-theme="dark"] .sync-running { color:#f3b66f; background:#412a17; }
html[data-theme="dark"] .status-retired { color:#c7a7f4; background:#302343; }
html[data-theme="dark"] .dashboard-status.status-pending,html[data-theme="dark"] .dashboard-status.status-draft { color:#f3b66f; background:#412a17; }
html[data-theme="dark"] .dashboard-status.status-approved,html[data-theme="dark"] .dashboard-status.status-paid,html[data-theme="dark"] .dashboard-status.status-completed,html[data-theme="dark"] .dashboard-status.status-active { color:#70d9ae; background:#14382d; }
html[data-theme="dark"] .dashboard-status.status-rejected,html[data-theme="dark"] .dashboard-status.status-cancelled { color:#ff9ca7; background:#351820; }
html[data-theme="dark"] .alert-success { color:#77ddb6; background:#11352b; border-color:#285f4d; }
html[data-theme="dark"] .alert-error { color:#ff9ca7; background:#351820; border-color:#65303a; }
html[data-theme="dark"] .restore-warning { background:#351820; }
html[data-theme="dark"] .restore-warning p { color:#e8b9bf; }
html[data-theme="dark"] .access-roles > a.active { color:#8bb5ff; background:#172a46; }
html[data-theme="dark"] .photo-preview { border-color:var(--line); }
html[data-theme="dark"] .manual-table th { background:#0e1725; }
html[data-theme="dark"] .manual-tip { color:#7bdab5; border-color:#285f4d; background:#11352b; }
html[data-theme="dark"] .manual-warning { color:#f2bd7f; border-color:#604425; background:#302315; }
html[data-theme="dark"] .salary-overrides { border-color:var(--line); background:#0e1725; }

@media (max-width: 850px) {
    .guest-body { padding: 16px; }
    .login-card { grid-template-columns: 1fr; }
    .login-visual { min-height: 280px; padding: 34px; }
    .login-visual h1 { font-size: 34px; }
    .login-form-panel { padding: 38px 30px; }
    .sidebar { display: none; }
    .app-shell { width: 100%; margin-left: 0; }
    .topbar { padding: 18px 20px; }
    .mobile-menu { display: block; margin-left: auto; margin-right: 10px; }
    .manual-button { margin-left:0; }.manual-button small,.theme-toggle small { display:none; }
    .user-copy { display: none; }
    .content { padding: 22px 18px 45px; }
    .welcome-panel { align-items: flex-start; gap: 20px; }
    .stat-grid { grid-template-columns: 1fr; }
    .page-actions, .profile-header, .status-panel { align-items: flex-start; flex-direction: column; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-bar label { flex-basis: auto; }
    .form-grid.three, .form-grid.two, .detail-grid { grid-template-columns: 1fr; }
    .form-grid .span-two { grid-column: span 1; }
    .profile-actions { width: 100%; justify-content: space-between; }
    .status-panel form { width: 100%; flex-wrap: wrap; }
    .organization-grid { grid-template-columns: 1fr; }
    .master-form-row { grid-template-columns: 1fr; }
    .device-info-grid, .device-layout { grid-template-columns: 1fr; }
    .device-card { grid-template-columns: 1fr; }
    .device-metrics { justify-items: start; text-align: left; }
    .device-actions { justify-content: flex-start; flex-wrap: wrap; }
    .shift-stats, .shift-layout { grid-template-columns: 1fr; }
    .time-input-grid { grid-template-columns: 1fr; }
    .calendar-layout { grid-template-columns: 1fr; }
    .calendar-panel { overflow-x: auto; }
    .calendar-weekdays, .calendar-grid { min-width: 680px; }
    .operation-layout { grid-template-columns:1fr; }
    .database-summary,.database-actions { grid-template-columns:1fr; }
    .smtp-stats,.smtp-layout { grid-template-columns:1fr; }
    .access-layout,.permission-grid { grid-template-columns:1fr; }
    .salary-grade-stats,.salary-grade-layout { grid-template-columns:1fr; }.salary-money-grid { grid-template-columns:1fr; }.salary-money-grid label:first-child { grid-column:auto; }
    .operation-layout.module-work_schedule,.operation-layout.module-payroll { grid-template-columns:1fr; }.employee-picker-list { grid-template-columns:1fr; }.employee-picker-toolbar { grid-template-columns:1fr auto; }.employee-picker-toolbar > small { grid-column:1/-1; }
    .dashboard-hero { align-items:flex-start; flex-direction:column; }
    .dashboard-hero-actions { justify-items:start; }
    .dashboard-stat-grid,.dashboard-primary-grid,.dashboard-secondary-grid,.dashboard-bottom-grid { grid-template-columns:1fr; }
    .attendance-breakdown { grid-template-columns:repeat(2,1fr); }
    .live-event { grid-template-columns:50px 1fr; }.live-event-time { grid-column:2; justify-items:start; text-align:left; }
    .fingerprint-toast { right:16px; bottom:16px; }
    .manual-hero { align-items:flex-start; flex-direction:column; }.manual-layout { grid-template-columns:1fr; }.manual-toc { position:static; }.manual-card-grid { grid-template-columns:1fr; }.manual-steps li { grid-template-columns:1fr; gap:4px; }
}

@media print {
    .sidebar,.topbar,.manual-toc,.manual-print { display:none!important; }
    .app-shell { width:100%; margin:0; }.content { padding:0; }.manual-hero { color:#111; background:white; box-shadow:none; border:1px solid #ddd; }
    .manual-hero p:last-child { color:#555; }.manual-content { gap:10px; }.manual-section { break-inside:avoid; box-shadow:none; }
}
