/* POS Peces 1.0 · Espacio de trabajo. Tokens compartidos por todas las pantallas. */
.merch-entry {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint);
  margin: 16px 0;
}
.merch-entry h3 {
  margin-top: 0;
}
.merch-summary {
  padding: 16px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--ink);
}
.merch-summary > small {
  display: block;
  color: var(--ink-2);
}
.merch-summary p {
  margin: 0;
}
.merch-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.merch-totals span {
  font-size: 11px;
  color: var(--ink-2);
}
.merch-totals strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.merch-totals span:last-child strong {
  color: var(--primary-strong);
}
.stock-entry {
  margin-top: 12px;
  font-size: 11px;
  white-space: normal;
}
@media (max-width: 420px) {
  .merch-entry {
    padding: 12px;
  }
  .merch-summary {
    padding: 12px;
  }
  .merch-totals {
    gap: 6px;
  }
  .merch-totals strong {
    font-size: 14px;
  }
}
:root {
  --ink: #182d34;
  --ink-2: #465b63;
  --muted: #687e85;
  --canvas: #f3f6f7;
  --surface: #fff;
  --tint: #f7f9fa;
  --line: #e0e8eb;
  --line-strong: #cbd8dd;
  --primary: #137e83;
  --primary-strong: #096367;
  --primary-tint: #e6f4f3;
  --display: #132f37;
  --display-line: #33535b;
  --amber: #e5f8f5;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 24px 90px #071b3033;
  --sidebar: #122c35;
  --sidebar-muted: #93acb4;
  --sidebar-active: #21434d;
  --card-shadow: 0 2px 3px #15344103;
  color-scheme: light;
}
:root[data-accent='blue'] {
  --primary: #3569b8;
  --primary-strong: #235395;
  --primary-tint: #eaf1fc;
}
:root[data-accent='green'] {
  --primary: #397451;
  --primary-strong: #245638;
  --primary-tint: #eaf4ed;
}
:root[data-theme='dark'] {
  --ink: #e1edf0;
  --ink-2: #b8ccd2;
  --muted: #90a8b1;
  --canvas: #112229;
  --surface: #192e36;
  --tint: #203841;
  --line: #304953;
  --line-strong: #49606a;
  --primary: #65c6c2;
  --primary-strong: #95e0dc;
  --primary-tint: #214948;
  --danger: #ff9c94;
  --danger-tint: #4b2d31;
  --warn: #edcc8c;
  --warn-tint: #463e2b;
  --info: #b0d2ec;
  --info-tint: #243f55;
  --sidebar: #0b1b22;
  --sidebar-active: #213a44;
  color-scheme: dark;
}
:root[data-theme='dark'][data-accent='blue'] {
  --primary: #90b8f6;
  --primary-strong: #b6d1fb;
  --primary-tint: #273f60;
}
:root[data-theme='dark'][data-accent='green'] {
  --primary: #92d4a9;
  --primary-strong: #b4e8c4;
  --primary-tint: #254835;
}
body {
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.005em;
}
button,
.button {
  font-size: 13px;
  min-height: 40px;
  font-weight: 500;
}
button:hover,
.button:hover {
  background: var(--tint);
}
button.primary {
  box-shadow: 0 3px 6px #133e4110;
}
:root[data-theme='dark'] button.primary,
:root[data-theme='dark'] .segmented button[aria-pressed='true'] {
  color: #102d34;
  background: var(--primary);
  border-color: var(--primary);
}
h1,
h2,
h3,
strong {
  letter-spacing: -0.018em;
}
input,
select,
textarea {
  font-size: 14px;
  border-color: var(--line-strong);
}
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
:focus-visible {
  outline-color: var(--primary);
}
#app {
  grid-template-columns: 232px minmax(0, 1fr);
}
#sidebar {
  background: var(--sidebar);
  color: #e8f0f2;
  border: 0;
  padding: 28px 16px 18px;
  gap: 8px;
}
.brand {
  padding: 0 8px 24px;
  gap: 12px;
}
.brand strong {
  font-size: 19px;
  letter-spacing: -0.025em;
}
#sidebar .brand small {
  color: var(--sidebar-muted);
  margin-top: 3px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logo {
  height: 40px;
  width: 40px;
  background: #66c6bd;
  border-radius: 12px;
}
.logo svg {
  fill: #16363e;
}
.logo svg circle {
  fill: #66c6bd;
}
.nav-search {
  margin-bottom: 16px;
  background: transparent;
  color: var(--sidebar-muted);
  border-color: #3a515b;
  padding: 9px 10px;
  justify-content: space-between;
  font-size: 11px;
  min-height: 39px;
  width: 100%;
}
.nav-search:hover {
  color: white;
  background: var(--sidebar-active);
  border-color: #62838d;
}
.nav-search kbd {
  font-size: 9px;
  background: transparent;
  color: #b8cdd2;
  border-color: #435963;
  padding: 3px;
}
#nav {
  gap: 22px;
}
.nav-group {
  gap: 4px;
}
.nav-group + .nav-group {
  border: 0;
  padding: 0;
}
.nav-label {
  color: #7c9ba6;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 12px 6px;
  font-weight: 600;
}
#nav button {
  color: #b1c5cb;
  padding: 11px 12px;
  min-height: 42px;
  font-size: 13px;
  border-radius: 8px;
}
#nav button:hover {
  background: #1a3944;
  color: #fff;
}
#nav button.active {
  background: var(--sidebar-active);
  box-shadow: none;
  color: #fff;
}
#nav button.active:after {
  content: '';
  width: 5px;
  height: 5px;
  background: #72d4cc;
  border-radius: 50%;
  margin-left: auto;
}
#nav .icon {
  width: 18px;
  height: 18px;
}
.session {
  border-top: 1px solid #2c454f;
  margin-top: 30px;
  padding: 18px 8px 0;
  gap: 7px;
}
.session .who {
  padding-top: 12px;
}
.session .who strong {
  color: #e2eff3;
}
.session .who small,
.session > small {
  color: var(--sidebar-muted);
  font-size: 10px;
}
.profile-button {
  color: #8ccec9;
  background: transparent;
  border: 0;
  font-size: 12px;
  justify-content: flex-start;
  padding: 0;
  min-height: 30px;
}
.profile-button:hover,
.logout:hover {
  background: var(--sidebar-active);
  color: white;
}
.logout {
  color: var(--sidebar-muted);
  padding-left: 0;
}
#point-picker label {
  color: var(--sidebar-muted);
}
#point-picker select {
  background: #1f3b46;
  color: white;
  border-color: #48616b;
}
#workspace {
  padding: 0 32px 42px;
}
.topbar {
  margin: 0 -32px 28px;
  padding: 0 32px;
  min-height: 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.topbar-title {
  order: 1;
  flex: none;
}
.topbar-title small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
#title {
  font-size: 16px;
  margin-top: 3px;
  font-weight: 600;
}
.topbar .date {
  font-size: 11px;
  margin-left: 6px;
}
#page-tools {
  gap: 8px;
}
.connection {
  order: 4;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.connection:before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2f9b7a;
}
.connection.disconnected {
  color: var(--danger);
}
.connection.disconnected:before {
  background: var(--danger);
}
.page {
  max-width: 1560px;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 8px;
}
.page-intro h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
}
.page-intro p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.capture-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.capture-label i {
  display: inline-block;
  height: 6px;
  width: 6px;
  border-radius: 100%;
  background: var(--primary);
  margin-right: 6px;
}
.panel,
.card {
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
h2 {
  font-size: 16px;
}
h3 {
  font-size: 14px;
}
.metric {
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1.25;
}
.metric small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.kpis {
  gap: 16px;
}
.kpis .card {
  position: relative;
  overflow: hidden;
}
.kpis .card > label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 12px;
}
.kpis .card .hint {
  font-size: 11px;
  margin-top: 10px;
}
.kpis4 .card:first-child {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.kpis4 .card:first-child > label,
.kpis4 .card:first-child .hint {
  color: #e5f4f4;
}
:root[data-theme='dark'] .kpis4 .card:first-child {
  background: var(--primary-tint);
  color: var(--ink);
  border-color: var(--primary);
}
:root[data-theme='dark'] .kpis4 .card:first-child > label,
:root[data-theme='dark'] .kpis4 .card:first-child .hint {
  color: var(--ink-2);
}
.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 24px;
}
.hero-row h2 {
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.hero-row p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.hero-actions {
  display: flex;
  gap: 8px;
}
.hero-actions button {
  min-height: 42px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.quick-card {
  padding: 15px 16px;
  text-align: left;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  white-space: normal;
}
.quick-card > .icon {
  color: var(--primary);
  background: var(--primary-tint);
  box-sizing: content-box;
  padding: 10px;
  border-radius: 10px;
  width: 18px;
  height: 18px;
}
.quick-card strong {
  font-size: 13px;
  display: block;
}
.quick-card small {
  font-size: 11px;
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.quick-card:hover {
  border-color: var(--primary);
  background: var(--surface);
}
.attention {
  margin: 18px 0 22px;
}
.attention summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  padding: 12px 0;
  font-size: 12px;
}
.attention .alerts {
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.alert {
  font-size: 12px;
  border: 1px solid transparent;
  padding: 12px 14px;
}
.alert .link {
  font-size: 11px;
  white-space: nowrap;
}
.dash-grid {
  gap: 16px;
}
.dash-grid .panel {
  margin: 0;
}
.dash-grid .panel h2 {
  font-size: 14px;
}
.dash-grid .panel .hint {
  font-size: 11px;
}
.dash-grid .dash-wide {
  background: var(--surface);
}
.trend-chart .bar {
  fill: color-mix(in srgb, var(--primary) 22%, var(--surface));
}
.trend-chart .bar-today {
  fill: var(--primary);
}
.trend-chart text {
  fill: var(--muted);
}
.trend-chart .bar-value {
  fill: var(--ink-2);
}
.trend-summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.trend-summary strong {
  font-size: 26px;
  letter-spacing: -0.03em;
}
.trend-summary span {
  font-size: 11px;
  color: var(--muted);
}
.onboarding {
  background: var(--primary-tint);
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 18px;
}
.onboarding h2 {
  margin-bottom: 6px;
}
.onboarding-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.onboarding-steps button {
  background: var(--surface);
}
.tabs {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 11px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 22px;
  max-width: 100%;
}
.tabs button {
  font-size: 12px;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 8px 16px;
  margin: 0;
}
.tabs button[aria-selected='true'] {
  background: var(--primary-tint);
  color: var(--primary-strong);
}
.tabs button:hover {
  background: var(--tint);
}
.tablewrap {
  border-radius: 12px;
}
thead {
  background: var(--tint);
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--muted);
}
th,
td {
  padding: 14px 16px;
}
td {
  font-size: 12.5px;
}
td small {
  font-size: 11px;
}
tbody tr:hover {
  background: var(--tint);
}
.ledger-row {
  padding: 15px 0;
  font-size: 13px;
}
.ledger-row small {
  font-size: 11px;
}
.ledger-row button {
  font-size: 11px;
  min-height: 30px;
  padding: 6px 10px;
}
.filter-row {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  gap: 12px;
  margin-bottom: 16px;
}
.filter-row label {
  font-size: 11px;
}
.filter-row button {
  min-height: 40px;
}
.filter-row .field {
  min-width: 0;
  flex: 1;
}
.filter-row input,
.filter-row select {
  min-width: 0;
  min-height: 40px;
  font-size: 13px;
}
#history-q {
  min-width: 160px;
}
.toolbar input {
  background: var(--surface);
}
.summary-line {
  padding: 12px 4px;
  color: var(--ink-2);
  font-size: 12px;
}
.segmented button {
  min-height: 43px;
  font-size: 14px;
  padding: 10px 20px;
}
.capture {
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}
.capture-head {
  margin-bottom: 22px;
}
.capture-head .segmented {
  padding: 4px;
  background: var(--tint);
  border: 1px solid var(--line);
}
.scale {
  border-radius: 14px;
  background: var(--display);
  border-color: var(--display-line);
  box-shadow: none;
}
.scale input,
.scale input:focus {
  color: var(--amber);
}
.scale-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aec9cf;
}
.scale-read input {
  font-size: 72px;
  letter-spacing: -0.05em;
}
.scale-unit {
  color: #95b7bf;
}
.scale-foot {
  border-color: #36525b;
  color: #bdd7dd;
}
.scale-foot input {
  background: #1c3a44;
  color: #e4f3f6;
  border: 1px solid #41616c;
}
.capture-actions {
  margin: 18px 0;
}
.capture-actions .hint {
  font-size: 11px;
}
.capture-actions button {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-tint);
}
.ticket {
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: visible;
  top: 100px;
}
.ticket-client {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 20px;
}
.ticket-client .row label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ticket-body {
  padding: 18px 20px;
}
.ticket-total {
  padding: 20px;
  border-top: 1px dashed var(--line-strong);
  background: var(--tint);
}
.total {
  font-size: 40px;
  letter-spacing: -0.045em;
}
.ticket-secondary {
  border-color: var(--line);
}
.ticket-extras {
  background: var(--surface);
  border-radius: 0 0 16px 16px;
}
.ticket-line {
  font-size: 13px;
}
.ticket-line small {
  font-size: 11px;
}
.charge-button {
  min-height: 52px;
  letter-spacing: 0.01em;
  font-size: 15px;
  border-radius: 9px;
}
.shortcuts {
  font-size: 10px;
  color: var(--muted);
  margin: 22px 0 0;
}
.shortcuts kbd {
  font-size: 9px;
}
.pos-step {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 15px;
}
.pos-step b {
  font-size: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 100%;
  height: 23px;
  width: 23px;
  background: var(--tint);
  color: var(--primary);
}
.draft-status {
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 0;
}
.draft-recovery {
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--primary-tint);
}
.record-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 12px;
  gap: 8px;
  margin-bottom: 18px;
}
.record-bar > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 10px;
}
.record-bar button {
  font-size: 12px;
  min-height: 36px;
}
.production-secondary {
  margin: 0 0 18px;
}
.production-secondary summary {
  font-size: 12px;
  color: var(--muted);
}
.production-secondary .actions {
  margin: 12px 0 0;
  justify-content: flex-start;
}
.pool-card:before {
  content: '';
  display: block;
  width: 32px;
  height: 4px;
  border-radius: 4px;
  background: var(--primary);
  margin-bottom: 16px;
}
.pool-card .metric {
  margin-top: 14px;
}
.water-card {
  background: var(--tint);
  border-radius: 12px;
  padding: 18px;
}
.water-card strong {
  font-size: 14px;
}
.water-card span {
  font-size: 13px;
}
.water-card small {
  font-size: 11px;
}
.week-head > .kpis {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
}
.week-head .week-nav {
  gap: 12px;
}
.week-card {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.week-card > legend {
  padding: 0 8px;
  color: var(--primary);
}
.week-card .form-more {
  background: var(--tint);
}
.week-fields input {
  font-size: 19px;
  font-weight: 600;
  min-height: 52px;
}
.client-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.client-metrics > div {
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
}
.client-metrics label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.client-metrics strong {
  font-size: 25px;
  font-weight: 500;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 18px;
}
.filter-chips button {
  font-size: 11px;
  border-radius: 7px;
  min-height: 32px;
}
.filter-chips button.active {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary-strong);
}
.settings-checks {
  display: grid;
  gap: 6px;
  padding: 12px 0;
}
.settings-checks label {
  font-size: 13px;
}
.form-section {
  border-color: var(--line);
  font-size: 13px;
  padding-top: 20px;
}
.form-more {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.option span {
  background: var(--surface);
  border-color: var(--line-strong);
  font-size: 12px;
}
.option:has(input:checked) span {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary-strong);
}
.command-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
}
.command-search .icon {
  color: var(--muted);
}
.command-search input {
  font-size: 17px;
  min-height: 50px;
}
.command-list {
  display: grid;
  gap: 5px;
}
.command-group {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  margin: 16px 0 3px;
}
.command-item {
  text-align: left;
  justify-content: flex-start;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
  gap: 14px;
  white-space: normal;
  min-width: 0;
}
.command-item > .icon {
  color: var(--primary);
}
.command-item > span {
  min-width: 0;
}
.command-item strong {
  display: block;
  font-size: 14px;
}
.command-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  font-weight: 400;
}
.command-arrow {
  margin-left: auto;
  color: var(--muted);
}
.category-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.category-row:last-child {
  border: 0;
}
.category-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.audit-table td {
  vertical-align: top;
}
.audit-table td:first-child {
  white-space: nowrap;
}
.audit-table td:last-child {
  max-width: 400px;
  word-break: break-word;
}
.empty {
  padding: 36px 20px;
  color: var(--muted);
  font-size: 13px;
  background: var(--tint);
  border-radius: 10px;
}
dialog {
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog h2 {
  font-size: 23px;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
dialog .lead {
  font-size: 13px;
}
.sheet {
  border-radius: 20px 0 0 20px;
}
dialog::backdrop {
  background: #0a202d8c;
  backdrop-filter: blur(3px);
}
dialog .close {
  top: 14px;
  right: 14px;
}
dialog .actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.modal-msg {
  border-radius: 10px;
}
.discard-prompt {
  position: sticky;
  bottom: 0;
  border: 1px solid var(--warn);
  background: var(--warn-tint);
  color: var(--warn);
  padding: 18px;
  border-radius: 12px;
  margin-top: 14px;
  box-shadow: var(--shadow);
}
.discard-prompt p {
  font-size: 13px;
  margin-top: 6px;
}
.discard-prompt .actions {
  margin-top: 6px;
  border: 0;
  padding-top: 6px;
}
.auth-card {
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 40px;
}
.auth-card .brand {
  padding-left: 0;
  margin-bottom: 8px;
}
.auth-card h1 {
  font-size: 28px;
  letter-spacing: -0.035em;
}
.auth-card .primary {
  min-height: 48px;
}
:root[data-theme='dark'] .client-results,
:root[data-theme='dark'] .mobile-charge,
:root[data-theme='dark'] .pay-heading,
:root[data-theme='dark'] .pay-methods button,
:root[data-theme='dark'] .ticket-empty,
:root[data-theme='dark'] .pesada,
:root[data-theme='dark'] .week-card,
:root[data-theme='dark'] .cash-card {
  background: var(--surface);
  color: var(--ink);
}
:root[data-theme='dark'] .client-results button:hover,
:root[data-theme='dark'] .client-results button[aria-selected='true'],
:root[data-theme='dark'] .pay-methods button[aria-pressed='true'] {
  background: var(--primary-tint);
  color: var(--ink);
}
:root[data-density='compact'] .panel,
:root[data-density='compact'] .card {
  padding: 16px;
}
:root[data-density='compact'] td,
:root[data-density='compact'] th {
  padding: 9px 12px;
}
:root[data-density='compact'] .ledger-row {
  padding: 10px 0;
}
:root[data-density='compact'] .page-intro {
  margin-bottom: 16px;
}
:root[data-density='compact'] .page-intro h2 {
  font-size: 23px;
}
:root[data-density='compact'] .field {
  margin-bottom: 11px;
}
@media (min-width: 1450px) {
  #workspace {
    padding-left: 42px;
    padding-right: 42px;
  }
  .topbar {
    margin-left: -42px;
    margin-right: -42px;
    padding-left: 42px;
    padding-right: 42px;
  }
}
@media (max-width: 1190px) {
  .connection {
    display: none;
  }
  .topbar .date {
    display: none;
  }
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .capture-label {
    display: none;
  }
  .hero-row h2 {
    font-size: 28px;
  }
  .pos {
    grid-template-columns: minmax(0, 1fr) minmax(285px, 340px);
    gap: 14px;
  }
  .capture {
    padding: 18px;
  }
  .scale-read input {
    font-size: 60px;
  }
  .capture-actions {
    flex-wrap: wrap;
  }
  .metric {
    font-size: 27px;
  }
}
@media (max-width: 900px) {
  #app {
    grid-template-columns: minmax(0, 1fr);
  }
  #sidebar {
    width: 264px;
    padding-top: 24px;
  }
  #workspace {
    padding: 0 20px 36px;
  }
  .topbar {
    margin: 0 -20px 22px;
    padding: 12px 20px;
    min-height: 70px;
    gap: 10px;
  }
  .topbar-title {
    margin-right: auto;
  }
  #menu-button {
    display: inline-flex;
    order: 0;
  }
  #page-tools {
    margin-left: 0;
  }
  .topbar .date {
    display: none;
  }
  .pos {
    grid-template-columns: 1fr;
  }
  .ticket {
    position: static;
  }
  .capture {
    padding: 22px;
  }
  .hero-row {
    align-items: flex-start;
  }
  .hero-row h2 {
    font-size: 28px;
  }
  .page-intro h2 {
    font-size: 25px;
  }
  .page-intro {
    margin-bottom: 20px;
  }
  .hero-actions button span {
    display: none;
  }
  .attention .alerts {
    grid-template-columns: 1fr;
  }
  #nav {
    gap: 16px;
  }
  .session {
    margin-top: 22px;
  }
}
@media (max-width: 640px) {
  #workspace {
    padding: 0 14px 36px;
  }
  .topbar {
    margin: 0 -14px 20px;
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  #title {
    font-size: 15px;
  }
  .topbar-title small {
    font-size: 9px;
  }
  #page-tools {
    gap: 6px;
  }
  .topbar .tool {
    font-size: 11px;
    padding: 6px 8px;
  }
  .topbar .chip {
    padding: 6px 8px;
    font-size: 11px;
  }
  #page-tools .icon {
    width: 16px;
    height: 16px;
  }
  .topbar .tool span {
    display: none;
  }
  #page-tools button {
    min-height: 34px;
  }
  .hero-row {
    margin-top: 4px;
    gap: 10px;
  }
  .hero-row h2 {
    font-size: 25px;
  }
  .hero-row p:not(.eyebrow) {
    font-size: 12px;
  }
  .hero-actions {
    flex-shrink: 0;
  }
  .hero-actions .text-button {
    display: none;
  }
  .quick-grid {
    gap: 8px;
    margin-top: 16px;
  }
  .quick-card {
    padding: 12px 10px;
    gap: 8px;
  }
  .quick-card > .icon {
    padding: 7px;
    width: 16px;
    height: 16px;
  }
  .quick-card strong {
    font-size: 11px;
  }
  .quick-card small {
    font-size: 10px;
  }
  .kpis4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpis .card {
    padding: 16px;
  }
  .kpis .card > label {
    font-size: 10px;
    margin-bottom: 9px;
  }
  .kpis .card .metric {
    font-size: 23px;
  }
  .kpis .card .hint {
    font-size: 10px;
  }
  .panel,
  .card {
    padding: 18px;
  }
  .page-intro h2 {
    font-size: 23px;
  }
  .page-intro p:not(.eyebrow) {
    font-size: 12px;
  }
  .tabs {
    padding: 4px;
  }
  .tabs button {
    padding: 8px 12px;
    font-size: 11px;
  }
  .filter-row {
    padding: 12px;
  }
  .filter-row .field {
    flex-basis: 42%;
  }
  .filter-row input[type='date'],
  .filter-row select {
    min-width: 0;
  }
  .client-metrics {
    gap: 8px;
  }
  .client-metrics > div {
    padding: 12px;
  }
  .client-metrics strong {
    font-size: 19px;
  }
  .client-metrics label {
    font-size: 10px;
  }
  .record-bar {
    padding: 10px;
  }
  .record-bar > span {
    display: none;
  }
  .record-bar button {
    font-size: 11px;
    padding: 8px;
  }
  .capture {
    padding: 16px;
  }
  .scale-read input {
    font-size: 64px;
  }
  .capture-actions .hint {
    font-size: 10px;
  }
  .capture-actions button {
    font-size: 12px;
  }
  .ticket-total .total {
    font-size: 36px;
  }
  dialog {
    padding: 24px 18px;
    border-radius: 15px;
  }
  dialog h2 {
    font-size: 21px;
    padding-right: 25px;
  }
  .sheet {
    border-radius: 15px 0 0 15px;
  }
  .auth-card {
    padding: 28px;
  }
  .command-item {
    padding: 12px;
  }
  .command-item strong {
    font-size: 13px;
  }
  .command-search input {
    font-size: 14px;
  }
  .pos-step {
    font-size: 9px;
  }
  .capture-label {
    display: none;
  }
  .week-nav h2 {
    font-size: 15px;
  }
}
@media (max-width: 380px) {
  .quick-card > .icon {
    display: none;
  }
  .quick-card {
    min-height: 62px;
  }
  .topbar-title {
    max-width: 130px;
  }
  #page-tools {
    margin-left: auto;
  }
  .kpis .card .metric {
    font-size: 21px;
  }
  .client-metrics {
    grid-template-columns: 1fr;
  }
  .client-metrics > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .client-metrics label {
    margin: 0;
  }
  .scale-read input {
    font-size: 51px;
  }
  .hero-row h2 {
    font-size: 22px;
  }
  .hero-actions .primary {
    padding: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .topbar,
  #sidebar,
  #page-intro,
  .hero-actions,
  .quick-grid,
  .attention,
  .connection,
  .record-bar,
  .production-secondary,
  #offline-notice {
    display: none !important;
  }
  html {
    color-scheme: light;
  }
  :root {
    --ink: #111;
    --ink-2: #333;
    --muted: #555;
    --surface: #fff;
    --tint: #fff;
    --canvas: #fff;
    --line: #ddd;
    --primary: #125e62;
  }
  dialog {
    box-shadow: none;
    border: 0;
    background: white;
    color: #111;
  }
  dialog .receipt {
    color: #111;
  }
  .receipt * {
    color: #111;
  }
  #workspace {
    padding: 0;
  }
  .panel,
  .card {
    break-inside: avoid;
    box-shadow: none;
  }
  .page {
    max-width: none;
  }
}
/* Les indicateurs sont des cartes autonomes; les synthèses internes restent légères. */
.kpis {
  background: transparent;
  border: 0;
  overflow: visible;
}
.kpis > .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel .kpis {
  background: transparent;
}
.panel .kpis > * {
  background: var(--tint);
  border-radius: 10px;
}
.week-head > .kpis {
  background: transparent;
  padding: 16px 0;
  border-radius: 0;
}
.scale-read input::placeholder {
  color: #708f96;
}
.scale-read input:focus-visible {
  outline: none;
}
.scale:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent);
}
.ticket {
  padding: 0 0 14px;
}
.ticket > .charge-button {
  margin: 0 18px;
  width: calc(100% - 36px);
}
.ticket-secondary,
.ticket-extras {
  margin: 0 18px;
}
#sidebar #version {
  margin-bottom: 6px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.settings-layout > .panel:last-child {
  grid-column: 1/-1;
}
.settings-layout .grid2 {
  max-width: 980px;
}
@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-layout > .panel:last-child {
    grid-column: auto;
  }
}
#toast {
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--line-strong);
}
:root[data-theme='dark'] .water-card.ok {
  background: var(--primary-tint);
  color: var(--ink);
  border-color: var(--primary);
}
:root[data-theme='dark'] .water-card.warn {
  background: var(--warn-tint);
  color: var(--warn);
}
:root[data-theme='dark'] .water-card.danger {
  background: var(--danger-tint);
  color: var(--danger);
}
:root[data-theme='dark'] .counter-empty,
:root[data-theme='dark'] .counter-card,
:root[data-theme='dark'] .counter-bar,
:root[data-theme='dark'] .cash-hero {
  background: var(--tint);
  color: var(--ink);
}
:root[data-theme='dark'] .cash-hero strong {
  color: var(--primary);
}
:root[data-theme='dark'] .stock-item.negative {
  background: var(--danger-tint);
}
@media print {
  html[data-theme] {
    --ink: #111;
    --ink-2: #333;
    --muted: #555;
    --surface: white;
    --canvas: white;
    --tint: white;
    --line: #ddd;
    --line-strong: #aaa;
    --primary: #125e62;
    --primary-tint: white;
  }
}

/* 1.1.1: el punto fijo del cajero se leía blanco sobre blanco en el menú oscuro. */
#sidebar .point-label {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
