:root {
  --ink: #18201d;
  --muted: #68716d;
  --paper: #f4f5f1;
  --panel: #fff;
  --line: #e4e7e1;
  --green: #0d7057;
  --green-dark: #095743;
  --green-soft: #e4f2ec;
  --lime: #cde95b;
  --orange: #dc7b2f;
  --orange-soft: #fff0e3;
  --red: #b94b4b;
  --red-soft: #fbe9e7;
  --sidebar: #10231c;
  --shadow: 0 12px 34px rgba(24, 32, 29, .06);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); min-height: 100vh; }
.lucide { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; vertical-align: -3px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
code { background: #eef0ec; padding: .18rem .4rem; border-radius: 5px; font-size: .86em; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 244px; padding: 28px 18px 20px;
  background: var(--sidebar); color: #d5dfda; display: flex; flex-direction: column; z-index: 10;
  overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(205,233,91,.35) transparent;
  transition: width .22s ease, padding .22s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(205,233,91,.28); border-radius: 99px; }
.sidebar-header { flex: 0 0 auto; }
.brand { display: flex; gap: 12px; align-items: center; margin: 0 8px 12px; color: #fff; }
.sidebar-logo-shell {
  width: 100%; min-height: 58px; display: grid; place-items: center; padding: 8px 10px;
  background: #fff; border-radius: 11px; box-shadow: 0 5px 18px rgba(0,0,0,.16);
}
.sidebar-logo-shell img { display: block; width: 100%; height: auto; }
.sidebar-logo-compact { display: none; width: 46px; min-height: 46px; padding: 0; overflow: hidden; border-radius: 13px; }
.sidebar-logo-compact img { width: 46px; height: 46px; object-fit: cover; }
.sidebar-toggle {
  width: calc(100% - 16px); min-height: 34px; margin: 0 8px 20px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 8px;
  color: #aebdb6; background: rgba(255,255,255,.035); cursor: pointer;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.sidebar-toggle:hover { color: var(--lime); background: #214438; }
.sidebar-toggle .lucide { width: 16px; height: 16px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--lime); color: #173025; font: 800 20px/1 "Manrope";
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.1);
}
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 28px; }
.brand strong { display: block; font: 700 17px/1.1 "Manrope"; }
.brand small { display: block; font-size: 11px; margin-top: 4px; color: #91a49b; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a, .sidebar-bottom > a, .nav-button {
  width: 100%; display: flex; gap: 12px; align-items: center; padding: 11px 13px; border: 0;
  border-radius: 9px; color: #aebdb6; background: none; font-size: 14px; font-weight: 500; cursor: pointer;
}
.sidebar .nav-icon { width: 20px; text-align: center; font-size: 17px; flex: 0 0 20px; }
.sidebar nav a:hover, .sidebar-bottom > a:hover, .nav-button:hover { color: white; background: rgba(255,255,255,.055); }
.sidebar nav a.active, .sidebar-bottom > a.active { color: white; background: rgba(205,233,91,.12); }
.sidebar nav a.active span, .sidebar-bottom > a.active span { color: var(--lime); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 3px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.sidebar-bottom form { margin: 0; }
.signed-in-user {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center;
  margin: 10px 5px 5px; padding: 10px 8px; border-top: 1px solid rgba(255,255,255,.08);
}
.signed-in-user .avatar { width: 32px; height: 32px; border-radius: 9px; }
.signed-in-user strong { color: #eef4f1; display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signed-in-user small { color: #8fa39a; display: block; font-size: 9px; margin-top: 2px; }

main { margin-left: 244px; padding: 30px clamp(24px, 4vw, 58px) 60px; max-width: 1680px; transition: margin-left .22s ease; }

body.sidebar-collapsed .sidebar { width: 78px; padding: 22px 11px 18px; }
body.sidebar-collapsed main { margin-left: 78px; }
body.sidebar-collapsed .brand { justify-content: center; margin: 0 0 12px; }
body.sidebar-collapsed .sidebar-logo-full { display: none; }
body.sidebar-collapsed .sidebar-logo-compact { display: grid; }
body.sidebar-collapsed .sidebar-toggle { width: 40px; margin: 0 auto 20px; padding: 0; }
body.sidebar-collapsed .sidebar-toggle-label { display: none; }
body.sidebar-collapsed .sidebar nav a,
body.sidebar-collapsed .sidebar-bottom > a,
body.sidebar-collapsed .nav-button { justify-content: center; gap: 0; padding: 11px 8px; }
body.sidebar-collapsed .sidebar .nav-label,
body.sidebar-collapsed .signed-in-details { display: none; }
body.sidebar-collapsed .sidebar nav a .nav-icon,
body.sidebar-collapsed .sidebar-bottom .nav-icon { width: 20px; }
body.sidebar-collapsed .signed-in-user {
  display: flex; justify-content: center; margin: 10px 0 5px; padding: 10px 0;
}

.app-footer {
  margin-top: 44px; padding: 17px 20px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid #d8e5de; background: #edf5f1; color: #344b42;
  box-shadow: 0 8px 24px rgba(24,32,29,.04);
}
.footer-company, .footer-meta {
  display: flex; align-items: center; gap: 7px; margin: 0;
  font-size: 11px; line-height: 1.4;
}
.footer-company img {
  width: 28px; height: 28px; margin-right: 2px; border-radius: 8px;
  object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.app-footer a { color: var(--green); font-weight: 700; transition: color .15s; }
.app-footer a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta { color: #718078; }
.footer-separator { width: 3px; height: 3px; border-radius: 50%; background: #9aaba2; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 65px; margin-bottom: 26px; gap: 20px; }
h1, h2, h3 { font-family: "Manrope", sans-serif; margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(27px, 3vw, 36px); line-height: 1.1; }
h2 { font-size: 19px; line-height: 1.25; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .14em; margin: 0 0 6px; text-transform: uppercase; }
.eyebrow.light { color: var(--lime); }
.muted { color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent;
  border-radius: 8px; min-height: 40px; padding: 0 17px; gap: 7px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { background: white; border-color: #d8ddd7; color: var(--ink); }
.button.secondary:hover { border-color: #aab3ad; }
.button.ghost { background: transparent; color: var(--muted); }
.button.wide { width: 100%; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 13px; font-weight: 700; border: 0; background: none; cursor: pointer; padding: 0; }
.text-link .lucide { width: 15px; height: 15px; }
.text-link:hover { color: var(--green-dark); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-actions form { margin: 0; }
.global-header-actions { display: flex; align-items: flex-end; gap: 9px; margin-left: auto; }
.notification-center { position: relative; flex: 0 0 auto; }
.notification-trigger {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid #d8ddd7; border-radius: 10px; background: white; color: var(--ink);
  cursor: pointer; box-shadow: 0 4px 14px rgba(24,32,29,.04);
}
.notification-trigger:hover { color: var(--green); border-color: #b6c9bf; }
.notification-badge {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px;
  padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--paper);
  border-radius: 99px; background: var(--red); color: white; font-size: 9px; font-weight: 800;
}
.notification-panel {
  position: absolute; z-index: 30; top: calc(100% + 10px); right: 0;
  width: min(390px, calc(100vw - 30px)); max-height: min(570px, calc(100vh - 120px));
  overflow: hidden; border: 1px solid var(--line); border-radius: 14px;
  background: white; box-shadow: 0 22px 60px rgba(17,35,28,.18);
}
.notification-panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 18px; border-bottom: 1px solid var(--line);
}
.notification-panel-heading h2 { font-size: 17px; }
.notification-panel-heading .eyebrow { margin-bottom: 3px; }
.notification-panel-heading .text-link { font-size: 10px; }
.desktop-notification-permission {
  width: calc(100% - 24px); margin: 12px; padding: 10px 12px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #bddfd1; border-radius: 9px; background: var(--green-soft);
  color: var(--green); font-size: 11px; font-weight: 800; cursor: pointer;
}
.notification-list { max-height: 420px; overflow-y: auto; }
.notification-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px;
  padding: 13px 16px; border-bottom: 1px solid #edf0ec; background: white;
}
.notification-item:hover { background: #f8faf8; }
.notification-item-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: var(--green-soft); color: var(--green);
}
.notification-item[data-category="DEVICE_OFFLINE"] .notification-item-icon,
.notification-item[data-category="SYNC_FAILURE"] .notification-item-icon {
  background: var(--red-soft); color: var(--red);
}
.notification-item[data-category="MISSING_CHECKOUT"] .notification-item-icon,
.notification-item[data-category="EMPLOYEE_EXIT"] .notification-item-icon {
  background: var(--orange-soft); color: var(--orange);
}
.notification-item strong { display: block; font-size: 12px; line-height: 1.35; }
.notification-item p { margin: 3px 0 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.notification-item time { color: #87918c; font-size: 9px; }
.notification-empty { margin: 0; padding: 32px 18px; color: var(--muted); text-align: center; font-size: 11px; }

input, select, textarea {
  width: 100%; border: 1px solid #d9ddd8; border-radius: 8px; background: white; color: var(--ink);
  min-height: 41px; padding: 9px 11px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(13,112,87,.1); }
label { color: #424a46; font-size: 12px; font-weight: 700; display: grid; gap: 7px; }
label small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.inline-form, .filterbar { display: flex; gap: 10px; align-items: center; }
.inline-form input { width: auto; }
.stack-form { display: grid; gap: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }

.flash {
  display: flex; gap: 10px; align-items: center; background: var(--green-soft); border: 1px solid #c5e4d8;
  color: #145e49; padding: 12px 15px; border-radius: 9px; margin-bottom: 18px; font-size: 13px; font-weight: 600;
}
.flash > span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: white; }
.flash-content { flex: 1; min-width: 0; }
.flash.error { background: var(--red-soft); border-color: #f2c7c2; color: #8f3838; }
.flash.error > span { background: var(--red); }
.flash.warning { background: #fff8df; border-color: #ead38a; color: #765d0a; }
.flash.warning > span { background: #b88a00; }
.message-dismiss {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: currentColor; cursor: pointer;
}
.message-dismiss:hover { background: rgb(0 0 0 / 7%); }
.message-dismiss:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.message-dismiss .lucide { width: 17px; height: 17px; }
.toast-region {
  position: fixed; z-index: 1200; top: 22px; right: 22px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.app-toast {
  position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 30px;
  gap: 12px; align-items: center; overflow: hidden; padding: 14px;
  border: 1px solid #b9dfd1; border-radius: 13px; background: #f7fffb;
  color: #164f3f; box-shadow: 0 18px 45px rgb(18 55 43 / 18%);
  pointer-events: auto; animation: toast-enter 180ms ease-out both;
}
.app-toast::after {
  content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px;
  background: var(--green); transform-origin: left;
  animation: toast-timer 5s linear both;
}
.app-toast:hover::after,
.app-toast:focus-within::after { animation-play-state: paused; }
.app-toast.is-leaving { animation: toast-leave 160ms ease-in both; }
.app-toast-icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; background: var(--green); color: white;
}
.app-toast-icon .lucide { width: 21px; height: 21px; }
.app-toast-content { min-width: 0; }
.app-toast-content strong { display: block; margin-bottom: 2px; font-size: 13px; }
.app-toast-content p { margin: 0; color: #3e675b; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.app-toast.warning {
  border-color: #ead38a; background: #fffdf3; color: #765d0a;
}
.app-toast.warning::after,
.app-toast.warning .app-toast-icon { background: #b88a00; }
.app-toast.warning .app-toast-content p { color: #765d0a; }
.app-toast.error {
  border-color: #f2c7c2; background: #fff8f7; color: #8f3838;
}
.app-toast.error::after,
.app-toast.error .app-toast-icon { background: var(--red); }
.app-toast.error .app-toast-content p { color: #8f3838; }
@keyframes toast-enter {
  from { opacity: 0; transform: translate3d(18px, -8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes toast-leave {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(18px, -6px, 0); }
}
@keyframes toast-timer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
.device-sync-notice.sync-failed { background: var(--red-soft); border-color: #efc7c3; }
.device-sync-notice.sync-failed .notice-icon { background: var(--red); color: white; }
.device-sync-notice.sync-queued .notice-icon,
.device-sync-notice.sync-sent .notice-icon,
.device-sync-notice.sync-waiting_data .notice-icon { animation: sync-spin 1.2s linear infinite; }
.button .lucide-loader-circle { animation: sync-spin 1.2s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
.device-user-status {
  display: inline-flex; align-items: center; min-height: 22px; padding: 4px 7px;
  border-radius: 99px; background: #eef1ed; color: var(--muted);
  font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.device-user-status.sync-completed { background: var(--green-soft); color: var(--green); }
.device-user-status.sync-failed { background: var(--red-soft); color: var(--red); }
.device-user-status.sync-queued,
.device-user-status.sync-sent,
.device-user-status.sync-waiting_data { background: var(--orange-soft); color: var(--orange); }
.row-sync-form { margin: 4px 0 0; }
.row-sync-form .text-link { font-size: 9px; }
.device-admin-form { margin: 8px 0 2px; }
.device-management-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; margin: 20px 0;
}
.managed-device-card { padding: 20px; }
.managed-device-head {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
}
.managed-device-head h2 { margin-bottom: 5px; }
.device-illustration {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: var(--green-soft); color: var(--green);
}
.device-illustration .lucide { width: 22px; height: 22px; }
.device-health {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px;
  border-radius: 99px; font-size: 9px; font-weight: 800;
}
.device-health .lucide { width: 13px; height: 13px; }
.device-health.online { background: var(--green-soft); color: var(--green); }
.device-health.offline { background: var(--red-soft); color: var(--red); }
.device-detail-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px; margin-top: 18px;
}
.device-detail-grid > div {
  min-height: 63px; padding: 11px; border: 1px solid var(--line);
  border-radius: 9px; background: #fafbf9;
}
.device-detail-grid small, .device-detail-grid strong, .device-detail-grid span { display: block; }
.device-detail-grid small { margin-bottom: 4px; color: var(--muted); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.device-detail-grid strong { font-size: 10px; overflow-wrap: anywhere; }
.device-detail-grid span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.protected-device-admins { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.protected-device-admins .section-heading { margin-bottom: 8px; }
.protected-device-admins h3 { font-size: 12px; }
.protected-admin-list { display: flex; flex-wrap: wrap; gap: 6px; }
.protected-admin-list > span {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px;
  border-radius: 7px; background: #f0f3ef; color: #4c5a53; font-size: 9px;
}
.managed-device-actions form { margin: 0; }
.device-retirement-form {
  display: flex; align-items: end; gap: 10px; margin: 0 20px 20px;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.device-retirement-form label { flex: 1; }
.device-assignment-list {
  display: grid; gap: 7px; max-height: 420px; overflow: auto;
  margin-top: 14px; padding-right: 4px;
}
.device-assignment-list > label {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: #fafbf9;
}
.device-assignment-list input { width: 17px; height: 17px; accent-color: var(--green); }
.device-assignment-list span,
.device-assignment-list strong,
.device-assignment-list small { display: block; }
.device-assignment-list strong { font-size: 11px; }
.device-assignment-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.protected-admin-list .lucide { width: 12px; height: 12px; color: var(--green); }
.protected-admin-list code { color: var(--muted); }
.device-empty-note { margin: 6px 0 0; font-size: 9px; }
.managed-device-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 16px;
}
.managed-device-actions > span { color: var(--muted); font-size: 9px; }
.device-command-status {
  display: inline-flex; padding: 5px 7px; border-radius: 99px;
  background: #eef1ed; color: var(--muted); font-size: 8px; font-weight: 800;
}
.device-command-status.status-completed { background: var(--green-soft); color: var(--green); }
.device-command-status.status-failed { background: var(--red-soft); color: var(--red); }
.device-command-status.status-cancelled { background: #eef0f4; color: #667085; }
.device-command-status.status-queued,
.device-command-status.status-sent,
.device-command-status.status-waiting_data { background: var(--orange-soft); color: var(--orange); }
.device-admin-toggle {
  display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0;
  background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; cursor: pointer;
}
.device-admin-toggle:disabled { opacity: .5; cursor: not-allowed; }
.device-admin-toggle.on { color: var(--green); }
.switch-track {
  position: relative; width: 29px; height: 16px; flex: 0 0 auto;
  border-radius: 99px; background: #cfd5d1; transition: background .18s;
}
.switch-track i {
  position: absolute; width: 12px; height: 12px; left: 2px; top: 2px;
  border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s;
}
.device-admin-toggle.on .switch-track { background: var(--green); }
.device-admin-toggle.on .switch-track i { transform: translateX(13px); }
.approval-dialog { width: min(560px, calc(100% - 30px)); }
.approval-person {
  display: flex; align-items: center; gap: 12px; padding: 13px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbf9;
}
.approval-person strong, .approval-person small { display: block; }
.approval-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.approval-icon {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 10px; background: var(--green-soft); color: var(--green);
}
.approval-icon .lucide { width: 20px; height: 20px; }
.role-change {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; margin-top: 14px;
}
.role-change > span { padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.role-change small, .role-change strong { display: block; }
.role-change small { color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.role-change > .lucide { width: 18px; color: var(--muted); }
.approval-warning { margin: 15px 0 0; color: var(--text); font-size: 12px; line-height: 1.55; }
.approval-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 11px;
  border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 10px; line-height: 1.5;
}
.notification-panel-actions { display: flex; align-items: center; gap: 10px; }
.notification-preferences-panel { margin-bottom: 20px; }
.notification-preferences-panel > .section-heading,
.notification-delivery-panel > .section-heading {
  padding: 20px 22px 14px;
}
.notification-preferences-form { padding: 0 22px 22px; }
.preference-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.preference-card {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbf9;
  cursor: pointer;
}
.preference-card input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--green); }
.preference-card span, .preference-card strong, .preference-card small { display: block; }
.preference-card strong { font-size: 12px; }
.preference-card small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.inline-warning {
  display: flex; gap: 9px; align-items: flex-start; margin: 0 22px 14px;
  padding: 11px; border-radius: 9px; background: var(--orange-soft);
  color: #87501d; font-size: 11px; line-height: 1.5;
}
.inline-warning .lucide { width: 16px; flex: 0 0 auto; }
.section-heading.compact { padding: 8px 0 12px; }
.delivery-destination { max-width: 260px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .preference-grid { grid-template-columns: 1fr; }
  .notification-preferences-panel > .section-heading,
  .notification-delivery-panel > .section-heading {
    padding: 17px 16px 12px;
  }
  .notification-preferences-form { padding: 0 16px 18px; }
}
.export-format-field { margin-top: 17px; }
.approval-note .lucide { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.directory-form { align-items: end; flex-wrap: wrap; }
.regularization-metrics { margin-bottom: 20px; }
.regularization-filters { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.regularization-filters select { max-width: 280px; }
.regularization-table .text-clamp { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regularization-type { display: inline-block; font-weight: 700; font-size: 11px; }
.regularization-status {
  display: inline-flex; padding: 5px 8px; border-radius: 99px; background: #eef1ed;
  color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.regularization-status.status-pending_manager,
.regularization-status.status-pending_hr { background: var(--orange-soft); color: #9a561f; }
.regularization-status.status-returned_to_employee { background: #fff4cf; color: #776015; }
.regularization-status.status-approved { background: var(--green-soft); color: var(--green); }
.regularization-status.status-rejected { background: var(--red-soft); color: var(--red); }
.requested-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.regularization-dialog { width: min(720px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: auto; }
.regularization-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.regularization-detail-grid > div, .regularization-reason {
  padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9;
}
.regularization-detail-grid small, .regularization-detail-grid strong,
.regularization-detail-grid span, .regularization-reason small { display: block; }
.regularization-detail-grid small, .regularization-reason small { color: var(--muted); font-size: 9px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.regularization-detail-grid span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.regularization-reason { margin-top: 10px; }
.regularization-reason p { margin: 0; font-size: 12px; line-height: 1.55; }
.decision-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.decision-form .dialog-actions { margin-top: 12px; }
.workflow-history { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.workflow-history summary { cursor: pointer; color: var(--green); font-size: 11px; font-weight: 800; }
.history-event { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 8px; padding-top: 13px; }
.history-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); }
.history-event strong { font-size: 11px; }
.history-event p { margin: 3px 0; color: var(--muted); font-size: 10px; }
.history-event small { color: var(--muted); font-size: 8px; }
.cancel-request-form { margin-top: 16px; }
.leave-filters { padding: 16px 18px; align-items: end; }
.leave-filters label { min-width: 160px; }
.leave-filters label:nth-child(2) { min-width: 280px; }
.leave-filters label span { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.success-text { color: var(--green) !important; }
.balance-available { display: inline-block; min-width: 52px; padding: 6px 8px; border-radius: 7px; background: var(--green-soft); color: var(--green); text-align: center; }
.ledger-type { font-weight: 700; font-size: 10px; }
.ledger-panel summary { display: flex; justify-content: space-between; align-items: center; padding: 21px 22px; cursor: pointer; }
.ledger-panel summary > span { color: var(--green); font-size: 11px; font-weight: 800; }
.ledger-panel[open] summary { border-bottom: 1px solid var(--line); }
.floating-ledger-action {
  position: fixed; right: 24px; bottom: 24px; z-index: 8; display: inline-flex; align-items: center; gap: 7px;
  border: 0; border-radius: 99px; padding: 11px 16px; background: var(--sidebar); color: white;
  box-shadow: 0 12px 28px rgba(10,25,19,.22); font-size: 11px; font-weight: 800; cursor: pointer;
}
.floating-ledger-action .lucide { width: 15px; height: 15px; color: var(--lime); }
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-top: 1px solid var(--line); background: #fbfcfa;
}
.pagination p { margin: 0; color: var(--muted); font-size: 10px; }
.pagination > div { display: flex; align-items: center; gap: 5px; }
.page-button {
  min-width: 31px; height: 31px; display: inline-grid; place-items: center; padding: 0 7px;
  border: 1px solid #dce1dc; border-radius: 7px; background: white; color: var(--muted);
  font-size: 10px; font-weight: 800;
}
.page-button:hover { border-color: var(--green); color: var(--green); }
.page-button.active { border-color: var(--green); background: var(--green); color: white; }
.page-button.disabled { opacity: .4; cursor: not-allowed; }
.page-button .lucide { width: 14px; height: 14px; }
.page-gap { color: var(--muted); font-size: 11px; padding: 0 2px; }
.directory-form label { min-width: 210px; }
.directory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 18px 18px; }
.directory-grid > div { display: flex; flex-wrap: wrap; gap: 7px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.directory-grid h3 { width: 100%; font-size: 12px; }
.directory-grid span { padding: 5px 8px; border-radius: 99px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 700; }
.organization-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-help-row { display: flex; justify-content: flex-end; margin-top: -7px; }
.password-shell {
  width: min(460px, calc(100% - 32px)); margin: 8vh auto; padding: 36px;
  background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.password-shell h1 { margin: 7px 0 9px; }
.password-shell > .text-link { display: inline-block; margin-top: 20px; }
.password-shell .login-company-logo { width: 220px; max-width: 100%; margin-bottom: 28px; }
.narrow-panel { max-width: 620px; }
.panel-form { padding: 22px; }
.admin-users-table { min-width: 1120px; }
.admin-users-table th:first-child { width: 250px; }
.admin-users-table th:nth-child(2) { width: 440px; }
.admin-users-table th:nth-child(3) { width: 130px; }
.admin-users-table th:nth-child(4) { width: 190px; }
.admin-users-table th:last-child { width: 210px; }
.admin-users-table td { vertical-align: middle; }
.admin-users-table .person { min-width: 220px; }
.admin-users-table .person small { overflow-wrap: anywhere; }
.inline-role-form {
  display: grid; grid-template-columns: minmax(150px, 1fr) minmax(165px, 1fr) auto;
  align-items: end; gap: 8px; min-width: 390px;
}
.inline-role-form label { min-width: 0; gap: 5px; }
.inline-role-form label > span,
.admin-account-state small,
.admin-activity small {
  color: var(--muted); font-size: 8px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.inline-role-form select { width: 100%; min-width: 0; min-height: 38px; height: 38px; }
.admin-save-access { min-height: 38px; height: 38px; padding-inline: 12px; font-size: 11px; }
.admin-account-state { display: grid; justify-items: start; gap: 5px; }
.admin-account-state small { margin-top: 3px; }
.admin-account-state strong { font-size: 10px; }
.admin-activity { display: grid; gap: 9px; }
.admin-activity span { display: grid; gap: 3px; }
.admin-activity strong { font-size: 10px; line-height: 1.35; }
.admin-row-actions {
  display: grid; grid-template-columns: repeat(2, max-content);
  align-items: center; gap: 6px;
}
.admin-action-button {
  min-height: 32px; padding: 0 9px; display: inline-flex;
  align-items: center; justify-content: flex-start; gap: 6px;
  border: 1px solid #dfe4df; border-radius: 8px; background: #fff;
  color: var(--green); font-size: 10px; font-weight: 800; cursor: pointer;
}
.admin-action-button:hover { border-color: #b9c7bf; background: #f6f9f6; }
.admin-action-button .lucide { width: 13px; height: 13px; }
.admin-action-button.danger-text:hover { border-color: #ecc7c4; background: var(--red-soft); }
.form-note { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.form-note .lucide { width: 17px; color: var(--green); }
.danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #b63f3f; border-radius: 8px; padding: 10px 16px;
  background: #b63f3f; color: white; font-weight: 800; cursor: pointer;
}
.danger-button:hover { background: #983232; }
.danger-button .lucide { width: 16px; height: 16px; }
.danger-icon { background: #fde7e7 !important; color: #b63f3f !important; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  margin-bottom: 20px; overflow: hidden;
}
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 21px 22px; gap: 15px; border-bottom: 1px solid var(--line); }
.panel > .filterbar { padding: 16px 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.metric-card {
  background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  min-height: 142px; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.metric-card::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; background: #f0f2ed; right: -28px; top: -30px; }
.metric-card.accent { background: var(--green); border-color: var(--green); color: white; }
.metric-card.accent::after { background: rgba(205,233,91,.18); }
.metric-card.warning::after { background: var(--orange-soft); }
.metric-card.danger::after { background: var(--red-soft); }
.metric-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-card.accent p, .metric-card.accent span { color: #cce0d7; }
.metric-card strong { display: block; font: 800 35px/1 "Manrope"; margin-bottom: 14px; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong.metric-time { font-size: 24px; margin-top: 8px; }
.semantic-metric.success-soft { background: var(--green-soft); border-color: #c5e4d8; }
.semantic-metric.success-soft::after { background: rgba(13,112,87,.11); }
.semantic-metric.success-soft p,
.semantic-metric.success-soft span { color: #39705f; }
.semantic-metric.success-soft strong { color: var(--green-dark); }
.semantic-metric.info-soft { background: #e9eff9; border-color: #cdd9ee; }
.semantic-metric.info-soft::after { background: rgba(18,50,116,.11); }
.semantic-metric.info-soft p,
.semantic-metric.info-soft span { color: #53698d; }
.semantic-metric.info-soft strong { color: #123274; }
.semantic-metric.warning-soft { background: var(--orange-soft); border-color: #f3d5bd; }
.semantic-metric.warning-soft::after { background: rgba(220,123,47,.13); }
.semantic-metric.warning-soft p,
.semantic-metric.warning-soft span { color: #8d633f; }
.semantic-metric.warning-soft strong { color: #a9581f; }
.semantic-metric.danger-soft { background: var(--red-soft); border-color: #f0cbc7; }
.semantic-metric.danger-soft::after { background: rgba(185,75,75,.12); }
.semantic-metric.danger-soft p,
.semantic-metric.danger-soft span { color: #8d5757; }
.semantic-metric.danger-soft strong { color: #9f3f3f; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 20px; }

.leader-list, .timeline { padding: 5px 22px 14px; }
.leader-row { display: grid; grid-template-columns: 39px 1fr auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid #eef0ed; }
.leader-row:last-child { border: 0; }
.avatar { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 800; flex: 0 0 auto; }
.employee-avatar { overflow: hidden; }
.employee-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.employee-dialog-identity { display: flex; align-items: center; gap: 11px; }
.employee-dialog-avatar { width: 42px; height: 42px; border-radius: 12px; }
.leader-row strong, .person strong { display: block; font-size: 13px; }
.leader-row small, .person small, small.block { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.count-badge { color: var(--orange); background: var(--orange-soft); border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 700; }
.count-badge.hot { color: var(--red); background: var(--red-soft); }
.timeline > div { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 13px 0; position: relative; }
.timeline > div:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 25px; bottom: -9px; width: 1px; background: #dde2dc; }
.timeline-dot { width: 11px; height: 11px; background: var(--lime); border: 3px solid var(--green); border-radius: 50%; margin-top: 3px; z-index: 1; }
.timeline strong { display: block; font-size: 13px; }
.timeline small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.empty { padding: 35px; text-align: center; color: var(--muted); font-size: 13px; }
.success-empty { color: var(--green); }

.notice-card {
  background: #edf4d6; border: 1px solid #dbe8ad; border-radius: 12px; padding: 16px 18px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.notice-card > div { display: flex; align-items: center; gap: 13px; }
.notice-icon { width: 37px; height: 37px; border-radius: 10px; background: var(--lime); display: grid; place-items: center; font-weight: 800; }
.notice-icon .lucide { width: 19px; height: 19px; }
.notice-card strong { display: block; font-size: 13px; }
.notice-card p { margin: 4px 0 0; color: #59644a; font-size: 12px; }
.notice-card.compact { max-width: 850px; }

.filterbar { flex-wrap: wrap; }
.filterbar input, .filterbar select { width: auto; min-width: 150px; }
.search-field { min-width: min(360px, 100%); display: flex; position: relative; }
.search-field span { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.search-field input { width: 100%; padding-left: 34px; }
.result-count { margin-left: auto; color: var(--muted); font-size: 11px; }

/* Shared filter pattern used by admin registers and workflow screens. */
.app-filterbar {
  display: flex; align-items: flex-end; gap: 12px; padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfefc 0%, #fafcf9 100%);
}
.app-filterbar .filter-field {
  flex: 1 1 180px; min-width: 160px; max-width: 300px;
}
.app-filterbar .filter-search {
  flex: 2 1 300px; max-width: 440px;
}
.filter-label {
  color: #66706b; font-size: 9px; font-weight: 800;
  letter-spacing: .075em; line-height: 1.2; text-transform: uppercase;
}
.filter-input-icon { display: block; position: relative; }
.filter-input-icon > .lucide {
  position: absolute; z-index: 1; left: 12px; top: 50%; width: 16px; height: 16px;
  color: #7e8983; pointer-events: none; transform: translateY(-50%);
}
.filter-input-icon > input { padding-left: 38px; }
.app-filterbar .filter-field > input,
.app-filterbar .filter-field > select,
.app-filterbar .filter-input-icon > input {
  width: 100%; min-width: 0; background: #fff;
}
.filter-actions {
  display: flex; flex: 0 0 auto; align-items: center; gap: 7px;
}
.filter-actions .button { white-space: nowrap; }
.filter-actions .button.ghost {
  padding-inline: 11px; border-color: transparent;
}
.filter-actions .button.ghost:hover {
  background: #eef2ed; color: var(--ink); transform: none;
}
.app-filterbar .result-count {
  align-self: center; padding: 6px 10px; border-radius: 99px;
  background: #eef3ef; color: #59645e; font-size: 10px; font-weight: 700;
  white-space: nowrap;
}
.compact-filter {
  display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap;
}
.compact-filter .filter-field { min-width: 155px; }
.compact-filter .filter-label { color: inherit; opacity: .72; }
.compact-filter input, .compact-filter select { width: 100%; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { background: #f8f9f6; color: #737b77; text-transform: uppercase; letter-spacing: .055em; font-size: 9px; text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 15px; border-bottom: 1px solid #eceeeb; color: #303733; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfa; }
table.dense td { padding: 10px 12px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.status-dot, .status, .chip { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 99px; padding: 5px 8px; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.status-dot.on { background: var(--green-soft); color: var(--green); }
.status-dot.off { background: #eef0ed; color: #737b77; }
.status-dot::before { content: ""; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.chip { background: #eff1ed; color: #59615d; }
.chip.super-chip { background: #e8edf9; color: #244b8b; }
.status-present, .status-weekly_off_work, .status-holiday_work,
.status-work_from_home, .status-official_duty, .status-client_visit { background: var(--green-soft); color: var(--green); }
.status-manual_half_day { background: var(--blue-soft); color: var(--blue); }
.status-paid_leave, .status-half_day_paid_leave,
.status-half_day_present_paid_leave { background: #e7eefb; color: #3c64a3; }
.status-half_day_present_unpaid_leave { background: #fff0df; color: #9a561f; }
.status-lop { background: var(--red-soft); color: var(--red); }
.status-weekly_off, .status-holiday { background: #f1f1e8; color: #6c6a45; }
.icon-button { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 7px; border-radius: 6px; }
.icon-button:hover { background: #eef0ed; }
.remarks { max-width: 280px; color: var(--muted); }
.method { display: inline-flex; border-radius: 5px; padding: 4px 6px; background: #e9eef8; color: #355b91; font-size: 9px; font-weight: 800; }
.method-post { background: var(--green-soft); color: var(--green); }
.path-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-status { display: inline-flex; border-radius: 99px; padding: 5px 8px; background: #eef0ed; color: #616965; font-size: 9px; font-weight: 800; }
.log-processed { background: var(--green-soft); color: var(--green); }
.log-error, .log-rejected, .log-unparsed { background: var(--red-soft); color: var(--red); }
.log-preview { color: var(--muted); max-width: 260px; white-space: normal; line-height: 1.45; }
.log-dialog { width: min(900px, calc(100% - 30px)); }
.log-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.log-detail-grid > div { background: #f6f8f4; border: 1px solid var(--line); border-radius: 8px; padding: 11px; min-width: 0; }
.log-detail-grid small, .log-detail-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-detail-grid small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.log-detail-grid strong { font-size: 11px; }
.log-dialog label { margin-top: 13px; }
.log-dialog pre { margin: 0; max-height: 125px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #101c17; color: #d7e7df; border-radius: 8px; padding: 12px; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.log-dialog pre.raw-body { max-height: 260px; }
.today-punches { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.today-punches .section-heading { margin-bottom: 12px; }
.technical-request { margin-top: 16px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.technical-request > summary { padding: 13px 15px; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700; background: #f6f8f4; }
.technical-request[open] > summary { border-bottom: 1px solid var(--line); }
.technical-request > label { margin: 13px !important; }
.row-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.row-actions form { margin: 0; }
.warning-text { color: var(--orange) !important; }
.danger-text { color: var(--red) !important; }

dialog {
  width: min(660px, calc(100% - 30px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 30px 100px rgba(10,25,19,.28);
}
.employee-dialog { width: min(880px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: auto; }
.employee-audit-history { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; }
.employee-audit-history summary { cursor: pointer; color: var(--green); font-size: 11px; font-weight: 800; }
.employee-audit-history div { display: flex; justify-content: space-between; gap: 12px; padding-top: 9px; color: var(--muted); font-size: 9px; }
.employee-audit-history p { margin: 9px 0 0; color: var(--muted); font-size: 9px; }
.audit-change-details summary { color: var(--green); cursor: pointer; font-weight: 800; white-space: nowrap; }
.audit-change-details pre { background: #f5f7f4; border: 1px solid var(--line); border-radius: 8px; color: #26332e; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 8px 0 0; max-height: 260px; max-width: 460px; overflow: auto; padding: 10px; white-space: pre-wrap; }
dialog::backdrop { background: rgba(11,29,22,.56); backdrop-filter: blur(3px); }
.dialog-form { padding: 24px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 23px; }
.dialog-heading > .dialog-close { width: 33px; height: 33px; border: 0; background: #f0f2ee; border-radius: 50%; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.dialog-heading > .dialog-close .lucide { width: 17px; height: 17px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; padding-top: 17px; border-top: 1px solid var(--line); }
.dialog-actions .button { width: auto; min-width: 88px; flex: 0 0 auto; }
.check-label { display: flex; flex-direction: row; align-items: center; align-self: end; min-height: 41px; }
.check-label input { width: 17px; min-height: 17px; accent-color: var(--green); }

.import-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.upload-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 27px; box-shadow: var(--shadow); }
.upload-card.featured { border-top: 4px solid var(--green); padding-top: 24px; }
.upload-icon { width: 45px; height: 45px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border-radius: 12px; font-size: 22px; margin-bottom: 19px; }
.upload-icon .lucide { width: 22px; height: 22px; }
.upload-card h2 { font-size: 22px; }
.upload-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.6; min-height: 62px; }
.upload-form { display: grid; gap: 13px; margin-top: 20px; }
.file-drop { display: block; border: 1px dashed #b8c0ba; border-radius: 10px; padding: 20px; text-align: center; cursor: pointer; background: #fafbf9; }
.file-drop:hover { border-color: var(--green); background: #f5faf7; }
.file-drop input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.file-drop strong, .file-drop small { display: block; }
.file-drop strong { color: var(--green); font-size: 13px; }
.file-drop small { margin-top: 4px; color: var(--muted); }
.recalc-form { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 0 18px 13px; color: var(--muted); font-size: 11px; }
.summary-panel summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; border-bottom: 1px solid var(--line); }
.summary-panel summary::-webkit-details-marker { display: none; }
.summary-panel summary > span { color: var(--muted); font-size: 11px; }

.attendance-controls > .filterbar { align-items: end; flex-wrap: wrap; }
.attendance-controls label > span, .month-picker > span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.attendance-controls .filterbar > label { min-width: 230px; }
.month-navigator { display: grid; grid-template-columns: 39px minmax(190px, 1fr) 39px; gap: 7px; align-items: end; }
.month-arrow { width: 39px; height: 41px; display: grid; place-items: center; border: 1px solid #d9ddd8; border-radius: 8px; background: #fff; color: var(--green); font-size: 25px; line-height: 1; }
.month-arrow:hover { border-color: var(--green); }
.month-arrow.disabled { color: #afb6b1; background: #f4f5f2; cursor: not-allowed; }
.month-picker { min-width: 210px; }
.attendance-filter-button { margin-bottom: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.attendance-section-heading { margin: 28px 0 14px; }
.view-date-selector, .view-month-selector { display: flex; align-items: end; gap: 8px; }
.view-date-selector label, .view-month-selector label { min-width: 185px; }
.view-date-selector label > span, .view-month-selector label > span {
  color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em;
}
.section-subtitle { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.attendance-today-metrics .metric-card { min-height: 128px; padding: 18px; }
.attendance-today-metrics .metric-card strong { font-size: 31px; }
.today-attendance-wrap { max-height: 510px; overflow: auto; }
.today-attendance-table thead { position: sticky; top: 0; z-index: 2; }
.today-attendance-table tr.has-punch { background: #fbfefc; }
.today-attendance-table tr.has-duplicates { box-shadow: inset 4px 0 0 var(--red); background: #fffafa; }
.today-attendance-table .person { display: grid; grid-template-columns: 34px minmax(150px, 1fr); gap: 10px; align-items: center; }
.punch-time { color: #8b938f; white-space: nowrap; }
.punch-time.active { color: var(--green); }
.punch-time.complete { color: #315f9b; }
.duplicate-badge { display: inline-flex; margin-top: 5px; padding: 4px 7px; border-radius: 99px; background: var(--red-soft); color: var(--red); font-size: 8px; font-weight: 800; white-space: nowrap; }
.duplicate-warning { color: var(--red) !important; font-weight: 600; }
.employee-attendance-controls { padding: 18px; }
.filter-section-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--line);
}
.filter-section-heading p:last-child {
  max-width: 620px; margin: 5px 0 0; color: var(--muted); font-size: 11px;
}
.employee-attendance-filter {
  display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(150px, .7fr) minmax(190px, .8fr) auto;
  align-items: end; gap: 12px;
}
.employee-attendance-filter label > span {
  color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em;
}
.report-mode-links { display: flex; gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-mode-links a { padding: 7px 11px; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.report-mode-links a.active { background: var(--green-soft); color: var(--green); }
.employee-report-profile {
  display: grid; grid-template-columns: 58px minmax(220px, .8fr) minmax(420px, 1.4fr);
  gap: 16px; align-items: center; padding: 20px 22px; margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow);
}
.employee-report-avatar {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px;
  background: var(--green); color: white; font: 800 22px/1 "Manrope";
}
.employee-report-identity h2 { font-size: 22px; }
.employee-report-identity > span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.employee-report-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.employee-report-meta > div { min-width: 0; padding: 11px 13px; border-radius: 9px; background: #f6f8f4; }
.employee-report-meta small, .employee-report-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-report-meta small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.employee-report-meta strong { margin-top: 5px; font-size: 10px; }
.individual-report-heading { margin: 0 0 13px; }
.employee-status-value { font-size: 22px !important; line-height: 1.15 !important; }
.individual-attendance-panel tr.has-duplicates { box-shadow: inset 4px 0 0 var(--red); background: #fffafa; }
.individual-month-matrix .attendance-legend { max-width: 720px; justify-content: flex-end; }
.individual-month-matrix .attendance-matrix-wrap { max-height: 250px; }
.employee-selection-empty {
  display: grid; justify-items: center; padding: 65px 25px; text-align: center;
  border: 1px dashed #cdd4ce; border-radius: 12px; background: rgba(255,255,255,.7);
}
.employee-selection-empty > span {
  width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: 16px; background: var(--green-soft); color: var(--green);
}
.employee-selection-empty > span .lucide { width: 26px; height: 26px; }
.employee-selection-empty h2 { font-size: 22px; }
.employee-selection-empty > p:last-child { max-width: 460px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.monthly-matrix-panel { overflow: visible; }
.matrix-heading { align-items: flex-start; flex-wrap: wrap; }
.matrix-tools { display: grid; justify-items: end; gap: 9px; }
.matrix-recalculate { margin: 0; }
.attendance-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 12px; max-width: 650px; color: var(--muted); font-size: 9px; }
.attendance-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.matrix-dot { width: 19px; height: 19px; display: inline-grid; place-items: center; border-radius: 5px; }
.attendance-matrix-wrap { width: 100%; max-height: 690px; overflow: auto; border-radius: 0 0 12px 12px; }
.attendance-matrix { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; background: white; font-size: 10px; }
.attendance-matrix th, .attendance-matrix td { height: 88px; min-width: 72px; padding: 5px; text-align: center; border-right: 1px solid #edf0eb; border-bottom: 1px solid #edf0eb; }
.attendance-matrix thead th { position: sticky; top: 0; z-index: 4; height: 57px; background: #f6f8f4; color: var(--muted); }
.attendance-matrix .employee-column { position: sticky; left: 0; z-index: 3; width: 220px; min-width: 220px; max-width: 220px; padding: 9px 13px; text-align: left; background: white; box-shadow: 1px 0 0 #e3e7e1; }
.attendance-matrix thead .employee-column { z-index: 6; background: #f6f8f4; text-transform: uppercase; letter-spacing: .06em; font-size: 9px; }
.attendance-matrix .employee-column strong, .attendance-matrix .employee-column small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-matrix .employee-column strong { color: var(--ink); font-size: 11px; }
.attendance-matrix .employee-column small { color: var(--muted); margin-top: 3px; font-weight: 500; }
.date-column strong, .date-column small { display: block; }
.date-column strong { color: var(--ink); font-size: 12px; }
.date-column small { margin-top: 3px; font-size: 8px; }
.date-column.weekend-column { background: #f2f4ef; }
.attendance-matrix tr:hover .employee-column, .attendance-matrix tbody tr:hover td { filter: brightness(.985); }
.matrix-cell span { width: 27px; height: 27px; display: grid; place-items: center; margin: auto; border-radius: 7px; font-size: 9px; font-weight: 800; }
.matrix-cell small { display: block; margin-top: 2px; font-size: 7px; color: var(--muted); transform: scale(.9); }
.matrix-cell .matrix-time {
  display: flex; justify-content: center; gap: 3px; margin-top: 2px;
  font-size: 7px; line-height: 1.15; transform: none; white-space: nowrap;
}
.matrix-time b { color: var(--green); font-size: 6px; letter-spacing: .03em; }
.matrix-time.checkout b { color: #315f9b; }
.matrix-time.hours { color: var(--ink); font-weight: 700; }
.matrix-time.hours b { color: var(--muted); }
.matrix-cell { position: relative; }
.matrix-cell.matrix-duplicate { background: #fff6f5; box-shadow: inset 0 0 0 2px #e49a92; }
.matrix-duplicate-count { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 3px; border-radius: 99px; background: var(--red); color: white; font-size: 7px; }
.matrix-present span, .matrix-weekly_off_work span, .matrix-holiday_work span,
.matrix-work_from_home span, .matrix-official_duty span { background: var(--green-soft); color: var(--green); }
.manual-badge {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 4px 6px;
  border-radius: 99px; background: #e7eefb; color: #3c64a3; font-size: 8px; font-weight: 800;
}
.manual-badge .lucide { width: 11px; height: 11px; }
.matrix-lop span { background: var(--red-soft); color: var(--red); }
.matrix-paid_leave span { background: #e7eefb; color: #3c64a3; }
.matrix-weekly_off span { background: #eff1ed; color: #68716d; }
.matrix-holiday span { background: #f5f1da; color: #7e7130; }
.matrix-upcoming span { background: transparent; color: #b0b6b2; }
.matrix-not_calculated span { background: var(--orange-soft); color: var(--orange); }
.attendance-matrix .today-column { box-shadow: inset 2px 0 0 var(--lime), inset -2px 0 0 var(--lime); }
.status-upcoming { background: #f2f4f1; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 20px; }
.settings-grid .panel { padding-bottom: 22px; }
.settings-grid .stack-form { padding: 20px 22px 0; }
.fixed-rules { display: grid; gap: 8px; background: #f6f8f3; border-radius: 8px; padding: 13px; color: #4c5a53; font-size: 11px; }
.fixed-rules span { display: flex; align-items: center; gap: 7px; }
.fixed-rules .lucide { width: 14px; height: 14px; color: var(--green); }
.mini-list { margin: 20px 22px 0; border-top: 1px solid var(--line); }
.mini-list > div { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 10px 0; font-size: 11px; border-bottom: 1px solid #eef0ed; }
.mini-list span { color: var(--muted); }
.calendar-panel-heading { align-items: flex-start; gap: 14px; }
.calendar-panel-heading .button { flex: 0 0 auto; }
.calendar-exception-list {
  display: grid; margin: 18px 22px 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.calendar-exception-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 12px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.calendar-exception-row:last-child { border-bottom: 0; }
.calendar-exception-date {
  display: grid; justify-items: center; padding: 8px 6px;
  border-radius: 8px; background: #f5f7f3; color: var(--ink);
}
.calendar-exception-date span { font-size: 11px; font-weight: 800; }
.calendar-exception-date small { color: var(--muted); font-size: 9px; }
.calendar-exception-copy { min-width: 0; display: grid; gap: 6px; }
.calendar-exception-copy > strong { overflow-wrap: anywhere; font-size: 11px; }
.calendar-exception-status, .calendar-exception-actions {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.calendar-exception-actions { justify-content: flex-end; }
.calendar-exception-actions .text-link { font-size: 10px; }
.calendar-change-reason { color: var(--muted); line-height: 1.4; }
.chip.calendar-holiday { background: #fff3cf; color: #765f0e; }
.chip.calendar-working { background: var(--green-soft); color: var(--green); }
.calendar-exception-empty { padding: 22px; }

/* Employee and administrator help desk. */
.support-intro {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 20px; padding: 24px 26px; border-radius: 14px;
  color: #fff; background: linear-gradient(125deg, #0d7057, #0b5a47);
  box-shadow: var(--shadow);
}
.support-intro h2 { margin: 4px 0 7px; color: #fff; }
.support-intro p { margin: 0; color: #d8ece5; }
.support-intro .eyebrow { color: #cde95b; }
.support-guidance {
  max-width: 330px; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; background: rgba(255,255,255,.08); font-size: 11px;
}
.support-guidance .lucide { flex: 0 0 auto; color: var(--lime); }
.support-card-list { display: grid; gap: 0; }
.support-ticket-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  gap: 18px; padding: 17px 21px; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--line); transition: background .16s ease;
}
.support-ticket-card:hover { background: #f8fbf8; }
.support-ticket-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.support-ticket-title strong { font-size: 13px; }
.support-ticket-main > p {
  max-width: 850px; margin: 0 0 9px; color: var(--muted); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.support-ticket-meta { display: flex; gap: 8px 15px; flex-wrap: wrap; color: #77817c; font-size: 9px; }
.support-ticket-side { display: flex; align-items: center; gap: 12px; }
.support-ticket-side .lucide { width: 17px; color: var(--muted); }
.support-status, .support-priority {
  display: inline-flex; align-items: center; width: fit-content;
  border-radius: 99px; padding: 5px 8px; font-size: 9px; font-weight: 800;
  white-space: nowrap;
}
.support-status.status-open, .support-status.status-reopened { color: #9a561f; background: var(--orange-soft); }
.support-status.status-assigned, .support-status.status-in_progress { color: #315e9c; background: #e7eefb; }
.support-status.status-waiting_for_employee { color: #776015; background: #fff4cf; }
.support-status.status-resolved { color: var(--green); background: var(--green-soft); }
.support-status.status-closed, .support-status.status-cancelled, .support-status.status-duplicate { color: #67706c; background: #edf0ed; }
.support-priority.priority-low { color: #66706b; background: #edf0ed; }
.support-priority.priority-normal { color: #315e9c; background: #e7eefb; }
.support-priority.priority-high { color: #a9581f; background: var(--orange-soft); }
.support-priority.priority-urgent { color: #9f3f3f; background: var(--red-soft); }
.support-empty { padding: 45px 20px; text-align: center; }
.support-empty > span {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px;
  display: grid; place-items: center; background: var(--green-soft); color: var(--green);
}
.support-empty h3 { margin: 0 0 6px; }
.support-empty p { margin: 0 auto 16px; color: var(--muted); font-size: 11px; }
.support-security-note {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px;
  border-radius: 9px; background: #f3f6f2; color: var(--muted); font-size: 10px;
}
.support-security-note .lucide { width: 15px; flex: 0 0 auto; color: var(--green); }
.support-detail-layout {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,360px);
  align-items: start; gap: 20px;
}
.support-detail-heading { align-items: flex-start; }
.support-heading-badges { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.support-original-message, .support-message { padding: 19px 21px; }
.support-original-message { background: #fbfcfa; border-bottom: 1px solid var(--line); }
.support-original-message > p, .support-message > p {
  margin: 13px 0 8px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
}
.support-message-author { display: flex; align-items: center; gap: 10px; }
.support-message-author strong, .support-message-author small { display: block; }
.support-message-author small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.support-thread { display: grid; gap: 12px; padding: 18px 20px; }
.support-message { border: 1px solid var(--line); border-radius: 11px; }
.support-message.admin-message { margin-left: 42px; border-color: #cce3da; background: #f4faf7; }
.support-message.employee-message { margin-right: 42px; }
.support-message.internal-message { border-color: #ead990; background: #fff9e5; }
.support-message.internal-message .avatar { color: #776015; background: #fff0b9; }
.support-awaiting { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 25px; color: var(--muted); font-size: 11px; }
.support-attachment {
  display: inline-flex; align-items: center; gap: 6px; margin: 7px 7px 0 0;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--green); background: #fff; font-size: 10px; font-weight: 700;
  text-decoration: none;
}
.support-attachment .lucide { width: 14px; }
.support-reply-form {
  display: grid; gap: 12px; padding: 18px 20px 20px;
  border-top: 1px solid var(--line); background: #fbfcfa;
}
.support-reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.support-file {
  width: fit-content; display: inline-flex; align-items: center; gap: 7px;
  color: var(--green); font-size: 10px; font-weight: 700; cursor: pointer;
}
.support-file .lucide { width: 15px; }
.support-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.support-summary dl, .support-sla dl { margin: 0; padding: 8px 20px 18px; }
.support-summary dl > div, .support-sla dl > div {
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.support-summary dl > div:last-child, .support-sla dl > div:last-child { border-bottom: 0; }
.support-summary dt, .support-sla dt {
  margin-bottom: 4px; color: var(--muted); font-size: 9px;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.support-summary dd, .support-sla dd { margin: 0; font-size: 11px; font-weight: 600; line-height: 1.5; }
.support-side-action { overflow: visible; }
.support-side-action > summary {
  padding: 15px 18px; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700;
}
.support-side-action form { display: grid; gap: 11px; padding: 0 18px 18px; }
.support-admin-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 24px;
}
.support-admin-header h2 { margin: 4px 0 7px; }
.support-admin-header p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.support-admin-form { display: grid; gap: 13px; padding: 18px 20px 20px; }
.support-internal-toggle {
  width: fit-content; padding: 9px 11px; border-radius: 8px; background: #fff7dc;
}
.support-internal-toggle span { display: grid; gap: 2px; }
.support-internal-toggle small { color: var(--muted); }
.support-diagnostics { margin-top: 12px; }
.support-diagnostics summary { color: var(--muted); font-size: 10px; cursor: pointer; }
.support-diagnostics code {
  display: block; margin-top: 8px; padding: 10px; border-radius: 8px;
  background: #eef1ed; font-size: 9px; overflow-wrap: anywhere;
}
.support-history { padding: 0 18px 16px; }
.support-history > summary { padding: 16px 0; cursor: pointer; font-weight: 800; }
.support-ticket-table td:nth-child(3) { min-width: 220px; }
.shift-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 18px; }
.shift-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 13px; }
.shift-card-head { display: flex; justify-content: space-between; }
.shift-orb { width: 25px; height: 25px; border-radius: 8px; background: var(--green-soft); border: 7px solid var(--green); }

.payroll-month-toolbar {
  display: flex; align-items: end; justify-content: space-between; gap: 18px;
  padding: 18px 20px; margin-bottom: 20px;
}
.payroll-month-toolbar .view-month-selector { margin: 0; }
.payroll-toolbar-action { display: flex; justify-content: flex-end; }
.payroll-lock-notice { background: var(--green-soft); border-color: #c5e4d8; }
.payroll-lock-notice .notice-icon { background: var(--green); color: white; }
.payroll-late-punch-notice { background: #fff8df; border-color: #ead38a; }
.payroll-late-punch-notice .notice-icon { background: #b88a00; color: white; }
.payroll-ready-notice { background: #eef8e5; border-color: #d5e7a8; }
.payroll-ready-notice .notice-icon { background: var(--lime); color: var(--sidebar); }
.lock-reason { margin-top: 4px !important; font-weight: 600; }
.payroll-metrics { margin: 20px 0; }
.metric-card strong.metric-word { font-size: 27px; }
.payroll-check-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; padding: 18px 20px 22px;
}
.payroll-check-grid article {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbf9;
}
.payroll-check-grid article > .lucide { width: 18px; height: 18px; flex: 0 0 auto; }
.payroll-check-grid article strong,
.payroll-check-grid article span { display: block; }
.payroll-check-grid article strong { font-size: 11px; }
.payroll-check-grid article span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.payroll-check-grid article.passed > .lucide { color: var(--green); }
.payroll-check-grid article.failed { background: var(--red-soft); border-color: #efc7c3; }
.payroll-check-grid article.failed > .lucide,
.payroll-check-grid article.failed span { color: var(--red); }
.checksum { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#close-payroll label, #reopen-payroll label { margin-top: 16px; }

.report-filter-panel { margin-bottom: 20px; overflow: visible; }
.report-filter-panel .panel-heading p:last-child,
.report-result-heading p:last-child {
  max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 11px;
}
.report-filter-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(145px, .7fr) minmax(145px, .7fr) minmax(120px, .55fr);
  gap: 12px; align-items: end; padding: 18px 20px 12px;
}
.report-filter-grid label { min-width: 0; }
.report-filter-grid label > select,
.report-filter-grid label > input { width: 100%; }
.report-view-button { min-height: 41px; justify-content: center; }
.report-filter-help {
  display: flex; align-items: center; gap: 7px; padding: 0 20px 18px;
  color: var(--muted); font-size: 9px;
}
.report-filter-help .lucide { width: 13px; height: 13px; color: var(--green); }
.report-result-panel { overflow: hidden; }
.report-result-heading { align-items: flex-start; }
.report-table-wrap { max-height: 620px; overflow: auto; }
.report-table { min-width: max-content; }
.report-table th { position: sticky; top: 0; z-index: 2; background: #f6f8f4; }
.report-table td { max-width: 360px; white-space: normal; }

.login-body {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; background: #e9ece6; padding: 25px;
}
.login-body .app-footer { width: min(960px, 100%); margin-top: 0; }
.login-shell { width: min(960px, 100%); min-height: 610px; background: white; border-radius: 20px; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; box-shadow: 0 30px 100px rgba(20,34,29,.16); }
.login-visual { background: var(--sidebar); color: white; padding: 55px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(205,233,91,.15); border-radius: 50%; width: 420px; height: 420px; right: -260px; top: -110px; }
.login-visual::after { width: 280px; height: 280px; right: -150px; top: -25px; }
.login-visual .brand-mark { margin-bottom: 45px; }
.login-visual h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1; margin-bottom: 22px; }
.login-visual > p:not(.eyebrow) { color: #aabbb3; line-height: 1.7; font-size: 14px; max-width: 390px; }
.rule-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.rule-pills span { border: 1px solid rgba(255,255,255,.13); padding: 7px 9px; border-radius: 99px; font-size: 9px; color: #c9d5cf; }
.login-panel { padding: 65px 55px; display: flex; flex-direction: column; justify-content: center; gap: 27px; }
.login-company-logo {
  width: min(285px, 82%); height: auto; display: block; align-self: flex-start; margin-bottom: 4px;
}
.login-panel h2 { font-size: 30px; }
.login-panel .muted { margin: 8px 0 0; font-size: 13px; }
.login-note { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; }
.password-input-shell { position: relative; display: block; width: 100%; }
.password-input-shell > input { width: 100%; padding-right: 45px !important; }
.password-visibility-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  display: grid; place-items: center; background: transparent; color: var(--muted);
  cursor: pointer; transition: color .16s ease, background .16s ease;
}
.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible { color: var(--green); background: #edf4ef; outline: none; }
.password-visibility-toggle .lucide { width: 17px; height: 17px; }

.activation-card {
  width: min(520px, 100%); background: #fff; border-radius: 20px; padding: 42px;
  box-shadow: 0 25px 80px rgba(20,34,29,.14); display: grid; gap: 26px;
}
.activation-card h1 { margin: 5px 0 8px; font-size: 30px; }
.activation-card .login-company-logo { width: min(280px, 82%); }

.portal-body {
  min-height: 100vh; background: #f3f5f1;
  font-family: "DM Sans", system-ui, sans-serif; font-size: 13px;
}
.portal-sidebar {
  position: fixed; inset: 0 auto 0 0; width: 255px; padding: 24px 20px;
  background: var(--sidebar); display: flex; flex-direction: column; z-index: 20;
  overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(205,233,91,.35) transparent;
  transition: width .22s ease, padding .22s ease;
}
.portal-sidebar-header { flex: 0 0 auto; }
.portal-mobile-menu { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.portal-mobile-menu-state {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.portal-mobile-menu-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 14px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px; background: #19382d; color: #d5dfda;
  font: inherit; font-weight: 700; cursor: pointer;
}
.portal-mobile-menu-toggle .lucide { width: 18px; height: 18px; }
.portal-menu-close-icon,
.portal-menu-close-label { display: none; }
.portal-brand { display: block; margin-bottom: 12px; }
.portal-brand span { background: #fff; border-radius: 14px; box-shadow: 0 5px 18px rgba(0,0,0,.16); }
.portal-brand img { display: block; width: 100%; height: auto; }
.portal-logo-full { display: block; padding: 13px; }
.portal-logo-compact { display: none; width: 46px; height: 46px; overflow: hidden; }
.portal-logo-compact img { width: 46px; height: 46px; object-fit: cover; }
.portal-sidebar .sidebar-toggle { width: 100%; margin: 0 0 20px; }
.portal-nav-label { margin: 0 12px 10px; color: #71887d; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.portal-sidebar nav { display: grid; gap: 7px; }
.portal-sidebar nav a, .portal-sidebar-bottom a, .portal-sidebar-bottom button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 0; border-radius: 11px; background: transparent; color: #b8c7c0;
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.portal-sidebar nav a:hover, .portal-sidebar-bottom a:hover, .portal-sidebar-bottom button:hover,
.portal-sidebar nav a.active { background: #203f2b; color: #d1ef4e; }
.portal-sidebar .lucide { width: 18px; height: 18px; }
.portal-sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.portal-sidebar-bottom form { margin: 0; }
.portal-main { margin-left: 255px; padding: 32px 38px 48px; min-width: 0; }
body.sidebar-collapsed .portal-sidebar { width: 78px; padding: 22px 11px 18px; }
body.sidebar-collapsed .portal-main { margin-left: 78px; }
body.sidebar-collapsed .portal-brand { width: 46px; margin: 0 auto 12px; }
body.sidebar-collapsed .portal-logo-full { display: none; }
body.sidebar-collapsed .portal-logo-compact { display: block; }
body.sidebar-collapsed .portal-sidebar .sidebar-toggle { width: 40px; margin: 0 auto 20px; padding: 0; }
body.sidebar-collapsed .portal-sidebar .nav-label { display: none; }
body.sidebar-collapsed .portal-sidebar nav a,
body.sidebar-collapsed .portal-sidebar-bottom a,
body.sidebar-collapsed .portal-sidebar-bottom button {
  justify-content: center; gap: 0; padding: 12px 8px;
}
.portal-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.portal-topbar h1 { font-size: 27px; margin-top: 3px; }
.portal-account { display: flex; align-items: center; gap: 10px; }
.portal-account > div:not(.notification-center) { display: grid; }
.portal-account small { color: var(--muted); }
.portal-welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 27px 30px; border-radius: 17px; background: linear-gradient(120deg,#0f7c62,#125b4c);
  color: #fff; margin-bottom: 20px; box-shadow: 0 16px 36px rgba(18,91,76,.16);
}
.portal-welcome.compact { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.portal-welcome h2 { margin: 4px 0 6px; font-size: 19px; }
.portal-welcome p:not(.eyebrow) { color: inherit; opacity: .78; margin: 0; }
.portal-welcome form { display: flex; gap: 9px; align-items: center; }
.portal-attendance-filters {
  display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px; width: min(690px, 100%);
}
.portal-welcome form.portal-attendance-filter {
  min-width: 0; padding: 11px 12px 12px;
  display: grid; align-items: stretch; gap: 8px;
  border: 1px solid var(--line); border-radius: 12px; background: #f8faf8;
}
.portal-period-controls {
  display: grid; grid-template-columns: minmax(135px, 1fr) auto;
  align-items: stretch; gap: 8px;
}
.portal-period-controls input,
.portal-period-controls .button {
  min-width: 0; min-height: 42px; height: 42px; margin: 0;
}
.portal-period-controls .button { padding-inline: 15px; white-space: nowrap; }
.portal-welcome input { min-height: 42px; border-radius: 9px; border: 1px solid var(--border); padding: 0 12px; background: #fff; }
.portal-welcome form.portal-dashboard-filter {
  width: min(305px, 100%); display: grid; align-items: stretch; gap: 8px;
}
.portal-dashboard-filter > .filter-label {
  color: rgba(255,255,255,.78); opacity: 1;
}
.portal-dashboard-controls {
  display: grid; grid-template-columns: minmax(165px, 1fr) auto;
  align-items: stretch; gap: 9px;
}
.portal-dashboard-controls input,
.portal-dashboard-controls .button {
  min-height: 42px; height: 42px; margin: 0;
}
.portal-dashboard-controls .button { padding-inline: 16px; white-space: nowrap; }
.portal-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 20px; }
.portal-metrics article { padding: 20px; border-radius: 15px; border: 1px solid; display: grid; gap: 7px; min-height: 130px; }
.portal-metrics article span { font-size: 11px; font-weight: 700; }
.portal-metrics article strong { font-family: "Manrope",sans-serif; font-size: 27px; }
.portal-metrics article small { margin-top: auto; opacity: .72; }
.portal-metrics .green { background: #117b62; border-color: #117b62; color: #fff; }
.portal-metrics .blue { background: #e9f0fc; border-color: #c8d8f2; color: #183e7d; }
.portal-metrics .orange { background: #fff0e3; border-color: #f2ceb0; color: #a85216; }
.portal-metrics .red { background: #fce9e9; border-color: #efcaca; color: #a63d3d; }
.portal-metrics .mint { background: #e3f4ee; border-color: #bee2d5; color: #09614e; }

.holiday-calendar-panel { margin-top: 24px; overflow: hidden; }
.holiday-calendar-heading { align-items: flex-start; gap: 20px; }
.holiday-calendar-heading h2 { margin-bottom: 5px; }
.holiday-calendar-help, .holiday-calendar-empty { margin: 0; color: var(--muted); font-size: 12px; }
.holiday-calendar-legend { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.holiday-calendar-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.holiday-legend-dot { width: 11px; height: 11px; display: inline-block; border-radius: 3px; background: #f6f7f4; border: 1px solid var(--line); }
.holiday-legend-dot.holiday { background: #fff3cf; border-color: #ead990; }
.holiday-legend-dot.weekly-off { background: #edf0ec; border-color: #d9dfda; }
.holiday-legend-dot.today { background: #e2f2ec; border: 2px solid var(--green); }
.holiday-calendar-scroll { overflow-x: auto; }
.holiday-calendar {
  min-width: 650px; display: grid; grid-template-columns: repeat(7, minmax(82px, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.holiday-calendar-weekday {
  min-height: 34px; display: grid; place-items: center; padding: 8px;
  background: #f7f8f5; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.holiday-calendar-day {
  min-height: 76px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #fff; display: flex; flex-direction: column; gap: 6px;
}
.holiday-calendar-day.outside { background: #fafbf9; }
.holiday-calendar-day.holiday { background: #fff8df; color: #7a6514; }
.holiday-calendar-day.weekly-off { background: #f1f3ef; color: #68716d; }
.holiday-calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--green); }
.holiday-day-number { font: 700 13px/1 "Manrope", sans-serif; }
.holiday-calendar-day small { font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }
.holiday-calendar-list { display: flex; gap: 9px; flex-wrap: wrap; padding: 15px 18px 0; }
.holiday-calendar-list span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px;
  border-radius: 8px; background: #fff8df; color: #6d5b18; font-size: 10px;
}
.holiday-calendar-list .lucide { width: 14px; height: 14px; }
.holiday-calendar-empty { padding: 14px 18px 18px; }
.portal-grid, .portal-request-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.portal-request-actions { margin-bottom: 20px; }
.profile-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 0; padding: 0 20px 20px; }
.profile-details div { padding: 13px 0; border-bottom: 1px solid var(--border); }
.profile-details dt { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.profile-details dd { margin: 5px 0 0; font-weight: 600; }
.portal-list { padding: 0 20px 20px; }
.portal-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.portal-list span { display: grid; gap: 3px; }
.portal-list span:last-child { text-align: right; }
.portal-list small { color: var(--muted); }
.portal-form { padding: 0 20px 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.portal-form .wide { grid-column: 1 / -1; }
.portal-form button { justify-self: start; }
.portal-form.single { grid-template-columns: minmax(280px,520px); }
.portal-welcome form.portal-year-filter {
  width: min(310px, 100%); padding: 11px 12px 12px;
  display: grid; align-items: stretch; gap: 8px;
  border: 1px solid var(--line); border-radius: 12px; background: #f8faf8;
}
.portal-year-controls {
  display: grid; grid-template-columns: minmax(105px, 1fr) auto;
  align-items: stretch; gap: 8px;
}
.portal-year-filter input {
  width: 100%; min-width: 0; min-height: 42px; height: 42px;
  border-color: #e2e6e2; background: #fff; font-weight: 700;
}
.portal-year-filter input:hover { border-color: #cbd3cd; }
.portal-year-filter .button {
  min-height: 42px; height: 42px; padding-inline: 16px; white-space: nowrap;
}
.portal-approval-route {
  margin: 18px 20px; padding: 13px 15px;
  border: 1px solid #c8e7dc; border-radius: 10px;
}
.portal-password-panel { max-width: 760px; }
.portal-password-panel .panel-heading { padding: 22px 22px 20px; }
.portal-password-panel .panel-heading p:last-child {
  margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5;
}
.portal-password-form {
  padding: 20px 20px 22px; gap: 17px;
}
.portal-password-form label { gap: 8px; }
.portal-password-form .button { margin-top: 2px; }
.balance-pill { background: #e3f4ee; color: #09614e; border-radius: 99px; padding: 7px 10px; font-size: 10px; font-weight: 700; }
.status-badge { display: inline-flex; border-radius: 99px; padding: 5px 8px; font-size: 9px; font-weight: 800; background: #eef0ed; color: #68756e; }
.status-badge.present, .status-badge.approved, .status-badge.work_from_home, .status-badge.official_duty { background: #e0f2eb; color: #08725a; }
.status-badge.pending_manager, .status-badge.pending_hr { background: #fff0df; color: #a45a1e; }
.status-badge.returned_to_employee { background: #fff4cf; color: #776015; }
.status-badge.rejected, .status-badge.lop { background: #fbe5e5; color: #b43f3f; }
.status-badge.paid_leave { background: #e5edfb; color: #325d9f; }
.workflow-attachments { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; padding: 10px 12px; border-radius: 9px; background: #f5f7f3; }
.workflow-attachments > small { width: 100%; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.text-link.danger { color: var(--red); }
.portal-avatar { overflow: hidden; }
.portal-avatar img, .profile-photo-preview img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.payroll-status-badge {
  width: fit-content; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 9px; border-radius: 99px;
  background: rgba(255,255,255,.15); color: #fff;
  font-size: 10px; font-weight: 800;
}
.payroll-status-badge .lucide { width: 14px; height: 14px; }
.portal-profile-photo {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center; gap: 16px; margin: 18px 20px 10px;
  padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 12px; background: #f8faf7;
}
.profile-photo-preview {
  width: 78px; height: 78px; overflow: hidden;
  display: grid; place-items: center; border-radius: 16px;
  background: var(--green); color: #fff;
  font: 800 25px/1 "Manrope", sans-serif;
}
.profile-photo-copy { min-width: 0; display: grid; gap: 5px; }
.profile-photo-copy > strong { font-size: 13px; }
.portal-profile-photo small { color: var(--muted); font-size: 10px; }
.profile-photo-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 7px; flex-wrap: wrap;
}
.profile-photo-actions label { display: inline-flex; color: var(--ink); }
.profile-photo-actions input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.portal-shift-panel { margin-top: 20px; }
.shift-assignment-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px;
  padding: 18px 22px;
}
.shift-assignment-grid article {
  padding: 15px; border: 1px solid var(--line); border-radius: 10px;
  display: grid; align-content: start; gap: 5px;
}
.shift-assignment-grid article > small {
  color: var(--muted); font-size: 9px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.shift-assignment-grid article > div {
  display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.shift-assignment-grid span, .shift-assignment-grid p {
  margin: 0; color: var(--muted); font-size: 11px;
}
.shift-history { margin: 0 22px 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.shift-history summary { color: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.shift-history > div {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px;
}
.shift-history > div span { display: grid; gap: 3px; }
.shift-history > div span:last-child { color: var(--muted); text-align: right; }
.leave-charge-preview {
  display: flex; align-items: center; gap: 9px; min-height: 42px;
  padding: 10px 12px; border-radius: 9px;
  background: #f4f6f2; color: var(--muted); font-size: 11px;
}
.leave-charge-preview.ready { background: var(--green-soft); color: var(--green); }
.leave-charge-preview.error { background: var(--red-soft); color: var(--red); }
.leave-charge-preview .lucide { width: 16px; height: 16px; }
.portal-history { min-width: 230px; margin-top: 8px; }
.portal-history .history-event { min-width: 0; }
.team-approval-section { margin-bottom: 20px; overflow: hidden; }
.team-approval-section > .panel-heading { padding: 19px 21px; }
.team-approval-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px;
  padding: 18px; background: #fafcf9;
}
.team-approval-empty {
  grid-column: 1 / -1; min-height: 96px; padding: 20px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 1px dashed #cfd9d2; border-radius: 12px; background: #fff;
  color: var(--muted); text-align: left;
}
.team-approval-empty-icon {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
  border-radius: 12px; background: var(--green-soft); color: var(--green);
}
.team-approval-empty-icon .lucide { width: 20px; height: 20px; }
.team-approval-empty strong { display: block; color: var(--ink); font-size: 13px; }
.team-approval-empty p { margin: 4px 0 0; font-size: 11px; line-height: 1.45; }
}
.manager-review-context {
  display: grid; gap: 8px; margin: 12px 0; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8faf8;
}
.manager-review-context > div { display: flex; justify-content: space-between; gap: 12px; }
.manager-review-context details { padding-top: 8px; border-top: 1px solid var(--line); }
.manager-review-context summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.manager-review-context p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.leave-balance-breakdown {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px;
  padding: 18px 20px 20px; background: #fafcf9;
}
.leave-balance-breakdown article {
  min-width: 0; padding: 18px 19px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(18,39,30,.035);
}
.leave-balance-breakdown article > strong { display: block; margin-bottom: 14px; }
.leave-balance-breakdown dl { display: grid; gap: 8px; margin: 0; }
.leave-balance-breakdown dl > div { display: flex; justify-content: space-between; gap: 12px; }
.leave-balance-breakdown dt { color: var(--muted); font-size: 11px; }
.leave-balance-breakdown dd { margin: 0; font-size: 12px; font-weight: 700; }
.leave-balance-breakdown .balance-available {
  margin-top: 7px; padding: 10px 11px; border-top: 0; border-radius: 8px;
  background: var(--green-soft); color: var(--green);
}
.leave-balance-breakdown > .empty {
  grid-column: 1 / -1; margin: 0; border: 1px dashed var(--line);
  border-radius: 11px; background: #fff;
}
.team-approval-card { padding: 18px; margin: 0; }
.team-request-person {
  display: grid; grid-template-columns: 38px minmax(0,1fr) auto;
  gap: 10px; align-items: center; margin-bottom: 15px;
}
.team-request-person > div { display: grid; gap: 3px; }
.team-request-person small { color: var(--muted); font-size: 10px; }
.team-request-details {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px; margin: 0;
}
.team-request-details div { padding: 10px; border-radius: 8px; background: #f6f8f4; }
.team-request-details dt {
  color: var(--muted); font-size: 8px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.team-request-details dd { margin: 4px 0 0; font-size: 11px; font-weight: 700; }
.team-request-reason { margin: 13px 0; font-size: 12px; line-height: 1.5; }
.team-decision-form {
  display: grid; gap: 11px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.team-decision-form .dialog-actions { margin-top: 0; }
.profile-crop-dialog {
  width: min(780px, calc(100% - 30px)); max-height: calc(100vh - 30px);
  padding: 24px; overflow: auto;
}
.profile-crop-dialog .dialog-heading { margin-bottom: 8px; }
.profile-crop-help { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.profile-crop-layout {
  display: grid; grid-template-columns: minmax(280px,480px) minmax(150px,1fr);
  gap: 22px; align-items: start;
}
.profile-crop-stage {
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 1;
  border-radius: 13px; background:
    linear-gradient(45deg,#e9ece7 25%,transparent 25%),
    linear-gradient(-45deg,#e9ece7 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#e9ece7 75%),
    linear-gradient(-45deg,transparent 75%,#e9ece7 75%);
  background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0;
  cursor: grab; touch-action: none; user-select: none;
}
.profile-crop-stage.dragging { cursor: grabbing; }
.profile-crop-stage canvas { width: 100%; height: 100%; display: block; }
.profile-crop-guide {
  position: absolute; inset: 6%; border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(9,24,18,.2), inset 0 0 0 1px rgba(0,0,0,.12);
}
.profile-crop-controls { display: grid; gap: 18px; }
.profile-crop-controls > div { display: grid; justify-items: start; gap: 7px; }
.profile-crop-controls small {
  color: var(--muted); font-size: 9px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.profile-crop-controls canvas {
  width: 120px; height: 120px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.profile-crop-controls input[type="range"] {
  width: 100%; min-height: auto; padding: 0; accent-color: var(--green);
}
.profile-crop-error {
  margin: 14px 0 0; padding: 10px 12px; border-radius: 8px;
  background: var(--red-soft); color: var(--red); font-size: 11px;
}

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .shift-grid { grid-template-columns: repeat(2, 1fr); }
  .employee-attendance-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-report-profile { grid-template-columns: 58px 1fr; }
  .employee-report-meta { grid-column: 1 / -1; }
  .payroll-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-management-grid { grid-template-columns: 1fr; }
  .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .team-approval-grid { grid-template-columns: 1fr; }
  .leave-balance-breakdown { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .support-detail-layout { grid-template-columns: minmax(0,1fr) 300px; }
}
@media (max-width: 1023px) {
  body.admin-desktop-only { overflow: hidden; }
  body.admin-desktop-only > .sidebar,
  body.admin-desktop-only > main { display: none !important; }
  .admin-desktop-required {
    position: fixed; inset: 0; z-index: 10000;
    display: grid; place-items: center; overflow: auto;
    padding: 24px; background:
      radial-gradient(circle at 15% 15%, rgba(205,233,91,.15), transparent 28%),
      linear-gradient(145deg, #10231c, #173a2e);
  }
  .admin-desktop-required-card {
    width: min(100%, 520px); padding: 36px;
    border: 1px solid rgba(255,255,255,.13); border-radius: 20px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 24px 70px rgba(0,0,0,.28); text-align: center;
  }
  .admin-desktop-required-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    display: grid; place-items: center; border-radius: 18px;
    background: var(--green-soft); color: var(--green);
  }
  .admin-desktop-required-icon .lucide { width: 30px; height: 30px; }
  .admin-desktop-required-card .eyebrow { margin-bottom: 7px; }
  .admin-desktop-required-card h1 {
    margin: 0; color: var(--ink); font: 800 25px/1.2 Manrope, sans-serif;
  }
  .admin-desktop-required-card > p:last-of-type {
    max-width: 410px; margin: 14px auto 0;
    color: var(--muted); font-size: 14px; line-height: 1.65;
  }
  .admin-desktop-required-actions {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 10px; margin-top: 25px;
  }
  .admin-desktop-required-actions form { margin: 0; }
}
@media (min-width: 1024px) {
  .admin-desktop-required { display: none; }
}
@media (max-width: 800px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 14px; }
  .sidebar-toggle { display: none; }
  body.sidebar-collapsed .sidebar { width: 100%; padding: 14px; }
  body.sidebar-collapsed main { margin-left: 0; }
  body.sidebar-collapsed .brand { justify-content: flex-start; margin: 0 0 12px; }
  body.sidebar-collapsed .sidebar-logo-full { display: grid; }
  body.sidebar-collapsed .sidebar-logo-compact { display: none; }
  body.sidebar-collapsed .sidebar .nav-label { display: inline; }
  .brand { margin: 0 0 12px; }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar nav a { justify-content: center; font-size: 11px; padding: 9px; }
  .sidebar nav a .nav-icon { display: none; }
  .sidebar-bottom { display: none; }
  main { margin-left: 0; padding: 22px 15px 45px; }
  .topbar, .notice-card { align-items: flex-start; flex-direction: column; }
  .global-header-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
  .split-grid, .import-grid, .settings-grid, .organization-grid { grid-template-columns: 1fr; }
  .employee-attendance-filter, .employee-report-meta { grid-template-columns: 1fr; }
  .payroll-month-toolbar { align-items: stretch; flex-direction: column; }
  .device-detail-grid { grid-template-columns: 1fr; }
  .report-filter-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { padding: 45px 28px; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .portal-sidebar {
    position: sticky; inset: 0 0 auto; width: 100%; height: auto;
    padding: 11px 14px; overflow: visible;
    box-shadow: 0 8px 24px rgba(9,28,21,.16);
  }
  .portal-sidebar-header {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
  }
  .portal-sidebar .sidebar-toggle { display: none; }
  .portal-mobile-menu-toggle { display: inline-flex; flex: 0 0 auto; }
  .portal-mobile-menu { display: none; padding-top: 13px; }
  .portal-mobile-menu-state:checked ~ .portal-mobile-menu {
    display: flex; max-height: calc(100vh - 78px); overflow-y: auto;
  }
  .portal-mobile-menu-state:focus-visible + .portal-sidebar-header .portal-mobile-menu-toggle {
    outline: 3px solid #5aa4ff; outline-offset: 2px;
  }
  .portal-mobile-menu-state:checked + .portal-sidebar-header .portal-menu-open-icon,
  .portal-mobile-menu-state:checked + .portal-sidebar-header .portal-menu-open-label {
    display: none;
  }
  .portal-mobile-menu-state:checked + .portal-sidebar-header .portal-menu-close-icon,
  .portal-mobile-menu-state:checked + .portal-sidebar-header .portal-menu-close-label {
    display: inline;
  }
  body.sidebar-collapsed .portal-sidebar { width: 100%; padding: 14px; }
  body.sidebar-collapsed .portal-main { margin-left: 0; }
  body.sidebar-collapsed .portal-brand { width: 150px; margin: 0; }
  body.sidebar-collapsed .portal-logo-full { display: block; }
  body.sidebar-collapsed .portal-logo-compact { display: none; }
  body.sidebar-collapsed .portal-sidebar .nav-label { display: inline; }
  body.sidebar-collapsed .portal-sidebar nav a,
  body.sidebar-collapsed .portal-sidebar-bottom a,
  body.sidebar-collapsed .portal-sidebar-bottom button { justify-content: flex-start; gap: 12px; padding: 12px 14px; }
  .portal-sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-sidebar-bottom {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px; margin-top: 13px;
  }
  .portal-sidebar-bottom form:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .portal-brand { width: 150px; margin: 0; }
  .portal-logo-full { padding: 7px 9px; border-radius: 10px !important; }
  .portal-main { margin-left: 0; padding: 20px 15px 45px; }
  .portal-topbar, .portal-welcome { align-items: flex-start; flex-direction: column; }
  .portal-topbar { gap: 15px; margin-bottom: 21px; }
  .portal-topbar h1 { font-size: 24px; }
  .portal-welcome .compact-filter,
  .portal-welcome .portal-dashboard-filter,
  .portal-attendance-filters,
  .portal-attendance-filters .portal-attendance-filter { width: 100%; }
  .portal-attendance-filters { grid-template-columns: 1fr; }
  .portal-grid, .portal-request-actions { grid-template-columns: 1fr; }
  .holiday-calendar-heading { flex-direction: column; }
  .holiday-calendar-legend { justify-content: flex-start; }
  .support-intro, .support-admin-header { align-items: flex-start; flex-direction: column; }
  .support-guidance { max-width: none; }
  .support-detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .toast-region { top: 14px; right: 14px; width: calc(100vw - 28px); }
  .metric-grid, .shift-grid, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .filterbar > * { width: 100% !important; }
  .app-filterbar { padding: 15px; gap: 11px; }
  .app-filterbar .filter-field { max-width: none; min-width: 0; }
  .app-filterbar .filter-actions { display: grid; grid-template-columns: 1fr auto; }
  .app-filterbar .filter-actions .button { width: 100%; }
  .app-filterbar .result-count { margin-left: 0; text-align: center; }
  .compact-filter { width: 100%; }
  .compact-filter .filter-field { flex: 1 1 100%; min-width: 0; }
  .compact-filter > .button { flex: 1 1 auto; }
  .portal-dashboard-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .portal-period-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .report-filter-grid .filter-actions { display: grid; grid-template-columns: 1fr auto; }
  .filter-section-heading { margin-bottom: 14px; }
  .result-count { margin-left: 0; }
  .log-detail-grid { grid-template-columns: 1fr 1fr; }
  .payroll-check-grid { grid-template-columns: 1fr; }
  .portal-metrics, .profile-details, .portal-form, .shift-assignment-grid { grid-template-columns: 1fr; }
  .calendar-panel-heading { flex-direction: column; }
  .calendar-panel-heading .button { width: 100%; }
  .calendar-exception-row { grid-template-columns: 56px minmax(0, 1fr); }
  .calendar-exception-actions {
    grid-column: 1 / -1; justify-content: flex-start;
    padding-top: 8px; border-top: 1px solid var(--line);
  }
  .support-ticket-card { grid-template-columns: 1fr; }
  .support-ticket-title { align-items: flex-start; flex-direction: column; }
  .support-ticket-side { justify-content: space-between; }
  .support-message.admin-message, .support-message.employee-message { margin: 0; }
  .support-reply-actions { align-items: stretch; flex-direction: column; }
  .support-reply-actions .button { width: 100%; }
  .support-heading-badges { justify-content: flex-start; }
  .portal-profile-photo {
    grid-template-columns: 68px minmax(0, 1fr); gap: 13px;
    margin: 14px; padding: 14px;
  }
  .profile-photo-preview { width: 68px; height: 68px; }
  .profile-photo-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .portal-welcome form.portal-year-filter { width: 100%; padding: 10px; }
  .portal-approval-route { margin: 15px 14px; padding: 12px 13px; }
  .leave-balance-breakdown { grid-template-columns: 1fr; padding: 14px; gap: 12px; }
  .portal-form .wide { grid-column: auto; }
  .portal-sidebar { padding-inline: 12px; }
  .portal-brand,
  body.sidebar-collapsed .portal-brand { width: 138px; }
  .portal-mobile-menu-toggle { min-height: 40px; padding-inline: 12px; }
  .portal-sidebar nav { grid-template-columns: 1fr; }
  .portal-sidebar-bottom { grid-template-columns: 1fr; }
  .portal-sidebar-bottom form:last-child:nth-child(odd) { grid-column: auto; }
  .portal-account { width: 100%; }
  .portal-account .notification-center { margin-left: auto; }
  .profile-crop-layout { grid-template-columns: 1fr; }
  .profile-crop-controls { grid-template-columns: 130px minmax(0,1fr); align-items: center; }
  .profile-crop-controls > .button { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .app-toast,
  .app-toast.is-leaving { animation: none; }
}
