:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, #e9f1ff 0, transparent 34rem),
    radial-gradient(circle at 100% 10%, #eefaf5 0, transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small-text {
  font-size: 12.5px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 11px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  overflow: hidden;
  max-width: 42vw;
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
}

.nav-link:hover {
  background: #f1f5f9;
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-button {
  font-family: inherit;
}

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 56px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.notice {
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.notice.warn {
  border-color: #fde68a;
  background: var(--warn-soft);
  color: #92400e;
}

.notice.info {
  border-color: #bfdbfe;
  background: var(--primary-soft);
  color: #1e3a8a;
}

/* ---------- toolbar ---------- */

.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.segmented {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
}

.seg-btn {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}

.seg-btn.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  color: var(--text);
}

.toolbar-fields {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.field.grow {
  flex: 1 1 180px;
}

input,
select,
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="date"],
input[type="month"],
input[type="time"] {
  min-width: 138px;
}

input:focus,
select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

select {
  cursor: pointer;
}

.btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:hover {
  border-color: #b6c2d2;
  background: #f8fafc;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2);
}

.btn.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.btn.small {
  height: 32px;
  padding: 0 11px;
  font-size: 12.5px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- stats ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.stat-label {
  color: var(--muted);
  font-size: 12.5px;
}

.stat-value {
  margin-top: 1px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-value.accent {
  color: var(--primary);
}

.stat-value.warn-text {
  color: var(--warn);
}

.stat-hint {
  color: var(--muted-2);
  font-size: 11.5px;
}

.sync-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 2px 5px 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.13);
}

.status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.13);
}

.status-dot.err {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* ---------- records ---------- */

.records-card {
  overflow: hidden;
}

.records-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 13px;
  border-bottom: 1px solid #eef2f7;
}

.records-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.records-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 3px;
  color: var(--muted-2);
  font-size: 11.5px;
  white-space: nowrap;
}

.live-dot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.records-content {
  padding: 4px 0 0;
}

.empty {
  padding: 46px 20px;
  color: var(--muted);
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: #fbfdff;
}

.records-table td:first-child {
  min-width: 130px;
}

.person-name {
  font-weight: 600;
}

.person-id {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.punches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.punch {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 8px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f5f9ff;
  color: #1e40af;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.num-col {
  width: 78px;
  text-align: right !important;
}

.count-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dept-cell {
  color: var(--muted);
  font-size: 12.5px;
}

/* month view */

.month-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.person-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}

.person-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fbfcfe;
  cursor: pointer;
  list-style: none;
}

.person-card > summary::-webkit-details-marker {
  display: none;
}

.person-card > summary::before {
  content: "▸";
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 11px;
  transition: transform 0.15s;
}

.person-card[open] > summary::before {
  transform: rotate(90deg);
}

.person-summary-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-total {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.day-list {
  padding: 2px 14px 8px;
}

.day-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px dashed #eef2f7;
}

.day-row:first-child {
  border-top: 0;
}

.day-date {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.day-date em {
  margin-left: 4px;
  color: var(--muted-2);
  font-style: normal;
}

.day-punches {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

/* absent */

.absent-panel {
  padding: 0 18px 16px;
}

.absent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}

.absent-toggle:hover {
  background: #f1f5f9;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 650;
}

.absent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
}

.absent-chip {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.footer-note {
  margin: 18px 4px 0;
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: center;
}

/* ---------- login ---------- */

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at 20% 15%, #dbeafe 0, transparent 28rem),
    radial-gradient(circle at 85% 85%, #d1fae5 0, transparent 30rem),
    #f4f6f9;
}

.login-shell {
  width: 100%;
  max-width: 390px;
  padding: 24px;
}

.login-card {
  padding: 34px 30px 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
  text-align: center;
  backdrop-filter: blur(12px);
}

.login-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.login-card h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 7px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .field {
  text-align: left;
}

.login-card .btn {
  margin-top: 14px;
}

.form-error {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--danger-soft);
  color: #991b1b;
  font-size: 12.5px;
  text-align: left;
}

.login-foot {
  margin: 22px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
}

/* ---------- admin ---------- */

.admin-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-card {
  padding: 20px;
}

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

.card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.card-head p {
  max-width: 760px;
  margin: 3px 0 0;
  font-size: 12.5px;
}

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

.form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.inline-status {
  color: var(--muted);
  font-size: 12.5px;
}

.inline-status.ok {
  color: var(--success);
}

.inline-status.err {
  color: var(--danger);
}

.badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.badge.ok {
  border-color: #a7f3d0;
  background: var(--success-soft);
  color: #047857;
}

.badge.err {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: #b91c1c;
}

.switch-line {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}

.switch-line input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.switch-line span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-line strong {
  font-size: 13.5px;
  font-weight: 600;
}

.switch-line small {
  color: var(--muted);
  font-size: 12px;
}

.schedule-block {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fcfdff;
}

.schedule-block + .schedule-block {
  margin-top: 12px;
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 5px 0 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: var(--primary-soft);
  color: #1e40af;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.time-chip button {
  display: grid;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.time-chip button:hover {
  background: #dbeafe;
  color: #b91c1c;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
}

.inline-form input[type="time"] {
  width: 132px;
}

.inline-form .muted {
  font-size: 12px;
}

.result-box {
  overflow: auto;
  max-height: 260px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0f172a;
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-box.error {
  border-color: #7f1d1d;
  color: #fecaca;
}

.last-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 16px;
}

.last-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfdff;
}

.last-item h3 {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 650;
}

.last-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.last-item.ok {
  border-color: #a7f3d0;
  background: var(--success-soft);
}

.last-item.err {
  border-color: #fecaca;
  background: var(--danger-soft);
}

.employees-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.employees-toolbar .search-input {
  width: 220px;
}

.employees-toolbar select {
  width: 150px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.employee-table {
  min-width: 720px;
}

.check-col {
  width: 54px;
  text-align: center !important;
}

.check-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.empty-cell {
  padding: 28px !important;
  color: var(--muted);
  text-align: center !important;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
}

.source-tag.device {
  background: #ecfdf5;
  color: #047857;
}

.audit-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.audit-row {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-row:nth-child(odd) {
  background: #fcfdff;
}

.audit-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.audit-action {
  color: var(--text);
  font-weight: 550;
  overflow-wrap: anywhere;
}

.audit-detail {
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 100;
  max-width: min(90vw, 460px);
  padding: 11px 16px;
  border-radius: 10px;
  background: #0f172a;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.24);
  color: #fff;
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
}

.toast.err {
  background: #991b1b;
}

.toast.ok {
  background: #065f46;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .last-results {
    grid-template-columns: 1fr;
  }

  .audit-row {
    grid-template-columns: 130px 120px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .topbar-inner {
    padding: 9px 13px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    max-width: 34vw;
    font-size: 14px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 15px;
  }

  .nav {
    gap: 1px;
  }

  .nav-link {
    height: 32px;
    padding: 0 9px;
    font-size: 12.5px;
  }

  .container {
    padding: 14px 12px 42px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .segmented {
    align-self: flex-start;
  }

  .toolbar-fields {
    align-items: stretch;
  }

  .field,
  .field.grow {
    flex: 1 1 100%;
  }

  .toolbar-fields .btn {
    flex: 1 1 auto;
  }

  .stat-card {
    padding: 12px 13px;
  }

  .stat-value {
    font-size: 23px;
  }

  .records-head {
    padding: 14px 14px 11px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }

  /* 手机上隐藏次要列，避免横向滚动 */
  .records-table {
    min-width: 0;
  }

  .records-table th:nth-child(2),
  .records-table td:nth-child(2),
  .records-table th:nth-child(4),
  .records-table td:nth-child(4) {
    display: none;
  }

  .records-table td:first-child {
    min-width: 104px;
  }

  .employee-table {
    min-width: 0;
  }

  .employee-table th:nth-child(4),
  .employee-table td:nth-child(4),
  .employee-table th:nth-child(6),
  .employee-table td:nth-child(6),
  .employee-table th:nth-child(7),
  .employee-table td:nth-child(7) {
    display: none;
  }

  .job-table th:nth-child(2),
  .job-table td:nth-child(2),
  .job-table th:nth-child(4),
  .job-table td:nth-child(4),
  .job-table th:nth-child(6),
  .job-table td:nth-child(6) {
    display: none;
  }

  .records-content {
    overflow-x: hidden;
  }

  .absent-panel {
    padding: 0 14px 14px;
  }

  .admin-card {
    padding: 15px;
  }

  .card-head {
    flex-direction: column;
    gap: 8px;
  }

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

  .employees-toolbar .search-input,
  .employees-toolbar select {
    width: 100%;
  }

  .audit-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 12px;
  }

  .audit-time {
    font-size: 11px;
  }

  .day-row {
    gap: 8px;
  }

  .day-punches {
    justify-content: flex-start;
  }

  .person-card > summary {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
