@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(assets/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(assets/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F5F7F8;
  --green: #1D8B58;
  --green-hi: #27AE6E;
  --green-dark: #17714A;
  --grad: linear-gradient(135deg, #27AE6E 0%, #1D8B58 60%, #17714A 100%);
  --ink: #0F1720;
  --gray: #8A93A0;
  --card: #FFFFFF;
  --star: #FFB800;
  --shadow: 0 10px 30px rgba(15, 23, 32, .07), 0 2px 8px rgba(15, 23, 32, .05);
  --glow: 0 12px 28px rgba(29, 139, 88, .35);
  --radius: 20px;
  --red: #D64545;
  --red-soft: #FDECEC;
  --amber: #A87700;
  --amber-soft: #FFF4DE;
  --green-soft: #E6F5EE;
  --line: #E1E5EA;
  --wa: #128C7E;
  /* Height of the panel at the bottom of «Turno» without the safe area: the list makes room for it */
  --shift-panel-h: 74px;
  --shadow-up: 0 -6px 20px rgba(15, 23, 32, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: 'Manrope', -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(120% 50% at 50% -10%, rgba(39, 174, 110, .10), transparent 60%),
    var(--bg);
  color: var(--ink);
  user-select: none;
  overscroll-behavior: none;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  animation: rise .3s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hidden { display: none; }

.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-height: 50px;
}

.square-btn {
  width: 48px; height: 48px;
  background: var(--card);
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s ease;
}
.square-btn:active { transform: scale(.92); }
.square-spacer { width: 48px; }

.lang-spacer, .lang-wrap { flex: 1 1 0; min-width: 48px; }
.lang-wrap { display: flex; justify-content: flex-end; }
.lang-select {
  height: 42px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230F1720' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 16px 16px;
  border: none;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 14px; font-weight: 800; color: var(--ink);
  cursor: pointer;
  padding: 0 32px 0 14px;
  -webkit-appearance: none; appearance: none;
}

.logo { width: 150px; margin: 22px 0 6px; }
.logo-small { width: 118px; margin: 0; }

.title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  margin: 16px 0;
}

.btn-green {
  width: 100%;
  max-width: 340px;
  height: 58px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 18px;
  box-shadow: var(--glow);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn-green:active { transform: scale(.97); box-shadow: 0 6px 16px rgba(29, 139, 88, .3); }
.btn-green:disabled { opacity: .35; box-shadow: none; cursor: default; }

.hint { font-size: 14px; font-weight: 500; color: var(--gray); text-align: center; margin-top: 14px; max-width: 300px; }

.row-card {
  width: 100%; max-width: 340px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 20px;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
}
.row-label { font-size: 14.5px; font-weight: 600; color: var(--gray); }
.row-value { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.row-value.big { font-size: 25px; letter-spacing: -.02em; }
.row-value.green { color: var(--green-dark); }
.row-card.total { background: linear-gradient(135deg, rgba(39,174,110,.10), rgba(29,139,88,.05)); box-shadow: inset 0 0 0 1.5px rgba(29,139,88,.35), var(--shadow); }
.row-card.total .row-value { color: var(--green-dark); }

/* Home: profile */
.profile-row {
  width: 100%; max-width: 380px;
  display: flex; align-items: center; gap: 14px;
  margin-top: 6px;
}
.profile-photo {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  outline: 3px solid rgba(29, 139, 88, .18);
  outline-offset: 2px;
}
.profile-hello { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.profile-venue { font-size: 13px; font-weight: 600; color: var(--gray); margin-top: 2px; }

/* Home: balance */
.balance-card {
  width: 100%; max-width: 380px;
  background: var(--grad);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  padding: 20px;
  display: flex; flex-direction: column; align-items: flex-start;
  color: #fff;
  margin-top: 16px;
}
.balance-label { font-size: 13.5px; font-weight: 700; opacity: .85; }
.balance-amount {
  font-size: 42px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 16px;
}
.btn-white {
  width: 100%; height: 52px;
  background: #fff; color: var(--green-dark);
  border: none; border-radius: 16px;
  font: inherit; font-size: 16.5px; font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn-white:active { transform: scale(.97); }
.btn-white:disabled { opacity: .5; cursor: default; }

.actions-row { display: flex; gap: 10px; width: 100%; max-width: 380px; margin-top: 10px; }
.action-card {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--card);
  border: none; border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 15px 10px;
  font: inherit; font-size: 14.5px; font-weight: 800; color: var(--ink);
  cursor: pointer;
  transition: transform .12s ease;
}
.action-card:active { transform: scale(.95); }
.action-card svg { color: var(--green); flex-shrink: 0; }

/* Home: history */
.list-title {
  width: 100%; max-width: 380px;
  font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  margin: 22px 0 2px;
}
.history { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 8px; }
.day-label {
  font-size: 12.5px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: .07em;
  margin: 12px 0 2px;
}
.pay-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: none; border-radius: 16px;
  box-shadow: 0 3px 10px rgba(15, 23, 32, .06);
  padding: 12px 14px;
  width: 100%;
  font: inherit; text-align: left;
  cursor: pointer;
  transition: transform .12s ease;
}
.pay-row:active { transform: scale(.97); }
.pay-icon {
  width: 40px; height: 40px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pay-icon.in { background: #E6F5EE; color: var(--green); }
.pay-icon.out { background: #F0F2F5; color: var(--gray); }
.pay-mid { flex: 1 0 auto; display: flex; flex-direction: column; gap: 2px; }
.pay-title { font-size: 15px; font-weight: 800; }
.pay-sub { font-size: 12.5px; font-weight: 600; color: var(--gray); display: flex; align-items: center; gap: 7px; }
.pay-stars { color: var(--star); font-size: 11.5px; letter-spacing: 1.5px; }
.pay-right { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pay-amt { font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-amt.plus { color: var(--green); }
.pay-chip {
  font-size: 10.5px; font-weight: 700;
  background: #FFF4DE; color: #A87700;
  padding: 3px 8px; border-radius: 999px;
}

/* Bottom sheet: payment detail */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50;
  animation: fadein .2s ease both;
}
@keyframes fadein { from { opacity: 0; } }
.sheet-backdrop.hidden { display: none; }
.sheet {
  width: 100%;
  max-width: 430px;
  max-height: 92dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px max(26px, env(safe-area-inset-bottom));
  animation: sheetup .3s cubic-bezier(.2, .9, .3, 1) both;
  display: flex; flex-direction: column; align-items: center;
}
@keyframes sheetup { from { transform: translateY(100%); } }
/* A long sheet scrolls; its rows and buttons keep their height */
.sheet > * { flex-shrink: 0; }
.sheet-handle { width: 44px; height: 5px; border-radius: 999px; background: #E1E5EA; margin-bottom: 8px; }
.detail-amount {
  font-size: 38px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--green); margin-top: 6px;
}
.detail-amount.out { color: var(--ink); }
.detail-date { font-size: 13.5px; font-weight: 600; color: var(--gray); margin-top: 2px; }
.detail-stars { font-size: 26px; letter-spacing: 4px; color: var(--star); margin: 8px 0 0; }
.detail-stars .off { color: #E1E5EA; }
.review-quote {
  width: 100%;
  background: #F2F7F4;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px; font-weight: 600;
  text-align: center;
  margin-top: 12px;
}
.sheet .row-card { max-width: none; }
.sheet .btn-green { max-width: none; margin-top: 16px; }


/* Shared by the venue tips demos: a small line under the amount */
.pay-note { max-width: 100%; font-size: 11.5px; font-weight: 600; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatar: photo over a circle with initials, the initials stay if the photo fails */
.avatar {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-soft); color: var(--green-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-avatar { width: 54px; height: 54px; font-size: 19px; outline: 3px solid rgba(29, 139, 88, .18); outline-offset: 2px; overflow: visible; }
.balance-card .balance-amount { margin-bottom: 0; }

/* Team and distribution lists */
.member-list { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.member-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; }
.member-top { display: flex; align-items: center; gap: 12px; }
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.member-name { font-size: 15px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-email { font-size: 12.5px; font-weight: 600; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.member-share { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.member-status { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.member-status[data-state="active"] { background: var(--green-soft); color: var(--green-dark); }
.member-status[data-state="invited"] { background: var(--amber-soft); color: var(--amber); }
.member-action {
  margin-top: 10px; width: 100%; height: 40px;
  background: var(--bg); color: var(--red);
  border: none; border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 800;
  cursor: pointer;
}
.member-action:active { transform: scale(.98); }

.link-btn {
  background: none; border: none;
  font: inherit; font-size: 14.5px; font-weight: 700; color: var(--green-dark);
  text-decoration: underline; text-underline-offset: 3px;
  padding: 12px; margin-top: 14px;
  cursor: pointer;
}
.btn-danger {
  width: 100%; height: 56px; margin-top: 18px;
  background: var(--red); color: #fff;
  border: none; border-radius: 18px;
  font: inherit; font-size: 17px; font-weight: 800;
  cursor: pointer;
}
.btn-danger:active { transform: scale(.97); }

/* Sheets: title, form */
.sheet-title { font-size: 21px; font-weight: 800; letter-spacing: -.01em; text-align: center; margin-top: 6px; }
.field { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field span { font-size: 13.5px; font-weight: 700; color: var(--gray); }
.field input {
  height: 50px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 14px;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  background: var(--card);
  user-select: text;
}
.field input:focus { outline: none; border-color: var(--green); }
.field-error { min-height: 20px; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--red); text-align: center; }
.field-error:empty { min-height: 0; margin-top: 0; }

/* Split table of a venue tip */
.split-table {
  width: 100%; margin-top: 14px;
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px 16px;
  background: var(--bg); border-radius: 16px; padding: 14px 16px;
}
.split-head { font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; }
.split-name { font-size: 14.5px; font-weight: 700; }
.split-share, .split-amt { font-size: 14.5px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.split-amt { color: var(--green-dark); }

/* Distribution */
.dist-body { width: 100%; display: flex; flex-direction: column; align-items: center; }
.dist-body.hidden { display: none; }
.dist-hint { margin-top: 0; }
.dist-row .member-name { font-size: 14.5px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.step-btn {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--green-soft); color: var(--green-dark);
  border: none; font: inherit; font-size: 20px; font-weight: 800; line-height: 1;
  cursor: pointer;
}
.step-btn:disabled { opacity: .35; cursor: default; }
.step-input {
  width: 44px; height: 34px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; font-weight: 800; text-align: center; color: var(--ink);
  -moz-appearance: textfield; user-select: text;
}
.step-input::-webkit-inner-spin-button, .step-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.step-unit { font-size: 14px; font-weight: 800; color: var(--gray); }
.row-card.total[data-state="error"] { background: var(--red-soft); box-shadow: inset 0 0 0 1.5px var(--red), var(--shadow); }
.row-card.total[data-state="error"] .row-value { color: var(--red); }
.dist-example { max-width: 340px; margin-top: 12px; font-size: 14px; font-weight: 700; text-align: center; color: var(--green-dark); }
.dist-actions { justify-content: center; max-width: 340px; margin: 14px 0 12px; }

/* New tip toast */
.toast {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: calc(100% - 32px); max-width: 360px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(15, 23, 32, .22);
  padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
  z-index: 60;
  cursor: pointer;
  animation: toastin .35s cubic-bezier(.2, .9, .3, 1) both;
}
.toast.hide { animation: toastout .3s ease both; }
@keyframes toastin { from { transform: translate(-50%, -130%); } to { transform: translate(-50%, 0); } }
@keyframes toastout { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -140%); opacity: 0; } }
.toast-icon {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.toast-title { font-size: 14.5px; font-weight: 800; }
.toast-sub { font-size: 13px; font-weight: 600; color: var(--gray); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «×» of the push: a 40×40 tap area on the right (brief R-16) */
.toast-body { flex: 1; min-width: 0; }
.toast-close {
  flex-shrink: 0;
  width: 40px; height: 40px; margin: -6px -8px -6px 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 12px;
  font: inherit; font-size: 24px; font-weight: 600; line-height: 1; color: var(--gray);
  cursor: pointer;
}
.toast-close:active { background: var(--bg); }

/* ==== Shifts, roles and reports (markets with shifts: mx, en) ==== */

/* Home: the closing link under today's amount */
.closing-link {
  margin-top: 8px; padding: 0;
  background: none; border: none;
  font: inherit; font-size: 14px; font-weight: 800; color: #fff;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

/* Home: panels of today's shift and distribution - white cards of the green card's form; label and «Cambiar ›» on one line,
   the main line cut with an ellipsis (by role: up to two lines), the unsaved edit of the shift in the accent colour */
.today-panel {
  width: 100%; max-width: 380px; min-width: 0;
  margin-top: 10px; padding: 16px 20px;
  background: var(--card); color: var(--ink);
  border: none; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  font: inherit; text-align: left;
  cursor: pointer;
  transition: transform .12s ease;
}
.today-panel:active { transform: scale(.98); }
.today-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.today-panel-label { min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-panel-link { flex-shrink: 0; font-size: 14px; font-weight: 800; color: var(--green-dark); }
.today-panel-main { min-width: 0; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-panel-main[data-lines="2"] { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.today-panel-note { min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--amber); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-panel-note:empty { display: none; }

/* Name and role chip on one line: the name is cut, the chip stays */
.name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.role-chip {
  flex-shrink: 0;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px;
  background: var(--bg); color: var(--gray); box-shadow: inset 0 0 0 1px var(--line);
}
.member-top[data-action="open"] { width: 100%; padding: 0; background: none; border: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.sheet-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Selects of the sheets and of «Turno» */
.field-select {
  width: 100%; min-width: 0; height: 50px;
  padding: 0 40px 0 14px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230F1720' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px 16px;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.field-select:focus { outline: none; border-color: var(--green); }

/* «Turno» */
.shift-pick { width: 100%; max-width: 380px; display: flex; gap: 10px; }
.btn-small {
  flex-shrink: 0; height: 50px; padding: 0 20px;
  background: var(--grad); color: #fff;
  border: none; border-radius: 14px; box-shadow: var(--glow);
  font: inherit; font-size: 15.5px; font-weight: 800;
  cursor: pointer;
}
.btn-small:disabled { opacity: .35; box-shadow: none; cursor: default; }
.shift-active { width: 100%; max-width: 380px; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--gray); overflow-wrap: anywhere; }
/* Panel fixed at the bottom of the viewport on «Turno» only, one line of text with the button on the right;
   the screen makes room for it */
#screen-shift[data-panel="on"] { padding-bottom: calc(var(--shift-panel-h) + max(24px, env(safe-area-inset-bottom))); }
.shift-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  width: 100%; max-width: 430px; margin: 0 auto;
  min-height: var(--shift-panel-h);
  padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  background: var(--amber-soft); box-shadow: var(--shadow-up);
  display: none; align-items: center; gap: 12px;
}
body[data-screen="screen-shift"] .shift-panel:is([data-kind="edited"], [data-kind="unsaved"]) { display: flex; }
.shift-panel-title {
  flex: 1; min-width: 0;
  font-size: 14.5px; font-weight: 800; color: var(--amber);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shift-row { cursor: pointer; }
.switch {
  flex-shrink: 0; position: relative;
  width: 46px; height: 28px; border-radius: 999px;
  background: var(--line);
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
  transition: background .15s ease;
}
.switch::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.switch:checked { background: var(--green); }
.switch:checked::before { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* «Reparto» and «Historial»: segmented choice; a role without people */
.period-row { display: flex; gap: 9px; width: 100%; max-width: 380px; margin: 4px 0 12px; }
.period-chip {
  flex: 1; padding: 12px 2px;
  background: var(--card); color: var(--ink);
  border: none; border-radius: 16px; box-shadow: var(--shadow);
  font: inherit; font-size: 14.5px; font-weight: 800;
  cursor: pointer;
}
.period-chip[data-state="selected"] { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.stat-row { width: 100%; max-width: 380px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { min-width: 0; padding: 12px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--gray); }
.stat-value { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Tip detail: name with the role under it; groups of roles */
.split-who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.split-who .split-name, .split-person .split-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-role { font-size: 12px; font-weight: 600; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-groups { width: 100%; margin-top: 14px; padding: 14px 16px; background: var(--bg); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; }
.split-group-head { font-size: 12.5px; font-weight: 800; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }
.split-person { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.split-person .split-name { min-width: 0; }

/* Shift closing */
.closing-list { width: 100%; margin-top: 14px; padding: 4px 16px; background: var(--bg); border-radius: 16px; display: flex; flex-direction: column; }
.closing-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.closing-row .split-who { flex: 1; }
.closing-total { border-bottom: none; }
.closing-total .split-name, .closing-total .split-amt { font-size: 16px; font-weight: 800; }
.btn-wa {
  width: 100%; height: 56px; margin-top: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa); color: #fff;
  border-radius: 18px;
  font-size: 17px; font-weight: 800; text-decoration: none;
}
.btn-wa:active { transform: scale(.97); }

/* Blocks with their own display stay hidden with .hidden */
.action-card.hidden, .today-panel.hidden, .field.hidden, .period-row.hidden, .split-table.hidden,
.split-groups.hidden, .closing-list.hidden, .btn-wa.hidden { display: none; }

/* Desktop: phone-like centered column */
@media (min-width: 700px) {
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100dvh;
  }
  .screen {
    width: 430px;
    min-height: 100dvh;
    box-shadow: 0 0 0 1px rgba(15, 23, 32, .06), 0 20px 60px rgba(15, 23, 32, .12);
    background:
      radial-gradient(120% 50% at 50% -10%, rgba(39, 174, 110, .10), transparent 60%),
      var(--bg);
  }
}
