:root {
  --chicken: #ed9513;
  --chicken-dark: #d77709;
  --ink: #1b1b18;
  --muted: #6f767e;
  --bg: #c47a0a;
  --card: #ffffff;
  --line: #eaeaea;
  --primary: #468dff;
  --badge: #1890ff;
  --sidebar: #050c1a;
  --accent: #8a63d2;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(5, 12, 26, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg); }
body {
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, select { font: inherit; }
button { cursor: pointer; }

body.login-screen {
  min-height: 100vh;
  color: #fff;
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
  background: #c47a0a url("/brand/bg.jpg") center 35% / cover no-repeat fixed;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
}
.login-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 28% 42%, rgba(0, 0, 0, 0.08), rgba(18, 10, 2, 0.46) 72%);
}
.login-stage {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 40px));
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) 1.1fr;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.login-panel {
  padding: 40px 36px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(22, 14, 6, 0.46), rgba(22, 14, 6, 0.58));
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.brand-mark { text-align: center; margin-bottom: 8px; }
.brand-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.eyebrow {
  margin: 14px 0 0;
  color: #ffd089;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.login-panel h1 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.7px;
}
.login-panel .lead {
  margin: 8px 0 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}
.login-panel .field {
  position: relative;
  display: block;
  margin-bottom: 14px;
}
.login-panel .field span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 650;
}
.field-icon {
  position: absolute;
  left: 14px;
  bottom: 16px;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}
.login-panel input {
  margin: 0;
  height: 52px;
  padding: 0 46px 0 42px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.login-panel input::placeholder { color: rgba(255, 255, 255, 0.55); }
.login-panel input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffc56a;
  box-shadow: 0 0 0 4px rgba(237, 149, 19, 0.28);
}
.eye {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
}
.eye:hover { background: rgba(255, 255, 255, 0.12); }
.eye svg { width: 18px; height: 18px; display: block; }
.login-panel .btn {
  width: 100%;
  margin-top: 8px;
  padding: 15px 16px;
  color: #fff;
  background: linear-gradient(180deg, #f6ae3a, #d77709);
  border-radius: 14px;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 26px rgba(215, 119, 9, 0.38);
}
.login-panel .btn:hover { background: #c96d08; }
.login-panel .message.error {
  background: rgba(180, 35, 24, 0.28);
  color: #fff;
  border: 1px solid rgba(255, 180, 171, 0.4);
}
.login-panel .message.ok {
  background: rgba(23, 138, 72, 0.32);
  color: #fff;
  border: 1px solid rgba(180, 255, 210, 0.4);
}
.login-panel input.invalid {
  border-color: #ffb4ab;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.35);
}
.login-showcase {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 32px;
}
.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(12, 8, 4, 0.55));
}
.showcase-art {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 7%;
  bottom: 28%;
  width: 88%;
  height: 65%;
  margin: auto;
  object-fit: contain;
  opacity: 0.72;
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
}
.showcase-copy {
  position: relative;
  z-index: 1;
  max-width: 320px;
}
.showcase-copy strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.5px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.showcase-copy p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
@media (max-width: 860px) {
  .login-screen { padding: 16px 12px; }
  .login-stage { grid-template-columns: 1fr; min-height: 0; }
  .login-panel { padding: 28px 18px 24px; border-right: 0; }
  .login-panel h1 { font-size: 30px; }
  .login-showcase { min-height: 150px; padding: 18px; order: -1; }
  .showcase-copy strong { font-size: 22px; }
}
h1 { margin: 14px 0 6px; font-size: 30px; letter-spacing: -0.4px; }
.lead { margin: 0 0 22px; color: var(--muted); }
.page-hero h1 { margin: 2px 0 0; font-size: 28px; }
.page-hero .lead, #page-count { margin: 6px 0 10px; font-size: 14px; }
label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select[multiple] { min-height: 140px; }
input:focus, select:focus {
  outline: none;
  border-color: var(--chicken);
  box-shadow: 0 0 0 4px rgba(237, 149, 19, 0.18);
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--chicken);
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(215, 119, 9, 0.18);
  transition: transform 0.15s, background 0.15s;
}
.view-btn, .edit-btn, #table-body .btn { box-shadow: none; border-radius: 10px; }
.btn:hover { background: var(--chicken-dark); transform: translateY(-1px); }
.btn:disabled { opacity: 0.7; transform: none; cursor: wait; }
.btn.ghost {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
.message { display: none; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.message.error { display: block; background: #fff1f0; color: #b42318; }
.message.ok { display: block; background: #fff7e8; color: #8a5a00; }
.toast-stack { position: fixed; top: 18px; right: 18px; z-index: 80; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 14px 14px 14px 12px; border-radius: 16px; background: #fff; border: 1px solid #e6ebf2; box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16); transform: translateY(-8px); opacity: 0; transition: transform 0.22s ease, opacity 0.22s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.leave { transform: translateY(-8px); opacity: 0; }
.toast.ok { border-left: 4px solid #178a48; }
.toast.error { border-left: 4px solid #b42318; }
.toast-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; }
.toast.ok .toast-icon { background: #e8f8ef; color: #178a48; }
.toast.error .toast-icon { background: #fff1f0; color: #b42318; }
.toast strong { display: block; font-size: 15px; }
.toast p { margin: 3px 0 0; color: #667085; font-size: 13px; line-height: 1.4; }
.toast button { border: 0; background: transparent; color: #98a2b3; font-size: 20px; line-height: 1; padding: 0 2px; cursor: pointer; }
.confirm-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(16, 24, 40, 0.45); }
.confirm-modal[hidden] { display: none; }
.confirm-card { width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22); }
.confirm-card h3 { margin: 0 0 8px; font-size: 20px; }
.confirm-card p { margin: 0; color: #667085; line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.shell { --rail: 280px; min-height: 100vh; display: grid; grid-template-columns: var(--rail) 1fr; transition: grid-template-columns 0.2s ease; }
.menu-collapse {
  position: fixed;
  top: 22px;
  left: calc(var(--rail) - 21px);
  z-index: 40;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffc15a, #ed9513);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18), 0 0 0 4px rgba(237, 149, 19, 0.16);
  transition: left 0.2s ease, transform 0.2s ease;
}
.menu-collapse svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.menu-collapse:hover { transform: scale(1.08); background: linear-gradient(180deg, #ffd27a, #d77709); }
.shell.menu-collapsed { --rail: 76px; }
.shell.menu-collapsed .menu-collapse svg { transform: rotate(180deg); }
.shell.menu-collapsed .sidebar {
  align-items: center;
  padding: 16px 8px;
  overflow-x: hidden;
  scrollbar-width: none;
}
.shell.menu-collapsed .sidebar::-webkit-scrollbar { width: 0; }
.shell.menu-collapsed .sidebar h2 {
  width: 40px;
  height: 40px;
  margin: 0 0 6px;
  display: grid;
  place-items: center;
  font-size: 0;
}
.shell.menu-collapsed .sidebar h2::before {
  content: "P";
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffc15a, #ed9513);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.shell.menu-collapsed .sidebar h2::after,
.shell.menu-collapsed .menu-progress,
.shell.menu-collapsed #menu::before,
.shell.menu-collapsed .nav-dots,
.shell.menu-collapsed .menu-group summary::after { display: none; }
.shell.menu-collapsed #menu { align-items: center; width: 100%; }
.shell.menu-collapsed .menu-group { position: relative; width: 44px; }
.shell.menu-collapsed .nav-btn,
.shell.menu-collapsed .menu-group summary {
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 8px;
}
.shell.menu-collapsed .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.shell.menu-collapsed .menu-children { display: none; }
.shell.menu-collapsed .menu-group.rail-open > summary {
  background: rgba(255, 255, 255, 0.08);
}
.rail-label { display: none; margin: 2px 8px 6px; }
#rail-panel {
  display: grid;
  gap: 2px;
  position: fixed;
  z-index: 80;
  min-width: 220px;
  max-height: calc(100vh - 16px);
  overflow: auto;
  padding: 8px;
  background: #0c1730;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.punch-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.punch-card-head h2 { margin: 0; font-size: 18px; }
#punch-card { margin-top: 16px; }
#rail-panel .rail-label {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#rail-panel .nav-btn { width: 100%; justify-content: flex-start; min-height: 0; padding: 8px 10px; }
.sidebar .logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sidebar .logout svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.shell.menu-collapsed .sidebar .logout {
  width: 44px;
  height: 44px;
  padding: 0;
}
.shell.menu-collapsed .sidebar .logout span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.sidebar {
  background: var(--sidebar);
  color: white;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: auto;
}
.sidebar h2 {
  margin: 2px 10px 0;
  font-size: 20px;
  letter-spacing: -0.3px;
}
.sidebar h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--chicken);
}
.menu-progress { margin: 10px 12px 12px; color: rgba(255, 255, 255, 0.62); font-size: 12px; }
#menu { position: relative; display: flex; flex-direction: column; gap: 2px; }
#menu::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 22px;
  bottom: 22px;
  border-left: 2px dotted rgba(255, 255, 255, 0.28);
}
.menu-group { margin: 0; }
.menu-group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  font-weight: 700;
  border-radius: 10px;
}
.menu-group summary::-webkit-details-marker { display: none; }
.menu-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.menu-group[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.menu-group summary:hover,
.nav-btn:hover { background: rgba(255, 255, 255, 0.06); }
.nav-ico,
.nav-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}
.nav-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--item-color, #ed9513);
  background: #050c1a;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--item-color, #ed9513) 70%, #fff);
}
.nav-ico svg { width: 16px; height: 16px; display: block; }
.nav-dots {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 8px;
  margin: 1px 0 3px 18px;
}
.menu-group[open] > .nav-dots { display: none; }
.nav-dots i,
.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--item-color, #ed9513);
  box-shadow: 0 0 0 3px #050c1a;
}
.menu-children { display: grid; gap: 2px; padding: 2px 0 6px; }
.menu-group:not([open]) > .menu-children { display: none; }
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  color: white;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px 8px 8px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.nav-btn.sub { padding: 7px 10px 7px 18px; font-size: 13px; color: rgba(255, 255, 255, 0.88); font-weight: 600; }
.nav-btn.pending { opacity: 0.72; }
.nav-btn.active,
.menu-group:has(.nav-btn.active) summary {
  background: color-mix(in srgb, var(--item-color, var(--accent)) 28%, transparent);
  color: #fff;
}
.nav-btn.active .nav-ico { background: var(--item-color, var(--accent)); color: #fff; }
#record-fields.tabbed { display: block; }
#table-body .btn { margin-right: 8px; padding: 6px 10px; }
.sidebar .logout { margin-top: auto; }
.main {
  min-width: 0;
  padding: 28px;
  background: #c47a0a;
}
.topbar h1 { color: #fff; }
.topbar .lead, .analytics-date { color: rgba(255, 255, 255, 0.9); }
.page-hero {
  border-radius: 18px;
  padding: 18px 22px 6px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--item-color, var(--chicken)) 16%, white), #fff 58%);
  border: 1px solid color-mix(in srgb, var(--item-color, var(--chicken)) 24%, white);
  border-top: 4px solid var(--item-color, var(--chicken));
  box-shadow: var(--shadow);
}
#workspace.styled-list {
  gap: 14px;
  margin: -28px;
  padding: 22px 24px 36px;
  background:
    radial-gradient(circle at 0 0, rgba(70, 141, 255, 0.16), transparent 32%),
    radial-gradient(circle at 100% 0, rgba(237, 149, 19, 0.14), transparent 26%),
    #eef3f9;
}
#workspace.styled-list .page-hero,
#workspace.styled-list #page-stats,
#workspace.styled-list .mode-switch,
#workspace.styled-list #list-panel,
#workspace.styled-list #record-form,
#workspace.styled-list #view-panel { margin: 0; }
#workspace.styled-list .mode-switch {
  align-self: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#workspace.styled-list .mode-btn {
  padding: 8px 16px;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}
.mode-btn[hidden] { display: none !important; }
#workspace.styled-list .mode-btn[data-mode="list"] { background: #468dff; }
#workspace.styled-list .mode-btn[data-mode="create"] { background: #ed9513; }
#workspace.styled-list .mode-btn[data-mode="view"] { background: #12b5a5; }
#workspace.styled-list .mode-btn[data-mode="edit"] { background: #8a63d2; }
#workspace.styled-list .mode-btn.active { box-shadow: 0 0 0 3px #fff, 0 8px 16px rgba(15, 23, 42, 0.2); }
#workspace.styled-list #list-panel { display: flex; flex-direction: column; gap: 12px; }
#workspace.styled-list #list-panel[hidden],
#workspace.styled-list #record-form[hidden],
#workspace.styled-list #view-panel[hidden] { display: none !important; }
#workspace.styled-list .page-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 26px 28px;
  color: #fff;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 120%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(110deg, #3d7bff 0%, #5a4dff 46%, #7c4dff 78%, #a855f7 100%);
  box-shadow: 0 18px 36px rgba(61, 90, 255, 0.24);
}
#workspace.styled-list .page-hero h1,
#workspace.styled-list .page-hero .lead { color: #fff; }
#workspace.styled-list .page-hero h1 { font-size: 32px; margin: 0; }
#workspace.styled-list .page-hero .eyebrow { display: none; }
#workspace.styled-list .page-hero .lead { margin: 6px 0 0; color: rgba(255, 255, 255, 0.88); font-size: 14px; }
.hero-total {
  min-width: 168px;
  text-align: right;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 18px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
}
.hero-total span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.hero-total strong { display: block; font-size: 30px; line-height: 1.05; letter-spacing: -0.5px; }
#workspace.employee-list #page-stats,
#workspace.punch-list #page-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#workspace.styled-list .stat {
  position: relative;
  border-radius: 18px;
  border: 1px solid #e7edf5;
  border-top: 0;
  background: #fff;
  padding: 16px 16px 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
#workspace.styled-list .stat:has(.stat-icon) {
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 12px;
  align-content: center;
}
#workspace.styled-list .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  font-style: normal;
  color: var(--tone-color, #468dff);
  background: color-mix(in srgb, var(--tone-color, #468dff) 14%, #fff);
}
#workspace.styled-list .stat-icon svg { width: 22px; height: 22px; }
#workspace.styled-list .stat span { color: #667085; font-size: 12px; font-weight: 700; }
#workspace.styled-list .stat strong { margin-top: 2px; font-size: 26px; }
#workspace.styled-list .stat small { display: block; margin-top: 2px; color: #98a2b3; font-weight: 800; font-size: 12px; }
#workspace.punch-list button.stat {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
#workspace.punch-list button.stat:hover {
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}
#workspace.punch-list button.stat.is-on,
#workspace.punch-list button.stat.is-open {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tone-color);
}
#workspace.punch-list button.stat:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tone-color);
}
.domain-pop {
  position: absolute;
  z-index: 30;
  left: 12px;
  right: 12px;
  top: calc(100% + 8px);
  padding: 10px 12px;
  border-radius: 12px;
  background: #101828;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}
#workspace.employee-list #search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  grid-template-areas:
    "search clear filter add"
    "filters filters filters filters";
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
#workspace.employee-list .search-field { grid-area: search; }
#workspace.employee-list #employee-clear { grid-area: clear; }
#workspace.employee-list #search-form > button[type="submit"] { grid-area: filter; }
#workspace.styled-list #open-create {
  grid-area: add;
  color: #fff;
  border: 1px solid #1a1a1a;
  background:
    linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #4a4a4a 0%, #161616 52%, #050505 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.45), 0 8px 16px rgba(0,0,0,.28);
}
#workspace.styled-list #open-create:hover {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #5a5a5a 0%, #1c1c1c 48%, #000 100%);
}
#workspace.styled-list .toolbar .search-field {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 14px 0 40px;
  display: flex;
  align-items: center;
  border: 1px solid #9ebfff;
  border-top: 1px solid #9ebfff;
  border-radius: 12px;
  background: #f3f7ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23468dff' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px 50% / 18px no-repeat;
}
#workspace.styled-list .toolbar .search-field label { display: none; }
#workspace.styled-list .toolbar .search-field input,
#workspace.styled-list .toolbar .search-field input:focus {
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #1d4ed8;
  font-weight: 650;
}
#workspace.styled-list .toolbar .search-field input::placeholder { color: #6b93e6; font-weight: 600; }
#workspace.styled-list .toolbar .search-field:focus-within {
  border-color: #3a6dff;
  box-shadow: 0 0 0 3px rgba(58, 109, 255, 0.15);
}
#workspace.styled-list .toolbar .btn { height: 44px; padding: 0 16px; white-space: nowrap; }
#workspace.employee-list .employee-filters {
  grid-area: filters;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}
#workspace.employee-list .employee-filters label { width: 100%; }
#workspace.employee-list #search-form .employee-filters label:nth-child(1) { --drop: #ed9513; }
#workspace.employee-list #search-form .employee-filters label:nth-child(2) { --drop: #468dff; }
#workspace.employee-list #search-form .employee-filters label:nth-child(3) { --drop: #8a63d2; }
#workspace.employee-list #search-form .employee-filters label:nth-child(4) { --drop: #12b5a5; }
#workspace.employee-list #search-form .employee-filters label {
  background: color-mix(in srgb, var(--drop, #468dff) 14%, #fff);
  border-color: color-mix(in srgb, var(--drop, #468dff) 48%, #fff);
}
#workspace.employee-list #search-form .employee-filters .combo-face,
#workspace.employee-list #search-form .employee-filters .combo-face.is-placeholder {
  color: var(--drop, #468dff);
  font-weight: 700;
}
#workspace.employee-list #search-form .employee-filters .combo-face::after {
  border-right-color: var(--drop, #468dff);
  border-bottom-color: var(--drop, #468dff);
}
#workspace.styled-list .location-filters label:has(.combo):nth-of-type(4n+1) { --drop: #ed9513; }
#workspace.styled-list .location-filters label:has(.combo):nth-of-type(4n+2) { --drop: #468dff; }
#workspace.styled-list .location-filters label:has(.combo):nth-of-type(4n+3) { --drop: #8a63d2; }
#workspace.styled-list .location-filters label:has(.combo):nth-of-type(4n) { --drop: #12b5a5; }
#workspace.styled-list .location-filters label:has(.combo) {
  background: color-mix(in srgb, var(--drop, #468dff) 14%, #fff);
  border-color: color-mix(in srgb, var(--drop, #468dff) 48%, #fff);
}
#workspace.styled-list .location-filters label:has(.combo) .combo-face,
#workspace.styled-list .location-filters label:has(.combo) .combo-face.is-placeholder {
  color: var(--drop, #468dff);
  font-weight: 700;
}
#workspace.styled-list .location-filters label:has(.combo) .combo-face::after {
  border-right-color: var(--drop, #468dff);
  border-bottom-color: var(--drop, #468dff);
}
#workspace.styled-list #table-card {
  border: 0;
  border-top: 0;
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}
#workspace.styled-list #table-card th:first-child,
#workspace.styled-list #table-card td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 10px 0 14px rgba(15, 23, 42, 0.04);
}
#workspace.styled-list #table-card th:first-child { z-index: 3; }
.action-toggle {
  position: relative;
  height: 34px;
  padding: 0 28px 0 12px;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #4a4a4a 0%, #161616 52%, #050505 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.45), 0 8px 16px rgba(0,0,0,.28);
}
.action-toggle::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.action-toggle:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #5a5a5a 0%, #1c1c1c 48%, #000 100%);
}
.action-pop {
  position: fixed;
  z-index: 90;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}
.action-pop[hidden] { display: none !important; }
.action-pop button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  color: #1d2939;
  cursor: pointer;
}
.action-pop button:hover { background: #f4f7fb; }
.action-pop button:nth-child(1) { color: #468dff; }
.action-pop button:nth-child(2) { color: #8a63d2; }
.action-pop button:nth-child(3) { color: #b42318; }
#workspace.styled-list #table-card td { padding: 12px; color: #344054; font-size: 13.5px; font-weight: 500; line-height: 1.4; }
#workspace.styled-list #page-count { border-top: 1px solid #eef2f6; margin: 0; padding: 12px 16px; font-size: 13px; color: #667085; }
#workspace.styled-list #table-card th {
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 13px;
  font-weight: 700;
}
#workspace.employee-list .emp-copy > span:first-child {
  font-weight: 700;
  color: #1d2939;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#workspace.employee-list .emp-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#workspace.employee-list .emp-tags { display: flex; flex-wrap: wrap; gap: 4px; }
#workspace.employee-list .emp-name .emp-tag { font-size: 10px; font-weight: 800; line-height: 1.4; padding: 1px 7px; border-radius: 999px; background: #fff4e5; color: #b86100; }
#workspace.employee-list .emp-name .emp-tag.hr { background: #eef2ff; color: #3a4ecf; }
#workspace.employee-list .emp-id { font-weight: 700; letter-spacing: 0.02em; color: #1d2939; white-space: nowrap; font-size: 13px; }
#workspace.employee-list .sn-cell { color: #98a2b3; font-weight: 700; text-align: center; width: 52px; }
#workspace.employee-list .photo-cell { text-align: center; width: 72px; }
#workspace.employee-list .photo-cell .list-avatar { width: 40px; height: 40px; margin: 0 auto; }
#workspace.styled-list .actions { display: flex; justify-content: flex-start; gap: 6px; }
#workspace.employee-list .actions .btn { margin: 0; min-width: 58px; }
#workspace.employee-list .soft-text {
  color: #667085;
  font-size: 13px;
  font-weight: 500;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#workspace.employee-list .soft-pill {
  max-width: 150px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
#workspace.employee-list .actions .btn { height: 32px; padding: 0 10px; border-radius: 9px; font-size: 12px; }
.employee-filters { display: flex; flex-wrap: nowrap; gap: 8px; width: auto; align-items: center; }
.employee-filters[hidden] { display: none !important; }
#search-form { flex-wrap: nowrap; align-items: center; }
#search-form > .btn { flex: 0 0 auto; height: 44px; padding: 0 16px; white-space: nowrap; }
#workspace.styled-list:has(#punch-filters:not([hidden])) #search-form {
  display: grid;
  grid-template-columns: max-content max-content minmax(140px, 1fr) minmax(130px, 1fr) auto minmax(180px, 1.4fr) auto;
  gap: 8px;
  align-items: center;
}
#search-form #punch-filters:not([hidden]) {
  display: contents;
}
#workspace.styled-list:has(#punch-filters:not([hidden])) #search-form .search-field {
  max-width: none;
  min-width: 0;
}
#workspace.styled-list:has(#punch-filters:not([hidden])) #punch-filters label:has(.combo) {
  width: 100%;
  min-width: 0;
}
#punch-non-payroll {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  color: #667085;
  font-weight: 800;
  white-space: nowrap;
}
#punch-non-payroll[aria-pressed="true"] {
  border-color: #99e3d8;
  background: #e7faf6;
  color: #0f766e;
}
.punch-views {
  grid-column: 1 / -1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}
.punch-view-label {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3a6dff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.punch-view-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-width: 292px;
  height: 44px;
  padding: 4px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fbfcfe 0%, #eef3f9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(15, 23, 42, 0.05);
}
.punch-view-track::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, #12b5a5 0%, #067647 100%);
  box-shadow: 0 8px 16px rgba(6, 118, 71, 0.28);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  pointer-events: none;
}
.punch-views:has(#punch-view-log.is-on) .punch-view-track::before {
  transform: translateX(100%);
  background: linear-gradient(135deg, #5b8dff 0%, #3a4ecf 100%);
  box-shadow: 0 8px 16px rgba(58, 109, 255, 0.28);
}
.punch-view {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease;
}
.punch-view svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.punch-view:hover:not(.is-on) { color: #344054; }
.punch-view.is-on { color: #fff; }
.punch-view:focus-visible {
  outline: 2px solid #3a6dff;
  outline-offset: 3px;
}
#attendance-filters[hidden] { display: none !important; }
#workspace.styled-list:has(#attendance-filters:not([hidden])) #search-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(130px, 0.6fr) minmax(180px, 1.3fr) auto auto;
  gap: 8px;
  align-items: center;
}
#search-form #attendance-filters:not([hidden]) { display: contents; }
#workspace.styled-list:has(#attendance-filters:not([hidden])) #search-form .search-field {
  max-width: none;
  min-width: 0;
}
.att-presets, #att-custom { grid-column: 1 / -1; }
.att-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.att-preset {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: #344054;
  font-weight: 800;
  cursor: pointer;
}
.att-preset.is-on { background: #067647; border-color: #067647; color: #fff; }
#att-custom { display: flex; gap: 8px; align-items: center; }
#att-custom[hidden] { display: none !important; }
#search-form #attendance-filters label:has(.combo) { font-size: 12px; gap: 8px; }
#search-form #attendance-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 0;
}
#att-custom .date-face { width: auto; min-width: 118px; height: 28px; }
#search-form .location-filters:not([hidden]),
#search-form #report-dates:not([hidden]),
#search-form #visit-geo:not([hidden]),
#search-form #location-extra:not([hidden]) {
  display: flex;
  flex-wrap: nowrap;
  width: auto;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}
#search-form .location-filters label,
#search-form .employee-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#search-form .employee-filters label {
  flex: 1 1 0;
  min-width: 0;
}
#search-form label:has(.combo) {
  gap: 0;
  padding: 0 12px 0 14px;
  font-size: 0;
}
#search-form label:has(.combo) .combo,
#search-form label:has(.combo) .combo-face { font-size: 13px; }
#search-form .date-face {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 138px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d2939;
  font-weight: 700;
  cursor: pointer;
}
#search-form .date-face::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: no-repeat center / 16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed9513' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}
#search-form .date-face.is-empty { color: #98a2b3; }
.date-pop {
  position: fixed;
  z-index: 90;
  width: 312px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
}
.date-pop[hidden] { display: none !important; }
.date-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.date-pop-title { font-size: 15px; }
.date-nav, .date-today {
  height: 34px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-weight: 800;
}
.date-nav { width: 34px; font-size: 20px; line-height: 1; }
.date-nav:hover, .date-today:hover { border-color: #f0c27a; background: #fff8ef; color: #b45309; }
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.date-dow { text-align: center; font-size: 11px; font-weight: 800; color: #98a2b3; padding-bottom: 4px; }
.date-day {
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1d2939;
  font-weight: 700;
}
.date-day:hover { background: #fff6eb; }
.date-day.is-out { color: #d0d5dd; }
.date-day.is-range { background: #fff3e0; }
.date-day.is-today { box-shadow: inset 0 0 0 1.5px #ed9513; }
.date-day.is-selected, .date-day.is-selected:hover { background: #ed9513; color: #fff; box-shadow: none; }
.date-pop-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.date-today { padding: 0 14px; }
#search-form .location-filters input[type="date"],
#search-form .location-filters input[type="month"] {
  width: 132px;
  min-width: 132px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d2939;
  font-weight: 650;
}
#search-form .location-filters input[type="date"]:focus,
#search-form .location-filters input[type="month"]:focus { box-shadow: none; }
#search-form .employee-filters .btn { height: 44px; flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }
.combo { display: flex; align-items: center; width: 100%; min-width: 0; }
.combo-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.combo-face {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent;
  color: #1d2939;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-face.is-placeholder { color: #98a2b3; }
.combo-face::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #98a2b3;
  border-bottom: 2px solid #98a2b3;
  transform: translateY(-70%) rotate(45deg);
}
.combo-pop {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}
.combo-pop[hidden] { display: none !important; }
.combo-search { height: 36px; margin: 0; border-radius: 10px; padding: 0 10px; }
.combo-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.combo-item {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  color: #1d2939;
  font-weight: 650;
  cursor: pointer;
}
.combo-item:hover, .combo-item.hover, .combo-item.active { background: #eef2ff; color: #3a4ecf; }
.combo-empty { padding: 10px; color: #98a2b3; font-size: 13px; }
#record-fields .field-card .combo { display: block; margin: 0 0 8px; }
#record-fields .field-card .combo-face {
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
}
#record-fields .field-card[class*="tone-"] .combo-face {
  border-color: color-mix(in srgb, var(--tone-color) 45%, #e6ebf2);
}
.combo-directory { padding: 10px; border-radius: 16px; }
.combo-directory .combo-search { height: 42px; border: 0; background: #f2f4f7; }
.combo-directory .combo-list { max-height: 320px; gap: 4px; }
.directory-item { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.dir-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #eef2ff;
  color: #3a4ecf;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}
.directory-item:nth-child(3n) .dir-avatar { background: #e8f8ef; color: #178a48; }
.directory-item:nth-child(3n + 1) .dir-avatar { background: #fff4e5; color: #b86100; }
.directory-item:nth-child(3n + 2) .dir-avatar { background: #f6f1fc; color: #7a4eb8; }
.dir-copy { display: grid; min-width: 0; }
.dir-copy strong { font-size: 13px; color: #1d2939; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-copy small { color: #667085; font-size: 12px; font-weight: 650; }
.directory-item.active .dir-copy strong,
.directory-item:hover .dir-copy strong,
.directory-item.hover .dir-copy strong { color: #3a4ecf; }
.emp-name { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.emp-name .list-avatar { width: 38px; height: 38px; border: 2px solid #fff; box-shadow: 0 0 0 1px #e4e7ec; }
.emp-initials { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #eef2ff; color: #3a6dff; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.soft-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f2f4f7; color: #344054; white-space: nowrap; }
.soft-pill.tone-0 { background: #e8f8ef; color: #178a48; }
.soft-pill.tone-1 { background: #eef2ff; color: #3a4ecf; }
.soft-pill.tone-2 { background: #f6f1fc; color: #7a4eb8; }
.soft-pill.tone-3 { background: #fff4e5; color: #b86100; }
.soft-pill.tone-4 { background: #fff0f5; color: #c4376b; }
.soft-pill.tone-5 { background: #e7f8f6; color: #0e8f83; }
#page-count.list-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 16px;
  color: #667085;
  background: #fff;
}
.pager-meta { font-size: 13px; font-weight: 650; }
.pager-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.pager-buttons button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: #344054;
  font-weight: 800;
  box-shadow: none;
  cursor: pointer;
}
.pager-buttons button:hover { transform: none; }
.pager-buttons svg { width: 18px; height: 18px; display: block; }
.pager-gap { min-width: 16px; text-align: center; color: #98a2b3; font-weight: 800; }
.pager-num.tone-blue { --pager: #3a6dff; }
.pager-num.tone-teal { --pager: #12b5a5; }
.pager-num.tone-orange { --pager: #ed9513; }
.pager-num.tone-purple { --pager: #8a63d2; }
.pager-num.tone-pink { --pager: #e85d8c; }
.pager-num {
  color: var(--pager, #344054);
  background: color-mix(in srgb, var(--pager, #98a2b3) 14%, #fff);
  border-color: color-mix(in srgb, var(--pager, #d0d5dd) 46%, #fff);
}
.pager-num.active {
  background: var(--pager, #3a6dff);
  border-color: var(--pager, #3a6dff);
  color: #fff;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--pager, #3a6dff) 32%, transparent);
}
.pager-num:hover:not(.active) { background: color-mix(in srgb, var(--pager, #3a6dff) 24%, #fff); }
.pager-nav.prev { color: #3a6dff; border-color: #c9d8ff; background: #f3f7ff; }
.pager-nav.next { color: #ed9513; border-color: #f6ddb8; background: #fff6ea; }
.pager-nav:hover:not(:disabled) { filter: brightness(0.97); }
.pager-buttons button:disabled { opacity: 0.38; cursor: default; }
@media (max-width: 1280px) {
  #workspace.employee-list #page-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.eyebrow {
  margin: 0;
  color: var(--item-color, var(--chicken));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat.tone-orange { --tone-color: #ed9513; }
.stat.tone-blue { --tone-color: #468dff; }
.stat.tone-purple { --tone-color: #8a63d2; }
.stat.tone-teal { --tone-color: #12b5a5; }
.stat.tone-green { --tone-color: #067647; }
.stat.tone-red { --tone-color: #b42318; }
.stat.tone-pink { --tone-color: #e85d8c; }
.stat.tone-orange strong { color: var(--chicken); }
.stat.tone-blue strong { color: var(--primary); }
.stat.tone-purple strong { color: var(--accent); }
.stat.tone-teal strong { color: #12b5a5; }
.stat.tone-green strong { color: #067647; }
.stat.tone-red strong { color: #b42318; }
.stat[class*="tone-"] {
  background: color-mix(in srgb, var(--tone-color) 16%, #fff);
  border-color: color-mix(in srgb, var(--tone-color) 38%, #fff);
  border-top: 4px solid var(--tone-color);
}
.stat[class*="tone-"] span { color: var(--tone-color); }
.mark-late, .mark-ontime, .mark-early, .mark-timely, .mark-later, .mark-in, .mark-out, .mark-punch {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.mark-late { color: #b42318; background: #ffe4e2; }
.mark-early { color: #b54708; background: #ffefd6; }
.mark-ontime, .mark-timely, .mark-in { color: #067647; background: #d1fadf; }
.mark-later, .mark-out { color: #175cd3; background: #dbe8ff; }
.mark-punch { color: #6941c6; background: #f4ebff; }
.badge.ok { background: #e8f8ef; color: #178a48; }
.badge.bad { background: #fff1f0; color: #b42318; }
.badge.wait { background: #fff7e8; color: #9a6700; }
.badge.info { background: #e6f2fd; color: var(--badge); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.topbar h1 { margin: 0; font-size: 28px; }
.panel { display: none !important; }
.panel.active { display: block !important; animation: rise 0.25s ease; }
#dashboard.panel.active { display: grid !important; }
#workspace.panel.active { display: flex !important; flex-direction: column; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat, .card {
  background: var(--card);
  border: 1px solid #e7edf5;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat strong { display: block; margin-top: 6px; font-size: 26px; letter-spacing: -0.4px; color: var(--primary); }
#mode-switch[hidden],
#search-form[hidden],
#table-card[hidden],
#bulk-panel[hidden],
#erp-sync-panel[hidden],
#data-source-panel[hidden],
#hrm-site-card[hidden],
#settings-stage[hidden],
#punch-card[hidden] { display: none !important; }
.mode-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.mode-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: transparent;
  color: #3d4d66;
  font-weight: 700;
}
.mode-btn[data-mode="list"].active { background: #468dff; color: white; }
.mode-btn[data-mode="create"].active { background: #ed9513; color: white; }
.mode-btn[data-mode="view"].active { background: #12b5a5; color: white; }
.mode-btn[data-mode="edit"].active { background: #8a63d2; color: white; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; justify-content: flex-start; }
.toolbar .search-field {
  flex: 1;
  max-width: 460px;
  margin: 0;
  padding: 8px 12px 10px;
  border: 1px solid color-mix(in srgb, #468dff 38%, #fff);
  border-top: 4px solid #468dff;
  border-radius: 12px;
  background: color-mix(in srgb, #468dff 14%, #fff);
}
.toolbar .search-field label { color: #468dff; margin-bottom: 6px; }
.toolbar input, .toolbar select { margin: 0; background: #fff; }
.toolbar .btn { height: 46px; padding: 0 18px; }
#search-form button[type="submit"] { background: #468dff; }
#search-form button[type="submit"]:hover { background: #2f6fe0; }
.create-btn { background: #ed9513; }
.excel-btn { background: #128a5b; box-shadow: 0 8px 16px rgba(18, 138, 91, 0.18); }
.excel-btn:hover { background: #0d6b47; }
.pdf-btn { background: #b42318; box-shadow: 0 8px 16px rgba(180, 35, 24, 0.18); }
.pdf-btn:hover { background: #912018; }
.view-btn { background: #468dff; padding: 8px 12px; }
.edit-btn { background: #8a63d2; padding: 8px 12px; }
.delete-btn { background: #b42318; padding: 8px 12px; }
.delete-btn:hover { background: #8f1c14; }
.actions { white-space: nowrap; text-align: right; }
.actions .btn { margin-left: 8px; }
.form-card { padding: 20px 22px 16px; }
#record-fields.form-grid,
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: stretch; }
.view-maps { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.view-maps.single { grid-template-columns: 1fr; }
.view-map-card h3 { margin: 0 0 8px; font-size: 16px; }
.view-map { height: 360px; border-radius: 16px; border: 1px solid #e6ebf2; background: #eef3f8; }
.view-map-note { margin: 8px 0 0; color: #667085; font-size: 13px; }
.form-section-title {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding: 0 2px 8px;
  color: #d77709;
  font-size: 1.05rem;
  border-bottom: 2px solid rgba(215, 119, 9, 0.22);
}
.form-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 0 16px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
}
.form-tab {
  border: 0;
  border-radius: 10px;
  background: #f4f7fb;
  color: #3d4d66;
  font-weight: 700;
  min-height: 46px;
  padding: 10px 8px;
  cursor: pointer;
}
.form-tab.active { color: #fff; }
.form-tab.tab-0.active { background: #17a2b8; border-bottom-color: #0f7f90; }
.form-tab.tab-1.active { background: #ed9513; border-bottom-color: #d77709; }
.form-tab.tab-2.active { background: #e85d8c; border-bottom-color: #c43b6e; }
#record-fields .form-pane { display: none !important; }
#record-fields .form-pane.is-active { display: grid !important; }
.form-pane.form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; max-width: 100%; }
.salary-line, .breakdown-grid { grid-column: 1 / -1; display: grid; gap: 12px 14px; min-width: 0; align-items: stretch; }
.salary-top { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.salary-pay { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.salary-pay:not(:has(> .field-card:not([hidden]))) { display: none; }
.field-card[hidden] { display: none !important; }
.breakdown-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.breakdown-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.breakdown-card > .field-card { width: 100%; }
.breakdown-card .field-card label { min-height: 34px; }
#record-fields .field-card {
  --tone-color: #ed9513;
  border: 1px solid #e6ebf2;
  border-left: 4px solid var(--tone-color);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px 4px;
  min-width: 0;
  min-height: 88px;
}
#record-fields .field-card.tone-orange { --tone-color: #ed9513; }
#record-fields .field-card.tone-blue { --tone-color: #468dff; }
#record-fields .field-card.tone-purple { --tone-color: #8a63d2; }
#record-fields .field-card.tone-teal { --tone-color: #12b5a5; }
#record-fields .field-card.tone-pink { --tone-color: #e85d8c; }
#record-fields .field-card[class*="tone-"] {
  background: color-mix(in srgb, var(--tone-color) 16%, #fff);
  border-color: color-mix(in srgb, var(--tone-color) 38%, #fff);
  border-top: 4px solid var(--tone-color);
  border-left: 4px solid var(--tone-color);
}
#record-fields .field-card[class*="tone-"] label { color: var(--tone-color); }
#record-fields .field-card[class*="tone-"] input,
#record-fields .field-card[class*="tone-"] select,
#record-fields .field-card[class*="tone-"] textarea {
  background: #fff;
  border-color: color-mix(in srgb, var(--tone-color) 45%, #e6ebf2);
  width: 100%;
  max-width: 100%;
}
.form-pane.form-grid label { min-height: 18px; margin-bottom: 6px; line-height: 1.3; }
.form-pane.form-grid input,
.form-pane.form-grid select,
.form-pane.form-grid textarea { margin-bottom: 8px; height: 42px; padding: 8px 12px; width: 100%; min-width: 0; max-width: 100%; }
.form-pane.form-grid textarea,
.form-pane.form-grid select[multiple] { height: auto; min-height: 84px; }
#record-fields .field-card:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding-bottom: 10px;
}
#record-fields .field-card:has(input[type="checkbox"]) label { margin: 0; }
.form-pane.form-grid input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.tab-nav { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; }
.form-grid .wide { grid-column: 1 / -1; }
.ta-editor { display: grid; gap: 12px; margin-top: 8px; }
.ta-lines { display: grid; gap: 10px; }
.ta-line, .ta-overall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #f8fafc;
}
.ta-line > strong, .ta-overall > strong, .ta-note { grid-column: 1 / -1; }
.ta-line label, .ta-overall label { display: grid; gap: 4px; margin: 0; font-size: 12px; color: #667085; }
.ta-line input, .ta-line select, .ta-line textarea,
.ta-overall input, .ta-overall textarea { margin: 0; background: #fff; width: 100%; }
.ta-line textarea, .ta-overall textarea { min-height: 64px; }
.ta-span-2 { grid-column: span 2; }
.ta-line input[readonly], .ta-overall input[readonly], .ta-line textarea[readonly], .ta-overall textarea[readonly] { background: #f3f4f6; }
.ta-note { color: #667085; font-size: 12px; }
.area-editor { display: grid; gap: 18px; margin-top: 8px; }
.area-section { display: grid; gap: 8px; }
.area-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.area-head h3 { margin: 0; font-size: 16px; }
.area-add { height: 36px; padding: 0 12px; }
.area-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #f8fafc;
}
.area-row label { display: grid; gap: 6px; margin: 0; font-size: 12px; color: #667085; }
.area-row label b { color: #b42318; }
.area-row select { height: 42px; margin: 0; background: #fff; }
.area-bound { align-self: end; min-height: 42px; display: flex; align-items: center; font-size: 12px; color: #027a48; }
.area-remove {
  height: 42px;
  min-width: 42px;
  border: 1px solid #f3c3bd;
  border-radius: 10px;
  background: #fff;
  color: #b42318;
  font-weight: 800;
}
.bind-map-wrap { margin-top: 16px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.map-action {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-weight: 700;
}
.map-action.grow { color: #15803d; border-color: #b7ebc6; background: #f3fbf6; }
.map-action.shrink { color: #b45309; border-color: #f6ddb8; background: #fff8ef; }
.map-action.danger { color: #b42318; border-color: #f3c3bd; background: #fff6f5; }
.leaflet-div-icon.bind-handle {
  background: #fff;
  border: 2px solid #15803d;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}
.bind-map-head {
  font-weight: 700;
  margin-bottom: 8px;
  color: #ed9513;
}
#bind-map {
  height: 460px;
  border-radius: 16px;
  border: 1px solid #e6ebf2;
  background: #eef3f8;
}
#bind-map-note { margin: 8px 0 0; }
.bind-areas { margin-top: 14px; }
#bind-areas-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#bind-areas-lists ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow: auto; }
#bind-areas-lists li {
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  background: #fff;
}
#bind-areas-lists li.is-bound { border-color: #15803d; background: #f0fdf4; }
#bind-areas-lists li small { display: block; color: #667085; }
.form-grid textarea { min-height: 90px; width: 100%; }
.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 0 4px;
  background: #fff;
  border-top: 1px solid #e6ebf2;
}
.form-buttons { display: flex; justify-content: flex-end; align-items: center; flex-wrap: nowrap; gap: 10px; }
#view-panel .form-actions { flex-direction: row; justify-content: flex-end; }
.form-actions .btn { width: auto; margin: 0; white-space: nowrap; }
.form-actions .btn[hidden] { display: none !important; }
.form-message { display: none; margin: 0; border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.form-message.error { display: block; background: #fff1f0; color: #b42318; }
.form-message.ok { display: block; background: #e8f8ef; color: #178a48; }
#tab-prev { background: #468dff; }
#tab-next { background: #12b5a5; }
#form-cancel { background: #8a63d2; color: #fff; }
#record-save { background: #ed9513; }
#tab-prev:hover { background: #2f6fe0; }
#tab-next:hover { background: #0e9a8c; }
#form-cancel:hover { background: #7348c4; }
#record-save:hover { background: #d77709; }
input.invalid, select.invalid, textarea.invalid { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15); }
.salary-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.salary-summary article { background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; padding: 12px 14px; border-top: 4px solid #ed9513; }
.salary-summary span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.salary-summary strong { display: block; margin-top: 4px; font-size: 18px; }
.salary-summary .tone-orange { border-top-color: #ed9513; }
.salary-summary .tone-blue { border-top-color: #468dff; }
.salary-summary .tone-teal { border-top-color: #12b5a5; }
.salary-summary .tone-purple { border-top-color: #8a63d2; }
.salary-summary .tone-pink { border-top-color: #e85d8c; }
.detail-item {
  --tone-color: #468dff;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  border-top: 4px solid var(--tone-color);
  min-width: 0;
}
.detail-item span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-item strong { display: block; margin-top: 6px; font-size: 16px; word-break: break-word; }
.detail-item.tone-orange { --tone-color: #ed9513; }
.detail-item.tone-blue { --tone-color: #468dff; }
.detail-item.tone-purple { --tone-color: #8a63d2; }
.detail-item.tone-teal { --tone-color: #12b5a5; }
.detail-item.tone-pink { --tone-color: #e85d8c; }
.detail-item[class*="tone-"] {
  background: color-mix(in srgb, var(--tone-color) 16%, #fff);
  border-color: color-mix(in srgb, var(--tone-color) 38%, #fff);
}
.detail-item[class*="tone-"] span { color: var(--tone-color); }
#bulk-panel h2 { margin: 0 0 8px; }
#bulk-panel .form-buttons { justify-content: flex-start; margin-top: 14px; }
#workspace.source-page {
  gap: 0;
}
#workspace.source-page .page-hero {
  display: none;
}
#workspace.source-page #list-panel {
  margin: 0;
}
#settings-stage {
  display: grid;
  gap: 22px;
}
#settings-stage[hidden] { display: none !important; }
#workspace.source-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.5), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(70, 141, 255, 0.28), transparent 32%),
    radial-gradient(circle at 55% 45%, rgba(31, 143, 99, 0.18), transparent 30%),
    radial-gradient(circle at 20% 80%, rgba(255, 180, 60, 0.22), transparent 28%),
    linear-gradient(165deg, rgba(255, 250, 242, 0.72), rgba(238, 246, 255, 0.42) 55%, rgba(232, 250, 241, 0.35));
  border-radius: 30px;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
#workspace.source-page #settings-stage { padding: 2px; }
.settings-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  align-items: center;
  gap: 24px;
  padding: 30px 32px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 12, 26, 0.28), rgba(5, 12, 26, 0.05)),
    linear-gradient(115deg, #ff7a00 0%, #ed9513 32%, #2bb673 68%, #468dff 100%);
  box-shadow:
    0 24px 52px rgba(199, 122, 10, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.settings-hero::before,
.settings-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.settings-hero::before {
  width: 260px;
  height: 260px;
  right: -50px;
  top: -90px;
  background: rgba(255, 255, 255, 0.18);
}
.settings-hero::after {
  width: 160px;
  height: 160px;
  right: 28%;
  bottom: -80px;
  background: rgba(120, 80, 255, 0.22);
}
.settings-hero-copy,
.settings-hero-side { position: relative; z-index: 1; }
.settings-hero-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  align-content: center;
}
.settings-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.settings-hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.settings-pill,
.strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}
.settings-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.settings-pill.tone-amber { background: rgba(255, 220, 150, 0.34); }
.settings-pill.tone-amber i { background: #ffcf70; }
.settings-pill.tone-mint { background: rgba(150, 255, 210, 0.34); }
.settings-pill.tone-mint i { background: #5ee0a4; }
.settings-pill.tone-sky { background: rgba(170, 210, 255, 0.36); }
.settings-pill.tone-sky i { background: #7ab0ff; }
.strip-chip {
  padding: 7px 11px;
  font-size: 11px;
  background: rgba(8, 18, 36, 0.22);
}
.strip-chip.tone-amber { color: #ffe2a8; }
.strip-chip.tone-mint { color: #baf8d8; }
.strip-chip.tone-sky { color: #c8ddff; }
.settings-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
}
.settings-hero h2 {
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.8px;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.settings-hero p {
  max-width: 560px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
  line-height: 1.55;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.settings-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 0;
  border-radius: 26px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)) padding-box,
    linear-gradient(135deg, rgba(237, 149, 19, 0.45), rgba(70, 141, 255, 0.35)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 18px 42px rgba(5, 12, 26, 0.1);
}
.settings-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #ed9513, #f0b14a, #468dff);
}
.settings-card::before,
.settings-card::after {
  pointer-events: none;
}
.settings-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -60px;
  top: -70px;
  border-radius: 50%;
  opacity: 0.55;
}
.settings-card.tone-erp {
  background:
    linear-gradient(180deg, #f7fffb, #ffffff 42%) padding-box,
    linear-gradient(135deg, #1f8f63, #46c48f) border-box;
}
.settings-card.tone-erp::before { background: linear-gradient(90deg, #1f8f63, #2bb673, #7af0b8); }
.settings-card.tone-erp::after { background: radial-gradient(circle, rgba(43, 182, 115, 0.22), transparent 70%); }
.settings-card.tone-mobile {
  background:
    linear-gradient(180deg, #fff8ef, #ffffff 42%) padding-box,
    linear-gradient(135deg, #ed9513, #ffc15a) border-box;
}
.settings-card.tone-mobile::before { background: linear-gradient(90deg, #ed9513, #ffb347, #ffd27a); }
.settings-card.tone-mobile::after { background: radial-gradient(circle, rgba(237, 149, 19, 0.2), transparent 70%); }
.settings-card.tone-site {
  background:
    linear-gradient(180deg, #f4f8ff, #ffffff 42%) padding-box,
    linear-gradient(135deg, #468dff, #8cbcff) border-box;
}
.settings-card.tone-site::before { background: linear-gradient(90deg, #468dff, #7ab0ff, #a9cdff); }
.settings-card.tone-site::after { background: radial-gradient(circle, rgba(70, 141, 255, 0.22), transparent 70%); }
#erp-sync-panel { grid-column: 1 / -1; }
.settings-card-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 0;
}
.settings-card-copy { min-width: 0; }
.settings-card-tag {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ed9513;
}
.tone-erp .settings-card-tag { color: #1f8f63; }
.tone-site .settings-card-tag { color: #468dff; }
.settings-card-head h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.35px;
  color: #0f1b2d;
}
.settings-card-head p {
  margin: 6px 0 0;
  color: #5b6b7c;
  font-weight: 600;
  line-height: 1.45;
}
.settings-step {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7eb, #ffe0a8);
  color: #ed9513;
  box-shadow:
    inset 0 0 0 1px rgba(237, 149, 19, 0.22),
    0 10px 18px rgba(237, 149, 19, 0.16);
}
.settings-step svg { width: 24px; height: 24px; }
.settings-step.tone-blue {
  background: linear-gradient(180deg, #eef5ff, #cfe2ff);
  color: #468dff;
  box-shadow:
    inset 0 0 0 1px rgba(70, 141, 255, 0.22),
    0 10px 18px rgba(70, 141, 255, 0.16);
}
.settings-step.tone-green {
  background: linear-gradient(180deg, #e9fbf2, #baf5d4);
  color: #1f8f63;
  box-shadow:
    inset 0 0 0 1px rgba(31, 143, 99, 0.22),
    0 10px 18px rgba(31, 143, 99, 0.16);
}
.source-choices {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.source-choice {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  align-content: start;
  min-height: 148px;
  margin: 0;
  padding: 16px;
  border: 1.5px solid #e6ebf2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.source-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(5, 12, 26, 0.1);
}
.source-choice input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.source-choice-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.source-choice-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff4e3;
  font-size: 16px;
  flex: 0 0 auto;
}
.source-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ed9513;
}
.source-choice strong {
  font-size: 17px;
  letter-spacing: -0.2px;
  color: #122033;
}
.source-choice small {
  color: #64748b;
  font-weight: 600;
  line-height: 1.45;
}
.source-choice:has(input:checked) {
  border-color: #ed9513;
  background: linear-gradient(180deg, #fffaf2, #fff1db);
  box-shadow: 0 0 0 4px rgba(237, 149, 19, 0.16);
}
.source-choice:has(input:checked) .source-choice-icon {
  background: linear-gradient(180deg, #ffb347, #ed9513);
  color: #fff;
}
#hrm-site-card .source-kicker { color: #468dff; }
#hrm-site-card .source-choice-icon { background: #eaf2ff; }
#hrm-site-card .source-choice:has(input:checked) {
  border-color: #468dff;
  background: linear-gradient(180deg, #f7faff, #e8f1ff);
  box-shadow: 0 0 0 4px rgba(70, 141, 255, 0.16);
}
#hrm-site-card .source-choice:has(input:checked) .source-choice-icon {
  background: linear-gradient(180deg, #7ab0ff, #468dff);
  color: #fff;
}
.source-urls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.source-urls[hidden] { display: none !important; }
.source-effective {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.source-effective .site-meta-card {
  min-height: 0;
}
.source-url-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#data-source-use-lan,
#data-source-check {
  justify-self: start;
  height: 40px;
  border-radius: 12px;
}
.settings-warn {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f0, #ffefdf);
  border: 1px solid #ffd7a8;
  color: #9a5b00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.settings-warn.is-danger {
  background: linear-gradient(180deg, #fff1f0, #ffe4e1);
  border-color: #f5b5b0;
  color: #b42318;
}
.health-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}
.health-pill.is-ok { background: #e7f8ef; color: #1f8f63; }
.health-pill.is-bad { background: #fdecec; color: #b42318; }
.adms-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.adms-copy-row code {
  min-width: 0;
}
.btn.mini-copy {
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}
.source-urls label,
.site-fields label {
  margin: 0;
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: #334155;
}
.source-urls input,
.site-fields input {
  margin: 0;
  width: 100%;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid #dbe3ee;
  font-family: Consolas, "Segoe UI", monospace;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.source-urls input:focus,
.site-fields input:focus {
  outline: none;
  border-color: #468dff;
  box-shadow: 0 0 0 4px rgba(70, 141, 255, 0.14);
}
.source-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}
.erp-sync-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
#settings-stage .btn.tone-amber-btn,
#settings-stage .btn.tone-mint-btn,
#settings-stage .btn.tone-sky-btn,
#settings-stage .btn.tone-warn-btn,
#settings-stage .btn.tone-violet-btn {
  border: 0;
  color: #fff;
  font-weight: 800;
}
#settings-stage .btn.tone-amber-btn {
  background: linear-gradient(180deg, #ffb347, #ed9513);
  box-shadow: 0 10px 22px rgba(237, 149, 19, 0.28);
}
#settings-stage .btn.tone-mint-btn {
  background: linear-gradient(180deg, #3ecf8a, #1f8f63);
  box-shadow: 0 10px 22px rgba(31, 143, 99, 0.26);
}
#settings-stage .btn.tone-sky-btn {
  background: linear-gradient(180deg, #6aa7ff, #468dff);
  box-shadow: 0 10px 22px rgba(70, 141, 255, 0.26);
}
#settings-stage .btn.tone-warn-btn {
  background: linear-gradient(180deg, #ff9f5a, #f06a2b);
  box-shadow: 0 10px 22px rgba(240, 106, 43, 0.26);
}
#settings-stage .btn.tone-violet-btn {
  background: linear-gradient(180deg, #9b7dff, #7a5af8);
  box-shadow: 0 10px 22px rgba(122, 90, 248, 0.26);
}
#settings-stage .btn.ghost.tone-mint-btn,
#settings-stage .btn.ghost.tone-sky-btn,
#settings-stage .btn.ghost.tone-violet-btn {
  color: inherit;
  background: #fff;
  border: 1.5px solid currentColor;
  box-shadow: none;
}
#settings-stage .btn.ghost.tone-mint-btn { color: #1f8f63; background: #effdf6; }
#settings-stage .btn.ghost.tone-sky-btn { color: #2f6fd6; background: #eef5ff; }
#settings-stage .btn.ghost.tone-violet-btn { color: #6a4de0; background: #f4f0ff; }
#data-source-note,
#erp-sync-note { margin: 0; min-height: 20px; font-weight: 700; color: #12805c; }
#data-source-note.is-error,
#erp-sync-note.is-error { color: #b42318; }
.erp-sync-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.erp-sync-stats .stat {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  border-left-width: 5px;
  align-content: space-between;
}
.erp-sync-stats .stat span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.erp-sync-stats .stat strong {
  font-size: 24px;
  letter-spacing: -0.5px;
  color: #122033;
}
.erp-sync-stats .stat.tone-ok {
  background: linear-gradient(180deg, #f0fff7, #e5fbef);
  border-color: #b7ebcf;
  border-left-color: #1f8f63;
}
.erp-sync-stats .stat.tone-ok strong { color: #1f8f63; }
.erp-sync-stats .stat.tone-warn {
  background: linear-gradient(180deg, #fff8f0, #ffefdf);
  border-color: #ffd7a8;
  border-left-color: #ed9513;
}
.erp-sync-stats .stat.tone-warn strong { color: #c7770c; }
.erp-sync-stats .stat.tone-info {
  background: linear-gradient(180deg, #f3f8ff, #e7f0ff);
  border-color: #c7dbff;
  border-left-color: #468dff;
}
.erp-sync-stats .stat.tone-info strong { color: #2f6fd6; }
.erp-sync-stats .stat.tone-good {
  background: linear-gradient(180deg, #f4fff8, #def7e9);
  border-color: #a9e6c5;
  border-left-color: #12b5a5;
}
.erp-sync-stats .stat.tone-good strong { color: #0f8f82; }
.erp-sync-actions { gap: 8px; flex-wrap: wrap; }
.erp-sync-table-wrap {
  position: relative;
  z-index: 2;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #d7e6ff;
  background: linear-gradient(180deg, #fcfdff, #f3f8ff);
  padding-bottom: 4px;
}
#erp-sync-failures {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}
#erp-sync-failures th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #e8f1ff, #ddeaff);
  color: #1d4f91;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#erp-sync-failures td {
  font-size: 12px;
  vertical-align: middle;
  background: #fff;
}
#erp-sync-failures td:nth-child(5) {
  max-width: 280px;
  word-break: break-word;
}
#erp-sync-failures td:last-child {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  padding-right: 16px;
}
#erp-sync-failures .erp-retry-one {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #ffd7a8;
  background: linear-gradient(180deg, #fff, #fff7eb);
  color: #c7770c;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(237, 149, 19, 0.16);
  cursor: pointer;
}
#erp-sync-failures .erp-retry-one:hover {
  background: linear-gradient(180deg, #ffb347, #ed9513);
  border-color: #ed9513;
  color: #fff;
  transform: translateY(-1px);
}
#erp-sync-failures .erp-retry-one:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.erp-sync-progress { position: relative; z-index: 1; margin: 0; }
.erp-sync-progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #e7eee9;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.erp-sync-progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1f8f63, #2bb673, #46c48f, #7af0b8);
  transition: width .25s ease;
}
#erp-sync-progress-text,
.erp-sync-reconcile {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #355246;
}
.erp-sync-reconcile {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #effdf6, #e3f9ee);
  border: 1px solid #b7ebcf;
}
.erp-sync-reconcile:empty { display: none; }
#data-source-save,
#hrm-site-save {
  min-width: 148px;
  height: 46px;
  border-radius: 14px;
}
.site-fields {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.site-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
}
.site-meta-card,
.site-meta > div {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 110px;
  padding: 16px;
  border: 1.5px solid #e6ebf2;
  border-radius: 18px;
  background: #f8fafc;
}
.site-meta-card.tone-amber {
  background: linear-gradient(180deg, #fffaf2, #ffe8c2);
  border-color: #ffd7a8;
}
.site-meta-card.tone-sky {
  background: linear-gradient(180deg, #f7faff, #dceaff);
  border-color: #c7dbff;
}
.site-meta-card.tone-mint {
  background: linear-gradient(180deg, #f4fff8, #d5f6e6);
  border-color: #a9e6c5;
}
.site-meta strong {
  font-size: 16px;
  letter-spacing: -0.2px;
  word-break: break-word;
  color: #122033;
}
.site-meta code {
  display: block;
  color: #1d4f91;
  font-family: Consolas, "Segoe UI", monospace;
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}
#hrm-site-hint { margin: 0; min-height: 20px; font-weight: 600; color: var(--muted); }
@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-hero { grid-template-columns: 1fr; }
  .settings-hero-side { justify-items: start; }
  .settings-hero-badges,
  .settings-hero-strip { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .site-meta { grid-template-columns: 1fr; }
  .erp-sync-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .source-choices, .source-urls, .site-fields, .source-effective { grid-template-columns: 1fr; }
  .settings-hero { padding: 22px; }
  .settings-hero h2 { font-size: 28px; }
  .source-actions,
  .erp-sync-actions { flex-direction: column; align-items: stretch; }
  .erp-sync-buttons { justify-content: stretch; }
  .erp-sync-buttons .btn { flex: 1 1 auto; }
  .erp-sync-stats { grid-template-columns: 1fr; }
  .source-choice { min-height: 0; }
}
#bulk-file { max-width: 320px; }
#table-card { overflow: hidden; padding: 0; border-top: 4px solid #ed9513; display: flex; flex-direction: column; }
.list-loading td {
  text-align: center !important;
  padding: 28px 16px !important;
  color: #667085 !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  background:
    linear-gradient(90deg, #fff7ed, #eff6ff, #ecfdf5, #fff7ed);
  background-size: 220% 100%;
  animation: list-shimmer 1.2s linear infinite;
}
@keyframes list-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.table-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
#table-card .table-scroll::-webkit-scrollbar { height: 0; width: 0; }
.table-xbar {
  position: fixed;
  z-index: 40;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  background: #e8edf3;
  box-shadow: inset 0 0 0 1px #d7dee8;
  scrollbar-color: #ed9513 #e8edf3;
  scrollbar-width: thin;
}
.table-xbar[hidden] { display: none !important; }
.table-xbar-inner { height: 1px; }
.table-xbar::-webkit-scrollbar { height: 14px; }
.table-xbar::-webkit-scrollbar-track { background: transparent; }
.table-xbar::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ed9513, #f3c16a);
  border: 3px solid #e8edf3;
  border-radius: 999px;
}
table { width: 100%; border-collapse: collapse; background: white; border-radius: 14px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #fafbfc; }
#table-card table { border: 0; }
#table-card th, #table-card td {
  border: 1px solid #e6ebf2;
  padding: 12px 14px;
  background: #fff;
  color: #1b1b18;
  font-weight: 500;
}
#table-card td { vertical-align: middle; }
.chip-list-cell { min-width: 150px; max-width: 230px; }
.area-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-width: 210px;
  min-height: 34px;
  margin: 0;
  padding: 4px 6px 4px 10px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: #1d2939;
  font: inherit;
  text-align: left;
  box-shadow: inset 0 0 0 1px #e6ebf2;
}
button.area-summary { cursor: pointer; }
button.area-summary:hover { box-shadow: inset 0 0 0 1px #d0d5dd, 0 6px 14px rgba(16, 24, 40, 0.06); }
.area-summary.hq { background: linear-gradient(180deg, #fffdf9, #fff6ea); box-shadow: inset 0 0 0 1px #f3d7b0; }
.area-summary.ex { background: linear-gradient(180deg, #fbfdff, #f3f7ff); box-shadow: inset 0 0 0 1px #d5e3ff; }
.area-summary.sales { background: linear-gradient(180deg, #fff, #f8fafc); }
.area-summary.is-open.hq { box-shadow: inset 0 0 0 1.5px #ed9513; }
.area-summary.is-open.ex { box-shadow: inset 0 0 0 1.5px #468dff; }
.area-summary.is-open.sales { box-shadow: inset 0 0 0 1.5px #667085; }
.area-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.area-summary.hq .area-dot, .area-chip.hq::before { background: #ed9513; }
.area-summary.ex .area-dot, .area-chip.ex::before { background: #468dff; }
.area-summary.sales .area-dot, .area-chip.sales::before { background: #98a2b3; }
.area-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
}
.area-summary small, .area-chip small {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.area-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.area-summary.hq .area-count { background: #ed9513; }
.area-summary.ex .area-count { background: #468dff; }
.area-summary.sales .area-count { background: #475467; }
.area-pop {
  position: fixed;
  z-index: 88;
  max-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.16);
}
.area-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.area-pop-head strong { font-size: 13px; color: #1d2939; white-space: nowrap; }
.area-pop-head span {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.area-chips { display: grid; gap: 4px; }
.area-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.area-chip small { margin-left: auto; flex: none; }
.area-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.area-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.area-chip.hq { background: #fff6ea; color: #9a5b00; }
.area-chip.ex { background: #eef4ff; color: #1d4ed8; }
.area-chip.sales { background: #f2f4f7; color: #344054; }
.muted-dash { color: #98a2b3; }
#table-card th {
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-color: rgba(255, 255, 255, 0.35);
}
#table-card th:nth-child(5n+1) { background: #ed9513; }
#table-card th:nth-child(5n+2) { background: #468dff; }
#table-card th:nth-child(5n+3) { background: #8a63d2; }
#table-card th:nth-child(5n+4) { background: #12b5a5; }
#table-card th:nth-child(5n+5) { background: #e85d8c; }
#table-card tbody tr:nth-child(even) td { background: #f7f9fc; }
#table-card thead th { position: sticky; top: 0; z-index: 2; }
#table-card tbody tr:hover td { background: #fff8ee; }
tr:hover td { background: #fff7e8; }
.badge {
  display: inline-block;
  background: #e6f2fd;
  color: var(--badge);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.location-filters, #report-dates, #location-extra { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.location-filters[hidden], #report-dates[hidden], #location-extra[hidden], #report-month-wrap[hidden], #visit-geo[hidden] { display: none !important; }
#visit-geo { display: flex; flex-wrap: wrap; gap: 10px; }
.location-filters label { display: grid; gap: 4px; color: #667085; font-size: 12px; font-weight: 700; }
.location-filters input, .location-filters select { min-width: 150px; }
.empty-row { text-align: center; color: #667085; padding: 28px 12px; }
.visit-cell { min-width: 160px; }
.visit-count { display: inline-flex; min-width: 28px; height: 24px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 8px; color: #fff; font-weight: 800; border: 0; }
.visit-count.farm { background: #2f9e44; }
.visit-count.market { background: #468dff; }
button.visit-count { cursor: pointer; }
button.visit-count:hover { filter: brightness(0.92); }
.visit-places { margin-top: 4px; color: #667085; font-size: 12px; line-height: 1.35; }
.visit-modal { position: fixed; inset: 0; z-index: 40; display: block; background: #fff; }
.visit-modal[hidden] { display: none; }
.visit-modal-card { position: relative; width: 100%; height: 100%; max-height: none; overflow: hidden; background: #fff; border-radius: 0; padding: 10px 14px 12px; display: flex; flex-direction: column; }
.visit-modal-card h3 { margin: 0 36px 8px; text-align: center; font-size: 1.25rem; flex: none; }
.visit-close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; z-index: 5; }
.visit-status { text-align: center; color: #667085; }
.visit-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.visit-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; height: 100%; overflow: hidden; }
.visit-summary, .visit-steps { background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08); }
.visit-summary { flex: none; overflow: hidden; }
.visit-steps { flex: 1; min-height: 0; overflow: auto; }
.visit-summary h4 { margin: 0; color: #fff; background: #0d6efd; padding: 10px 14px; font-size: 15px; }
.visit-summary-body, #visit-map-summary { padding: 12px 14px 8px; }
.visit-summary p { margin: 0 0 10px; font-size: 13px; }
.visit-summary span { display: block; color: #667085; margin-bottom: 2px; }
.visit-summary strong { font-weight: 700; }
.visit-summary .visit-source { color: #667085; font-size: 12px; font-weight: 500; }
.visit-steps { padding: 12px 14px; }
.visit-steps > p { margin: 0 0 8px; text-align: center; color: #667085; font-size: 12px; }
.visit-step { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 0 0 12px; margin: 0; cursor: pointer; font: inherit; color: inherit; }
.visit-step-check { flex: 0 0 auto; color: #198754; font-weight: 800; line-height: 1.4; }
.visit-step-body { display: grid; gap: 2px; min-width: 0; }
.visit-step-body strong { font-size: 14px; }
.visit-step-meta, .visit-step-place { color: #667085; font-size: 12px; font-style: normal; }
.visit-step-meta b { color: #198754; font-weight: 600; }
.visit-card-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.4; }
.visit-card-row span { color: #667085; }
.visit-map-shell { position: relative; height: 100%; min-height: 0; border: 1px solid #e4e7ec; border-radius: 12px; background: #e9ecef; box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08); overflow: hidden; }
.visit-map-layers { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; gap: 6px; }
.visit-map-layers[hidden] { display: none; }
.visit-map-layers button { border: 0; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700; color: #344054; background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(16,24,40,0.12); cursor: pointer; }
.visit-map-layers button.active { color: #fff; background: #246bff; }
.visit-canvas { position: absolute; inset: 0; height: auto; background: #e5e9ef; }
.visit-map-legs { position: absolute; left: 10px; right: 150px; bottom: 14px; z-index: 2; display: flex; flex-wrap: nowrap; gap: 8px; justify-content: flex-start; overflow-x: auto; pointer-events: none; }
.visit-leg { pointer-events: auto; flex: 0 0 180px; width: 180px; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); text-align: left; }
.visit-leg strong { display: block; background: #0d6efd; color: #fff; font-size: 12px; padding: 7px 10px; }
.visit-leg span { display: block; padding: 8px 10px 10px; color: #344054; font-size: 12px; }
.visit-map-done { position: absolute; right: 14px; bottom: 14px; z-index: 3; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; color: #fff; background: #98a2b3; box-shadow: 0 4px 12px rgba(16, 24, 40, 0.16); }
.visit-map-done.ready { background: #198754; }
.visit-pin { background: none !important; border: 0 !important; }
.visit-pin svg { display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.28)); }
.photo-upload { display: grid; justify-items: center; gap: 10px; margin: 0 0 16px; padding: 22px; border: 2px dashed rgba(215, 119, 9, 0.45); border-radius: 16px; background: rgba(255,255,255,0.72); }
.photo-upload p { margin: 0; font-weight: 700; color: #344054; }
.photo-frame { width: 160px; height: 160px; border-radius: 16px; overflow: hidden; background: #f4f7fb; box-shadow: 0 5px 15px rgba(0,0,0,.1); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame.empty { background: #f4f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Ccircle cx='80' cy='62' r='28' fill='%23d0d5dd'/%3E%3Cellipse cx='80' cy='132' rx='42' ry='28' fill='%23d0d5dd'/%3E%3C/svg%3E") center / 100% no-repeat; }
.photo-frame.empty img { display: none; }
.photo-change { background: linear-gradient(135deg, #d77709, #ed9513); color: #fff; border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.photo-change input { display: none; }
.list-avatar { width: 50px; height: 50px; object-fit: cover; border-radius: 50%; display: block; background: #f4f7fb; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.list-avatar.empty { background: #f4f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='19' r='8' fill='%23d0d5dd'/%3E%3Cellipse cx='25' cy='40' rx='13' ry='9' fill='%23d0d5dd'/%3E%3C/svg%3E") center / cover no-repeat; }
.login-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #344054; cursor: pointer; }
.login-switch input { width: 42px; height: 22px; accent-color: #ed9513; cursor: pointer; }
#record-fields.role-form { align-items: stretch; }
#record-fields.role-form .span-2 { grid-column: span 2; }
#record-fields.role-form .field-card { height: 100%; min-height: 168px; }
#record-fields.role-form select[multiple] { min-height: 112px; height: 112px; }
#record-form:has(#record-fields.role-form) .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 14px;
  padding: 12px 0 4px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid #e6ebf2;
}
.perm-board { grid-column: 1 / -1; margin-top: 6px; padding: 16px 16px 14px; border: 2px solid rgba(215, 119, 9, 0.28); border-radius: 16px; background: #fff; }
.perm-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
  gap: 12px 18px;
  align-items: center;
  margin: -16px -16px 14px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 2px solid rgba(215, 119, 9, 0.18);
  border-radius: 14px 14px 0 0;
}
.perm-title h3 { margin: 0 0 4px; color: #d77709; font-size: 1.15rem; }
.perm-title p { margin: 0; color: #667085; line-height: 1.4; }
.perm-tools { display: flex; gap: 8px; align-items: center; }
.perm-tools input[type="search"] { flex: 1; min-width: 0; height: 42px; border: 1px solid #d0d5dd; border-radius: 10px; padding: 8px 12px; background: #fff; }
.perm-tools button { height: 42px; border: 0; border-radius: 10px; padding: 0 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.perm-tools button.select { background: linear-gradient(135deg, #d77709, #ed9513); color: #fff; }
.perm-tools button.clear { background: #fff; color: #344054; border: 1px solid #d0d5dd; }
.perm-count { min-width: 96px; height: 42px; display: grid; place-items: center; padding: 0 10px; border-radius: 999px; background: #fff6ea; color: #d77709; font-weight: 800; white-space: nowrap; }
.perm-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.perm-group { border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04); }
.perm-group summary { list-style: none; display: grid; grid-template-columns: 18px minmax(120px, 180px) minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; cursor: pointer; }
.perm-group-check { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #ed9513; }
.perm-group summary::-webkit-details-marker { display: none; }
.perm-group summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.perm-group[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.perm-group summary strong { min-width: 0; }
.perm-group.tone-orange summary { background: #fff6ea; color: #d77709; }
.perm-group.tone-blue summary { background: #eef4ff; color: #2f6fe0; }
.perm-group.tone-purple summary { background: #f6f1fc; color: #8a63d2; }
.perm-group.tone-teal summary { background: #e9faf7; color: #0e8f83; }
.perm-group.tone-pink summary { background: #fff0f5; color: #e85d8c; }
.perm-group em { margin: 0; font-style: normal; font-size: 12px; font-weight: 700; color: #344054; background: #fff; border-radius: 999px; padding: 3px 8px; }
.perm-picked { min-width: 0; color: #1d2939; font-size: 12px; font-weight: 700; line-height: 1.35; background: rgba(255,255,255,.78); border-radius: 8px; padding: 5px 8px; }
.perm-picked.empty { color: #98a2b3; font-weight: 600; }
.perm-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; padding: 12px; }
.perm-check { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; margin: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid #e6ebf2; background: #fff; }
.perm-check.on { background: #fff8ee; border-color: rgba(237, 149, 19, 0.5); }
.perm-check span { flex: 1 1 auto; min-width: 0; line-height: 1.35; white-space: normal; overflow-wrap: break-word; word-break: normal; }
.perm-check input { width: 18px; height: 18px; min-width: 18px; margin: 0; padding: 0; accent-color: #ed9513; flex: 0 0 18px; }
@media (max-width: 800px) {
  .visit-layout { grid-template-columns: 1fr; }
  .visit-canvas { min-height: 320px; }
}
#dashboard {
  gap: 18px;
  padding: 10px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.7), transparent 36%),
    radial-gradient(circle at 92% 6%, rgba(70, 141, 255, 0.16), transparent 28%),
    radial-gradient(circle at 68% 58%, rgba(31, 143, 99, 0.12), transparent 30%),
    linear-gradient(165deg, rgba(255, 248, 238, 0.7), rgba(236, 245, 255, 0.35));
}
.dash-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 22px 24px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(8, 16, 32, 0.28), rgba(8, 16, 32, 0.05)),
    linear-gradient(118deg, #ff8a00 0%, #ed9513 34%, #2bb673 68%, #468dff 100%);
  box-shadow:
    0 24px 52px rgba(199, 122, 10, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.dash-hero::before,
.dash-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.dash-hero::before {
  width: 240px;
  height: 240px;
  right: -64px;
  top: -96px;
  background: rgba(255, 255, 255, 0.18);
}
.dash-hero::after {
  width: 160px;
  height: 160px;
  left: -40px;
  bottom: -80px;
  background: rgba(70, 141, 255, 0.22);
}
.dash-hero-top,
.dash-hero-copy,
.dash-me,
.dash-refresh { position: relative; z-index: 1; }
.dash-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.dash-hero-copy { min-width: 0; flex: 1; }
.dash-hero .eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dash-hero h1 {
  margin: 6px 0 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.7px;
  line-height: 1.1;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.dash-hero .lead {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}
.dash-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.dash-refresh svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-refresh:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}
.dash-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 28px rgba(90, 42, 0, 0.07);
  backdrop-filter: blur(10px);
}
.dash-preset {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e6ebf2;
  background: #fff;
  color: #344054;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dash-preset:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(16, 24, 40, 0.08); }
.dash-preset.is-on {
  background: linear-gradient(180deg, #ffb347, #ed9513);
  border-color: #ed9513;
  color: #fff;
  box-shadow: 0 10px 18px rgba(237, 149, 19, 0.24);
}
.dash-custom { display: flex; gap: 8px; align-items: center; }
.dash-custom[hidden] { display: none !important; }
.dash-custom label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border-radius: 12px;
  background: #fff8ee;
  border: 1px solid #ffd7a8;
  color: #9a5b00;
  font-size: 12px;
  font-weight: 800;
}
.dash-custom .date-face { width: auto; min-width: 108px; height: 28px; }
.dash-me { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dash-me .stat {
  margin: 0;
  min-height: 0;
  padding: 14px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.dash-me .stat span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dash-me .stat strong { font-size: 20px; color: #fff; letter-spacing: -0.3px; }
.dash-me .stat.tone-in { background: rgba(180, 245, 214, 0.22); }
.dash-me .stat.tone-out { background: rgba(190, 220, 255, 0.24); }
.dash-me .stat.tone-gps { background: rgba(255, 220, 150, 0.24); }
.dash-board {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-ring {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #f4fff8, #ffffff 48%) padding-box,
    linear-gradient(135deg, #1f8f63, #46c48f) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 14px 30px rgba(31, 143, 99, 0.12);
}
.dash-ring svg { width: 88px; height: 88px; flex: 0 0 auto; transform: rotate(-90deg); }
.dash-ring .ring-track { fill: none; stroke: #e7f6ee; stroke-width: 8; }
.dash-ring .ring-value { fill: none; stroke: #12b5a5; stroke-width: 8; stroke-linecap: round; }
.dash-ring text { transform: rotate(90deg); transform-origin: 44px 44px; font-size: 16px; font-weight: 800; fill: #1b1b18; }
.dash-ring strong { display: block; font-size: 16px; }
.dash-ring p { margin: 4px 0 0; color: #667085; font-size: 13px; line-height: 1.4; }
.analytics { margin-top: 0; display: grid; gap: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas: "icon label" "icon value" "icon hint";
  gap: 0 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  border: 1px solid #e6ebf2;
  border-top: 4px solid var(--tone, #ed9513);
  min-height: 104px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.metric:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(16, 24, 40, 0.1); }
.metric i {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone, #ed9513) 82%, #fff), var(--tone, #ed9513));
  box-shadow: 0 10px 18px color-mix(in srgb, var(--tone, #ed9513) 28%, transparent);
}
.metric i svg { width: 18px; height: 18px; }
.metric.tone-orange { --tone: #ed9513; }
.metric.tone-blue { --tone: #468dff; }
.metric.tone-purple { --tone: #8a63d2; }
.metric.tone-teal { --tone: #12b5a5; }
.metric.tone-pink { --tone: #e85d8c; }
.metric.tone-green { --tone: #067647; }
.metric.tone-red { --tone: #b42318; }
.floor-board {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(70, 141, 255, 0.08), transparent 34%),
    linear-gradient(180deg, #f5fffa, #ffffff 42%) padding-box,
    linear-gradient(135deg, rgba(31, 143, 99, 0.5), rgba(70, 141, 255, 0.3)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
}
.floor-board::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #1f8f63, #2bb673, #468dff, #ed9513);
}
.floor-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.3px; }
.floor-head p { margin: 6px 0 0; color: #667085; font-size: 13px; font-weight: 600; }
.floor-main { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: center; }
.floor-ring {
  width: 148px;
  height: 148px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(255,255,255,0.55) 59%, transparent 62%),
    conic-gradient(#1f8f63 0 var(--on), #f04438 var(--on) 100%);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 16px 32px rgba(31, 143, 99, 0.2);
}
.floor-ring div {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f4faf7);
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: inset 0 0 0 1px #eef5f1;
}
.floor-ring strong { font-size: 28px; color: #067647; line-height: 1; }
.floor-ring span { color: #667085; font-size: 12px; font-weight: 800; }
.floor-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.floor-tile {
  text-align: left;
  font: inherit;
  cursor: pointer;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6ebf2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.floor-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(16, 24, 40, 0.08); }
.floor-tile span { display: block; color: #667085; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.floor-tile strong { display: block; margin-top: 6px; font-size: 28px; letter-spacing: -0.04em; }
.floor-tile.is-ontime { background: linear-gradient(180deg, #f0fff7, #d9fbe8); border-color: #abefc6; }
.floor-tile.is-ontime strong { color: #067647; }
.floor-tile.is-late { background: linear-gradient(180deg, #fff5f4, #ffe4e2); border-color: #fecdca; }
.floor-tile.is-late strong { color: #b42318; }
.floor-tile.is-wait { background: linear-gradient(180deg, #f8fafc, #eef2f6); border-color: #d0d5dd; }
.floor-tile.is-wait strong { color: #475467; }
.floor-mix { display: flex; height: 12px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: #eef2f6; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); }
.floor-mix i { display: block; height: 100%; }
.floor-mix i.is-ontime { background: linear-gradient(90deg, #1f8f63, #2bb673); }
.floor-mix i.is-late { background: linear-gradient(90deg, #f04438, #b42318); }
.floor-mix i.is-wait { background: #d0d5dd; }
.floor-days { display: flex; gap: 6px; align-items: end; min-height: 150px; overflow-x: auto; padding: 8px 4px 2px; }
.floor-day { display: grid; justify-items: center; gap: 6px; flex: 1 0 36px; }
.floor-tile.is-people { background: linear-gradient(180deg, #f8fafc, #eef2f7); }
.floor-day span, .floor-day small { color: #667085; font-size: 11px; font-weight: 700; }
.floor-day div { width: 100%; height: 110px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.floor-day i { display: block; width: 100%; border-radius: 8px; min-height: 0; }
.floor-day i.is-late { background: #b42318; }
.floor-day i.is-ontime { background: #1f8f63; }
.floor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.floor-chip {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.floor-chip:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(16, 24, 40, 0.08); }
.floor-chip.is-quiet { color: #667085; background: #f8fafc; }
.floor-live { display: grid; gap: 8px; }
.floor-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.floor-person:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(16, 24, 40, 0.07); }
.floor-person b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-person small { color: #667085; white-space: nowrap; }
.mark-ontime,
.mark-late {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.mark-ontime { color: #067647; background: #d9fbe8; }
.mark-late { color: #b42318; background: #fee4e2; }
.metric span { grid-area: label; color: #667085; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.metric strong { grid-area: value; margin-top: 2px; font-size: 26px; letter-spacing: -0.04em; color: #1b1b18; }
.metric small { grid-area: hint; color: #667085; }
.insight-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.insight {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e6ebf2;
  border-left: 5px solid var(--tone, #ed9513);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.insight:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08); }
.insight.tone-orange { --tone: #ed9513; }
.insight.tone-blue { --tone: #468dff; }
.insight.tone-purple { --tone: #8a63d2; }
.insight.tone-teal { --tone: #12b5a5; }
.insight.tone-pink { --tone: #e85d8c; }
.insight strong { display: block; font-size: 14px; }
.insight p { margin: 4px 0 0; color: #3f3f46; font-size: 13px; line-height: 1.45; }
.insight small { display: inline-block; margin-top: 8px; color: var(--tone, #d77709); font-weight: 800; }
.analytics .chart-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, #ffffff, #f7fafc) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--chart-accent, #ed9513) 55%, #fff), rgba(70, 141, 255, 0.28)) border-box;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.07);
  padding: 18px;
}
.analytics .chart-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--chart-accent, #ff8a00), #3b82f6, #10b981);
}
.chart-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.chart-head::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--chart-accent, #ff8a00);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--chart-accent, #ff8a00) 22%, transparent);
  flex: 0 0 auto;
}
.donut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 0; }
.donut-layout { display: grid; grid-template-columns: 148px 1fr; gap: 14px; align-items: center; }
.donut { width: 148px; height: 148px; filter: drop-shadow(0 10px 18px rgba(16, 24, 40, 0.1)); }
.donut-track { fill: none; stroke: #eef2f7; stroke-width: 16; }
.donut-hub { fill: #fff; filter: drop-shadow(0 4px 10px rgba(16, 24, 40, 0.06)); }
.donut-slice { transition: stroke-width 0.15s ease; }
.donut-total { font-size: 15px; font-weight: 800; fill: #101828; }
.donut-caption { font-size: 9px; font-weight: 700; fill: #98a2b3; letter-spacing: 0.08em; text-transform: uppercase; }
.donut-legend { display: grid; gap: 8px; min-width: 0; }
.legend-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--swatch, #ed9513) 12%, #fff), #fff);
  border: 1px solid color-mix(in srgb, var(--swatch, #ed9513) 22%, #eef2f6);
}
.legend-row span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.legend-row b { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1d2939; }
.legend-row i {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch, #ed9513) 18%, transparent);
}
.legend-row small { color: #667085; white-space: nowrap; font-weight: 700; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 0; }
.chart-card.span-2 { grid-column: 1 / -1; }
.chart-card h2 { margin: 0; font-size: 17px; letter-spacing: -0.2px; }
.chart-note { margin: 6px 0 14px; color: #667085; font-size: 12px; font-weight: 600; }
.chart-legend-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.chart-legend-row .chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.chip-ta { color: #1d4ed8; background: linear-gradient(180deg, #dbeafe, #eff6ff); border: 1px solid #bfdbfe; }
.chip-da { color: #c2410c; background: linear-gradient(180deg, #ffedd5, #fff7ed); border: 1px solid #fdba74; }
.spend-list { display: grid; gap: 12px; }
.spend-row { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; }
.spend-row > span {
  font-size: 12px;
  font-weight: 800;
  color: #344054;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}
.spend-pair { display: grid; gap: 6px; }
.spend-line { display: grid; grid-template-columns: 1fr 92px; gap: 8px; align-items: center; }
.spend-track { height: 12px; border-radius: 999px; background: #eef2f7; overflow: hidden; box-shadow: inset 0 1px 2px rgba(16,24,40,0.05); }
.spend-track i { display: block; height: 100%; border-radius: inherit; }
.spend-track i.ta { background: linear-gradient(90deg, #2563eb, #60a5fa 55%, #93c5fd); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25); }
.spend-track i.da { background: linear-gradient(90deg, #ea580c, #fb923c 55%, #fdba74); box-shadow: 0 4px 10px rgba(234, 88, 12, 0.22); }
.spend-line small { color: #475467; font-size: 11px; text-align: right; font-weight: 700; }
.day-bars { display: flex; gap: 8px; align-items: end; min-height: 200px; overflow-x: auto; padding: 4px 2px 2px; }
.day-bar { display: grid; justify-items: center; gap: 8px; flex: 1 0 36px; min-width: 36px; }
.day-bar span {
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: var(--bar, #ff8a00);
  box-shadow: 0 6px 12px color-mix(in srgb, var(--bar, #ff8a00) 35%, transparent);
}
.day-bar small { color: #667085; font-size: 11px; font-weight: 700; }
.day-bar div {
  width: 100%;
  height: 140px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bar, #ff8a00) 10%, #fff), #f4f7fb);
  border: 1px solid color-mix(in srgb, var(--bar, #ff8a00) 18%, #eef2f6);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.day-bar i {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bar, #ff8a00) 55%, #fff), var(--bar, #ff8a00));
  border-radius: 14px 14px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  transition: height 0.35s ease;
}
.dept-bars { display: grid; gap: 12px; }
.dept-row { display: grid; gap: 6px; }
.dept-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; }
.dept-head small {
  color: #fff;
  background: var(--bar, #10b981);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}
.dept-track {
  height: 14px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(16,24,40,0.05);
}
.dept-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar, #10b981) 70%, #fff), var(--bar, #10b981));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--bar, #10b981) 28%, transparent);
}
.analytics-date { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.7); color: #667085; font-weight: 700; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .menu-collapse, .shell.menu-collapsed .menu-collapse { left: auto; right: 16px; top: 12px; }
  .shell.menu-collapsed .sidebar { display: none; }
  .sidebar { height: auto; max-height: 46vh; position: relative; }
  .dash-board, .floor-person { grid-template-columns: 1fr; }
  .dash-hero { padding: 18px; }
  .dash-hero h1 { font-size: 28px; }
  .dash-me { gap: 8px; }
  .dash-me .stat { padding: 12px 10px; }
  .dash-me .stat strong { font-size: 17px; }
  .dash-refresh { padding: 0 12px; }
  .dash-refresh span { display: none; }
  .floor-main { grid-template-columns: 118px minmax(0, 1fr); gap: 12px; }
  .floor-ring { width: 118px; height: 118px; }
  .floor-ring div { width: 82px; height: 82px; }
  .floor-ring strong { font-size: 22px; }
  .floor-tiles { grid-template-columns: 1fr; }
  #page-count.list-pager { flex-direction: column; align-items: stretch; }
  .area-row, .view-maps, .ta-line, .ta-overall { grid-template-columns: 1fr; }
  .ta-span-2 { grid-column: auto; }
  .pager-buttons { justify-content: center; }
  .grid, #record-fields, .form-grid, .detail-grid, .form-pane.form-grid, .salary-summary, .salary-top, .salary-pay, .breakdown-grid, #bind-areas-lists, .metric-grid, .chart-grid, .insight-grid, .donut-grid, .perm-items, .perm-groups, .perm-head { grid-template-columns: 1fr; }
  #workspace.styled-list { margin: -16px; padding: 16px; }
  #workspace.employee-list #page-stats { grid-template-columns: 1fr; }
  #workspace.punch-list #page-stats { grid-template-columns: 1fr 1fr; }
  #workspace.employee-list #search-form {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "search search"
      "filters filters"
      "clear filter"
      "add add";
  }
  #workspace.employee-list .employee-filters { grid-template-columns: 1fr; }
  .punch-views { width: 100%; }
  .punch-view-track { min-width: 0; width: 100%; }
  #workspace.styled-list:has(#punch-filters:not([hidden])) #search-form {
    grid-template-columns: 1fr 1fr;
  }
  #workspace.styled-list:has(#punch-filters:not([hidden])) #search-form .search-field,
  #workspace.styled-list:has(#punch-filters:not([hidden])) #search-form > button[type="submit"] {
    grid-column: 1 / -1;
  }
  #workspace.styled-list:has(#attendance-filters:not([hidden])) #search-form {
    grid-template-columns: 1fr;
  }
  #record-fields.role-form .span-2 { grid-column: auto; }
  .chart-card.span-2 { grid-column: auto; }
  .donut-layout { grid-template-columns: 120px 1fr; }
  .form-tabs { grid-template-columns: 1fr; }
}
