:root {
  /* Paleta compartida con Control de Personal. */
  --nav-bg: #0b2d3e;
  --bg: #f2f5f8;
  --surface: #ffffff;
  --ink: #0b2d3e;
  --muted: #647887;
  --line: #d7e1ea;
  --primary: #0b2d3e;
  --primary-dark: #113d52;
  --primary-blue: #315f8f;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.setup-page .page {
  display: grid;
  min-height: calc(100vh - 105px);
  place-items: center;
}

.setup-card {
  width: min(520px, calc(100vw - 32px));
  padding: 32px;
  background: #fff;
  border: 1px solid #d3dee8;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(18, 49, 66, .12);
}

.setup-card h1 { margin: 4px 0 8px; color: #123142; }
.setup-card label {
  display: block;
  margin: 20px 0 6px;
  color: #40596b;
  font-weight: 700;
}
.setup-step, .setup-note { color: #667b8c; font-size: .85rem; }
.setup-button {
  width: 100%;
  margin-top: 24px;
  padding: 12px 18px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #123142;
  font-weight: 700;
}
.setup-note { margin: 18px 0 0; text-align: center; }

.terminal-settings-link {
  color: #dce8ee;
  font-size: .78rem;
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  white-space: nowrap;
  z-index: 2;
}

.terminal-settings-link:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 800px) {
  .terminal-settings-link {
    right: 12px;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  min-height: 100vh;
}

.app-topbar {
  align-items: center;
  background: var(--nav-bg);
  color: white;
  display: grid;
  gap: 24px;
  justify-content: space-between;
  padding: 14px 28px;
  position: relative;
}

.brand,
.app-topbar a {
  color: white;
  text-decoration: none;
}

.brand {
  display: grid;
  font-size: 18px;
  font-weight: 700;
  gap: 2px;
  position: relative;
  z-index: 2;
}

.brand span {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 600;
}

.top-title {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 700;
  left: 50%;
  line-height: 1;
  position: absolute;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.app-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.app-topbar nav a {
  border-radius: 6px;
  color: #dbeafe;
  padding: 8px 10px;
}

.app-topbar nav a:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.page {
  margin: 0 auto;
  max-width: 100%;
  min-height: calc(100vh - 62px);
  padding: 18px 22px;
}

.check-screen {
  display: grid;
  gap: 18px;
  grid-template-rows: minmax(350px, auto) auto;
  margin: 0 auto;
  max-width: 1600px;
  min-height: calc(100vh - 98px);
}

.check-summary {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(340px, 25vw) 1fr;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  padding: 18px;
}

.adjustment-filter-panel,
.adjustment-employee-panel {
  padding: 18px 22px;
}

.adjustment-filter-panel .section-head {
  margin-bottom: 16px;
}

.adjustment-filter-panel h1 {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}

.adjustment-filter-panel .muted {
  font-size: 18px;
}

.adjustment-filter-panel label,
.adjustment-employee-grid span {
  font-size: 19px;
  font-weight: 700;
}

.adjustment-filter-panel .form-control,
.adjustment-filter-panel .form-select {
  font-size: 26px;
  min-height: 62px;
  padding: 12px 16px;
}

.adjustment-filter-panel .btn-main {
  font-size: 22px;
  min-height: 64px;
  padding-left: 24px;
  padding-right: 24px;
}

.adjustment-panel {
  padding: 14px;
}

.scan-panel,
.employee-panel,
.week-panel {
  min-width: 0;
}

.panel h1,
.panel h2 {
  margin: 0 0 14px;
}

.scan-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.scan-panel h1 {
  display: none;
}

.scan-clock {
  align-items: center;
  background: #ffffff;
  color: #050505;
  display: flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 24px;
  min-height: 92px;
  overflow: hidden;
  padding: 8px 6px;
  text-align: center;
  text-transform: capitalize;
  white-space: nowrap;
  width: 100%;
}

.scan-input {
  font-size: 28px;
  font-weight: 800;
  min-height: 58px;
  text-align: center;
}

.scan-panel .btn-main {
  font-size: 17px;
  min-height: 52px;
}

.employee-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 350px;
  padding-top: 26px;
}

.time-banner {
  align-items: center;
  background: #fff6c7;
  border-radius: 6px;
  color: #050505;
  display: flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 3.7vw, 64px);
  font-weight: 800;
  justify-content: flex-end;
  line-height: 1;
  margin-bottom: 14px;
  min-height: 76px;
  padding: 8px 26px;
}

.week-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding-bottom: 16px;
}

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

.section-head h2 {
  margin-bottom: 4px;
}

.section-head p {
  margin: 0;
}

.week-range {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
  white-space: nowrap;
}

.weekly-totals {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 14px;
}

.total-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

.total-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.total-card strong {
  color: var(--ink);
  display: block;
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1;
}

.total-card.overtime-total {
  background: #fff7ed;
  border-color: #fed7aa;
}

.total-card.overtime-total strong {
  color: #9a3412;
}

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

.stack {
  display: grid;
  gap: 12px;
}

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

.query-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) minmax(140px, 180px);
}

.query-employee-card {
  min-height: 180px;
}

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

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

.checkline {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkline input {
  width: auto;
}

.btn-main,
.btn-secondary {
  align-items: center;
  border: 0;
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  text-decoration: none;
}

.btn-main {
  background: var(--primary);
}

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

.btn-secondary {
  background: #334155;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.employee-card {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: clamp(210px, 16vw, 285px) 1fr;
  min-height: 250px;
}

.employee-details {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.photo {
  align-items: center;
  aspect-ratio: 1;
  background: #e2e8f0;
  border-radius: 8px;
  color: #475569;
  display: flex;
  font-size: clamp(58px, 6vw, 86px);
  font-weight: 700;
  justify-content: center;
  overflow: hidden;
  width: clamp(210px, 16vw, 285px);
}

.photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.facts {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.facts span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.facts strong {
  display: block;
  font-size: clamp(22px, 1.65vw, 30px);
  line-height: 1.15;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.schedule-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(320px, 1.4fr);
  padding: 14px 16px;
}

.schedule-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.schedule-card strong {
  color: var(--ink);
  display: block;
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.15;
}

.schedule-card em {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  margin-top: 4px;
}

.schedule-days strong {
  color: var(--primary);
}

.schedule-card.no-schedule {
  background: #fff7ed;
  border-color: #fed7aa;
  grid-template-columns: 1fr;
}

.notice {
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.notice.ok {
  background: #dcfce7;
  color: var(--success);
}

.notice.duplicate {
  background: #fef3c7;
  color: var(--warning);
}

.notice.error {
  background: #fee2e2;
  color: var(--danger);
}

.clean-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.week-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  table-layout: fixed;
  width: 100%;
}

/* El checador prioriza lectura rápida y proporciones estables. */
.checkclock-page .page {
  min-height: 0;
  padding: 20px clamp(16px, 2.2vw, 36px) 32px;
}

.checkclock-page .check-screen {
  grid-template-rows: auto auto;
  max-width: none;
  min-height: 0;
  width: 100%;
}

.checkclock-page .check-summary {
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
}

.checkclock-page .scan-panel,
.checkclock-page .employee-panel {
  min-height: 390px;
}

.checkclock-page .scan-panel {
  align-content: start;
  overflow: hidden;
  padding: 24px;
}

.checkclock-page .scan-panel .stack {
  min-width: 0;
  width: 100%;
}

.checkclock-page .scan-panel .form-control,
.checkclock-page .scan-panel .btn-main {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

.checkclock-page .scan-panel .form-control {
  border: 1px solid #b8c7d3;
  border-radius: 6px;
  display: block;
  padding: 8px 12px;
}

.checkclock-page .scan-panel .form-control:focus {
  border-color: #6f9cff;
  box-shadow: 0 0 0 3px rgba(76, 125, 255, .2);
  outline: 0;
}

.checkclock-page .scan-clock {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(30px, 2.2vw, 38px);
  line-height: 1.15;
  margin-bottom: 26px;
  min-height: 72px;
  white-space: normal;
}

.checkclock-page .scan-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkclock-page .employee-panel {
  padding: 20px;
}

.checkclock-page .time-banner {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(34px, 3vw, 50px);
  min-height: 66px;
  padding: 8px 20px;
}

.checkclock-page .employee-card {
  gap: 22px;
  grid-template-columns: 160px minmax(0, 1fr);
  min-height: 220px;
}

.checkclock-page .photo {
  font-size: 54px;
  width: 160px;
}

.checkclock-page .facts {
  gap: 12px 20px;
}

.checkclock-page .facts strong {
  font-size: clamp(17px, 1.35vw, 22px);
}

.checkclock-page .schedule-card {
  gap: 12px;
  padding: 12px 14px;
}

.checkclock-page .schedule-card strong {
  font-size: clamp(15px, 1.1vw, 18px);
}

.checkclock-page .week-panel {
  padding: 20px;
}

.checkclock-page .week-table .time-cell {
  height: 92px;
}

.checkclock-page .week-table .time-value {
  font-size: clamp(22px, 2vw, 30px);
}

@media (max-width: 1100px) {
  .checkclock-page .check-summary {
    grid-template-columns: 1fr;
  }

  .checkclock-page .scan-panel,
  .checkclock-page .employee-panel {
    min-height: auto;
  }

  .checkclock-page .scan-panel {
    grid-template-columns: minmax(230px, .75fr) minmax(320px, 1.25fr);
    gap: 22px;
  }

  .checkclock-page .scan-clock {
    margin: 0;
  }

  .checkclock-page .scan-panel .stack {
    align-content: center;
  }
}

@media (max-width: 700px) {
  .checkclock-page .page {
    padding: 12px;
  }

  .checkclock-page .scan-panel {
    grid-template-columns: 1fr;
  }

  .checkclock-page .employee-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .checkclock-page .facts,
  .checkclock-page .schedule-card,
  .checkclock-page .weekly-totals {
    grid-template-columns: 1fr;
  }

  .checkclock-page .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.week-table th {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 12px;
  text-align: center;
}

.week-table thead th {
  border-top: 1px solid var(--line);
}

.week-table thead th:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 0;
}

.week-table thead th:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 0 0;
}

.week-table tbody th,
.week-table tbody td {
  border-bottom: 1px solid var(--line);
}

.week-table tbody tr:last-child th:first-child {
  border-radius: 0 0 0 8px;
}

.week-table tbody tr:last-child td:last-child {
  border-radius: 0 0 8px 0;
}

.week-table .row-title {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
  min-width: 112px;
  text-align: left;
  width: 112px;
}

.week-table tbody .row-title {
  font-size: 14px;
  font-weight: 700;
}

.week-table .day-name,
.week-table .day-date,
.week-table .time-value,
.week-table .extra-note {
  display: block;
}

.week-table .day-name {
  color: var(--primary);
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 800;
}

.week-table .day-date {
  color: var(--muted);
  font-size: clamp(11px, .95vw, 14px);
  margin-top: 2px;
}

.week-table .time-cell {
  background: #fff;
  border-right: 1px solid var(--line);
  color: var(--ink);
  height: clamp(62px, 7vh, 88px);
  padding: 9px 10px;
  text-align: center;
  vertical-align: middle;
}

.week-table .time-value {
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 800;
  line-height: 1.1;
}

.week-table .overtime-cell {
  background: #fff7ed;
  color: #9a3412;
}

.week-table .current-check {
  background: #dcfce7;
  box-shadow: inset 0 0 0 3px #16a34a;
  color: #14532d;
}

.week-table .current-check.overtime-cell {
  background: #ffedd5;
  box-shadow: inset 0 0 0 3px #f97316;
  color: #9a3412;
}

.week-table .current-note {
  color: #15803d;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.week-table .current-check.overtime-cell .current-note {
  color: #c2410c;
}

.week-table .extra-note {
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
}

.pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.pill.entrada {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.salida {
  background: #dcfce7;
  color: #047857;
}

.pill.extra {
  background: #fef3c7;
  color: #b45309;
  margin-right: 6px;
}

.days-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
}

.day-check {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  padding: 9px;
}

.adjustment-filter-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(300px, 1.35fr) minmax(150px, .55fr) minmax(190px, .75fr) minmax(300px, 1.15fr) minmax(110px, auto);
}

.adjustment-employee-grid {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(90px, .35fr) minmax(280px, 1.05fr) minmax(180px, .6fr) minmax(360px, 1.2fr) 260px;
}

.adjustment-employee-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.adjustment-employee-grid strong {
  display: block;
  font-size: 26px;
  margin-top: 4px;
}

.adjustment-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.adjustment-command-row {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 260px;
  margin-top: 8px;
}

.adjustment-inline-message {
  border-left: 8px solid #14532d;
  margin: 0;
  min-height: 52px;
  padding: 16px 18px;
}

.adjustment-week-actions {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.employee-actions-cell {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.employee-actions-cell .adjustment-week-actions {
  width: 100%;
}

.adjustment-week-actions .btn-main,
.adjustment-week-actions .btn-secondary {
  font-size: 18px;
  min-height: 58px;
  min-width: 0;
  padding: 10px 12px;
}

.adjustment-board {
  display: grid;
  gap: 7px;
  min-width: 1040px;
}

.adjustment-panel {
  overflow-x: auto;
}

.adjustment-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 130px 112px 112px 92px 96px 96px 86px minmax(132px, .8fr) minmax(132px, .8fr) 124px;
}

.adjustment-heading {
  background: #315f8f;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 12px;
}

.adjustment-day-row {
  background: #fbfdff;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  padding: 8px 10px;
}

.adjustment-day strong,
.adjustment-day span,
.minutes-stack span,
.minutes-stack em {
  display: block;
}

.adjustment-day strong {
  color: #16675f;
  font-size: 20px;
}

.adjustment-day span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.adjustment-day em {
  color: #9a3412;
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  margin-top: 3px;
}

.original-time {
  background: #eef6ff;
  border: 1px solid #c4d7ee;
  border-radius: 6px;
  font-size: 21px;
  font-weight: 800;
  padding: 9px 8px;
  text-align: center;
}

.effective-time {
  background: #eef7f3;
  border: 1px solid #b9d9cc;
  border-radius: 6px;
  color: #0f3f3a;
  font-size: 21px;
  font-weight: 800;
  padding: 9px 8px;
  position: relative;
  text-align: center;
  width: 100%;
}

.effective-time.has-adjustment {
  background: #dff5ec;
  border-color: #5fbf98;
  color: #075f46;
}

.effective-time-button {
  cursor: pointer;
}

.effective-time-button:hover:not(:disabled) {
  background: #d5f2e6;
  border-color: #2fa978;
  color: #075f46;
}

.effective-time-button:disabled {
  cursor: not-allowed;
  opacity: .75;
}

.adjustment-time-input {
  font-size: 19px;
  font-weight: 700;
  min-height: 42px;
}

.time-adjust-control {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(86px, 1fr) 72px;
}

.btn-time-fill {
  background: #315f8f;
  font-size: 12px;
  font-weight: 800;
  min-height: 42px;
  padding: 8px;
}

.btn-time-fill:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.minutes-stack {
  color: #4b6280;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.adjusted-minutes.has-adjustment {
  color: #08734f;
}

.effective-minutes.has-adjustment {
  color: #075985;
}

.minutes-stack em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  margin-top: 2px;
}

.adjustment-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.adjustment-actions .btn-main,
.adjustment-actions .btn-secondary {
  font-size: 13px;
  min-height: 38px;
  padding: 8px 10px;
}

.btn-clear-adjustment {
  background: #b91c1c;
}

.hidden-adjustment-form {
  display: none;
}

.adjustment-side-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.side-block {
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.side-block strong {
  background: #315f8f;
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font-size: 17px;
  justify-content: center;
  margin-bottom: 2px;
  padding: 7px 10px;
}

.metric-card {
  background: #f2f7fb;
  border: 1px solid #cbd8e6;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
  min-height: 66px;
  padding: 10px 12px;
}

.metric-card span {
  color: var(--ink);
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: left;
}

.metric-card output {
  color: #102a43;
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.primary-metric {
  background: #eef6ff;
  border-color: #9db9df;
  min-height: 78px;
}

.primary-metric span {
  font-size: 22px;
}

.primary-metric output {
  font-size: 34px;
}

.adjustment-side-actions strong {
  background: #315f8f;
}

.personnel-hero {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 1fr) auto;
}

.personnel-hero h1 {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}

.personnel-hero .muted {
  font-size: 18px;
}

.personnel-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
}

.personnel-kpis div {
  background: #eef6ff;
  border: 1px solid #b7cce5;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px 14px;
}

.personnel-kpis span {
  color: #315f8f;
  font-size: 14px;
  font-weight: 800;
}

.personnel-kpis strong {
  color: #0f2742;
  font-size: 32px;
  line-height: 1;
}

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

.compact-form,
.personnel-wide-form {
  display: grid;
  gap: 12px;
}

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

.personnel-wide-form {
  align-items: end;
  grid-template-columns: 2fr 2fr 120px 170px 90px 180px;
}

.compact-form label,
.personnel-wide-form label {
  color: #41577a;
  font-size: 14px;
  font-weight: 800;
}

.compact-form .form-control,
.compact-form .form-select,
.personnel-wide-form .form-control,
.personnel-wide-form .form-select {
  font-size: 16px;
  min-height: 42px;
}

.compact-form .full {
  grid-column: 1 / -1;
}

.personnel-table {
  font-size: 15px;
}

.personnel-table th {
  background: #315f8f;
  color: #fff;
  font-size: 14px;
}

.personnel-table td {
  vertical-align: middle;
}

@media (max-width: 800px) {
  .app-topbar,
  .check-summary {
    display: grid;
  }

  .check-summary,
  .form-grid,
  .query-form,
  .days-grid {
    grid-template-columns: 1fr;
  }

  .employee-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

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

  .weekly-totals {
    grid-template-columns: 1fr;
  }

  .adjustment-filter-grid,
  .adjustment-employee-grid {
    grid-template-columns: 1fr;
  }

  .adjustment-workspace {
    grid-template-columns: 1fr;
  }

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

  .personnel-kpis {
    grid-template-columns: 1fr;
  }

  .adjustment-command-row {
    grid-template-columns: 1fr;
  }

  .check-screen {
    min-height: auto;
  }

  .page {
    padding: 14px;
  }
}

@media (min-width: 1200px) and (min-height: 780px) {
  .checkclock-compact { overflow: hidden; }
  .checkclock-compact .app-topbar { padding: 7px 20px; }
  .checkclock-compact .app-topbar nav a { padding: 4px 8px; }
  .checkclock-compact .top-title { font-size: 27px; }
  .checkclock-compact .page { height: calc(100vh - 70px); min-height: 0; padding: 9px 14px; }
  .checkclock-compact .check-screen { gap: 8px; grid-template-rows: minmax(255px, .8fr) minmax(305px, 1.2fr); height: 100%; min-height: 0; }
  .checkclock-compact .check-summary { gap: 8px; grid-template-columns: minmax(300px, 25vw) 1fr; min-height: 0; }
  .checkclock-compact .panel { padding: 10px 14px; }
  .checkclock-compact .scan-panel { min-height: 0; }
  .checkclock-compact .scan-clock { font-size: 32px; margin-bottom: 8px; min-height: 52px; padding: 4px; }
  .checkclock-compact .scan-input { font-size: 20px; min-height: 43px; }
  .checkclock-compact .scan-panel .btn-main { font-size: 14px; min-height: 42px; }
  .checkclock-compact .employee-panel { min-height: 0; padding-top: 10px; }
  .checkclock-compact .time-banner { font-size: clamp(32px, 3vw, 48px); margin-bottom: 7px; min-height: 50px; padding: 5px 18px; }
  .checkclock-compact .notice { margin-bottom: 7px; padding: 8px 11px; }
  .checkclock-compact .employee-card { gap: 15px; grid-template-columns: 175px 1fr; min-height: 175px; }
  .checkclock-compact .photo { font-size: 55px; width: 175px; }
  .checkclock-compact .employee-details { gap: 8px; }
  .checkclock-compact .facts { gap: 10px; }
  .checkclock-compact .facts span { font-size: 10px; }
  .checkclock-compact .facts strong { font-size: clamp(16px, 1.3vw, 22px); }
  .checkclock-compact .schedule-card { gap: 8px; padding: 7px 10px; }
  .checkclock-compact .schedule-card span { font-size: 10px; margin-bottom: 1px; }
  .checkclock-compact .schedule-card strong { font-size: clamp(14px, 1.1vw, 18px); }
  .checkclock-compact .schedule-card em { font-size: 9px; margin-top: 1px; }
  .checkclock-compact .week-panel { min-height: 0; padding-bottom: 8px; }
  .checkclock-compact .section-head { margin-bottom: 6px; }
  .checkclock-compact .section-head h2 { font-size: 23px; margin-bottom: 1px; }
  .checkclock-compact .section-head p { font-size: 11px; }
  .checkclock-compact .week-range { font-size: 10px; padding: 4px 7px; }
  .checkclock-compact .weekly-totals { gap: 7px; margin-bottom: 6px; }
  .checkclock-compact .total-card { padding: 6px 10px; }
  .checkclock-compact .total-card span { font-size: 10px; margin-bottom: 1px; }
  .checkclock-compact .total-card strong { font-size: 23px; }
  .checkclock-compact .week-table th { padding: 5px 7px; }
  .checkclock-compact .week-table .day-name { font-size: 15px; }
  .checkclock-compact .week-table .day-date { font-size: 9px; margin-top: 0; }
  .checkclock-compact .week-table .row-title { min-width: 82px; width: 82px; }
  .checkclock-compact .week-table tbody .row-title { font-size: 11px; }
  .checkclock-compact .week-table .time-cell { height: clamp(48px, 5.3vh, 62px); padding: 5px 7px; }
  .checkclock-compact .week-table .time-value { font-size: clamp(18px, 2vw, 26px); }
  .checkclock-compact .week-table .current-note,
  .checkclock-compact .week-table .extra-note { font-size: 9px; margin-top: 1px; }

  .adjustment-compact .app-topbar { padding: 7px 20px; }
  .adjustment-compact .app-topbar nav a { padding: 4px 8px; }
  .adjustment-compact .top-title { font-size: 27px; }
  .adjustment-compact .page { padding: 9px 14px; }
  .adjustment-compact .mt-3 { margin-top: 7px !important; }
  .adjustment-compact .adjustment-filter-panel { padding: 9px 14px 11px; }
  .adjustment-compact .adjustment-filter-panel .section-head { align-items: center; margin-bottom: 7px; }
  .adjustment-compact .adjustment-filter-panel h1 { font-size: 30px; margin-bottom: 2px; }
  .adjustment-compact .adjustment-filter-panel .muted { font-size: 13px; margin: 0; }
  .adjustment-compact .week-range { padding: 5px 8px; }
  .adjustment-compact .adjustment-filter-grid { gap: 8px; }
  .adjustment-compact .adjustment-filter-panel label { font-size: 13px; }
  .adjustment-compact .adjustment-filter-panel .form-control,
  .adjustment-compact .adjustment-filter-panel .form-select { font-size: 17px; min-height: 40px; padding: 6px 10px; }
  .adjustment-compact .adjustment-filter-panel .btn-main { font-size: 15px; min-height: 40px; padding: 6px 14px; }
  .adjustment-compact .adjustment-employee-panel { padding: 8px 14px; }
  .adjustment-compact .adjustment-employee-grid strong { font-size: 18px; margin-top: 1px; }
  .adjustment-compact .adjustment-employee-grid span { font-size: 11px; }
  .adjustment-compact .adjustment-week-actions .btn-main,
  .adjustment-compact .adjustment-week-actions .btn-secondary { font-size: 13px; min-height: 40px; padding: 5px 8px; }
  .adjustment-compact .adjustment-command-row { margin-top: 3px; }
  .adjustment-compact .adjustment-inline-message { min-height: 36px; padding: 7px 12px; }
  .adjustment-compact .adjustment-workspace { gap: 9px; grid-template-columns: minmax(0, 1fr) 220px; }
  .adjustment-compact .adjustment-panel { padding: 7px; }
  .adjustment-compact .adjustment-board { gap: 3px; }
  .adjustment-compact .adjustment-heading { font-size: 12px; padding: 7px 8px; }
  .adjustment-compact .adjustment-day-row { padding: 4px 7px; }
  .adjustment-compact .adjustment-day strong { font-size: 15px; }
  .adjustment-compact .adjustment-day span { font-size: 10px; }
  .adjustment-compact .adjustment-day em { font-size: 9px; margin-top: 0; }
  .adjustment-compact .original-time,
  .adjustment-compact .effective-time { font-size: 16px; padding: 5px; }
  .adjustment-compact .adjustment-time-input { font-size: 14px; min-height: 34px; padding: 4px 7px; }
  .adjustment-compact .time-adjust-control { gap: 4px; grid-template-columns: minmax(78px, 1fr) 58px; }
  .adjustment-compact .btn-time-fill { font-size: 9px; min-height: 34px; padding: 4px; }
  .adjustment-compact .minutes-stack { font-size: 10px; line-height: 1.15; }
  .adjustment-compact .minutes-stack em { font-size: 8px; }
  .adjustment-compact .adjustment-side-panel { gap: 6px; }
  .adjustment-compact .side-block { gap: 5px; padding: 7px; }
  .adjustment-compact .side-block > strong { font-size: 13px; padding: 4px 7px; }
  .adjustment-compact .metric-card { gap: 2px; min-height: 45px; padding: 5px 8px; }
  .adjustment-compact .metric-card span { font-size: 12px; }
  .adjustment-compact .metric-card output { font-size: 19px; }
  .adjustment-compact .primary-metric { min-height: 50px; }
  .adjustment-compact .primary-metric span { font-size: 14px; }
  .adjustment-compact .primary-metric output { font-size: 23px; }
}
