:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-raised: rgba(255, 255, 255, 0.86);
  --surface-soft: #f9f9fb;
  --sidebar: rgba(248, 248, 250, 0.92);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-strong: #3a3a3c;
  --line: rgba(60, 60, 67, 0.16);
  --line-strong: rgba(60, 60, 67, 0.28);
  --accent: #007aff;
  --accent-strong: #0066d6;
  --accent-soft: rgba(0, 122, 255, 0.11);
  --green: #248a3d;
  --green-soft: rgba(36, 138, 61, 0.12);
  --amber: #b26a00;
  --amber-soft: rgba(255, 159, 10, 0.14);
  --red: #d70015;
  --red-soft: rgba(255, 69, 58, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --content-width: 1080px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-raised: rgba(28, 28, 30, 0.88);
    --surface-soft: #2c2c2e;
    --sidebar: rgba(22, 22, 24, 0.92);
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --muted-strong: #d1d1d6;
    --line: rgba(235, 235, 245, 0.14);
    --line-strong: rgba(235, 235, 245, 0.24);
    --accent: #0a84ff;
    --accent-strong: #409cff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --green: #32d74b;
    --green-soft: rgba(50, 215, 75, 0.17);
    --amber: #ffd60a;
    --amber-soft: rgba(255, 214, 10, 0.16);
    --red: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.17);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  }

}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 40px;
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon,
.button-icon,
.field-icon,
.card-icon {
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon {
  width: 22px;
  height: 22px;
}

.button-icon {
  width: 24px;
  height: 24px;
}

.field-icon {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.card-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  padding: 40px 18px 24px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 8px 32px;
  color: var(--ink);
}

.brand-clock {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.clock-face {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  border-radius: 999px;
  background: currentColor;
  transform-origin: 50% 100%;
}

.clock-hour {
  width: 3px;
  height: 9px;
  transform: translateX(-50%) rotate(var(--hour-angle, 0deg));
}

.clock-minute {
  width: 2px;
  height: 13px;
  transform: translateX(-50%) rotate(var(--minute-angle, 0deg));
}

.clock-second {
  width: 1.5px;
  height: 14px;
  background: var(--red);
  transform: translateX(-50%) rotate(var(--second-angle, 0deg));
}

.clock-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-time {
  font-size: 29px;
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.brand-date {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.mode-tabs,
.side-actions {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-strong);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 650;
  text-align: left;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.nav-button.quiet {
  min-height: 50px;
  color: var(--muted);
}

.nav-button:hover,
.sidebar-link:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.employee-quick-button:hover,
.admin-access-button:hover,
.stepper button:hover {
  transform: translateY(-1px);
}

.nav-button:focus-visible,
.sidebar-link:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.danger-button:focus-visible,
.employee-quick-button:focus-visible,
.admin-access-button:focus-visible,
.stepper button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.28);
  outline-offset: 2px;
}

.sidebar-spacer {
  flex: 1 1 auto;
  min-height: 28px;
}

.sidebar-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h2 {
  font-size: 15px;
  font-weight: 720;
  line-height: 1.25;
}

.sidebar-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.sidebar-link {
  grid-column: 2;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.side-actions {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.sidebar-footer {
  display: grid;
  justify-items: start;
  gap: 18px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding: 14px 8px 0;
}

.sidebar-admin-button {
  width: 100%;
  padding-inline: 6px;
}

.sidebar-admin-chevron {
  margin-left: auto;
}

.company-logo {
  display: block;
  width: 220px;
  max-width: calc(100% - 12px);
  height: auto;
  margin-left: 6px;
  object-fit: contain;
}

.workspace {
  min-width: 0;
  padding: 32px min(56px, 5vw) 56px;
}

.topbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
}

.admin-access-button {
  display: inline-flex;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-strong);
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.admin-access-button .icon {
  width: 18px;
  height: 18px;
}

.admin-access-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.neutral {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted-strong);
}

.status-pill.good {
  border-color: color-mix(in srgb, var(--green) 36%, transparent);
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.warn {
  border-color: color-mix(in srgb, var(--amber) 38%, transparent);
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.bad {
  border-color: color-mix(in srgb, var(--red) 38%, transparent);
  background: var(--red-soft);
  color: var(--red);
}

.content {
  width: min(100%, var(--content-width));
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-head.inline {
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.panel,
.entry-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel {
  padding: 24px;
  box-shadow: var(--shadow);
}

.entry-panel {
  border-color: transparent;
  background: transparent;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.employee-quick-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.employee-quick-button {
  display: grid;
  min-height: 96px;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.employee-quick-button span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.employee-quick-button strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.2;
}

.employee-quick-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.punch-panel {
  display: flex;
  min-height: 176px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
  box-shadow: var(--shadow);
}

.punch-panel h2 {
  margin-top: 12px;
}

.punch-panel p {
  margin-top: 7px;
}

.punch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
  min-width: min(100%, 380px);
}

.punch-timer {
  display: grid;
  min-width: 172px;
  place-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 17px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), var(--shadow-sm);
  text-align: center;
}

.punch-timer span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.punch-timer strong {
  font-size: 31px;
  font-weight: 830;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.punch-actions button {
  min-height: 86px;
  flex-direction: column;
  gap: 8px;
  font-size: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 16px;
}

.form-grid.compact {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.form-grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.login-grid {
  grid-template-columns: minmax(220px, 1.1fr) minmax(170px, 0.7fr) auto;
}

.field-block {
  display: grid;
  gap: 9px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 680;
}

.field-block em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.helper-text {
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
  line-height: 1.35;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.counter {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.input-shell {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.16);
}

.display-field {
  font-size: 19px;
  font-weight: 650;
}

.end-icon {
  margin-left: auto;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  outline: 0;
}

.input-shell input,
.input-shell select,
.input-shell textarea {
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 18px;
  font-weight: 520;
}

.input-shell select {
  appearance: none;
}

.input-shell input[type="date"],
.input-shell input[type="time"] {
  color-scheme: light dark;
}

.input-shell input[type="number"] {
  appearance: textfield;
}

.input-shell input[type="number"]::-webkit-outer-spin-button,
.input-shell input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.note-shell {
  min-height: 104px;
  align-items: stretch;
  padding: 0 16px;
}

.note-shell textarea {
  min-height: 102px;
  padding: 15px 0;
  line-height: 1.45;
  resize: vertical;
}

.pause-shell {
  padding-right: 10px;
}

.stepper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  min-width: 122px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.stepper button {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--accent);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.stepper button + button {
  border-left: 1px solid var(--line);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 720;
  text-align: center;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  border: 1px solid var(--accent-strong);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.23);
}

.submit-button {
  min-height: 68px;
  font-size: 18px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--accent);
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted-strong);
}

.danger-button {
  border: 1px solid color-mix(in srgb, var(--red) 36%, transparent);
  background: var(--red-soft);
  color: var(--red);
}

.full-span {
  grid-column: 1 / -1;
}

.summary-box {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 18px 22px;
}

.summary-box span {
  display: block;
  font-size: 20px;
  font-weight: 730;
}

.summary-box small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.summary-box strong {
  color: var(--accent);
  font-size: 36px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.notice,
.error-box,
.form-message {
  border-radius: var(--radius);
  padding: 12px 14px;
  line-height: 1.45;
}

.notice {
  border: 1px solid color-mix(in srgb, var(--amber) 34%, transparent);
  background: var(--amber-soft);
  color: var(--amber);
}

.error-box {
  border: 1px solid color-mix(in srgb, var(--red) 34%, transparent);
  background: var(--red-soft);
  color: var(--red);
}

.form-message {
  margin-top: 12px;
  color: var(--muted);
}

.action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.export-required {
  border-color: color-mix(in srgb, var(--amber) 38%, transparent);
  background: color-mix(in srgb, var(--amber-soft) 46%, var(--surface));
}

.button-row,
.restore-row,
.employee-row,
.month-controls {
  display: flex;
  align-items: center;
}

.button-row {
  gap: 10px;
  flex-wrap: wrap;
}

.restore-row {
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.file-label {
  display: grid;
  flex: 1 1 260px;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.list,
.audit-list,
.check-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.check-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px;
}

.check-item strong {
  font-size: 16px;
}

.check-item span {
  color: var(--muted);
  line-height: 1.4;
}

.check-item.good {
  border-color: color-mix(in srgb, var(--green) 34%, transparent);
  background: var(--green-soft);
}

.check-item.good strong {
  color: var(--green);
}

.check-item.warn {
  border-color: color-mix(in srgb, var(--amber) 34%, transparent);
  background: var(--amber-soft);
}

.check-item.warn strong {
  color: var(--amber);
}

.restore-preview {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.restore-preview span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.restore-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.restore-preview strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.employee-row {
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px;
}

.employee-meta {
  display: grid;
  gap: 6px;
}

.employee-meta strong {
  font-size: 17px;
  font-weight: 720;
}

.employee-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.month-controls {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.summary-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px;
}

.summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.summary-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  font-weight: 760;
}

.employee-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.employee-month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.employee-month-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 16px;
}

.employee-month-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.employee-month-card strong {
  display: block;
  font-size: 17px;
  font-weight: 730;
}

.employee-month-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
}

.employee-month-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.employee-month-stats span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.employee-month-stats b {
  font-size: 16px;
  font-weight: 730;
  line-height: 1.15;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

tr.weekend td {
  background: var(--amber-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.audit-item {
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px 14px;
  color: var(--muted);
}

.audit-item strong {
  display: block;
  color: var(--ink);
  font-weight: 720;
}

.hidden {
  display: none !important;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 276px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 14px;
  }

  .workspace {
    padding-inline: 30px;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .employee-month-grid,
  .employee-month-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 14px;
  }

  .brand {
    padding-bottom: 18px;
  }

  .mode-tabs,
  .side-actions {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 16px;
    padding-inline: 0;
  }

  .company-logo {
    width: 150px;
    margin: 0 8px 0 0;
  }

  .sidebar-spacer,
  .sidebar-card {
    display: none;
  }

  .workspace {
    padding: 18px 16px 40px;
  }

  .topbar {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }

  .form-grid,
  .form-grid.compact,
  .form-grid.wide,
  .login-grid,
  .entry-form {
    grid-template-columns: 1fr;
  }

  .section-head,
  .section-head.inline,
  .action-panel,
  .punch-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .month-controls,
  .button-row,
  .restore-row,
  .employee-actions,
  .punch-actions {
    justify-content: stretch;
  }

  .month-controls > *,
  .button-row > *,
  .restore-row > *,
  .employee-actions > *,
  .punch-timer,
  .punch-actions > * {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-month-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 21px;
  }

  .brand-time {
    font-size: 25px;
  }

  .mode-tabs,
  .side-actions {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .field-block {
    font-size: 16px;
  }

  .input-shell {
    min-height: 58px;
  }

  .input-shell input,
  .input-shell select,
  .input-shell textarea {
    font-size: 16px;
  }

  .pause-shell {
    flex-wrap: wrap;
    padding-block: 10px;
  }

  .stepper {
    width: 100%;
  }

  .punch-actions {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .summary-box {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .summary-box strong {
    font-size: 32px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .employee-month-stats {
    grid-template-columns: 1fr;
  }

  .employee-row {
    align-items: stretch;
    flex-direction: column;
  }
}
