:root {
  --ink: #07264a;
  --muted: #65738a;
  --line: #e6ebf3;
  --soft: #f5f8fd;
  --panel: #ffffff;
  --blue: #3267e3;
  --blue-dark: #194fae;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --cyan: #0891b2;
  --shadow: 0 18px 45px rgba(9, 31, 68, 0.12);
}

.assessment-v54-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
}

.assessment-v54-summary article,
.assessment-v54-prompt {
  border: 1px solid var(--line, #d8e1ee);
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.assessment-v54-summary span,
.assessment-v54-summary small {
  display: block;
  color: var(--muted, #5b6f8d);
}

.assessment-v54-summary strong {
  display: block;
  margin-top: 4px;
}

.assessment-v54-list {
  padding: 0 16px 16px;
}

.assessment-v54-prompt {
  margin-top: 12px;
  border-color: #f3c86a;
  background: #fff9ea;
}

.assessment-v54-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.assessment-batch-choice,
.assessment-batch-minutes {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.assessment-batch-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.assessment-batch-minutes input {
  width: 84px;
  height: 34px;
  padding: 0 8px;
}

.assessment-batch-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #bfd0f7;
  border-radius: 10px;
  background: #f5f8ff;
}

.assessment-batch-toolbar small,
.period-readiness small {
  color: var(--muted);
}

.period-readiness {
  display: grid;
  gap: 5px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 4%, rgba(50, 103, 227, 0.12), transparent 28rem),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 46%, #ffffff 100%);
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.login-brand {
  margin-bottom: 8px;
}

.mfa-qr {
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.mfa-qr svg,
.mfa-qr img {
  width: min(220px, 100%);
  height: auto;
}

.mfa-secret {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  word-break: break-all;
  background: var(--soft);
}

.full-button {
  width: 100%;
  margin-top: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 86px;
  padding: 12px;
  resize: vertical;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 68px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 6px;
  min-width: 54px;
  height: 32px;
  padding: 0 10px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 800;
  background: var(--soft);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  background: var(--ink);
}

.brand-logo {
  width: 92px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.login-brand .brand-logo {
  width: 132px;
  height: 72px;
}

.brand strong,
.brand span,
.session-card strong,
.session-card small,
.history-row strong,
.history-row small,
.request-row strong,
.request-row small,
.person-row strong,
.person-row small,
.worksite-row strong,
.worksite-row small {
  display: block;
}

.brand strong {
  font-size: 20px;
}

.brand span,
.session-card span,
.session-card small,
.eyebrow,
label,
.metrics span,
.timeline-note,
.empty-state,
.history-row small,
.request-row small,
.person-row small,
.worksite-row small {
  color: var(--muted);
}

.warning-text {
  color: #b45309 !important;
  font-weight: 700;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.nav-tab.active {
  color: var(--blue);
  border-color: rgba(50, 103, 227, 0.18);
  background: rgba(50, 103, 227, 0.08);
}

.icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-weight: 800;
}

.session-card {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 25px rgba(9, 31, 68, 0.07);
}

.session-card strong {
  margin: 5px 0 10px;
}

main {
  padding: 36px;
}

.mobile-session-bar {
  display: none;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 25px rgba(9, 31, 68, 0.07);
}

.mobile-session-bar span,
.mobile-session-bar strong {
  display: block;
}

.mobile-session-bar span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-session-bar strong {
  margin-top: 3px;
}

.view,
.admin-tab {
  display: none;
}

.view.active,
.admin-tab.active {
  display: block;
}

.topbar {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.period-label {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.month-close-status {
  margin-top: 6px;
  color: var(--blue);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
}

h2 {
  font-size: 19px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.dark-label {
  color: rgba(255, 255, 255, 0.76);
}

.employee-picker {
  display: grid;
  gap: 7px;
  width: min(280px, 100%);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.employee-grid {
  column-count: 2;
  column-gap: 18px;
}

.employee-grid > .panel {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.punch-panel {
  padding: 22px;
  background:
    linear-gradient(155deg, rgba(7, 38, 74, 0.97), rgba(28, 80, 160, 0.94)),
    var(--ink);
  color: white;
}

.gps-check {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.gps-check small {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.35;
}

.gps-check small strong {
  color: white;
}

.gps-map-link {
  color: white;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gps-warning {
  color: #fde68a;
  font-weight: 800;
}

.status-line,
.panel-heading,
.history-row,
.request-row,
.person-row,
.worksite-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.status-line {
  color: rgba(255, 255, 255, 0.82);
}

.status-line > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  background: var(--red);
}

.status-dot.working {
  background: var(--green);
}

.status-dot.break {
  background: var(--amber);
}

.time-hero {
  display: grid;
  gap: 8px;
  margin: 34px 0;
}

.time-hero span {
  font-size: clamp(58px, 11vw, 92px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0;
}

.time-hero small {
  color: rgba(255, 255, 255, 0.68);
}

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

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.audit-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(180px, 1fr) minmax(140px, 180px) auto;
  gap: 10px;
  align-items: end;
  padding: 18px 18px 0;
}

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

.calendar-weekday {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 0 6px 4px;
  text-align: center;
}

.calendar-spacer {
  min-height: 112px;
}

.calendar-day {
  display: grid;
  min-height: 112px;
  gap: 12px;
  align-content: start;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: white;
}

.calendar-day strong {
  display: block;
}

.calendar-date-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.calendar-date-line strong {
  font-size: 24px;
  line-height: 1;
}

.calendar-date-line span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-status {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: rgba(7, 38, 74, 0.08);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 8px;
}

.calendar-hours {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.calendar-worksites,
.calendar-flags {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  line-height: 1.25;
}

.calendar-flags {
  color: #9a5a00;
  font-weight: 800;
}

.calendar-day.worked {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.09);
}

.calendar-day.absence,
.calendar-day.missing {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.calendar-day.vacation {
  border-color: rgba(8, 145, 178, 0.35);
  background: rgba(8, 145, 178, 0.09);
}

.calendar-day.absence-registered {
  border-color: rgba(124, 58, 237, 0.32);
  background: rgba(124, 58, 237, 0.08);
}

.calendar-day.corrected {
  border-color: rgba(50, 103, 227, 0.32);
  background: rgba(50, 103, 227, 0.08);
}

.calendar-day.alert {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.calendar-day.selected {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.day-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.day-detail-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.day-detail-grid span,
.day-detail-grid strong {
  display: block;
}

.day-detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.day-detail-grid strong {
  margin-top: 4px;
}

.primary-action,
.secondary-action,
.danger-action,
.ghost-button,
.secondary-light,
.tiny-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-action {
  color: white;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(50, 103, 227, 0.24);
}

.primary-action:hover {
  background: var(--blue-dark);
}

.primary-action:disabled,
.secondary-action:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.secondary-action {
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.11);
}

.danger-action {
  color: white;
  background: rgba(239, 68, 68, 0.94);
}

.secondary-light,
.ghost-button {
  color: var(--blue);
  border-color: rgba(50, 103, 227, 0.18);
  background: rgba(50, 103, 227, 0.08);
}

.compact {
  width: auto;
  min-height: 38px;
}

.panel-heading {
  min-height: 72px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.timeline,
.history-list,
.request-list,
.people-table,
.worksite-list {
  padding: 12px 18px 18px;
}

.location-review-row {
  align-items: flex-start;
  gap: 16px;
}

.location-review-row > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.location-review-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 430px;
}

.archive-section {
  display: grid;
  gap: 4px;
  padding: 6px 0 10px;
}

.archive-section + .archive-section {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 14px;
}

.advance-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 18px 8px;
}

.advance-admin-summary article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.advance-admin-summary span,
.advance-admin-summary strong {
  display: block;
}

.advance-admin-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.advance-admin-summary strong {
  margin-top: 5px;
  font-size: 1.25rem;
}

.archive-section summary,
.section-subtitle {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 6px 0;
  text-transform: uppercase;
}

.timeline-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-time {
  font-weight: 900;
}

.timeline-type {
  display: block;
  font-weight: 800;
}

.punch-edit-panel {
  margin-top: 8px;
}

.punch-edit-panel summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: white;
  cursor: pointer;
  font-weight: 800;
}

.punch-edit-form {
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(50, 103, 227, 0.18);
  border-radius: 8px;
  background: rgba(50, 103, 227, 0.06);
}

.punch-edit-form label {
  min-width: 0;
}

.stack-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.stack-form.separated {
  border-top: 1px solid var(--line);
}

.compact-form {
  padding-bottom: 6px;
}

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

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

.receipt-batch-tools {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.receipt-batch-note {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.receipt-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(220px, auto);
  gap: 14px;
  align-items: center;
}

.receipt-row select {
  width: 100%;
}

.receipt-page {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receipt-thumb {
  width: 42px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  color: var(--muted);
  font-weight: 900;
}

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

.receipt-match-reason {
  flex-basis: 100%;
  max-width: 320px;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
}

.receipt-batch-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.confirmation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(50, 103, 227, 0.08), rgba(8, 145, 178, 0.06));
}

.confirmation-card.is-confirmed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(50, 103, 227, 0.05));
}

.confirmation-copy {
  display: grid;
  gap: 7px;
}

.confirmation-copy strong,
.confirmation-copy small,
.confirmation-copy p {
  display: block;
}

.confirmation-copy p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.confirmation-copy small {
  color: var(--muted);
}

.confirmation-actions {
  display: flex;
  justify-content: flex-end;
}

.history-row,
.request-row,
.person-row,
.worksite-row {
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.history-row:last-child,
.request-row:last-child,
.person-row:last-child,
.worksite-row:last-child {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: var(--blue);
  background: rgba(50, 103, 227, 0.1);
}

.pill.green {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.pill.amber {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.pill.red {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.pill.cyan {
  color: #0e7490;
  background: rgba(8, 145, 178, 0.12);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.compact-panel {
  margin-bottom: 18px;
}

.metrics article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 25px rgba(9, 31, 68, 0.08);
}

.metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 31px;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.sub-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  background: white;
}

.sub-tab.active {
  color: var(--blue);
  border-color: rgba(50, 103, 227, 0.18);
  background: rgba(50, 103, 227, 0.08);
}

.wide-panel {
  min-height: 520px;
}

.person-profile {
  display: flex;
  gap: 11px;
  align-items: center;
}

.payroll-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 420px;
  text-align: right;
}

.payroll-summary small {
  flex-basis: 100%;
  color: var(--muted);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #071f3d, #3267e3);
}

.request-actions,
.month-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.month-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(50, 103, 227, 0.18);
  border-radius: 8px;
  color: var(--blue);
  background: rgba(50, 103, 227, 0.08);
}

.month-picker input {
  width: 150px;
  height: 30px;
  padding: 0 6px;
  border-color: transparent;
  color: var(--ink);
  background: white;
}

.correction-box {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 180px) minmax(120px, 160px) auto;
  gap: 12px;
  align-items: end;
  margin: 0 18px 16px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.correction-box strong,
.correction-box small {
  display: block;
}

.correction-box.missing-day-form {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.missing-day-form > div,
.missing-day-form label:last-of-type {
  grid-column: 1 / -1;
}

.missing-day-form > button {
  justify-self: start;
}

.tiny-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-color: var(--line);
  color: var(--ink);
  background: white;
  text-decoration: none;
}

.tiny-button.approve {
  color: #047857;
}

.tiny-button.reject {
  color: #b91c1c;
}

.tiny-button.neutral {
  color: var(--blue);
}

.form-hint {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.person-row.clickable {
  cursor: pointer;
  border-radius: 8px;
  padding-left: 8px;
  padding-right: 8px;
}

.person-row.clickable:hover {
  background: rgba(50, 103, 227, 0.06);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 38, 74, 0.38);
  backdrop-filter: blur(6px);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.modal-heading,
.modal-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-summary {
  align-items: stretch;
}

.summary-item {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.summary-item span,
.summary-item small {
  display: block;
  color: var(--muted);
}

.summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.modal-timeline {
  padding-top: 4px;
}

.receipt-modal-panel {
  width: min(1120px, 100%);
}

.employee-access-panel {
  width: min(620px, 100%);
}

.employee-access-content {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.employee-access-content p {
  margin: 0;
  color: var(--muted);
}

.employee-access-credentials {
  display: grid;
  gap: 10px;
  margin: 0;
}

.employee-access-credentials > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.employee-access-credentials dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.employee-access-credentials dd {
  margin: 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.employee-access-warning {
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.10);
}

.receipt-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  padding: 18px;
}

.receipt-review iframe {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.receipt-review-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.receipt-review-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  background: var(--ink);
  box-shadow: var(--shadow);
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

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

.punch-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 193, 7, 0.65);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 193, 7, 0.14);
}

.punch-reminder strong,
.punch-reminder small {
  display: block;
}

.punch-reminder small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
}

.attention-pulse {
  animation: attention-pulse 1s ease-in-out 3;
  outline: 3px solid rgba(255, 193, 7, 0.7);
  outline-offset: 3px;
}

@keyframes attention-pulse {
  50% {
    transform: scale(1.03);
  }
}

.employee-notification-summary {
  margin: 0 18px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.employee-notification-summary strong,
.employee-notification-summary small {
  display: block;
}

.employee-notification-summary small {
  margin-top: 4px;
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .brand {
    margin-bottom: 16px;
  }

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

  .session-card {
    display: none;
  }

  main {
    padding: 20px 16px 28px;
  }

  .mobile-session-bar {
    display: flex;
  }

  .topbar,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .employee-grid {
    column-count: 1;
  }

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

  .calendar-weekday,
  .calendar-spacer {
    display: none;
  }

  .calendar-day {
    min-height: 54px;
    grid-template-columns: minmax(62px, auto) 1fr auto;
    gap: 8px;
    align-items: center;
    align-content: center;
  }

  .calendar-date-line {
    display: grid;
    justify-content: start;
    gap: 1px;
  }

  .calendar-date-line strong {
    font-size: 20px;
  }

  .calendar-status {
    justify-self: start;
  }

  .calendar-hours {
    justify-self: end;
    font-size: 0.95rem;
  }

  .calendar-worksites,
  .calendar-flags {
    grid-column: 2 / -1;
  }

  .topbar {
    display: grid;
    align-items: start;
  }

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

@media (max-width: 680px) {
  h1 {
    font-size: 38px;
  }

  .nav-tabs,
  .punch-actions,
  .calendar-toolbar,
  .audit-toolbar,
  .day-detail-grid,
  .metrics,
  .form-grid,
  .form-grid.three,
  .punch-edit-form,
  .receipt-batch-tools,
  .receipt-row {
    grid-template-columns: 1fr;
  }

  .correction-box,
  .correction-box.missing-day-form {
    grid-template-columns: 1fr;
  }

  .missing-day-form > div,
  .missing-day-form label:last-of-type {
    grid-column: auto;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .punch-reminder,
  .history-row,
  .request-row,
  .person-row,
  .worksite-row,
  .confirmation-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .receipt-actions,
  .request-actions,
  .month-actions,
  .confirmation-actions {
    width: 100%;
  }

  .receipt-actions button,
  .request-actions button,
  .month-actions button,
  .confirmation-actions button {
    flex: 1;
  }

  .receipt-review {
    grid-template-columns: 1fr;
  }

  .receipt-review iframe {
    min-height: 420px;
  }

  .modal-summary {
    flex-direction: column;
  }
}
