:root {
  color-scheme: light;
  --ink: #132532;
  --muted: #6b767d;
  --teal: #119da3;
  --line: #e6ebed;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #fafcfc;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  letter-spacing: 0;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
.topbar {
  min-height: 88px;
  padding: 18px max(24px, calc((100% - 1200px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
}
.brand img { display: block; flex-shrink: 0; object-fit: contain; }
.admin-button {
  min-height: 42px;
  padding: 9px 22px;
  flex-shrink: 0;
  border: 1px solid #d5dfe3;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 160ms, border-color 160ms;
}
.admin-button:hover { background: #f0f6f6; border-color: #9bb9bc; }
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.welcome { width: 100%; max-width: 688px; margin: 0 auto; padding: 48px 24px; min-height: min(660px, calc(100svh - 170px)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome-logo {
  display: block;
  width: 112px;
  height: 168px;
  object-fit: contain;
  margin: 0 auto 28px;
}
.eyebrow { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
h1 { margin: 0; font-size: 46px; line-height: 1.15; font-weight: 750; overflow-wrap: anywhere; }
.summary {
  margin: 20px auto 32px;
  max-width: 440px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  text-wrap: pretty;
}
.attendance-button {
  width: min(100%, 340px);
  min-height: 68px;
  padding: 16px 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #fff;
  background: #087e83;
  font-size: 20px;
  font-weight: 650;
  box-shadow: 0 6px 16px #087e831a;
  transition: background 160ms, box-shadow 160ms;
}
.attendance-button:hover { background: #066a6f; box-shadow: 0 8px 20px #087e8326; }
.attendance-button:active { background: #055b60; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
footer {
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
footer span { margin: 0 7px; }
@media (max-width: 540px) {
  .topbar { min-height: 76px; padding: 14px 20px; gap: 12px; }
  .brand { font-size: 15px; gap: 9px; }
  .brand img { width: 24px; height: 36px; }
  .admin-button { padding: 9px 16px; }
  .welcome { padding: 32px 24px; }
  .welcome-logo { width: 96px; height: 144px; margin-bottom: 24px; }
  h1 { font-size: 34px; }
  .summary { font-size: 16px; }
  .attendance-button { min-height: 64px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none !important; }
}

[hidden] { display: none !important; }
.screen { width: min(1200px, 100%); margin: 0 auto; padding: 36px 24px 64px; flex: 1; }
.screen-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
h2 { margin: 0; font-size: 26px; }
h3 { font-size: 18px; margin: 24px 0; }
.subtle { color: var(--muted); font-size: 13px; line-height: 1.5; }
.primary, .secondary { min-height: 42px; border-radius: 6px; padding: 10px 18px; font-size: 14px; font-weight: 600; }
.primary { background: #087e83; border: 1px solid #087e83; color: white; }
.primary:hover { background: #066a6f; }
.secondary { border: 1px solid #d5dfe3; background: white; color: var(--ink); }
.secondary:hover { background: #edf3f4; }
.kiosk-body { max-width: 720px; margin: 40px auto; }
.clock { text-align: center; font-size: 40px; font-variant-numeric: tabular-nums; margin: 0; }
.clock + p { text-align: center; margin: 6px 0 32px; }
.modes { border: 0; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.modes legend { margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.modes label { position: relative; font-size: 13px; }
.modes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.modes span { min-height: 64px; padding: 12px 8px; display: flex; align-items: center; justify-content: center; text-align: center; background: white; border: 1px solid #d5dfe3; border-radius: 6px; }
.modes input:checked + span { background: #e0f3f1; color: #075e64; border-color: #087e83; font-weight: 600; }
.modes input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 3px; }
label { display: grid; gap: 8px; font-size: 14px; }
input, select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--ink); border: 1px solid #cdd7db; border-radius: 5px; background: white; }
.scan-row { display: flex; gap: 12px; margin-top: 10px; }
#dni { font-size: 28px; font-variant-numeric: tabular-nums; min-height: 66px; }
.scan-row button { min-width: 130px; }
.message { min-height: 24px; line-height: 1.6; font-size: 15px; }
.message[data-tone="error"] { color: #a12c35; }
.message[data-tone="success"] { color: #087448; }
.tabs { display: flex; border-bottom: 1px solid var(--line); gap: 8px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 14px 18px; white-space: nowrap; font-size: 14px; color: var(--muted); }
.tabs button[aria-pressed="true"] { color: #087e83; border-bottom-color: #087e83; font-weight: 600; }
.shift-form { display: grid; grid-template-columns: 120px repeat(4, minmax(100px, 1fr)) auto; gap: 16px; align-items: end; border-bottom: 1px solid var(--line); padding: 24px 0; }
.shift-form h4 { align-self: center; margin: 0; font-size: 15px; }
.person-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 16px; align-items: end; margin-bottom: 30px; }
.report-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 24px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: #f1f5f6; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.5; }
td button { margin: 3px; }
td select { min-width: 120px; }
.empty { text-align: center; padding: 36px; color: var(--muted); }
dialog { width: min(480px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
dialog::backdrop { background: #12243266; }
dialog h2 { font-size: 22px; }
dialog p { line-height: 1.7; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (max-width: 900px) {
  .shift-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-form h4 { grid-column: 1 / -1; }
  .person-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .screen { padding: 24px 18px 40px; }
  .screen-header { align-items: start; gap: 12px; }
  .screen-header h2 { font-size: 22px; }
  .screen-header button { padding: 10px 12px; max-width: 120px; }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scan-row { flex-direction: column; }
  .person-form { grid-template-columns: 1fr; }
  .tabs button { padding: 14px 10px; }
  .report-filter label { flex: 1; min-width: 135px; }
  .kiosk-body { margin-top: 28px; }
}

button:disabled { opacity: 0.55; cursor: wait; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
.access-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; max-width: 920px; margin: 40px auto; align-items: start; }
.access-brand { padding: 20px 0; }
.access-brand h3 { font-size: 36px; line-height: 1.2; margin: 24px 0 18px; }
.access-brand p { max-width: 300px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.local-label { display: inline-block; color: #087448; background: #e5f5ed; padding: 5px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.stack-form { display: grid; gap: 20px; }
.access-forms { min-width: 0; }
.access-tabs button { flex: 1; }
.stack-form .primary { min-height: 48px; }
.worker-identity { display: flex; gap: 16px; align-items: center; padding: 22px 0 8px; }
.identity-initial { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; background: #e0f3f1; color: #075e64; font-size: 22px; font-weight: 700; border-radius: 6px; }
.worker-identity strong { font-size: 18px; overflow-wrap: anywhere; }
.worker-identity p { color: var(--muted); margin: 5px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.overview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); gap: 24px; padding: 16px 0 32px; }
.overview-metrics > div { border-left: 3px solid #b8dce0; padding-left: 20px; }
.overview-metrics > div:nth-child(2) { border-color: #7fc69f; }
.overview-metrics > div:nth-child(3) { border-color: #e1bd67; }
.overview-metrics span { color: var(--muted); font-size: 14px; }
.overview-metrics strong { display: block; font-size: 32px; margin-top: 10px; }
.workspace-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.workspace-details dt { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.workspace-details dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.owner-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.owner-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin: 24px 0; }
.owner-toolbar h3 { margin: 0; }
.owner-toolbar label { width: min(100%, 320px); }
.owner-row-actions { min-width: 260px; }
.space-status { display: inline-block; font-size: 12px; padding: 4px 8px; border-radius: 4px; background: #e5f5ed; color: #087448; }
.space-status.suspended { background: #fff0e5; color: #9b4521; }
.owner-reports { margin-top: 36px; border-top: 1px solid var(--line); }
#edit-workspace { max-height: calc(100svh - 48px); overflow-y: auto; }
#edit-workspace .stack-form { margin-top: 24px; gap: 16px; }
#cloud-area-dialog { max-height: calc(100svh - 48px); overflow-y: auto; }
#cloud-area-dialog .stack-form { margin-top: 24px; gap: 16px; }
#cloud-account { overflow-wrap: anywhere; }
.checkbox-label { display: flex; align-items: center; gap: 10px; }
.checkbox-label input { width: 18px; min-height: 18px; height: 18px; accent-color: #087e83; }
@media (max-width: 800px) { .owner-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  .owner-metrics { grid-template-columns: 1fr; }
  .owner-toolbar { align-items: stretch; flex-direction: column; }
  .owner-toolbar label { width: 100%; }
}
#admin-title, #admin-context { overflow-wrap: anywhere; }
#choose-area .stack-form { margin-top: 24px; }
.pricing { width: 100%; background: #fff; border-top: 1px solid var(--line); padding: 48px 24px 56px; }
.pricing-inner { max-width: 880px; margin: 0 auto; }
.pricing-heading { text-align: center; margin-bottom: 32px; }
.pricing-heading h2 { font-size: 30px; }
.pricing-heading > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 14px 0 0; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plan { border: 1px solid #d5dfe3; border-radius: 8px; padding: 28px; display: flex; flex-direction: column; align-items: start; }
.plan-annual { border-color: #087e83; background: #f6fbfa; }
.plan h3 { font-size: 18px; line-height: 28px; margin: 0; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; width: 100%; }
.saving { font-size: 12px; color: #075e64; background: #dff0e9; padding: 5px 8px; border-radius: 4px; }
.plan-price { font-size: 40px; line-height: 1.2; font-weight: 700; margin: 28px 0 10px; }
.plan-price span { font-size: 15px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.plan-description { color: var(--muted); font-size: 14px; margin: 0 0 24px; line-height: 1.6; }
.choose-plan { width: 100%; margin-top: auto; }
.plan-benefits { margin-top: 32px; padding-top: 8px; }
.plan-benefits h3 { margin: 0 0 20px; font-size: 16px; }
.plan-benefits ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; list-style: none; padding: 0; margin: 0; }
.plan-benefits li { display: flex; gap: 10px; align-items: start; font-size: 14px; line-height: 1.6; }
.plan-benefits li::before { content: '\2713'; color: #087e83; font-weight: 700; flex-shrink: 0; }
@media (max-width: 600px) {
  .pricing { padding: 32px 20px 40px; }
  .pricing-heading h2 { font-size: 26px; }
  .plans { grid-template-columns: 1fr; gap: 16px; }
  .plan { padding: 24px; }
  .plan-benefits ul { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 700px) {
  .access-layout { grid-template-columns: 1fr; gap: 20px; margin: 0 auto; max-width: 440px; }
  .access-brand { padding: 8px 0; }
  .access-brand img { display: none; }
  .access-brand h3 { font-size: 26px; margin: 0 0 12px; }
  .access-brand h3 br { display: none; }
  .access-brand p { font-size: 15px; margin: 0 0 12px; }
  .overview-metrics { gap: 20px; grid-template-columns: 1fr; }
  .workspace-details dl { grid-template-columns: 1fr; }
  .header-actions { max-width: 130px; }
}
