:root {
  --kp-bg: oklch(0.17 0.018 218);
  --kp-sidebar: oklch(0.135 0.02 221);
  --kp-surface: oklch(0.215 0.019 218);
  --kp-surface-2: oklch(0.255 0.021 217);
  --kp-surface-3: oklch(0.30 0.022 217);
  --kp-line: oklch(0.40 0.022 217 / 0.68);
  --kp-text: oklch(0.96 0.006 210);
  --kp-muted: oklch(0.75 0.018 214);
  --kp-faint: oklch(0.62 0.018 214);
  --kp-accent: oklch(0.78 0.14 165);
  --kp-accent-strong: oklch(0.70 0.16 165);
  --kp-accent-ink: oklch(0.17 0.028 176);
  --kp-danger: oklch(0.70 0.18 25);
  --kp-warning: oklch(0.80 0.14 80);
  --kp-info: oklch(0.75 0.12 225);
  --kp-topbar-bg: oklch(0.17 0.018 218 / .96);
  --kp-control-bg: var(--kp-bg);
  --kp-row-hover: oklch(0.28 0.02 217 / .46);
  --kp-soft-accent: oklch(0.34 0.05 170);
  --kp-focus-ring: oklch(0.78 0.14 165 / .38);
  --kp-dashboard-card-line: oklch(0.46 0.032 215 / .78);
  --kp-dashboard-card-shadow: oklch(0.08 0.018 220 / .34);
  --kp-dashboard-card-highlight: oklch(0.92 0.05 170 / .075);
  --kp-dashboard-card-tint: oklch(0.32 0.04 170 / .14);
  --kp-dashboard-inner-line: oklch(0.43 0.026 215 / .68);
  --kp-dashboard-chart-glow: oklch(0.78 0.14 165 / .16);
  --kp-secondary-hover: oklch(0.35 0.024 217);
  --kp-danger-button: oklch(0.78 0.14 25);
  --kp-danger-button-border: oklch(0.55 0.12 25);
  --kp-danger-button-hover: oklch(0.48 0.14 25);
  --kp-plan-text: oklch(0.78 0.10 255);
  --kp-plan-bg: oklch(0.24 0.035 245);
  --kp-plan-line: oklch(0.54 0.08 255 / .62);
  --kp-success-text: oklch(0.90 0.12 160);
  --kp-success-bg: oklch(0.31 0.07 160);
  --kp-neutral-text: oklch(0.79 0.02 215);
  --kp-neutral-bg: oklch(0.32 0.018 215);
  --kp-warning-text: oklch(0.91 0.11 82);
  --kp-warning-bg: oklch(0.34 0.075 78);
  --kp-danger-text: oklch(0.88 0.10 25);
  --kp-danger-bg: oklch(0.34 0.09 25);
  --kp-info-text: oklch(0.86 0.08 225);
  --kp-info-bg: oklch(0.32 0.06 225);
  --kp-metric-highlight: oklch(0.29 0.045 170);
  --kp-callout-bg: oklch(0.34 0.075 170);
  --kp-callout-muted: oklch(0.86 0.035 170);
  --kp-logo-frame-bg: oklch(0.17 0.018 218);
  --kp-settings-hover-line: oklch(0.54 0.05 170);
  --kp-sidebar-line: var(--kp-line);
  --kp-sidebar-text: var(--kp-text);
  --kp-sidebar-muted: var(--kp-muted);
  --kp-sidebar-faint: var(--kp-faint);
  --kp-sidebar-hover: var(--kp-surface);
  --kp-sidebar-active: var(--kp-surface-2);
  --kp-sidebar-active-text: var(--kp-text);
  --kp-sidebar-active-icon: var(--kp-accent);
  --kp-sidebar-accent: var(--kp-accent);
  --kp-sidebar-accent-soft: var(--kp-soft-accent);
  --kp-sidebar-package: oklch(0.72 0.11 255);
  --kp-logo-filter: invert(1) hue-rotate(178deg) saturate(2.6) brightness(.98) contrast(1.25);
  --kp-logo-blend: screen;
  --kp-sidebar-logo-filter: invert(1) hue-rotate(178deg) saturate(2.6) brightness(.98) contrast(1.25);
  --kp-radius: 12px;
  --kp-radius-sm: 8px;
  --kp-sidebar-width: 180px;
  --kp-topbar-height: 70px;
  --kp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --kp-z-dropdown: 30;
  --kp-z-sticky: 40;
  --kp-z-modal: 60;
}

:root[data-kp-theme="light"] {
  color-scheme: light;
  --kp-bg: oklch(0.975 0.007 255);
  --kp-sidebar: oklch(0.225 0.075 258);
  --kp-surface: oklch(1 0 0);
  --kp-surface-2: oklch(0.955 0.012 255);
  --kp-surface-3: oklch(0.915 0.022 255);
  --kp-line: oklch(0.86 0.018 255);
  --kp-text: oklch(0.245 0.052 258);
  --kp-muted: oklch(0.45 0.035 258);
  --kp-faint: oklch(0.50 0.032 258);
  --kp-accent: oklch(0.57 0.23 260);
  --kp-accent-strong: oklch(0.50 0.24 260);
  --kp-accent-ink: oklch(1 0 0);
  --kp-danger: oklch(0.58 0.22 26);
  --kp-warning: oklch(0.68 0.17 78);
  --kp-info: oklch(0.56 0.20 250);
  --kp-topbar-bg: oklch(0.995 0.004 255 / .96);
  --kp-control-bg: oklch(1 0 0);
  --kp-row-hover: oklch(0.95 0.018 255);
  --kp-soft-accent: oklch(0.93 0.045 258);
  --kp-focus-ring: oklch(0.57 0.23 260 / .30);
  --kp-dashboard-card-line: oklch(0.82 0.025 255);
  --kp-dashboard-card-shadow: oklch(0.34 0.045 258 / .12);
  --kp-dashboard-card-highlight: oklch(1 0 0 / .96);
  --kp-dashboard-card-tint: oklch(0.94 0.04 258 / .36);
  --kp-dashboard-inner-line: oklch(0.86 0.018 255);
  --kp-dashboard-chart-glow: oklch(0.57 0.23 260 / .10);
  --kp-secondary-hover: oklch(0.88 0.025 255);
  --kp-danger-button: oklch(0.55 0.21 26);
  --kp-danger-button-border: oklch(0.62 0.16 26);
  --kp-danger-button-hover: oklch(0.48 0.22 26);
  --kp-plan-text: oklch(0.43 0.19 260);
  --kp-plan-bg: oklch(0.94 0.035 260);
  --kp-plan-line: oklch(0.72 0.10 260);
  --kp-success-text: oklch(0.43 0.15 153);
  --kp-success-bg: oklch(0.93 0.055 153);
  --kp-neutral-text: oklch(0.43 0.028 255);
  --kp-neutral-bg: oklch(0.93 0.014 255);
  --kp-warning-text: oklch(0.50 0.14 73);
  --kp-warning-bg: oklch(0.95 0.065 78);
  --kp-danger-text: oklch(0.52 0.20 25);
  --kp-danger-bg: oklch(0.94 0.055 25);
  --kp-info-text: oklch(0.46 0.17 250);
  --kp-info-bg: oklch(0.93 0.045 250);
  --kp-metric-highlight: oklch(0.95 0.04 153);
  --kp-callout-bg: oklch(0.93 0.05 153);
  --kp-callout-muted: oklch(0.40 0.09 153);
  --kp-logo-frame-bg: oklch(0.20 0.06 258);
  --kp-settings-hover-line: oklch(0.62 0.16 260);
  --kp-sidebar-line: oklch(0.34 0.075 258);
  --kp-sidebar-text: oklch(0.98 0.006 255);
  --kp-sidebar-muted: oklch(0.84 0.025 255);
  --kp-sidebar-faint: oklch(0.69 0.035 255);
  --kp-sidebar-hover: oklch(0.29 0.085 258);
  --kp-sidebar-active: oklch(0.56 0.23 260);
  --kp-sidebar-active-text: oklch(1 0 0);
  --kp-sidebar-active-icon: oklch(1 0 0);
  --kp-sidebar-accent: oklch(0.72 0.17 250);
  --kp-sidebar-accent-soft: oklch(0.31 0.11 258);
  --kp-sidebar-package: oklch(0.76 0.14 250);
  --kp-logo-filter: none;
  --kp-logo-blend: normal;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--kp-bg); }
body { margin: 0; color: var(--kp-text); background: var(--kp-bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.94rem; }
a { color: inherit; }
h1, h2, h3 { color: var(--kp-text); text-wrap: balance; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; }
.kp-tabular { font-variant-numeric: tabular-nums; }
.kp-muted { color: var(--kp-muted); }

.kp-skip-link { position: fixed; inset: 0 auto auto 1rem; z-index: 100; transform: translateY(-140%); padding: .65rem .9rem; border-radius: 0 0 8px 8px; color: var(--kp-accent-ink); background: var(--kp-accent); transition: transform 180ms var(--kp-ease); }
.kp-skip-link:focus { transform: translateY(0); }
.kp-shell { min-height: 100vh; }
.kp-sidebar { position: fixed; inset: 0 auto 0 0; z-index: var(--kp-z-sticky); width: var(--kp-sidebar-width); flex-direction: column; padding: 1.15rem .75rem .9rem; color: var(--kp-sidebar-text); background: var(--kp-sidebar); border-right: 1px solid var(--kp-sidebar-line); }
.kp-brand { display: inline-grid; width: 8.4rem; justify-items: center; gap: .38rem; color: var(--kp-text); text-decoration: none; }
.kp-brand-logo { display: block; width: 100%; height: auto; filter: var(--kp-logo-filter); mix-blend-mode: var(--kp-logo-blend); }
.kp-brand-product { display: inline-flex; align-items: center; gap: .4rem; padding-left: .2em; color: var(--kp-text); font-size: .7rem; font-weight: 760; letter-spacing: .2em; line-height: 1; text-transform: uppercase; }
.kp-brand-product i { color: var(--kp-accent); font-size: .92rem; line-height: 1; }
.kp-sidebar .kp-brand, .kp-mobile-nav .kp-brand, .kp-auth-story .kp-brand { color: var(--kp-sidebar-text); }
.kp-sidebar .kp-brand-logo, .kp-mobile-nav .kp-brand-logo, .kp-auth-story .kp-brand-logo { filter: var(--kp-sidebar-logo-filter); mix-blend-mode: screen; }
.kp-sidebar .kp-brand-product, .kp-mobile-nav .kp-brand-product, .kp-auth-story .kp-brand-product { color: var(--kp-sidebar-text); }
.kp-sidebar .kp-brand-product i, .kp-mobile-nav .kp-brand-product i, .kp-auth-story .kp-brand-product i { color: var(--kp-sidebar-accent); }
a.kp-brand:focus-visible { border-radius: 6px; outline: 2px solid var(--kp-accent); outline-offset: 4px; }
.kp-tenant-brand { display: flex; width: 100%; min-height: 58px; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: .3rem; border-radius: 9px; color: var(--kp-sidebar-text); text-decoration: none; }
.kp-tenant-brand:hover { color: var(--kp-sidebar-text); background: var(--kp-sidebar-hover); }
.kp-tenant-brand:focus-visible { outline: 2px solid var(--kp-sidebar-accent); outline-offset: 3px; }
.kp-tenant-logo-slot { display: flex; min-width: 0; min-height: 36px; align-items: center; justify-content: center; }
.kp-tenant-logo { display: block; width: auto; max-width: 140px; height: auto; max-height: 48px; object-fit: contain; }
.kp-tenant-fallback { display: flex; min-width: 0; align-items: center; gap: .55rem; }
.kp-tenant-fallback > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid var(--kp-sidebar-line); border-radius: 9px; color: var(--kp-sidebar-accent); background: var(--kp-sidebar-accent-soft); font-weight: 800; }
.kp-tenant-fallback strong { overflow: hidden; font-size: .78rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.kp-package-name { color: var(--kp-sidebar-package); font-size: .62rem; font-weight: 720; letter-spacing: .035em; line-height: 1; }
.kp-nav { display: grid; gap: .24rem; margin-top: 1.65rem; }
.kp-nav-label { margin: 1rem .7rem .3rem; color: var(--kp-sidebar-faint); font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.kp-nav-link { display: flex; min-height: 42px; align-items: center; gap: .68rem; padding: .6rem .62rem; border-radius: 9px; color: var(--kp-sidebar-muted); font-size: .9rem; text-decoration: none; transition: color 180ms var(--kp-ease), background-color 180ms var(--kp-ease); }
.kp-nav-link i { width: 1.25rem; color: var(--kp-sidebar-faint); font-size: 1rem; text-align: center; }
.kp-nav-link:hover { color: var(--kp-sidebar-text); background: var(--kp-sidebar-hover); }
.kp-nav-link.active { color: var(--kp-sidebar-active-text); background: var(--kp-sidebar-active); }
.kp-nav-link.active i { color: var(--kp-sidebar-active-icon); }
.kp-sidebar-footer { display: grid; justify-items: center; gap: .55rem; margin-top: auto; padding: 1rem .7rem 0; border-top: 1px solid var(--kp-sidebar-line); color: var(--kp-sidebar-muted); }
.kp-sidebar-footer small { color: var(--kp-sidebar-faint); font-size: .64rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.kp-sidebar-footer .kp-brand-version { margin-left: .15rem; color: var(--kp-sidebar-package); font-size: .56rem; font-weight: 680; letter-spacing: .01em; text-transform: none; }
.kp-platform-brand { width: 6.8rem; gap: .3rem; }
.kp-platform-brand .kp-brand-product { font-size: .61rem; }
.kp-platform-brand .kp-brand-product i { font-size: .82rem; }
.kp-workspace { min-height: 100vh; margin-left: var(--kp-sidebar-width); }
.kp-topbar { position: sticky; top: 0; z-index: var(--kp-z-sticky); display: flex; min-height: var(--kp-topbar-height); align-items: center; gap: 1rem; padding: .75rem clamp(1rem, 2.4vw, 2rem); background: var(--kp-topbar-bg); border-bottom: 1px solid var(--kp-line); backdrop-filter: blur(12px); }
.kp-topbar-title { display: grid; line-height: 1.15; }
.kp-topbar-title strong { font-size: .98rem; }
.kp-inline-timezone { color: var(--kp-info-text); font-weight: 650; white-space: nowrap; }
.kp-icon-button { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--kp-line); border-radius: 9px; color: var(--kp-text); background: var(--kp-surface); }
.kp-user-toggle { display: flex; align-items: center; gap: .65rem; padding: .32rem .45rem .32rem .35rem; border: 0; border-radius: 10px; color: var(--kp-text); background: transparent; }
.kp-user-toggle:hover, .kp-user-toggle[aria-expanded="true"] { background: var(--kp-surface-2); }
.kp-user-toggle > span:nth-child(2) { text-align: left; line-height: 1.15; }
.kp-user-toggle strong { max-width: 15rem; overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.kp-user-toggle small { color: var(--kp-muted); font-size: .7rem; }
.kp-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--kp-accent); background: var(--kp-soft-accent); font-weight: 800; }
.kp-user-menu, .dropdown-menu { --bs-dropdown-bg: var(--kp-surface-2); --bs-dropdown-border-color: var(--kp-line); --bs-dropdown-link-color: var(--kp-text); --bs-dropdown-link-hover-color: var(--kp-text); --bs-dropdown-link-hover-bg: var(--kp-surface-3); --bs-dropdown-divider-bg: var(--kp-line); z-index: var(--kp-z-dropdown); color: var(--kp-text); border-radius: 10px; }
.kp-user-menu { min-width: 17.5rem; }
.kp-user-menu small { color: var(--kp-muted); }
.kp-language-label { display: block; margin-bottom: .45rem; color: var(--kp-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kp-language-options { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .2rem; border: 1px solid var(--kp-line); border-radius: 9px; background: var(--kp-bg); }
.kp-language-options form { margin: 0; }
.kp-language-option { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; gap: .3rem; border: 0; border-radius: 7px; background: transparent; color: var(--kp-muted); font-size: .82rem; font-weight: 700; cursor: pointer; }
.kp-language-option:hover, .kp-language-option:focus-visible { background: var(--kp-surface-3); color: var(--kp-text); }
.kp-language-option:focus-visible { outline: 2px solid var(--kp-accent); outline-offset: 2px; }
.kp-language-option.active { background: var(--kp-soft-accent); color: var(--kp-accent); }
.kp-mobile-nav { --bs-offcanvas-bg: var(--kp-sidebar); --bs-offcanvas-color: var(--kp-sidebar-text); width: min(84vw, 260px) !important; }
.kp-mobile-nav .offcanvas-body { display: flex; flex-direction: column; }
.kp-mobile-tenant-brand { align-items: flex-start; justify-content: flex-start; }
.kp-mobile-sidebar-footer { width: 100%; }
.kp-main { width: min(100%, 1560px); margin-inline: auto; padding: clamp(1rem, 2.6vw, 2.2rem); }
.kp-flashes { display: grid; gap: .5rem; margin-bottom: 1rem; }
.alert { border: 0; border-radius: 10px; }

.kp-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.kp-page-heading h1 { margin: .2rem 0 0; font-size: 1.75rem; font-weight: 720; letter-spacing: -.025em; }
.kp-page-heading p { max-width: 70ch; margin: .35rem 0 0; color: var(--kp-muted); }
.kp-back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .55rem; color: var(--kp-muted); font-size: .82rem; text-decoration: none; }
.kp-back-link:hover { color: var(--kp-accent); }
.btn { min-height: 40px; border-radius: 8px; font-weight: 650; }
.btn-sm { min-height: 32px; }
.btn-primary { --bs-btn-color: var(--kp-accent-ink); --bs-btn-bg: var(--kp-accent); --bs-btn-border-color: var(--kp-accent); --bs-btn-hover-color: var(--kp-accent-ink); --bs-btn-hover-bg: var(--kp-accent-strong); --bs-btn-hover-border-color: var(--kp-accent-strong); --bs-btn-active-color: var(--kp-accent-ink); --bs-btn-active-bg: var(--kp-accent-strong); --bs-btn-active-border-color: var(--kp-accent-strong); }
.btn-secondary { --bs-btn-color: var(--kp-text); --bs-btn-bg: var(--kp-surface-3); --bs-btn-border-color: var(--kp-surface-3); --bs-btn-hover-color: var(--kp-text); --bs-btn-hover-bg: var(--kp-secondary-hover); --bs-btn-hover-border-color: var(--kp-secondary-hover); }
.btn-outline-secondary { --bs-btn-color: var(--kp-text); --bs-btn-border-color: var(--kp-line); --bs-btn-hover-color: var(--kp-text); --bs-btn-hover-bg: var(--kp-surface-3); --bs-btn-hover-border-color: var(--kp-line); }
.btn-outline-danger { --bs-btn-color: var(--kp-danger-button); --bs-btn-border-color: var(--kp-danger-button-border); --bs-btn-hover-color: oklch(1 0 0); --bs-btn-hover-bg: var(--kp-danger-button-hover); --bs-btn-hover-border-color: var(--kp-danger-button-hover); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus, a:focus-visible, button:focus-visible { outline: 3px solid var(--kp-focus-ring); outline-offset: 2px; box-shadow: none; }

.form-label { margin-bottom: .42rem; color: var(--kp-text); font-size: .82rem; font-weight: 650; }
.form-control, .form-select { min-height: 42px; color: var(--kp-text); background-color: var(--kp-control-bg); border: 1px solid var(--kp-line); border-radius: 8px; }
.form-control::placeholder { color: var(--kp-faint); opacity: 1; }
.form-control:focus, .form-select:focus { color: var(--kp-text); background-color: var(--kp-control-bg); border-color: var(--kp-accent); }
.form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b9c7cd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
:root[data-kp-theme="light"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2355647c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-check-input { background-color: var(--kp-control-bg); border-color: var(--kp-line); }
.form-check-input:checked { background-color: var(--kp-accent-strong); border-color: var(--kp-accent-strong); }
.form-text { color: var(--kp-muted); }
.kp-form-panel { max-width: 900px; padding: clamp(1.1rem, 2.5vw, 1.75rem); border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-form-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: .75rem; padding-top: 1.2rem; border-top: 1px solid var(--kp-line); }
.kp-shift-lunch { margin: .35rem 0 1rem; padding: 1.1rem 0 .25rem; border-top: 1px solid var(--kp-line); border-bottom: 1px solid var(--kp-line); }
.kp-shift-lunch > header { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.kp-shift-lunch > header > span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 9px; color: var(--kp-info-text); background: var(--kp-info-bg); }
.kp-shift-lunch h2 { margin: 0; font-size: .95rem; }
.kp-shift-lunch header p { margin: .25rem 0 0; color: var(--kp-muted); font-size: .76rem; }
.kp-lunch-guidance { display: flex; align-items: flex-start; gap: .45rem; margin: -.2rem 0 .9rem; color: var(--kp-muted); font-size: .73rem; line-height: 1.45; }
.kp-lunch-guidance i { margin-top: .05rem; color: var(--kp-info-text); }

.kp-panel, .kp-table-panel { border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-panel { padding: 1.25rem; }
.kp-panel-header, .kp-table-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.kp-panel-header { margin-bottom: 1rem; }
.kp-panel-header h2, .kp-table-heading h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.kp-panel-header p, .kp-table-heading p { margin: .26rem 0 0; color: var(--kp-muted); font-size: .82rem; }
.kp-panel-header > i { color: var(--kp-accent); font-size: 1.1rem; }
.kp-panel-header > a { color: var(--kp-accent); font-size: .8rem; font-weight: 650; text-decoration: none; }
.kp-table-heading { padding: 1rem 1.1rem; border-bottom: 1px solid var(--kp-line); }
.kp-plan-usage { flex: 0 0 auto; padding: .34rem .5rem; border: 1px solid var(--kp-plan-line); border-radius: 999px; color: var(--kp-plan-text); background: var(--kp-plan-bg); font-size: .66rem; font-weight: 720; white-space: nowrap; }
.kp-table-panel { overflow: hidden; }
.kp-table { --bs-table-bg: transparent; --bs-table-color: var(--kp-text); --bs-table-border-color: var(--kp-line); margin: 0; font-size: .85rem; }
.kp-table thead th { padding: .78rem 1rem; color: var(--kp-muted); background: var(--kp-surface-2); border-bottom-width: 1px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.kp-table tbody td { padding: .86rem 1rem; color: var(--kp-text); }
.kp-table tbody tr:hover { background: var(--kp-row-hover); }
.kp-table small { color: var(--kp-muted); }
.kp-primary-link { color: var(--kp-text); font-weight: 680; text-decoration: none; }
.kp-primary-link:hover { color: var(--kp-accent); }
.kp-empty-table { display: grid; min-height: 180px; place-items: center; align-content: center; gap: .35rem; color: var(--kp-muted); text-align: center; }
.kp-empty-table i { color: var(--kp-faint); font-size: 1.5rem; }
.kp-empty-table strong { color: var(--kp-text); }
.kp-status { display: inline-flex; align-items: center; min-height: 25px; padding: .2rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 750; letter-spacing: .02em; }
.kp-status.active, .kp-status.present, .kp-status.online { color: var(--kp-success-text); background: var(--kp-success-bg); }
.kp-status.inactive, .kp-status.offline, .kp-status.unknown { color: var(--kp-neutral-text); background: var(--kp-neutral-bg); }
.kp-status.connector_offline, .kp-status.device_offline { color: var(--kp-danger-text); background: var(--kp-danger-bg); }
.kp-status.polling, .kp-status.sync_delayed { color: var(--kp-warning-text); background: var(--kp-warning-bg); }
.kp-status.late, .kp-status.incomplete { color: var(--kp-warning-text); background: var(--kp-warning-bg); }
.kp-status.absent { color: var(--kp-danger-text); background: var(--kp-danger-bg); }
.kp-status.sick_leave, .kp-status.authorized_absence { color: var(--kp-info-text); background: var(--kp-info-bg); }
.kp-status.annual_leave, .kp-status.day_off, .kp-status.public_holiday { color: var(--kp-neutral-text); background: var(--kp-neutral-bg); }

.kp-filter-bar { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; padding: .85rem; border: 1px solid var(--kp-line); border-radius: 10px; background: var(--kp-surface); }
.kp-filter-bar .form-control, .kp-filter-bar .form-select { width: auto; min-width: 155px; flex: 1 1 160px; }
.kp-filter-wide .form-select { min-width: 145px; }
.kp-search-field { position: relative; flex: 2 1 260px; }
.kp-search-field i { position: absolute; top: 50%; left: .8rem; color: var(--kp-faint); transform: translateY(-50%); }
.kp-search-field .form-control { width: 100%; padding-left: 2.35rem; }
.kp-employee-search { position: relative; min-width: 220px; flex: 2 1 280px; }
.kp-employee-search .kp-search-field { display: block; width: 100%; }
.kp-employee-search-results { position: absolute; z-index: var(--kp-z-dropdown); top: calc(100% + .4rem); right: 0; left: 0; max-height: 340px; overflow-y: auto; border: 1px solid var(--kp-line); border-radius: 10px; visibility: hidden; opacity: 0; background: var(--kp-surface); transform: translateY(-4px); pointer-events: none; transition: opacity 160ms var(--kp-ease), transform 160ms var(--kp-ease), visibility 160ms var(--kp-ease); }
.kp-employee-search-results.is-open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
.kp-employee-search-state { display: flex; min-height: 58px; align-items: center; gap: .7rem; padding: .85rem 1rem; color: var(--kp-muted); font-size: .75rem; }
.kp-employee-search-state i { color: var(--kp-faint); font-size: 1rem; }
.kp-employee-search-option { display: grid; width: 100%; min-height: 62px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .7rem .85rem; border: 0; border-top: 1px solid var(--kp-line); border-radius: 0; color: var(--kp-text); background: transparent; text-align: left; text-decoration: none; }
.kp-employee-search-option:first-of-type { border-top: 0; }
.kp-employee-search-option:hover, .kp-employee-search-option.is-active { color: var(--kp-text); background: var(--kp-surface-2); }
.kp-employee-search-option:focus-visible { outline: 2px solid var(--kp-accent); outline-offset: -2px; }
.kp-employee-search-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--kp-accent); background: var(--kp-surface-3); font-size: .76rem; font-weight: 800; }
.kp-employee-search-copy { display: grid; min-width: 0; gap: .16rem; }
.kp-employee-search-copy strong, .kp-employee-search-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-employee-search-copy strong { font-size: .78rem; font-weight: 730; }
.kp-employee-search-copy small { color: var(--kp-muted); font-size: .66rem; }
.kp-employee-search-option > i { color: var(--kp-faint); font-size: .7rem; }
.kp-preset-tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .75rem; }
.kp-preset-tabs a { padding: .5rem .75rem; border-radius: 8px; color: var(--kp-muted); text-decoration: none; white-space: nowrap; }
.kp-preset-tabs a:hover, .kp-preset-tabs a.active { color: var(--kp-text); background: var(--kp-surface-2); }
.kp-pagination-bar { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid var(--kp-line); color: var(--kp-muted); background: var(--kp-surface-2); font-size: .76rem; }
.kp-pagination-bar .pagination { --bs-pagination-padding-x: .7rem; --bs-pagination-padding-y: .4rem; --bs-pagination-font-size: .76rem; --bs-pagination-color: var(--kp-muted); --bs-pagination-bg: transparent; --bs-pagination-border-color: var(--kp-line); --bs-pagination-hover-color: var(--kp-text); --bs-pagination-hover-bg: var(--kp-surface-3); --bs-pagination-hover-border-color: var(--kp-line); --bs-pagination-focus-color: var(--kp-text); --bs-pagination-focus-bg: var(--kp-surface-3); --bs-pagination-active-color: var(--kp-accent-ink); --bs-pagination-active-bg: var(--kp-accent); --bs-pagination-active-border-color: var(--kp-accent); --bs-pagination-disabled-color: var(--kp-faint); --bs-pagination-disabled-bg: transparent; --bs-pagination-disabled-border-color: var(--kp-line); }

.kp-metric-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 1rem; overflow: hidden; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-metric-strip > div { display: grid; min-height: 112px; align-content: center; gap: .35rem; padding: 1rem 1.2rem; border-right: 1px solid var(--kp-line); }
.kp-metric-strip > div:last-child { border-right: 0; }
.kp-metric-strip span { color: var(--kp-muted); font-size: .76rem; }
.kp-metric-strip strong { font-size: 1.85rem; font-weight: 740; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.kp-metric-strip small { color: var(--kp-faint); font-size: .7rem; }
.kp-metric-inside { background: var(--kp-metric-highlight); }
.kp-metric-inside strong { color: var(--kp-accent); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(1) { background: var(--kp-info-bg); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(1) strong { color: var(--kp-info-text); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(2) { background: var(--kp-success-bg); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(2) strong { color: var(--kp-success-text); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(3) { background: var(--kp-danger-bg); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(3) strong { color: var(--kp-danger-text); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(4) { background: var(--kp-warning-bg); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(4) strong { color: var(--kp-warning-text); }
:root[data-kp-theme="light"] .kp-metric-strip > div:nth-child(5) strong { color: var(--kp-success-text); }
.kp-dashboard-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.25fr); gap: 1rem; }
.kp-dashboard-grid > .kp-shift-panel { grid-column: 1; }
.kp-dashboard-grid > .kp-live-panel { grid-column: 2; grid-row: span 2; }
.kp-dashboard-grid > .kp-device-panel { grid-column: 1; }
.kp-live-indicator { display: flex; align-items: center; gap: .45rem; color: var(--kp-muted); font-size: .78rem; }
.kp-live-indicator > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: var(--kp-accent); }
.kp-live-indicator.error > span:first-child { background: var(--kp-danger); }
.kp-current-shift > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .7rem 0 1rem; }
.kp-current-shift > div:first-child strong { font-size: 1.35rem; }
.kp-current-shift > div:first-child span { color: var(--kp-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.kp-shift-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--kp-line); }
.kp-shift-counts span { display: grid; gap: .2rem; padding: .8rem .45rem .2rem; color: var(--kp-muted); font-size: .68rem; }
.kp-shift-counts b { color: var(--kp-text); font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.kp-activity-list, .kp-device-list { display: grid; }
.kp-activity-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .8rem; min-height: 58px; border-top: 1px solid var(--kp-line); }
.kp-activity-row.is-new { animation: kp-punch-arrival 1.4s var(--kp-ease); }
@keyframes kp-punch-arrival { from { background: var(--kp-success-bg); } to { background: transparent; } }
.kp-activity-row:first-child { border-top: 0; }
.kp-activity-row time { color: var(--kp-accent); font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kp-activity-row > div { display: grid; min-width: 0; }
.kp-activity-row strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.kp-activity-row small { color: var(--kp-muted); font-size: .7rem; }
.kp-action { padding: .18rem .48rem; border-radius: 999px; color: var(--kp-muted); background: var(--kp-surface-3); font-size: .66rem; font-weight: 700; }
.kp-action-in { color: var(--kp-success-text); background: var(--kp-success-bg); }
.kp-action-out { color: var(--kp-info-text); background: var(--kp-info-bg); }
.kp-device-list > a, .kp-device-list > .kp-device-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .72rem; min-height: 64px; border-top: 1px solid var(--kp-line); color: inherit; text-decoration: none; }
.kp-device-list > a:first-child, .kp-device-list > .kp-device-row:first-child { border-top: 0; }
.kp-device-list a:hover strong { color: var(--kp-accent); }
.kp-device-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--kp-faint); }
.kp-device-dot.online { background: var(--kp-accent); }
.kp-device-dot.polling, .kp-device-dot.sync_delayed { background: var(--kp-warning); }
.kp-device-dot.connector_offline, .kp-device-dot.device_offline { background: var(--kp-danger); }
.kp-device-list > a > div:nth-child(2), .kp-device-list > .kp-device-row > div:nth-child(2) { display: grid; }
.kp-device-list small { color: var(--kp-muted); font-size: .7rem; }
.kp-device-state { display: grid; justify-items: end; }
.kp-device-state b { color: var(--kp-muted); font-size: .65rem; }
.kp-device-state small { max-width: 12rem; text-align: right; font-variant-numeric: tabular-nums; }
.kp-empty-inline { display: flex; min-height: 92px; align-items: center; gap: .8rem; color: var(--kp-muted); }
.kp-empty-inline > i { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: var(--kp-accent); background: var(--kp-surface-2); }
.kp-empty-inline > div { display: grid; }
.kp-empty-inline strong { color: var(--kp-text); }

.kp-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kp-definition-list { display: grid; margin: 0 0 1rem; }
.kp-definition-list > div { display: grid; grid-template-columns: minmax(120px, .65fr) 1fr; gap: 1rem; padding: .72rem 0; border-top: 1px solid var(--kp-line); }
.kp-definition-list > div:first-child { border-top: 0; }
.kp-definition-list dt { color: var(--kp-muted); font-weight: 500; }
.kp-definition-list dd { margin: 0; text-align: right; }
.kp-date-inline { width: 145px; min-height: 32px; }
.kp-history-summary { overflow: hidden; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-history-summary > header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--kp-line); }
.kp-history-summary h2 { margin: 0; font-size: 1rem; }
.kp-history-summary header p { margin: .25rem 0 0; color: var(--kp-muted); font-size: .78rem; }
.kp-history-summary header > span { color: var(--kp-accent); font-size: .76rem; font-weight: 720; white-space: nowrap; }
.kp-history-metrics { display: grid; grid-template-columns: repeat(8, minmax(100px, 1fr)); }
.kp-history-metrics > div { display: grid; min-height: 88px; align-content: center; gap: .25rem; padding: .85rem 1rem; border-right: 1px solid var(--kp-line); }
.kp-history-metrics > div:last-child { border-right: 0; }
.kp-history-metrics span { color: var(--kp-muted); font-size: .68rem; }
.kp-history-metrics strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.kp-history-metrics .success strong { color: var(--kp-success-text); }
.kp-history-metrics .warning strong { color: var(--kp-warning-text); }
.kp-history-metrics .danger strong { color: var(--kp-danger-text); }
.kp-history-metrics .info strong { color: var(--kp-info-text); }
.kp-report-table { min-width: 1420px; }
.kp-history-observation { min-width: 210px; color: var(--kp-muted) !important; font-size: .78rem; line-height: 1.4; }
.kp-lunch-cell { min-width: 150px; }
.kp-lunch-cell small { display: block; margin-top: .3rem; color: var(--kp-muted); }
.kp-history-workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.kp-history-workspace-heading h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.015em; }
.kp-history-workspace-heading p { margin: .3rem 0 0; color: var(--kp-muted); font-size: .82rem; }
.kp-history-filter { align-items: end; }
.kp-history-filter .kp-filter-field { display: grid; min-width: 175px; flex: 1 1 190px; gap: .4rem; }
.kp-history-filter .kp-filter-field > span { color: var(--kp-muted); font-size: .72rem; font-weight: 700; }
.kp-history-filter-actions { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.kp-history-filter-actions .btn { white-space: nowrap; }
.kp-secret-callout { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1rem; border-radius: 10px; color: var(--kp-text); background: var(--kp-callout-bg); }
.kp-secret-callout > i { color: var(--kp-accent); font-size: 1.35rem; }
.kp-secret-callout > div { min-width: 0; flex: 1; }
.kp-secret-callout p { margin: .2rem 0 .6rem; color: var(--kp-callout-muted); }
.kp-secret-callout code { display: block; overflow: auto; color: var(--kp-text); white-space: nowrap; }
.kp-theme-settings { padding: 1.25rem; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-theme-settings > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.kp-theme-settings > header > div { display: flex; align-items: flex-start; gap: .75rem; }
.kp-theme-heading-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 9px; color: var(--kp-accent); background: var(--kp-soft-accent); font-size: 1rem; }
.kp-theme-settings h2 { margin: 0; font-size: 1rem; font-weight: 720; }
.kp-theme-settings header p { max-width: 70ch; margin: .25rem 0 0; color: var(--kp-muted); font-size: .82rem; }
.kp-theme-device-note { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; padding: .36rem .5rem; color: var(--kp-muted); font-size: .7rem; }
.kp-theme-device-note i { color: var(--kp-accent); }
.kp-theme-settings fieldset { margin: 0; }
.kp-theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.kp-theme-option label { display: grid; height: 100%; overflow: hidden; border: 1px solid var(--kp-line); border-radius: 10px; background: var(--kp-bg); cursor: pointer; transition: border-color 180ms var(--kp-ease), background-color 180ms var(--kp-ease); }
.kp-theme-option label:hover { background: var(--kp-surface-2); }
.kp-theme-option input:focus-visible + label { outline: 3px solid var(--kp-focus-ring); outline-offset: 2px; }
.kp-theme-option input:checked + label { border-color: var(--kp-accent); background: var(--kp-surface-2); }
.kp-theme-preview { display: grid; min-height: 112px; grid-template-columns: 24% 1fr; overflow: hidden; border-bottom: 1px solid var(--kp-line); }
.kp-theme-preview-sidebar { display: grid; align-content: start; gap: .48rem; padding: .65rem .45rem; }
.kp-theme-preview-sidebar::before { width: 16px; height: 6px; margin-bottom: .3rem; border-radius: 2px; content: ""; }
.kp-theme-preview-sidebar i { display: block; width: 78%; height: 5px; border-radius: 2px; }
.kp-theme-preview-sidebar i:nth-child(2) { width: 58%; }
.kp-theme-preview-canvas { display: grid; align-content: start; gap: .6rem; padding: .65rem; }
.kp-theme-preview-canvas > i { display: block; width: 44%; height: 6px; border-radius: 2px; }
.kp-theme-preview-canvas > span { display: grid; grid-template-columns: repeat(4, 1fr); gap: .28rem; }
.kp-theme-preview-canvas > span i { display: block; min-height: 28px; border-radius: 4px; }
.kp-theme-preview-canvas > b { display: block; min-height: 30px; border-radius: 4px; }
.kp-theme-preview-dark { background: oklch(0.18 0.02 218); }
.kp-theme-preview-dark .kp-theme-preview-sidebar { background: oklch(0.13 0.025 221); }
.kp-theme-preview-dark .kp-theme-preview-sidebar::before { background: oklch(0.70 0.16 250); }
.kp-theme-preview-dark .kp-theme-preview-sidebar i { background: oklch(0.38 0.025 218); }
.kp-theme-preview-dark .kp-theme-preview-sidebar i:first-child { background: oklch(0.70 0.16 165); }
.kp-theme-preview-dark .kp-theme-preview-canvas > i { background: oklch(0.78 0.14 165); }
.kp-theme-preview-dark .kp-theme-preview-canvas > span i { background: oklch(0.27 0.022 217); }
.kp-theme-preview-dark .kp-theme-preview-canvas > b { background: oklch(0.23 0.019 218); }
.kp-theme-preview-light { background: oklch(0.975 0.007 255); }
.kp-theme-preview-light .kp-theme-preview-sidebar { background: oklch(0.225 0.075 258); }
.kp-theme-preview-light .kp-theme-preview-sidebar::before { background: oklch(0.72 0.17 250); }
.kp-theme-preview-light .kp-theme-preview-sidebar i { background: oklch(0.45 0.085 258); }
.kp-theme-preview-light .kp-theme-preview-sidebar i:first-child { background: oklch(0.58 0.23 260); }
.kp-theme-preview-light .kp-theme-preview-canvas > i { background: oklch(0.31 0.06 258); }
.kp-theme-preview-light .kp-theme-preview-canvas > span i:nth-child(1) { background: oklch(0.90 0.07 260); }
.kp-theme-preview-light .kp-theme-preview-canvas > span i:nth-child(2) { background: oklch(0.90 0.09 153); }
.kp-theme-preview-light .kp-theme-preview-canvas > span i:nth-child(3) { background: oklch(0.92 0.10 78); }
.kp-theme-preview-light .kp-theme-preview-canvas > span i:nth-child(4) { background: oklch(0.91 0.08 25); }
.kp-theme-preview-light .kp-theme-preview-canvas > b { background: oklch(1 0 0); border: 1px solid oklch(0.86 0.018 255); }
.kp-theme-option-copy { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem .85rem; }
.kp-theme-option-copy > span { display: grid; gap: .16rem; }
.kp-theme-option-copy strong { color: var(--kp-text); font-size: .82rem; }
.kp-theme-option-copy small { color: var(--kp-muted); font-size: .7rem; }
.kp-theme-option-copy > i { color: var(--kp-accent); opacity: 0; transition: opacity 160ms var(--kp-ease); }
.kp-theme-option input:checked + label .kp-theme-option-copy > i { opacity: 1; }
.kp-settings-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kp-settings-links > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; min-height: 82px; padding: 1rem; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); color: var(--kp-text); background: var(--kp-surface); text-decoration: none; }
.kp-settings-links > a:hover { border-color: var(--kp-settings-hover-line); }
.kp-settings-links > a > i:first-child { color: var(--kp-accent); font-size: 1.2rem; }
.kp-settings-links div { display: grid; }
.kp-settings-links span { color: var(--kp-muted); font-size: .78rem; }
.kp-brand-settings { display: grid; grid-template-columns: minmax(210px, .62fr) minmax(0, 1.38fr); overflow: hidden; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-company-logo-preview { display: grid; min-height: 260px; place-items: center; align-content: center; gap: .75rem; padding: 1.5rem; color: var(--kp-sidebar-text); background: var(--kp-sidebar); border-right: 1px solid var(--kp-sidebar-line); }
.kp-company-logo-preview > span { color: var(--kp-sidebar-faint); font-size: .65rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.kp-company-logo-preview > small { max-width: 16rem; overflow: hidden; color: var(--kp-sidebar-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.kp-company-logo-frame { display: grid; width: min(100%, 180px); min-height: 76px; place-items: center; padding: .85rem; border: 1px solid var(--kp-sidebar-line); border-radius: 10px; background: var(--kp-logo-frame-bg); }
.kp-company-logo-frame img { display: block; width: auto; max-width: 140px; height: auto; max-height: 48px; object-fit: contain; }
.kp-company-logo-form { display: grid; align-content: center; gap: 1.15rem; padding: clamp(1.25rem, 3vw, 2rem); }
.kp-company-logo-form h2 { margin: .3rem 0 .4rem; font-size: 1.2rem; }
.kp-company-logo-form p { margin: 0; color: var(--kp-muted); }
.kp-eyebrow { color: var(--kp-accent); font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.kp-security-note { display: flex; align-items: flex-start; gap: .5rem; font-size: .74rem; }
.kp-security-note i { margin-top: .05rem; color: var(--kp-accent); }
.kp-security-note.warning i { color: var(--kp-warning); }
.kp-limit-note { display: flex; align-items: flex-start; gap: .45rem; margin: .85rem 0 0; color: var(--kp-muted); font-size: .74rem; }
.kp-limit-note i { color: var(--kp-info); }
.kp-compact-list { display: grid; gap: .4rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--kp-line); }
.kp-compact-list > div { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .45rem 0; }
.kp-compact-list span { display: grid; }
.kp-compact-list small { color: var(--kp-muted); }
.kp-audit-list { display: grid; }
.kp-audit-list > div { display: flex; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--kp-line); }
.kp-audit-list > div:first-child { border-top: 0; }
.kp-audit-dot { width: 8px; height: 8px; margin-top: .32rem; border-radius: 50%; background: var(--kp-accent); }
.kp-audit-list p { display: grid; margin: 0; }
.kp-audit-list strong { font-size: .8rem; font-weight: 600; }
.kp-audit-list small { color: var(--kp-muted); font-size: .7rem; }
.kp-error-state { display: grid; min-height: calc(100vh - 180px); place-items: center; align-content: center; gap: .6rem; text-align: center; }
.kp-error-state i { color: var(--kp-accent); font-size: 2rem; }
.kp-error-state h1 { margin: 0; font-size: 1.5rem; }
.kp-error-state p { color: var(--kp-muted); }

.kp-auth-body { min-height: 100vh; background: var(--kp-bg); }
.kp-auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr); }
.kp-auth-story { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 4.5rem); color: var(--kp-sidebar-text); background: var(--kp-sidebar); border-right: 1px solid var(--kp-sidebar-line); }
.kp-auth-brand { width: 12rem; }
.kp-auth-mobile-brand { display: none; }
.kp-auth-story h1 { max-width: 11ch; margin: .75rem 0 1rem; color: var(--kp-sidebar-text); font-size: clamp(2.3rem, 4vw, 4.5rem); font-weight: 760; line-height: .98; letter-spacing: -.04em; }
.kp-auth-story p { max-width: 58ch; color: var(--kp-sidebar-muted); }
.kp-auth-caption { color: var(--kp-sidebar-accent) !important; font-size: .78rem; font-weight: 750; }
.kp-auth-signal { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .15rem .75rem; }
.kp-auth-signal-icon { display: grid; grid-row: 1 / 3; width: 34px; height: 34px; place-items: center; border: 1px solid var(--kp-sidebar-line); border-radius: 9px; color: var(--kp-sidebar-accent); background: var(--kp-sidebar-accent-soft); font-size: 1rem; }
.kp-auth-signal-icon i { line-height: 1; }
.kp-auth-signal small { color: var(--kp-sidebar-muted); }
.kp-auth-form-wrap { display: grid; place-items: center; padding: 1.5rem; background: var(--kp-bg); }
.kp-auth-form { width: min(100%, 420px); }
.kp-auth-form-head { margin-bottom: 1.5rem; }
.kp-auth-form-head > span { color: var(--kp-accent); font-size: .78rem; font-weight: 700; }
.kp-auth-form-head h2 { margin: .3rem 0 .45rem; font-size: 1.75rem; letter-spacing: -.025em; }
.kp-auth-form-head p { color: var(--kp-muted); }
.kp-auth-link { display: inline-block; margin-top: 1rem; color: var(--kp-accent); text-decoration: none; }

@media (max-width: 1199.98px) {
  .kp-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kp-metric-strip > div:nth-child(3) { border-right: 0; }
  .kp-metric-strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--kp-line); }
  .kp-dashboard-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991.98px) {
  .kp-workspace { margin-left: 0; }
  .kp-dashboard-grid { grid-template-columns: 1fr; }
  .kp-dashboard-grid > .kp-shift-panel,
  .kp-dashboard-grid > .kp-live-panel,
  .kp-dashboard-grid > .kp-device-panel { grid-column: auto; grid-row: auto; }
  .kp-detail-grid { grid-template-columns: 1fr; }
  .kp-auth-shell { grid-template-columns: 1fr; }
  .kp-auth-story { display: none; }
  .kp-auth-form-wrap { min-height: 100vh; }
  .kp-auth-mobile-brand { display: inline-grid; width: 9.5rem; margin-bottom: 2rem; }
}
@media (max-width: 767.98px) {
  .kp-page-heading { align-items: stretch; flex-direction: column; }
  .kp-page-heading > .d-flex, .kp-page-heading > form { width: 100%; }
  .kp-page-heading > .d-flex .btn, .kp-page-heading > .btn { flex: 1; }
  .kp-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-metric-strip > div { min-height: 96px; }
  .kp-metric-strip > div:nth-child(odd) { border-right: 1px solid var(--kp-line); }
  .kp-metric-strip > div:nth-child(even) { border-right: 0; }
  .kp-metric-strip > div:nth-child(-n+4) { border-bottom: 1px solid var(--kp-line); }
  .kp-metric-strip > div:last-child { grid-column: 1 / -1; }
  .kp-filter-bar > * { flex-basis: 100% !important; width: 100% !important; }
  .kp-settings-links { grid-template-columns: 1fr; }
  .kp-theme-settings > header { flex-direction: column; }
  .kp-theme-device-note { padding-left: 3.15rem; }
  .kp-theme-options { grid-template-columns: 1fr; }
  .kp-brand-settings { grid-template-columns: 1fr; }
  .kp-company-logo-preview { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--kp-line); }
}
@media (max-width: 575.98px) {
  .kp-main { padding: 1rem .75rem 1.5rem; }
  .kp-topbar { padding-inline: .75rem; }
  .kp-page-heading h1 { font-size: 1.45rem; }
  .kp-panel { padding: 1rem; }
  .kp-shift-counts { grid-template-columns: repeat(2, 1fr); }
  .kp-activity-row { grid-template-columns: 42px minmax(0, 1fr); }
  .kp-activity-row > .kp-action { grid-column: 2; justify-self: start; }
  .kp-secret-callout { align-items: flex-start; flex-wrap: wrap; }
  .kp-secret-callout .btn { width: 100%; }
  .kp-form-actions { flex-direction: column-reverse; }
  .kp-form-actions .btn { width: 100%; }
}

/* Notification center */
.kp-notification-dropdown { position: relative; }
.kp-notification-toggle { position: relative; width: 42px; height: 42px; border-color: var(--kp-line); color: var(--kp-muted); background: var(--kp-surface); }
.kp-notification-toggle > i { font-size: 1.05rem; }
.kp-notification-toggle:hover, .kp-notification-toggle[aria-expanded="true"] { border-color: var(--kp-accent); color: var(--kp-accent); background: var(--kp-soft-accent); }
.kp-notification-toggle.has-unread { border-color: var(--kp-accent); color: var(--kp-accent); background: var(--kp-soft-accent); }
.kp-notification-badge { position: absolute; top: -6px; right: -6px; display: grid; min-width: 20px; height: 20px; place-items: center; padding-inline: 4px; border: 2px solid var(--kp-topbar-bg); border-radius: 999px; color: oklch(1 0 0); background: var(--kp-danger); font-size: .61rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kp-notification-menu { width: min(390px, calc(100vw - 1rem)); padding: 0; overflow: hidden; }
.kp-notification-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--kp-line); }
.kp-notification-menu-heading > div { display: grid; }
.kp-notification-menu-heading strong { font-size: .9rem; }
.kp-notification-menu-heading small { color: var(--kp-muted); font-size: .7rem; }
.kp-notification-menu-heading form, .kp-notification-menu-list form { margin: 0; }
.kp-notification-menu-heading button { border: 0; color: var(--kp-accent); background: transparent; font-size: .72rem; font-weight: 700; }
.kp-notification-menu-list { max-height: min(430px, 60vh); overflow-y: auto; }
.kp-notification-menu-item { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .7rem; padding: .82rem 1rem; border: 0; border-top: 1px solid var(--kp-line); color: var(--kp-text); background: transparent; text-align: left; }
.kp-notification-menu-list form:first-child .kp-notification-menu-item { border-top: 0; }
.kp-notification-menu-item:hover, .kp-notification-menu-item:focus-visible { background: var(--kp-surface-3); }
.kp-notification-menu-item.unread { background: var(--kp-soft-accent); }
.kp-notification-menu-item > span:nth-child(2) { display: grid; min-width: 0; gap: .15rem; }
.kp-notification-menu-item strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.kp-notification-menu-item small { display: -webkit-box; overflow: hidden; color: var(--kp-muted); font-size: .7rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.kp-notification-menu-item time { color: var(--kp-faint); font-size: .64rem; }
.kp-notification-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; color: var(--kp-info-text); background: var(--kp-info-bg); }
.kp-notification-menu-item.warning .kp-notification-icon, .kp-notification-card.warning .kp-notification-icon { color: var(--kp-warning-text); background: var(--kp-warning-bg); }
.kp-notification-menu-item.critical .kp-notification-icon, .kp-notification-card.critical .kp-notification-icon { color: var(--kp-danger-text); background: var(--kp-danger-bg); }
.kp-unread-dot { width: 8px; height: 8px; margin-top: .35rem; border-radius: 50%; background: var(--kp-accent); }
.kp-notification-empty { display: grid; min-height: 170px; place-items: center; align-content: center; gap: .3rem; padding: 1rem; text-align: center; }
.kp-notification-empty i { color: var(--kp-faint); font-size: 1.4rem; }
.kp-notification-empty strong { font-size: .82rem; }
.kp-notification-empty small { color: var(--kp-muted); }
.kp-notification-menu-footer { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; border-top: 1px solid var(--kp-line); color: var(--kp-accent); font-size: .76rem; font-weight: 700; text-decoration: none; }
.kp-notification-menu-footer:hover { color: var(--kp-accent); background: var(--kp-surface-3); }

/* Settings navigation and notification rules */
.kp-settings-tabs { display: flex; gap: .35rem; margin: -0.4rem 0 1rem; overflow-x: auto; border-bottom: 1px solid var(--kp-line); }
.kp-settings-tabs a { display: inline-flex; min-height: 44px; align-items: center; gap: .45rem; padding: .65rem .85rem; border-bottom: 2px solid transparent; color: var(--kp-muted); font-size: .8rem; font-weight: 680; text-decoration: none; white-space: nowrap; }
.kp-settings-tabs a:hover { color: var(--kp-text); }
.kp-settings-tabs a.active { border-bottom-color: var(--kp-accent); color: var(--kp-accent); }
.kp-notification-rules { overflow: hidden; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-rule-row { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto minmax(210px, .55fr); align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; border-top: 1px solid var(--kp-line); }
.kp-rule-row:first-of-type { border-top: 0; }
.kp-rule-row.compact { grid-template-columns: auto minmax(220px, 1fr) auto; }
.kp-rule-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; color: var(--kp-info-text); background: var(--kp-info-bg); font-size: 1.05rem; }
.kp-rule-icon.warning { color: var(--kp-warning-text); background: var(--kp-warning-bg); }
.kp-rule-icon.critical { color: var(--kp-danger-text); background: var(--kp-danger-bg); }
.kp-rule-copy h2 { margin: 0; font-size: .92rem; font-weight: 720; }
.kp-rule-copy p { max-width: 70ch; margin: .25rem 0 0; color: var(--kp-muted); font-size: .76rem; line-height: 1.45; }
.kp-rule-toggle { margin: 0; padding: 0; }
.kp-rule-toggle .form-check-input { width: 2.65rem; height: 1.35rem; margin: 0; }
.kp-rule-threshold { min-width: 0; }
.kp-rule-threshold .form-label { font-size: .7rem; }
.kp-rule-threshold .form-control { min-width: 0; }
.input-group-text { color: var(--kp-muted); background: var(--kp-surface-2); border-color: var(--kp-line); }
.kp-notification-rules > .kp-form-actions { margin: 0; padding: 1rem 1.25rem; background: var(--kp-surface-2); }

/* Dashboard */
.kp-dashboard-heading { align-items: center; }
.kp-dashboard-heading p strong { color: var(--kp-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.kp-realtime-control { display: inline-grid; min-height: 48px; grid-template-columns: auto minmax(0, auto) auto; align-items: center; gap: .65rem; padding: .55rem .85rem; border: 1px solid var(--kp-success-text); border-radius: 10px; color: var(--kp-success-text); background: var(--kp-success-bg); font-size: .78rem; font-weight: 720; cursor: pointer; transition: border-color 160ms var(--kp-ease), color 160ms var(--kp-ease), background-color 160ms var(--kp-ease); }
.kp-realtime-control:hover { filter: brightness(1.04); }
.kp-realtime-control.pending { border-color: var(--kp-warning-text); color: var(--kp-warning-text); background: var(--kp-warning-bg); }
.kp-realtime-control.offline { border-color: var(--kp-danger-text); color: var(--kp-danger-text); background: var(--kp-danger-bg); }
.kp-realtime-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in oklch, currentColor 16%, transparent), 0 0 8px color-mix(in oklch, currentColor 24%, transparent); }
.kp-realtime-control > span:nth-child(2) { display: grid; justify-items: start; }
.kp-realtime-control b { font-size: .76rem; line-height: 1.2; }
.kp-realtime-control small { margin-top: .15rem; color: currentColor; font-size: .64rem; font-weight: 600; opacity: .82; }
.kp-realtime-control > i { font-size: .95rem; }
.kp-realtime-control.pending > i { animation: kp-realtime-spin 900ms linear infinite; }
@keyframes kp-realtime-spin { to { transform: rotate(360deg); } }
.kp-dashboard-board { display: grid; gap: 1rem; }
.kp-dashboard-board > *, .kp-dashboard-row > * { min-width: 0; }
.kp-dashboard-row { display: grid; gap: 1rem; align-items: stretch; }
.kp-dashboard-row-monitoring { grid-template-columns: minmax(0, 2fr) minmax(280px, .86fr); }
.kp-dashboard-row-status, .kp-dashboard-row-rankings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kp-dashboard-row-operations { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.kp-dashboard-row .kp-panel { display: flex; min-width: 0; flex-direction: column; }
.kp-dashboard-board .kp-panel {
  --kp-panel-emphasis: var(--kp-accent);
  position: relative;
  border-color: var(--kp-dashboard-card-line);
  background: linear-gradient(180deg, var(--kp-dashboard-card-tint), transparent 92px), var(--kp-surface);
  box-shadow: inset 0 1px 0 var(--kp-dashboard-card-highlight), 0 3px 8px var(--kp-dashboard-card-shadow);
}
.kp-attention-panel { --kp-panel-emphasis: var(--kp-warning-text); }
.kp-workforce-panel[data-workforce-panel="factory"],
.kp-ranking-panel[data-ranking-panel="factory"] { --kp-panel-emphasis: var(--kp-info-text); }
.kp-dashboard-board .kp-panel-header > i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--kp-panel-emphasis) 32%, var(--kp-dashboard-card-line));
  border-radius: 9px;
  color: var(--kp-panel-emphasis);
  background: color-mix(in oklch, var(--kp-panel-emphasis) 10%, var(--kp-surface-2));
  box-shadow: 0 0 8px color-mix(in oklch, var(--kp-panel-emphasis) 16%, transparent);
  font-size: 1rem;
  line-height: 1;
}
.kp-dashboard-board .kp-panel-header > a {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  padding: .3rem .55rem;
  border: 1px solid color-mix(in oklch, var(--kp-accent) 24%, var(--kp-dashboard-card-line));
  border-radius: 8px;
  background: color-mix(in oklch, var(--kp-accent) 7%, transparent);
  transition: border-color 160ms var(--kp-ease), color 160ms var(--kp-ease), background-color 160ms var(--kp-ease);
}
.kp-dashboard-board .kp-panel-header > a:hover {
  border-color: color-mix(in oklch, var(--kp-accent) 52%, var(--kp-dashboard-card-line));
  color: var(--kp-accent);
  background: color-mix(in oklch, var(--kp-accent) 13%, transparent);
}
.kp-presence-panel { padding-bottom: .9rem; }
.kp-presence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-inline: -1.25rem; border-top: 1px solid var(--kp-dashboard-inner-line); border-bottom: 1px solid var(--kp-dashboard-inner-line); }
.kp-presence-group { display: flex; min-width: 0; flex-direction: column; align-items: stretch; padding: 1rem; border-left: 1px solid var(--kp-dashboard-inner-line); }
.kp-presence-group:first-child { border-left: 0; }
.kp-presence-group header { display: grid; min-height: 62px; align-content: start; justify-items: center; text-align: center; }
.kp-presence-group header strong { font-size: .84rem; font-weight: 720; }
.kp-presence-group header span { max-width: 24ch; overflow: hidden; margin-top: .18rem; font-size: .76rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.kp-presence-group header small { margin-top: .18rem; color: var(--kp-muted); font-size: .66rem; font-variant-numeric: tabular-nums; }
.kp-presence-chart { position: relative; display: grid; min-height: 178px; place-items: center; }
.kp-presence-chart canvas { width: 168px; height: 168px; max-width: 100%; border-radius: 50%; filter: drop-shadow(0 0 4px var(--kp-dashboard-chart-glow)); cursor: pointer; }
.kp-presence-chart canvas:focus-visible { outline: 2px solid var(--kp-accent); outline-offset: 4px; }
.kp-presence-center { position: absolute; display: grid; place-items: center; pointer-events: none; }
.kp-presence-center strong { color: var(--kp-text); font-size: 1.05rem; font-weight: 780; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.kp-presence-center span { margin-top: .08rem; color: var(--kp-success-text); font-size: .78rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.kp-presence-group > a { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: .4rem; color: var(--kp-accent); font-size: .72rem; font-weight: 700; text-decoration: none; }
.kp-presence-group > a:hover { background: var(--kp-row-hover); }
.kp-presence-group > a.disabled { color: var(--kp-faint); pointer-events: none; }
.kp-presence-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem 1.25rem; padding-top: .8rem; color: var(--kp-muted); font-size: .7rem; }
.kp-presence-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.kp-presence-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--kp-faint); }
.kp-presence-legend i.present { background: var(--kp-success-text); }
.kp-presence-legend i.late { background: var(--kp-warning); }
.kp-presence-legend i.incomplete { background: var(--kp-info); }
.kp-presence-legend i.absent { background: var(--kp-danger); }
.kp-presence-legend i.approved { background: var(--kp-accent); }
.kp-panel-action { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: .45rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--kp-dashboard-inner-line); color: var(--kp-accent); font-size: .76rem; font-weight: 700; text-decoration: none; }
.kp-panel-action:hover { color: var(--kp-accent); background: var(--kp-row-hover); }
.kp-hourly-header { align-items: center; }
.kp-segmented-control { display: inline-flex; padding: 3px; border: 1px solid var(--kp-dashboard-inner-line); border-radius: 9px; background: var(--kp-surface-2); }
.kp-segmented-control button { min-height: 34px; padding: .35rem .65rem; border: 0; border-radius: 6px; color: var(--kp-muted); background: transparent; font-size: .69rem; font-weight: 700; }
.kp-segmented-control button:hover { color: var(--kp-text); }
.kp-segmented-control button.active { color: var(--kp-accent-ink); background: var(--kp-accent); box-shadow: 0 0 8px color-mix(in oklch, var(--kp-accent) 18%, transparent); }
.kp-segmented-control button:focus-visible { outline: 2px solid var(--kp-accent); outline-offset: 2px; }
.kp-chart-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; color: var(--kp-muted); font-size: .68rem; }
.kp-chart-key span { display: inline-flex; align-items: center; gap: .35rem; }
.kp-chart-key i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--kp-info); }
.kp-chart-key i.current { background: var(--kp-accent); }
.kp-hourly-chart { position: relative; min-height: 270px; flex: 1; }
.kp-hourly-chart canvas { display: block; width: 100%; height: 270px; }
.kp-chart-tooltip { position: absolute; z-index: 2; padding: .35rem .5rem; border: 1px solid var(--kp-dashboard-inner-line); border-radius: 7px; color: var(--kp-text); background: var(--kp-surface-3); font-size: .65rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.kp-chart-summary { display: flex; justify-content: space-between; gap: 1rem; padding-top: .7rem; border-top: 1px solid var(--kp-dashboard-inner-line); color: var(--kp-muted); font-size: .72rem; }
.kp-chart-summary strong { color: var(--kp-text); font-variant-numeric: tabular-nums; }
.kp-attention-list { display: grid; margin-bottom: .8rem; flex: 1; }
.kp-attention-list > * { display: grid; min-height: 52px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .6rem; margin-inline: -.5rem; padding-inline: .5rem; border-top: 1px solid var(--kp-dashboard-inner-line); border-radius: 8px; color: var(--kp-text); text-decoration: none; transition: color 160ms var(--kp-ease), background-color 160ms var(--kp-ease); }
.kp-attention-list > *:first-child { border-top: 0; }
.kp-attention-list > a:hover { background: color-mix(in oklch, var(--kp-panel-emphasis) 8%, transparent); }
.kp-attention-list a:hover span { color: var(--kp-accent); }
.kp-attention-list span { display: inline-flex; min-width: 0; align-items: center; gap: .55rem; font-size: .76rem; }
.kp-attention-list span i { color: var(--kp-info); font-size: 1rem; }
.kp-attention-list > .warning span i { color: var(--kp-warning); }
.kp-attention-list > .critical span i { color: var(--kp-danger); }
.kp-attention-list strong { color: var(--kp-text); font-size: .82rem; font-variant-numeric: tabular-nums; }
.kp-attention-list > a > i:last-child { color: var(--kp-faint); font-size: .68rem; }
.kp-workforce-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--kp-dashboard-inner-line); border-bottom: 1px solid var(--kp-dashboard-inner-line); }
.kp-workforce-metrics > div { display: grid; min-height: 50px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: .55rem .65rem; border-top: 1px solid var(--kp-dashboard-inner-line); }
.kp-workforce-metrics > div:nth-child(-n+2) { border-top: 0; }
.kp-workforce-metrics > div:nth-child(even) { border-left: 1px solid var(--kp-dashboard-inner-line); }
.kp-workforce-metrics i { color: var(--kp-faint); }
.kp-workforce-metrics .success i { color: var(--kp-success-text); }
.kp-workforce-metrics .warning i { color: var(--kp-warning-text); }
.kp-workforce-metrics .danger i { color: var(--kp-danger-text); }
.kp-workforce-metrics .info i { color: var(--kp-info-text); }
.kp-workforce-metrics span { min-width: 0; color: var(--kp-muted); font-size: .72rem; }
.kp-workforce-metrics strong { font-size: .86rem; font-variant-numeric: tabular-nums; }
.kp-live-panel .kp-activity-list, .kp-device-panel .kp-device-list { max-height: 330px; overflow-y: auto; }
.kp-device-panel .kp-device-list { flex: 1; }
.kp-dashboard-board .kp-activity-row { border-top-color: var(--kp-dashboard-inner-line); }
.kp-dashboard-board .kp-device-list > a,
.kp-dashboard-board .kp-device-list > .kp-device-row {
  margin-inline: -.5rem;
  padding-inline: .5rem;
  border-top-color: var(--kp-dashboard-inner-line);
  border-radius: 8px;
  transition: background-color 160ms var(--kp-ease);
}
.kp-dashboard-board .kp-device-list > a:hover { background: color-mix(in oklch, var(--kp-accent) 8%, transparent); }
.kp-dashboard-board .kp-device-dot.online { box-shadow: 0 0 0 3px color-mix(in oklch, var(--kp-accent) 14%, transparent), 0 0 8px color-mix(in oklch, var(--kp-accent) 24%, transparent); }
.kp-dashboard-board .kp-device-dot.polling,
.kp-dashboard-board .kp-device-dot.sync_delayed { box-shadow: 0 0 0 3px color-mix(in oklch, var(--kp-warning) 14%, transparent), 0 0 8px color-mix(in oklch, var(--kp-warning) 22%, transparent); }
.kp-dashboard-board .kp-device-dot.connector_offline,
.kp-dashboard-board .kp-device-dot.device_offline { box-shadow: 0 0 0 3px color-mix(in oklch, var(--kp-danger) 14%, transparent), 0 0 8px color-mix(in oklch, var(--kp-danger) 22%, transparent); }
.kp-ranking-panel { min-height: 0; }
.kp-ranking-table-wrap { overflow: hidden; }
.kp-ranking-table { --bs-table-color: var(--kp-text); --bs-table-bg: transparent; --bs-table-border-color: var(--kp-dashboard-inner-line); width: 100%; min-width: 0; table-layout: fixed; font-size: .7rem; font-variant-numeric: tabular-nums; }
.kp-ranking-table thead th { padding: .5rem .3rem; color: var(--kp-muted); background: var(--kp-surface-2); font-size: .6rem; font-weight: 750; line-height: 1.2; overflow-wrap: anywhere; vertical-align: middle; white-space: normal; }
.kp-ranking-table tbody td { overflow: hidden; padding: .55rem .3rem; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.kp-ranking-table tbody td:nth-child(2) { overflow-wrap: anywhere; white-space: normal; }
.kp-ranking-table tbody td { transition: background-color 160ms var(--kp-ease); }
.kp-ranking-table tbody tr:hover > td { background: color-mix(in oklch, var(--kp-panel-emphasis) 7%, transparent); }
.kp-ranking-table tbody tr:last-child td { border-bottom: 0; }
.kp-ranking-table td:nth-child(1), .kp-ranking-table th:nth-child(1) { width: 32px; text-align: center; }
.kp-ranking-table td:nth-child(n+3), .kp-ranking-table th:nth-child(n+3) { text-align: right; }
.kp-ranking-table a { color: var(--kp-text); font-weight: 650; text-decoration: none; }
.kp-ranking-table a:hover { color: var(--kp-accent); }
.kp-ranking-table td strong { color: var(--kp-success-text); }

@media (min-width: 576px) {
  .kp-ranking-table td:nth-child(1), .kp-ranking-table th:nth-child(1) { width: 5%; }
  .kp-ranking-table td:nth-child(2), .kp-ranking-table th:nth-child(2) { width: 28%; }
  .kp-ranking-table td:nth-child(3), .kp-ranking-table th:nth-child(3) { width: 22%; }
  .kp-ranking-table td:nth-child(4), .kp-ranking-table th:nth-child(4) { width: 16%; }
  .kp-ranking-table td:nth-child(5), .kp-ranking-table th:nth-child(5) { width: 18%; }
  .kp-ranking-table td:nth-child(6), .kp-ranking-table th:nth-child(6) { width: 11%; }
}

/* Full notification history */
.kp-notification-page-list { overflow: hidden; border: 1px solid var(--kp-line); border-radius: var(--kp-radius); background: var(--kp-surface); }
.kp-notification-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-top: 1px solid var(--kp-line); }
.kp-notification-card:first-child { border-top: 0; }
.kp-notification-card.unread { background: var(--kp-soft-accent); }
.kp-notification-card > div:nth-child(2) { min-width: 0; }
.kp-notification-card-title { display: flex; align-items: center; gap: .55rem; }
.kp-notification-card h2 { margin: 0; font-size: .88rem; }
.kp-notification-card p { margin: .2rem 0; color: var(--kp-muted); font-size: .78rem; }
.kp-notification-card time { color: var(--kp-faint); font-size: .68rem; }
.kp-unread-label { padding: .15rem .4rem; border-radius: 999px; color: var(--kp-accent); background: var(--kp-surface); font-size: .6rem; font-weight: 800; }
.kp-notification-actions { display: flex; align-items: center; gap: .45rem; }
.kp-notification-actions form { margin: 0; }

@media (max-width: 1199.98px) {
  .kp-history-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kp-history-metrics > div:nth-child(4) { border-right: 0; }
  .kp-history-metrics > div:nth-child(-n+4) { border-bottom: 1px solid var(--kp-line); }
  .kp-presence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-presence-group:nth-child(odd) { border-left: 0; }
  .kp-presence-group:nth-child(n+3) { border-top: 1px solid var(--kp-line); }
  .kp-dashboard-row-rankings { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 991.98px) {
  .kp-rule-row, .kp-rule-row.compact { grid-template-columns: auto minmax(0, 1fr) auto; }
  .kp-rule-threshold { grid-column: 2 / 4; }
  .kp-dashboard-row-monitoring,
  .kp-dashboard-row-status,
  .kp-dashboard-row-operations,
  .kp-dashboard-row-rankings { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767.98px) {
  .kp-pagination-bar { align-items: flex-start; flex-direction: column; }
  .kp-history-filter-actions { width: 100%; margin-left: 0; }
  .kp-history-filter-actions .btn { flex: 1; }
  .kp-history-summary > header { align-items: flex-start; flex-direction: column; }
  .kp-history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-history-metrics > div, .kp-history-metrics > div:nth-child(4) { border-right: 1px solid var(--kp-line); border-bottom: 1px solid var(--kp-line); }
  .kp-history-metrics > div:nth-child(even) { border-right: 0; }
  .kp-history-metrics > div:nth-last-child(-n+2) { border-bottom: 0; }
  .kp-dashboard-heading { align-items: flex-start; flex-direction: column; }
  .kp-presence-grid { grid-template-columns: minmax(0, 1fr); }
  .kp-presence-group,
  .kp-presence-group:nth-child(odd) { border-left: 0; }
  .kp-presence-group:nth-child(n+2) { border-top: 1px solid var(--kp-line); }
  .kp-hourly-header { align-items: flex-start; flex-direction: column; }
  .kp-chart-key { justify-content: flex-start; }
  .kp-notification-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .kp-notification-actions { grid-column: 2; flex-wrap: wrap; }
}

@media (max-width: 575.98px) {
  .kp-realtime-control { width: 100%; justify-content: center; }
  .kp-presence-grid { margin-inline: -1rem; }
  .kp-presence-legend { justify-content: flex-start; }
  .kp-segmented-control { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kp-chart-key { width: 100%; justify-content: flex-start; }
  .kp-chart-summary { flex-direction: column; gap: .25rem; }
  .kp-workforce-metrics { grid-template-columns: minmax(0, 1fr); }
  .kp-workforce-metrics > div,
  .kp-workforce-metrics > div:nth-child(even) { border-left: 0; }
  .kp-workforce-metrics > div:nth-child(2) { border-top: 1px solid var(--kp-line); }
  .kp-ranking-table-wrap { overflow: visible; }
  .kp-ranking-table { display: block; min-width: 0; }
  .kp-ranking-table thead { display: none; }
  .kp-ranking-table tbody { display: grid; gap: .7rem; }
  .kp-ranking-table tbody tr { display: grid; overflow: hidden; border: 1px solid var(--kp-line); border-radius: 8px; background: var(--kp-surface-2); }
  .kp-ranking-table tbody td,
  .kp-ranking-table tbody td:nth-child(n+3) { display: flex; width: auto; justify-content: space-between; gap: 1rem; padding: .48rem .65rem; border-top: 1px solid var(--kp-line); border-bottom: 0; text-align: right; }
  .kp-ranking-table tbody td:nth-child(n) { width: auto; }
  .kp-ranking-table tbody td:first-child { border-top: 0; color: var(--kp-muted); }
  .kp-ranking-table tbody td::before { color: var(--kp-muted); content: attr(data-label); font-size: .65rem; font-weight: 700; text-align: left; }
  .kp-rule-row, .kp-rule-row.compact { grid-template-columns: auto minmax(0, 1fr) auto; padding: 1rem; }
  .kp-rule-threshold { grid-column: 1 / -1; }
  .kp-notification-menu { position: fixed !important; top: calc(var(--kp-topbar-height) - 4px) !important; right: .5rem !important; left: .5rem !important; width: auto; transform: none !important; }
}

@media (pointer: coarse) {
  .kp-segmented-control button,
  .kp-presence-group > a,
  .kp-panel-action { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .kp-notification-menu-item, .kp-settings-tabs a, .kp-realtime-control { transition: none; }
  .kp-realtime-control.pending > i { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Employee history workspace */
.kp-employee-profile .kp-definition-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0;
}
.kp-employee-profile .kp-definition-list > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  align-content: start;
  gap: .3rem;
  padding: .25rem 1rem;
  border-top: 0;
  border-right: 1px solid var(--kp-line);
}
.kp-employee-profile .kp-definition-list > div:first-child { padding-left: 0; }
.kp-employee-profile .kp-definition-list > div:last-child { padding-right: 0; border-right: 0; }
.kp-employee-profile .kp-definition-list dd { overflow-wrap: anywhere; text-align: left; }
.kp-employee-profile-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--kp-line);
}

.kp-history-shell { min-width: 0; }
.kp-history-tabs {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: clip;
  border: 1px solid var(--kp-line);
  border-radius: var(--kp-radius);
  background: var(--kp-surface);
}
.kp-history-tab {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 92px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border: 0;
  border-right: 1px solid var(--kp-line);
  color: var(--kp-muted);
  background: transparent;
  text-align: left;
  transition: color 180ms var(--kp-ease), background-color 180ms var(--kp-ease);
}
.kp-history-tab:last-child { border-right: 0; }
.kp-history-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--kp-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--kp-ease);
}
.kp-history-tab:hover { color: var(--kp-text); background: var(--kp-row-hover); }
.kp-history-tab:active { background: var(--kp-surface-3); }
.kp-history-tab:focus-visible {
  z-index: 1;
  outline: 3px solid var(--kp-focus-ring);
  outline-offset: -3px;
}
.kp-history-tab.active { color: var(--kp-text); background: var(--kp-surface-2); }
.kp-history-tab.active::after { transform: scaleX(1); }
.kp-history-tab-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: var(--kp-muted);
  background: var(--kp-surface-3);
  font-size: 1.15rem;
}
.kp-history-tab.active .kp-history-tab-icon { color: var(--kp-accent); background: var(--kp-soft-accent); }
.kp-history-tab-copy { display: grid; min-width: 0; gap: .18rem; }
.kp-history-tab-copy strong {
  color: inherit;
  font-size: 1rem;
  font-weight: 740;
  line-height: 1.25;
  text-wrap: balance;
}
.kp-history-tab-copy small {
  overflow: hidden;
  color: var(--kp-muted);
  font-size: .74rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kp-history-tab-count {
  min-width: 30px;
  padding: .27rem .5rem;
  border-radius: 999px;
  color: var(--kp-muted);
  background: var(--kp-surface-3);
  font-size: .7rem;
  font-weight: 760;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.kp-history-tab.active .kp-history-tab-count { color: var(--kp-accent); background: var(--kp-soft-accent); }
.kp-history-tab-content { min-width: 0; padding-top: 1.25rem; }
.kp-history-tab-content > .tab-pane:focus-visible {
  outline: 3px solid var(--kp-focus-ring);
  outline-offset: 4px;
}

.kp-history-shell .kp-preset-tabs {
  display: flex;
  flex-wrap: wrap;
  overflow: visible;
}
.kp-history-shell .kp-preset-tabs a {
  min-height: 40px;
  flex: 1 1 150px;
  align-content: center;
  text-align: center;
}
.kp-history-shell .kp-history-metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr));
  gap: 1px;
  background: var(--kp-line);
}
.kp-history-shell .kp-history-metrics > div,
.kp-history-shell .kp-history-metrics > div:nth-child(even),
.kp-history-shell .kp-history-metrics > div:nth-last-child(-n+2) {
  border: 0;
  background: var(--kp-surface);
}

.kp-responsive-record-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.kp-responsive-record-table thead th {
  overflow-wrap: anywhere;
  white-space: normal;
}
.kp-responsive-record-table tbody td {
  min-width: 0;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.kp-history-table-grouped thead th:nth-child(1) { width: 16%; }
.kp-history-table-grouped thead th:nth-child(2) { width: 15%; }
.kp-history-table-grouped thead th:nth-child(3) { width: 16%; }
.kp-history-table-grouped thead th:nth-child(4) { width: 16%; }
.kp-history-table-grouped thead th:nth-child(5) { width: 14%; }
.kp-history-table-grouped thead th:nth-child(6) { width: 23%; }
.kp-shift-history-table thead th:nth-child(1) { width: 28%; }
.kp-shift-history-table thead th:nth-child(2) { width: 20%; }
.kp-shift-history-table thead th:nth-child(3) { width: 27%; }
.kp-shift-history-table thead th:nth-child(4) { width: 25%; }
.kp-urgent-history-table thead th:nth-child(1) { width: 24%; }
.kp-urgent-history-table thead th:nth-child(2) { width: 33%; }
.kp-urgent-history-table thead th:nth-child(3) { width: 20%; }
.kp-urgent-history-table thead th:nth-child(4) { width: 23%; }
.kp-history-primary > strong,
.kp-history-primary > small { display: block; }
.kp-history-primary > small { margin-top: .22rem; color: var(--kp-muted); }
.kp-history-detail {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: .55rem;
  margin-top: .35rem;
}
.kp-history-detail:first-child { margin-top: 0; }
.kp-history-detail > span { color: var(--kp-muted); font-size: .7rem; }
.kp-history-detail > strong,
.kp-history-detail > small { color: var(--kp-text); text-align: right; }
.kp-history-status-cell > .kp-status { margin: 0 .25rem .3rem 0; }
.kp-history-status-cell > small { display: block; margin-top: .2rem; color: var(--kp-muted); line-height: 1.4; }
.kp-attendance-panel .kp-table-heading { align-items: center; }
.kp-attendance-sort {
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: .38rem;
  padding: .34rem .58rem;
  border: 1px solid var(--kp-plan-line);
  border-radius: 999px;
  color: var(--kp-plan-text);
  background: var(--kp-plan-bg);
  font-size: .68rem;
  font-weight: 720;
  white-space: nowrap;
}
.kp-attendance-sort i { color: var(--kp-accent); }
.kp-attendance-table thead th:nth-child(1) { width: 21%; }
.kp-attendance-table thead th:nth-child(2) { width: 13%; }
.kp-attendance-table thead th:nth-child(3) { width: 16%; }
.kp-attendance-table thead th:nth-child(4) { width: 13%; }
.kp-attendance-table thead th:nth-child(5) { width: 18%; }
.kp-attendance-table thead th:nth-child(6) { width: 19%; }
.kp-latest-punch,
.kp-no-punch { display: grid; gap: .24rem; }
.kp-latest-punch > strong { color: var(--kp-accent); font-size: 1.08rem; line-height: 1.1; }
.kp-latest-punch > small,
.kp-no-punch > small { display: flex; align-items: center; gap: .3rem; color: var(--kp-muted); line-height: 1.25; }
.kp-latest-punch i { color: var(--kp-accent); }
.kp-no-punch > strong { color: var(--kp-faint); font-size: 1.08rem; line-height: 1.1; }
.kp-attendance-table .kp-lunch-cell > small { display: block; margin-top: .3rem; }
.kp-attendance-note { display: flex; align-items: center; gap: .28rem; margin-top: .35rem; color: var(--kp-warning-text); font-size: .68rem; font-weight: 700; }
.kp-assignment-end-form,
.kp-override-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
}
.kp-override-actions { justify-content: flex-start; margin-top: .45rem; }
.kp-urgent-shift-form { padding: 1rem 1.1rem; border-bottom: 1px solid var(--kp-line); }

@media (max-width: 991.98px) {
  .kp-employee-profile .kp-definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-employee-profile .kp-definition-list > div {
    padding: .75rem 1rem;
    border-right: 1px solid var(--kp-line);
    border-bottom: 1px solid var(--kp-line);
  }
  .kp-employee-profile .kp-definition-list > div:nth-child(odd) { padding-left: 0; }
  .kp-employee-profile .kp-definition-list > div:nth-child(even) { padding-right: 0; border-right: 0; }
  .kp-employee-profile .kp-definition-list > div:nth-last-child(-n+2) { border-bottom: 0; }

  .kp-responsive-record-table,
  .kp-responsive-record-table tbody { display: block; }
  .kp-responsive-record-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .kp-responsive-record-table tbody {
    display: grid;
    gap: .75rem;
    padding: .75rem;
  }
  .kp-responsive-record-table tbody tr {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: clip;
    border: 1px solid var(--kp-line);
    border-radius: 10px;
    background: var(--kp-surface);
  }
  .kp-responsive-record-table tbody td {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: .3rem;
    padding: .75rem !important;
    border: 0;
    border-top: 1px solid var(--kp-line);
  }
  .kp-responsive-record-table tbody td::before {
    color: var(--kp-muted);
    content: attr(data-label);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.25;
  }
  .kp-responsive-record-table tbody td:first-child {
    grid-column: 1 / -1;
    border-top: 0;
    background: var(--kp-surface-2);
  }
  .kp-history-table-grouped tbody td:last-child,
  .kp-shift-history-table tbody td:last-child,
  .kp-urgent-history-table tbody td:last-child,
  .kp-attendance-table tbody td:last-child { grid-column: 1 / -1; }
  .kp-empty-record-row { grid-template-columns: 1fr !important; }
  .kp-empty-record-row td { grid-column: 1 / -1 !important; border-top: 0 !important; background: transparent !important; }
  .kp-empty-record-row td::before { display: none; }
  .kp-shift-action-cell { align-content: center !important; }
  .kp-assignment-end-form { justify-content: flex-start; }
}

@media (max-width: 575.98px) {
  .kp-employee-profile .kp-definition-list { grid-template-columns: 1fr; }
  .kp-employee-profile .kp-definition-list > div,
  .kp-employee-profile .kp-definition-list > div:nth-child(odd),
  .kp-employee-profile .kp-definition-list > div:nth-child(even) {
    padding: .7rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--kp-line);
  }
  .kp-employee-profile .kp-definition-list > div:nth-last-child(2) { border-bottom: 1px solid var(--kp-line); }
  .kp-employee-profile .kp-definition-list > div:last-child { border-bottom: 0; }
  .kp-employee-profile-footer { justify-content: stretch; }
  .kp-employee-profile-footer form,
  .kp-employee-profile-footer .btn { width: 100%; }

  .kp-history-tab {
    min-height: 112px;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: .38rem;
    padding: .75rem .55rem;
    text-align: center;
  }
  .kp-history-tab-icon { width: 36px; height: 36px; font-size: 1rem; }
  .kp-history-tab-copy { justify-items: center; }
  .kp-history-tab-copy strong { font-size: .88rem; }
  .kp-history-tab-copy small { display: none; }
  .kp-history-tab-count { min-width: 26px; padding: .18rem .4rem; font-size: .64rem; }
  .kp-history-tab::after { transform-origin: center; }
  .kp-history-tab-content { padding-top: 1rem; }

  .kp-history-workspace-heading { align-items: flex-start; flex-direction: column; }
  .kp-history-shell .kp-preset-tabs { display: grid; grid-template-columns: 1fr; }
  .kp-history-shell .kp-preset-tabs a { width: 100%; }
  .kp-history-filter-actions { width: 100%; flex-direction: column; margin-left: 0; }
  .kp-history-filter-actions .btn { width: 100%; }
  .kp-history-summary > header { align-items: flex-start; flex-direction: column; }
  .kp-history-summary header > span { white-space: normal; }
  .kp-history-shell .kp-history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-history-shell .kp-history-metrics > div { min-width: 0; padding: .75rem; }

  .kp-responsive-record-table tbody { padding: .65rem; }
  .kp-responsive-record-table tbody tr { grid-template-columns: 1fr; }
  .kp-responsive-record-table tbody td,
  .kp-history-table-grouped tbody td:last-child,
  .kp-shift-history-table tbody td:last-child,
  .kp-urgent-history-table tbody td:last-child,
  .kp-attendance-table tbody td:last-child { grid-column: 1; }
  .kp-attendance-panel .kp-table-heading { align-items: flex-start; flex-direction: column; }
  .kp-attendance-sort { white-space: normal; }
  .kp-attendance-recalculate { flex-direction: column; }
  .kp-attendance-recalculate .form-control,
  .kp-attendance-recalculate .btn { width: 100%; }
  .kp-responsive-record-table tbody td:first-child { grid-column: 1; }
  .kp-pagination-bar { align-items: flex-start; flex-direction: column; }
  .kp-pagination-bar .pagination { flex-wrap: wrap; }
  .kp-assignment-end-form { align-items: stretch; flex-direction: column; }
  .kp-assignment-end-form .kp-date-inline,
  .kp-assignment-end-form .btn { width: 100%; }
  .kp-override-actions { align-items: stretch; flex-direction: column; }
  .kp-override-actions form,
  .kp-override-actions .btn { width: 100%; }
}
