:root {
  --bg: #0d1b2a;
  --bg-elevated: #12243a;
  --card: #1e3a5f;
  --card-soft: #25466f;
  --text: #ffffff;
  --muted: #9bb4cc;
  --primary: #3498db;
  --primary-hover: #5dade2;
  --green: #27ae60;
  --yellow: #f39c12;
  --red: #e74c3c;
  --blue: #3498db;
  --purple: #9b59b6;
  --orange: #e67e22;
  --late-15: #2ecc71;
  --late-30: #f1c40f;
  --late-60: #e67e22;
  --late-over: #e74c3c;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

a { color: #7ec8ff; }

button, .button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.card {
  width: min(460px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.card p {
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.button:hover { background: var(--primary-hover); }

.button.secondary {
  background: transparent;
  border: 1px solid #4c7aa8;
}

.button.ghost {
  background: #ffffff;
  color: #1f2937;
}

.button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.google-icon {
  width: 18px;
  height: 18px;
}

.error {
  margin-top: 14px;
  color: #ffb4b4;
  background: rgba(231, 76, 60, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  display: none;
}

.error.visible { display: block; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(13, 27, 42, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong { font-size: 1.05rem; }
.brand span { color: var(--muted); font-size: 0.85rem; }

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-box img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.85rem;
}

.user-meta small { color: var(--muted); }

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.month-nav h2 {
  margin: 0;
  min-width: 220px;
  text-align: center;
  text-transform: capitalize;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--card);
  color: #fff;
}

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

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi, .panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.kpi .label {
  color: var(--muted);
  font-size: 0.85rem;
}

.kpi .value {
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 700;
}

.panel {
  margin-bottom: 16px;
}

.panel h3 {
  margin: 0 0 14px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.rank-row, .ot-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 0.92rem;
}

.ot-row {
  grid-template-columns: 140px 1fr 70px;
}

.bar {
  height: 12px;
  background: var(--card-soft);
  border-radius: 99px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--orange);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th, .table td {
  padding: 8px 6px;
  text-align: left;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

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

.empty, .status-box {
  text-align: center;
  padding: 48px 20px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

@media (max-width: 800px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .user-meta { display: none; }
  .ot-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .month-nav h2 { min-width: 0; font-size: 1.1rem; }
}

body.home {
  min-height: 100vh;
  background: #06357a;
  font-family: Outfit, system-ui, -apple-system, Segoe UI, sans-serif;
}

.promo {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(520px 320px at 12% 18%, rgba(80, 190, 255, 0.28), transparent 70%),
    radial-gradient(760px 560px at 78% 48%, rgba(255, 255, 255, 0.95), transparent 60%),
    linear-gradient(100deg, #04275f 0%, #0b56b8 24%, #4c9aee 42%, #c5e4fc 62%, #f7fbff 100%);
}

.deco {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.deco-left {
  left: -20px;
  top: 0;
  width: min(340px, 42vw);
  height: 100%;
}

.deco-right {
  right: -30px;
  bottom: 0;
  width: min(280px, 34vw);
  height: 70%;
}

.promo-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 40px 40px;
  min-height: 100vh;
}

.copy { max-width: 640px; }

.mark {
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  border-radius: 22px;
  display: block;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(3, 24, 64, 0.28);
}

.copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-shadow: 0 8px 24px rgba(4, 30, 80, 0.25);
}

.copy h1 span { font-weight: 800; }

.sub {
  margin: 16px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
}

.keyword-line {
  margin: 8px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  color: #3ee6a0;
  letter-spacing: 0.01em;
}

.tag {
  margin: 6px 0 0;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.perks {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

.perk-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: #3ee6a0;
  filter: drop-shadow(0 0 6px rgba(62, 230, 160, 0.45));
}

.perk-icon svg { width: 100%; height: 100%; display: block; }

.downloads { margin-top: 34px; }

.downloads > p {
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 8px 16px 8px 12px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.store:hover { background: #161616; }

.store svg { width: 26px; height: 26px; flex: 0 0 26px; }

.store span { display: flex; flex-direction: column; line-height: 1.05; }

.store small {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  opacity: 0.9;
}

.store strong { font-size: 1.05rem; font-weight: 700; }

.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  text-decoration: none;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.admin-btn:hover { background: rgba(255, 255, 255, 0.24); }

body.home .error { color: #ffe1e1; }

.device {
  display: flex;
  justify-content: center;
  align-items: center;
}

.device img {
  width: min(520px, 100%);
  height: auto;
  display: block;
}

@media (max-width: 860px) {
  .promo {
    background:
      radial-gradient(420px 240px at 12% 8%, rgba(80, 190, 255, 0.28), transparent 70%),
      linear-gradient(180deg, #04275f 0%, #0a4eae 62%, #1668c9 100%);
  }

  .promo-inner {
    grid-template-columns: 1fr;
    padding: 32px 20px 40px;
    min-height: auto;
  }

  .device img {
    width: min(340px, 92vw);
    margin-top: 8px;
  }

  .copy h1 { font-size: clamp(1.85rem, 8vw, 2.6rem); }

  .deco-left { opacity: 0.55; }
  .deco-right { opacity: 0.4; }

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

.more {
  display: inline-flex;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.more:hover { color: #fff; }

.legal {
  position: relative;
  color: #fff;
  background:
    radial-gradient(480px 280px at 90% 0%, rgba(62, 230, 160, 0.12), transparent 70%),
    linear-gradient(180deg, #031833 0%, #06264f 48%, #0a3f86 100%);
  padding: 72px 24px 80px;
}

.legal-inner {
  max-width: 980px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: #3ee6a0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal h2 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.legal-lead {
  max-width: 62ch;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.5;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.legal-card {
  margin: 0;
  padding: 22px 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.legal-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #7ee0ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.legal-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.legal-card p,
.legal-close {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.legal-close {
  margin-top: 22px;
  font-weight: 600;
  color: #fff;
}

.seo-blocks {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, #0a3f86 0%, #06264f 55%, #031833 100%);
  padding: 56px 24px 88px;
}

.seo-inner {
  max-width: 980px;
  margin: 0 auto;
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.seo-card {
  margin: 0;
  padding: 22px 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.seo-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.seo-card p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.faq {
  margin-top: 40px;
}

.faq > h2 {
  margin: 0 0 18px;
  max-width: 22ch;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.faq-item {
  margin: 0 0 10px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: #3ee6a0;
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

@media (max-width: 720px) {
  .seo-grid {
    grid-template-columns: 1fr;
  }
}

.nav-link {
  padding: 8px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.filters-panel h3 {
  margin-bottom: 16px;
}

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

.filters-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.filters-grid select,
.filters-grid input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #4c7aa8;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}

.filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.result-summary {
  margin: 14px 0 0;
  min-height: 1.2em;
}

.table-wrap {
  overflow-x: auto;
}

.reports-table th,
.reports-table td {
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-row td:first-child {
  box-shadow: inset 4px 0 0 var(--type-accent, transparent);
  padding-left: 12px;
}

.datetime-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.datetime-date {
  font-weight: 600;
}

.datetime-time {
  color: var(--muted);
  font-size: 0.85rem;
}

.report-row.type-visitors { --type-accent: #1565c0; }
.report-row.type-packages { --type-accent: #2e7d32; }
.report-row.type-providers { --type-accent: #ef6c00; }
.report-row.type-shift { --type-accent: #455a64; }
.report-row.type-other { --type-accent: #546e7a; }

.type-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.type-chip.type-visitors {
  background: rgba(21, 101, 192, 0.18);
  color: #90caf9;
}
.type-chip.type-packages {
  background: rgba(46, 125, 50, 0.18);
  color: #a5d6a7;
}
.type-chip.type-providers {
  background: rgba(239, 108, 0, 0.2);
  color: #ffcc80;
}
.type-chip.type-shift {
  background: rgba(69, 90, 100, 0.25);
  color: #b0bec5;
}
.type-chip.type-other {
  background: rgba(84, 110, 122, 0.2);
  color: #b0bec5;
}

.type-title {
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--muted);
}

.detail-panel {
  border-left: 4px solid var(--type-accent, #3498db);
}

.detail-panel.type-visitors { --type-accent: #1565c0; }
.detail-panel.type-packages { --type-accent: #2e7d32; }
.detail-panel.type-providers { --type-accent: #ef6c00; }
.detail-panel.type-shift { --type-accent: #455a64; }
.detail-panel.type-other { --type-accent: #546e7a; }

.detail-section h4 {
  color: var(--type-accent, #7ec8ff);
}

.reports-table .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reports-table .link-btn {
  background: transparent;
  color: #7ec8ff;
  padding: 0;
  font-size: 0.88rem;
  text-decoration: underline;
}

.reports-table .link-btn:hover {
  color: #a8dcff;
}

.status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(155, 180, 204, 0.2);
  color: var(--muted);
}

.status-pill.open { background: rgba(52, 152, 219, 0.2); color: #7ec8ff; }
.status-pill.submitted { background: rgba(243, 156, 18, 0.2); color: #f5c542; }
.status-pill.closed { background: rgba(155, 89, 182, 0.2); color: #d2a8ef; }
.status-pill.supervised { background: rgba(39, 174, 96, 0.2); color: #7ddea8; }
.status-pill.draft { background: rgba(155, 180, 204, 0.15); color: var(--muted); }

.detail-panel .detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-panel .detail-header h3 {
  margin: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-section {
  margin-bottom: 18px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-section h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.detail-field {
  margin-bottom: 10px;
}

.detail-field .field-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.detail-field .field-value {
  white-space: pre-wrap;
  line-height: 1.45;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 6px;
}

.detail-table th,
.detail-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.detail-table th {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
}

.detail-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.detail-photos img,
.detail-signature img {
  max-width: 180px;
  max-height: 120px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

@media (max-width: 800px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .user-box .nav-link {
    display: none;
  }
}

.checar-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}

.checar-card h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.checar-wide {
  max-width: 100%;
}

.saved-accounts {
  margin: 16px 0 4px;
}

.saved-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.saved-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-account-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #4c7aa8;
  border-radius: 12px;
  background: #102338;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.saved-account-btn:hover {
  border-color: var(--primary);
}

.saved-account-btn strong {
  font-size: 0.98rem;
}

.saved-account-btn small {
  color: var(--muted);
}

.saved-account-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.saved-account-row .saved-account-btn {
  flex: 1;
}

.saved-account-remove {
  border: 1px solid #4c7aa8;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
}

.saved-account-remove:hover {
  color: #ffb4b4;
  border-color: #e74c3c;
}

.checar-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.checar-form label,
.pickers label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.checar-form input,
.pickers select {
  border: 1px solid #4c7aa8;
  border-radius: 12px;
  background: #102338;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.punch-clock {
  text-align: center;
  margin-bottom: 18px;
}

.clock-time {
  margin: 4px 0;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.next-step {
  margin: 0;
  color: #9ed8ff;
  font-weight: 600;
}

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

.summary-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.pickers {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

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

.punch-btn {
  min-height: 64px;
  border-radius: 16px;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.punch-btn.is-loading {
  opacity: 1;
  cursor: wait;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: punch-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes punch-spin {
  to { transform: rotate(360deg); }
}

.punch-in { background: #27ae60; }
.punch-out { background: #e74c3c; }
.punch-lunch { background: #f39c12; }
.punch-lunch-end { background: #e67e22; }

.punch-message {
  min-height: 1.4em;
  margin-top: 14px;
  color: #9ed8ff;
}

.terms-box {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  background: #102338;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #d7e7f5;
}

.signature-block {
  margin-top: 16px;
}

#signaturePad {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 12, 22, 0.72);
}

.modal.hidden { display: none; }

.modal-card {
  width: min(520px, 100%);
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.camera-wrap {
  position: relative;
  margin: 12px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1 / 1;
}

.camera-wrap video,
.camera-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#cameraOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.55) 46%);
}

@media (max-width: 640px) {
  .day-summary,
  .punch-grid {
    grid-template-columns: 1fr;
  }

  .clock-time {
    font-size: 2.1rem;
  }
}
