/* Emporio Ketrawe · Campo Vivo. Fuentes Inter y Fraunces (SIL OFL), servidas localmente. */
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-latin-700-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/fraunces-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/fraunces-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/fraunces-latin-400-italic.woff2) format("woff2");
}
[hidden] {
  display: none !important;
}
:root {
  --nav-w: 264px;
  --rail-w: 76px;
  /* Marca: café del logo, bosque y los cuatro elementos (Tue, Mawünko, Neyen, Kutral). */
  --brand: #432a19;
  --forest: #1d3326;
  --forest-2: #284636;
  --leaf: #8cbf3f;
  --water: #2aa7e0;
  --wind: #1f6f9b;
  --fire: #e8641c;
  --ink: #241c15;
  --muted: #7a7065;
  --line: #e8e1d6;
  --line-soft: #f1ece4;
  --paper: #f6f2eb;
  --surface: #ffffff;
  --cream: #f3ead8;
  --red: #b23a2e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px #2b1d1008, 0 2px 8px #2b1d1008;
  --shadow: 0 10px 34px #2b1d1014;
  --shadow-lg: 0 28px 80px #160d0636;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.1s;
}
button:hover {
  background: #faf7f2;
  border-color: #d9cfbf;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8cbf3f66;
  outline-offset: 2px;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}
h1 {
  font-size: 40px;
  line-height: 1.1;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
small {
  font-size: 12.5px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #4b4036;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid #ddd3c4;
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: 44px;
  font-weight: 400;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--forest-2);
  box-shadow: 0 0 0 4px #2846361f;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--forest);
}
textarea {
  min-height: 80px;
}
label.check {
  flex-direction: row;
  align-items: center;
  font-weight: 500;
}
.primary {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
  box-shadow: 0 4px 14px #1d332630;
}
.primary:hover {
  background: var(--forest-2);
  border-color: var(--forest-2);
}
.wide {
  width: 100%;
}
.danger {
  color: var(--red);
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #8b7c69;
}
.error {
  color: var(--red);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Ingreso ---------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.login-brand {
  position: relative;
  color: var(--cream);
  background:
    linear-gradient(160deg, #0f1d15e6 0%, #1d3326b3 45%, #1d332640 100%),
    url(img/cascada.jpg) center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 7vh 6vw;
  overflow: hidden;
}
.login-brand-inner {
  max-width: 560px;
}
.login-logo {
  width: 230px;
  max-width: 60%;
  display: block;
  margin-bottom: 9vh;
  filter: drop-shadow(0 4px 18px #0006);
}
.login-brand .eyebrow {
  color: #cfe0b9;
}
.login-brand h1 {
  font-size: clamp(46px, 5vw, 76px);
  margin: 18px 0 18px;
  color: #fffaf0;
}
.login-brand h1 em {
  font-style: italic;
  color: #c9e39c;
}
.login-brand p {
  font-size: 19px;
  line-height: 1.6;
  color: #e3dccd;
  margin-bottom: 48px;
}
.elements {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid #ffffff2e;
}
.elements span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #efe7d6;
}
.elements img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: #fffffff0;
  border-radius: 50%;
  padding: 4px;
}
.login-form {
  display: grid;
  place-items: center;
  background: var(--paper);
  padding: 40px;
}
.login-inner {
  width: 100%;
  max-width: 380px;
}
.login-logo-dark {
  width: 150px;
  display: block;
  margin-bottom: 34px;
}
.login-inner h2 {
  font-size: 34px;
  margin: 14px 0 10px;
}
.login-inner form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}
.login-inner form .primary {
  padding: 14px;
  font-size: 15px;
}
.login-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 40px;
  letter-spacing: 0.04em;
}

/* ---------- Estructura ---------- */
.sidebar {
  background: linear-gradient(180deg, #1d3326 0%, #172a1f 100%);
  color: #b9c8bc;
  width: var(--nav-w);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 2.6vh, 24px) 12px clamp(12px, 2vh, 18px);
  z-index: 40;
  overflow: hidden;
  transition:
    width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #120c0766;
  backdrop-filter: blur(3px);
}
body.menu-open {
  overflow: hidden;
}
.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 4px clamp(14px, 3.2vh, 30px) 10px;
}
.brand {
  display: block;
}
.brand img {
  width: clamp(130px, 22vh, 175px);
  display: block;
}
.sidebar-top .icon-button {
  color: #b9c8bc;
  font-size: 26px;
  line-height: 1;
  padding: 2px 8px;
}
.sidebar-top .icon-button:hover {
  color: #fff;
  background: #ffffff12;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  margin: 0 12px clamp(6px, 1.2vh, 12px);
  color: #7f978a;
}
/* La lista del menú tiene su propio scroll (barra oculta), independiente de la
   página; el logo y el usuario quedan fijos arriba y abajo. */
nav {
  display: grid;
  gap: clamp(1px, 0.4vh, 4px);
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 -4px;
  padding: 0 4px 6px;
}
nav::-webkit-scrollbar {
  display: none;
}
nav a {
  font-size: 14px;
  padding: clamp(3px, 0.6vh, 7px) 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d3ddd5;
  transition:
    background 0.15s,
    color 0.15s;
}
nav a:hover {
  background: #ffffff0f;
  color: #fff;
}
nav a.active {
  background: #f3ead8;
  color: var(--forest);
  font-weight: 600;
}
.nav-icon {
  width: clamp(26px, 3.4vh, 33px);
  height: clamp(26px, 3.4vh, 33px);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent);
}
nav a.active .nav-icon {
  background: var(--tone);
  color: #fff;
}
.nav-icon svg {
  width: 18px;
  height: 18px;
}
.sidebar-bottom {
  flex-shrink: 0;
}
/* Pantallas bajas: el menú se compacta para no necesitar scroll. */
@media (max-height: 760px) {
  .nav-label {
    display: none;
  }
  .brand img {
    width: 118px;
  }
  .sidebar-top {
    margin-bottom: 12px;
  }
  nav a {
    font-size: 13.5px;
  }
  .sidebar-bottom {
    padding-top: 10px;
  }
}
@media (max-height: 560px) {
  nav {
    grid-template-columns: 1fr 1fr;
  }
  nav a {
    font-size: 12.5px;
    gap: 8px;
  }
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px 6px 0;
  border-top: 1px solid #ffffff17;
  font-size: 13px;
  color: #eef2ec;
}
.sidebar-bottom small {
  display: block;
  color: #93a99a;
  margin-top: 3px;
  font-size: 12px;
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--leaf);
  color: var(--forest);
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar .icon-button {
  color: #b9c8bc;
  margin-left: auto;
}
.sidebar .icon-button:hover {
  color: #fff;
  background: #ffffff12;
}
.workspace {
  margin-left: var(--nav-w);
  transition: margin-left 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 70px;
  background: #fffdf9cc;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
}
.slash {
  padding: 0 12px;
  color: #cbbfae;
}
.topbar strong {
  font-size: 13px;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}
#menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  color: var(--forest);
  background: var(--surface);
  border: 1px solid var(--line);
}
#menu-toggle:hover {
  background: #faf7f2;
}
.topbar {
  justify-content: flex-start;
}
.topbar-end {
  margin-left: auto;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #e9f3dc;
  color: #3d6517;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.orange {
  color: #a24611;
  background: #fde8db;
}
.pill.red {
  color: var(--red);
  background: #fbe9e6;
}
main {
  padding: 34px 36px 48px;
  flex: 1;
  width: 100%;
}
footer {
  padding: 18px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Componentes ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head h1 {
  margin: 8px 0 6px;
  font-size: 36px;
}
.page-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 210px;
  padding: 34px 38px;
  margin-bottom: 26px;
  color: #fffaf0;
  background:
    linear-gradient(100deg, #10201799 0%, #1d332670 50%, #1d332610 100%),
    url(img/campo.jpg) center 60% / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}
.hero .eyebrow {
  color: #d6eab4;
}
.hero h1 {
  color: #fffaf0;
  margin: 10px 0 8px;
  font-size: 38px;
}
.hero p {
  margin: 0;
  color: #ece5d7;
  max-width: 520px;
}
.hero .actions {
  margin-top: 20px;
}
.hero .actions button {
  background: #fffaf0;
  border-color: #fffaf0;
}
.hero .actions button.primary {
  background: var(--leaf);
  border-color: var(--leaf);
  color: var(--forest);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--leaf);
}
.metric:nth-child(2)::before {
  background: var(--water);
}
.metric:nth-child(3)::before {
  background: var(--fire);
}
.metric:nth-child(4)::before {
  background: var(--wind);
}
.metric .metric-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.metric .value {
  font: 600 29px var(--serif);
  margin: 12px 0 6px;
  color: var(--forest);
  letter-spacing: -0.02em;
}
.metric .detail {
  font-size: 12px;
  color: var(--muted);
}
.metric.accent {
  background: var(--forest);
  border-color: var(--forest);
}
.metric.accent .value {
  color: #fffaf0;
}
.metric.accent .metric-label,
.metric.accent .detail {
  color: #b9cdbc;
}
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 22px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-head h3 {
  margin: 0;
}
.panel-body {
  padding: 22px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #fbf8f3;
  padding: 11px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b7c69;
  font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}
td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
tbody tr:hover td {
  background: #fcfaf6;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
td .actions button {
  padding: 6px 11px;
  font-size: 12px;
}
td.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.center-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.center-row:last-child {
  border: 0;
}
.center-row:has(.bar) {
  grid-template-columns: 1fr 130px;
}
.bar {
  height: 6px;
  background: #efe9df;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}
.bar span {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--leaf), #5f9a2a);
  border-radius: 999px;
}
.center-bar {
  width: 100%;
  height: 6px;
  display: block;
  margin-top: 10px;
  border: 0;
}
meter::-webkit-meter-bar {
  background: #efe9df;
  border: 0;
  border-radius: 999px;
}
meter::-webkit-meter-optimum-value {
  background: var(--leaf);
  border-radius: 999px;
}
.alert-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.alert-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.empty {
  padding: 34px 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 340px;
}
.toolbar select {
  max-width: 240px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tabs button {
  font-size: 13px;
  padding: 8px 15px;
  font-weight: 500;
  border-radius: 999px;
}
.tabs button.selected {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}
.icon-button {
  padding: 6px 10px;
  font-size: 19px;
  background: transparent;
  border: 0;
  font-weight: 400;
  box-shadow: none;
}
dialog {
  border: 0;
  border-radius: 18px;
  width: min(640px, 94vw);
  padding: 0;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #120c0766;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 20px 26px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.dialog-head h2 {
  margin: 0;
  font-size: 24px;
}
#modal-body {
  padding: 24px 26px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--forest);
  color: #fff;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  font-size: 14px;
  border-left: 4px solid var(--leaf);
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.resource {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--water);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.resource h3 {
  font: 400 20px var(--serif);
  margin-bottom: 12px;
}
.resource p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
  min-height: 44px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.day {
  padding: 10px;
  min-height: 124px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  background: var(--surface);
}
.day.today {
  background: #f3f8ea;
  font-weight: 700;
  color: var(--forest);
}
.day-head {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  background: #fbf8f3;
  padding: 11px;
  border-right: 1px solid var(--line-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.day.other {
  opacity: 0.4;
}
.event {
  margin-top: 6px;
  background: #e3f3fb;
  color: #0f5878;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 7px;
  border-radius: 7px;
  white-space: normal;
  line-height: 1.35;
  text-align: left;
  width: 100%;
  border: 0;
  border-left: 3px solid var(--water);
}
.center-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.center-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.center-card .center-index {
  font: 400 30px var(--serif);
  color: var(--leaf);
}
.center-card h2 {
  margin: 16px 0 6px;
}
.center-card .center-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
  margin-top: 20px;
  font-size: 14px;
}
.spaced-panel {
  margin-top: 22px;
}
.pos-grid > section,
.pos-grid > aside,
.grid-two > div {
  min-width: 0;
}

/* Colores por centro de costo: los cuatro elementos de Ketrawe. */
.tone-0 {
  --tone: var(--leaf);
  --tone-soft: #eef6e2;
}
.tone-1 {
  --tone: var(--water);
  --tone-soft: #e3f3fb;
}
.tone-2 {
  --tone: var(--wind);
  --tone-soft: #e2eef5;
}
.tone-3 {
  --tone: var(--fire);
  --tone-soft: #fdeadf;
}

/* ---------- Caja / POS ---------- */
.pos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.product-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 16px 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 400;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--tone, var(--leaf));
}
.product-card:hover {
  border-color: #cfc3b1;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product-card:active {
  transform: scale(0.98);
}
.product-card .category {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone, var(--muted));
  font-weight: 700;
}
.product-card strong {
  font-size: 15px;
  line-height: 1.3;
  display: block;
  margin: 12px 0;
  font-weight: 600;
}
.product-card .card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--forest);
  gap: 6px;
}
.product-card .stock {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  background: var(--paper);
  padding: 3px 8px;
  border-radius: 999px;
}
.cart-panel {
  position: sticky;
  top: 90px;
  align-self: start;
  display: flex;
  flex-direction: column;
}
.cart-panel .panel-head {
  background: var(--forest);
  color: #fff;
  border: 0;
}
.cart-panel .panel-head .pill {
  background: #ffffff1f;
  color: #e6efe2;
}
.cart-items {
  max-height: 360px;
  overflow: auto;
  padding: 0 20px;
}
.cart-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.cart-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  gap: 12px;
}
.cart-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}
.qty-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}
.qty-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  font-weight: 500;
  font-size: 17px;
  border-radius: 50%;
}
.qty-controls input {
  width: 74px;
  min-height: 34px;
  padding: 4px;
  text-align: center;
}
.qty-controls .remove {
  margin-left: auto;
  border: 0;
  width: auto;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--red);
  background: transparent;
}
.cart-summary {
  padding: 18px 20px 20px;
  background: #fcfaf6;
  border-top: 1px solid var(--line-soft);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin: 10px 0;
  align-items: center;
  gap: 20px;
}
.summary-line input {
  width: 110px;
  padding: 7px 10px;
  min-height: 36px;
  text-align: right;
}
.summary-line.total {
  font: 600 26px var(--serif);
  border-top: 1px dashed #d9cfbf;
  padding-top: 16px;
  margin-top: 16px;
  color: var(--forest);
}
.summary-line.total span:first-child {
  font: 600 14px var(--sans);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 18px 0 12px;
}
.payment-methods button {
  font-size: 13px;
  padding: 11px 4px;
}
.payment-methods button.selected {
  border-color: var(--forest);
  background: #e9f3dc;
  color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}
.cart-summary .primary.wide {
  padding: 16px;
  font-size: 16px;
  margin-bottom: 8px;
  background: var(--fire);
  border-color: var(--fire);
  box-shadow: 0 8px 22px #e8641c40;
}
.cart-summary .primary.wide:hover {
  background: #cf5512;
}

/* Modo caja: el POS ocupa toda la pantalla, sin menú lateral. */
body.pos-mode .sidebar,
body.pos-mode .topbar,
body.pos-mode footer {
  display: none;
}
body.pos-mode .workspace {
  margin-left: 0;
}
body.pos-mode main {
  padding: 0;
  max-width: none;
  height: 100vh;
  overflow: hidden;
}
.pos-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  background: var(--paper);
}
.pos-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  background: var(--forest);
  color: #e8efe6;
}
.pos-bar img {
  height: 38px;
}
.pos-bar .pos-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  padding-left: 16px;
  border-left: 1px solid #ffffff26;
}
.pos-bar .pos-title strong {
  font: 400 19px var(--serif);
  color: #fffaf0;
}
.pos-bar .pos-title small {
  color: #a9bead;
  font-size: 11.5px;
}
.pos-bar .pos-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pos-bar .pos-clock {
  font: 600 18px var(--sans);
  font-variant-numeric: tabular-nums;
  color: #fffaf0;
  padding: 0 6px;
}
.pos-bar button {
  background: #ffffff14;
  border-color: #ffffff26;
  color: #f3f6f1;
  padding: 8px 13px;
  font-size: 13px;
}
.pos-bar button:hover {
  background: #ffffff26;
  border-color: #ffffff40;
}
.pos-bar button.primary {
  background: var(--leaf);
  border-color: var(--leaf);
  color: var(--forest);
  box-shadow: none;
}
.pos-bar .pill {
  background: #ffffff1a;
  color: #dff0c8;
}
.pos-bar .pill.orange {
  background: #e8641c33;
  color: #ffd2b8;
}
.pos-screen .pos-grid {
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 0;
  min-height: 0;
}
.pos-catalog {
  padding: 18px 22px;
  overflow: auto;
  min-height: 0;
}
.pos-catalog .toolbar {
  position: sticky;
  top: -18px;
  z-index: 2;
  background: var(--paper);
  padding: 4px 0 12px;
  margin: 0;
}
.pos-catalog .toolbar input {
  max-width: none;
  flex: 1;
  min-height: 50px;
  font-size: 16px;
  padding-left: 16px;
}
.pos-catalog .tabs {
  margin-bottom: 16px;
}
.pos-screen .cart-panel {
  position: static;
  height: 100%;
  border-radius: 0;
  border-width: 0 0 0 1px;
  margin: 0;
  min-height: 0;
  box-shadow: -8px 0 30px #2b1d100d;
}
.pos-screen .cart-items {
  flex: 1;
  max-height: none;
  min-height: 0;
}
.pos-screen .product-card {
  min-height: 132px;
}

/* ---------- Ticket 80 mm (estilo restaurante, solo negro) ---------- */
.ticket-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.ticket-preview .ticket {
  box-shadow: 0 10px 30px #2b1d1026;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.ticket {
  width: 72mm;
  padding: 5mm 4mm 6mm;
  background: #fff;
  color: #000;
  font: 500 11px/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
}
.ticket p {
  margin: 0;
}
.t-head {
  text-align: center;
}
.t-head img {
  display: block;
  width: 40mm;
  margin: 0 auto 2.5mm;
}
.t-name {
  font: 600 20px/1.1 var(--serif);
  letter-spacing: 0.01em;
}
.t-tag {
  margin-top: 1.2mm !important;
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
}
.t-small {
  font-size: 9.5px;
}
.t-ornament {
  display: flex;
  align-items: center;
  gap: 2mm;
  margin: 3.5mm 0 3mm;
  font-size: 9px;
}
.t-ornament::before,
.t-ornament::after {
  content: "";
  flex: 1;
  border-top: 1px solid #000;
}
.t-meta {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 2mm;
  text-align: center;
}
.t-meta-2 {
  grid-template-columns: 1fr 1fr;
  margin-top: 2mm;
  padding-bottom: 3mm;
  border-bottom: 1px solid #000;
}
.t-meta small {
  display: block;
  font-size: 7.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.t-meta b {
  font-size: 11px;
  font-weight: 700;
}
.t-items {
  margin-top: 3mm;
}
.t-items-head,
.t-item {
  display: grid;
  grid-template-columns: 7mm 1fr auto;
  gap: 2mm;
  align-items: start;
}
.t-items-head {
  font-size: 7.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 1.5mm;
  border-bottom: 1px dotted #000;
  margin-bottom: 2mm;
}
.t-items-head span:last-child,
.t-amt {
  text-align: right;
}
.t-item {
  margin-bottom: 2.2mm;
}
.t-qty {
  font-weight: 700;
  font-size: 12px;
}
.t-desc {
  font-weight: 600;
  font-size: 11.5px;
  line-height: 1.25;
}
.t-desc small {
  display: block;
  font-weight: 400;
  font-size: 9px;
  margin-top: 0.4mm;
}
.t-amt {
  font-weight: 600;
  white-space: nowrap;
}
.t-row {
  display: flex;
  justify-content: space-between;
  gap: 2mm;
}
.t-sums {
  border-top: 1px dotted #000;
  padding-top: 2mm;
  font-size: 10.5px;
  display: grid;
  gap: 0.6mm;
}
.t-count {
  font-size: 9px;
}
.t-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 2.5mm 0 0;
  padding: 2.5mm 0;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}
.t-total span:first-child {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
}
.t-total span:last-child {
  font: 600 22px/1 var(--serif);
}
.t-pay {
  margin-top: 2mm;
  font-size: 10.5px;
  display: grid;
  gap: 0.6mm;
}
.t-strong {
  font-weight: 700;
}
.t-status {
  margin: 3mm 0 0 !important;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1.5px solid #000;
  padding: 1.5mm;
}
.t-thanks {
  text-align: center;
  margin: 4.5mm 0 3mm;
}
.t-script {
  font: italic 400 17px/1.2 var(--serif);
  margin-bottom: 1mm !important;
}
.t-review {
  display: grid;
  grid-template-columns: 24mm 1fr;
  gap: 3mm;
  align-items: center;
  border: 1px solid #000;
  border-radius: 3mm;
  padding: 2.5mm;
}
.t-review img {
  width: 24mm;
  height: 24mm;
  display: block;
  image-rendering: pixelated;
}
.t-review b {
  display: block;
  font: 600 13px/1.2 var(--serif);
}
.t-stars {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin: 0.8mm 0;
}
.t-review small {
  display: block;
  font-size: 8.5px;
  line-height: 1.35;
}
.t-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6mm 2mm;
  margin-top: 3.5mm;
  font-size: 8.5px;
  font-weight: 600;
}
.t-social span {
  display: flex;
  align-items: center;
  gap: 1.2mm;
  min-width: 0;
  white-space: nowrap;
}
.t-social svg {
  width: 3.4mm;
  height: 3.4mm;
  flex-shrink: 0;
}
.t-legal {
  margin-top: 3.5mm !important;
  padding-top: 2mm;
  border-top: 1px dotted #000;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.06em;
}
#print-area {
  display: none;
}

/* ---------- Adaptación ---------- */
@media (min-width: 1700px) {
  main {
    max-width: 1600px;
    margin: 0 auto;
  }
}
@media (max-width: 1200px) {
  main {
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .pos-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .pos-screen .pos-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics {
    gap: 12px;
  }
  .metric .value {
    font-size: 25px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .topbar {
    height: 62px;
  }
  .topbar-end #today,
  .breadcrumb {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .center-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand {
    min-height: 320px;
    padding: 40px 32px;
  }
  .login-logo {
    margin-bottom: 30px;
    width: 170px;
  }
  .calendar {
    overflow: auto;
  }
  .day {
    padding: 7px;
    min-height: 96px;
  }
  .pos-screen {
    height: auto;
    min-height: 100vh;
  }
  body.pos-mode main {
    height: auto;
    overflow: visible;
  }
  .pos-screen .pos-grid {
    grid-template-columns: 1fr;
  }
  .pos-screen .cart-panel {
    border-width: 1px 0 0;
  }
  .pos-bar {
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 5;
  }
}
@media (max-width: 650px) {
  main {
    padding: 20px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-head h1,
  .hero h1 {
    font-size: 29px;
  }
  .hero {
    padding: 24px 20px;
    min-height: 190px;
  }
  .pos-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cart-panel {
    position: static;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-card {
    padding: 14px 12px 12px;
  }
  .product-card .card-bottom {
    font-size: 14px;
    flex-wrap: wrap;
  }
  .resource-grid,
  .center-cards {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: 1;
  }
  .login-brand {
    min-height: 260px;
    padding: 28px 22px;
  }
  .login-brand p,
  .elements {
    display: none;
  }
  .login-brand h1 {
    font-size: 40px;
    margin-bottom: 0;
  }
  .login-form {
    padding: 34px 20px;
  }
  .login-logo-dark {
    display: none;
  }
  .calendar {
    min-width: 700px;
  }
  .panel-calendar {
    overflow: auto;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px 14px;
  }
  .metric .value {
    font-size: 22px;
  }
  .panel-head {
    padding: 16px;
  }
  .topbar > div {
    min-width: 0;
  }
  footer {
    padding: 16px;
    flex-direction: column;
    gap: 4px;
  }
  #toast {
    bottom: 14px;
    left: 14px;
    right: 14px;
    max-width: none;
  }
  .pos-bar {
    padding: 10px 14px;
    gap: 10px;
  }
  .pos-bar .pos-title {
    display: none;
  }
  .pos-bar .desktop-only {
    display: none;
  }
  .pos-catalog {
    padding: 14px;
  }
  .ticket-preview .ticket {
    max-width: 100%;
  }
}

/* ---------- Menú: expandido o barra de íconos (empuja el contenido) ---------- */
.brand-mark {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3ead8;
  color: var(--forest);
  font: 600 26px/44px var(--serif);
  text-align: center;
}
.sidebar-top #menu-close {
  display: none;
}
.sidebar-user {
  min-width: 0;
}
.sidebar-user strong,
.sidebar-user small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-text {
  white-space: nowrap;
  overflow: hidden;
}
body.nav-collapsed .sidebar {
  width: var(--rail-w);
}
body.nav-collapsed .workspace {
  margin-left: var(--rail-w);
}
body.nav-collapsed .brand-full,
body.nav-collapsed .nav-label,
body.nav-collapsed .nav-text,
body.nav-collapsed .sidebar-user,
body.nav-collapsed .sidebar-bottom #logout {
  display: none;
}
body.nav-collapsed .brand-mark {
  display: block;
}
body.nav-collapsed .sidebar-top {
  margin: 0 0 clamp(14px, 3vh, 26px);
  justify-content: center;
}
body.nav-collapsed nav a {
  justify-content: center;
  padding-inline: 0;
}
body.nav-collapsed nav a.active {
  background: #ffffff14;
}
body.nav-collapsed .nav-icon {
  width: clamp(34px, 4.6vh, 42px);
  height: clamp(34px, 4.6vh, 42px);
}
body.nav-collapsed .sidebar-bottom {
  justify-content: center;
  padding-inline: 0;
}
body.pos-mode .workspace,
body.pos-mode.nav-collapsed .workspace {
  margin-left: 0;
}
@media (max-width: 700px) {
  .sidebar,
  body.nav-collapsed .sidebar {
    width: min(290px, 86vw);
    transform: translateX(-100%);
    visibility: hidden;
  }
  .sidebar.open,
  body.nav-collapsed .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: var(--shadow-lg);
  }
  .workspace,
  body.nav-collapsed .workspace {
    margin-left: 0;
  }
  .sidebar-top #menu-close {
    display: block;
  }
  body.nav-collapsed .brand-full,
  body.nav-collapsed .nav-label,
  body.nav-collapsed .sidebar-user,
  body.nav-collapsed .sidebar-bottom #logout {
    display: block;
  }
  body.nav-collapsed .nav-text {
    display: inline;
  }
  body.nav-collapsed .brand-mark {
    display: none;
  }
  body.nav-collapsed .sidebar-top {
    justify-content: space-between;
    margin: 0 4px 20px 10px;
  }
  body.nav-collapsed nav a {
    justify-content: flex-start;
    padding-inline: 10px;
  }
  body.nav-collapsed nav a.active {
    background: #f3ead8;
  }
  body.nav-collapsed .nav-icon {
    width: 30px;
    height: 30px;
  }
  body.nav-collapsed .sidebar-bottom {
    justify-content: flex-start;
  }
}

/* ---------- Barra superior ---------- */
.topbar {
  height: 66px;
  padding: 0 28px;
  gap: 14px;
}
.crumbs {
  white-space: nowrap;
}
#menu-toggle svg {
  width: 22px;
  height: 22px;
}
.global-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 440px;
  margin-left: 18px;
  display: flex;
  align-items: center;
}
.global-search > svg {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.global-search input {
  padding-left: 40px;
  padding-right: 64px;
  min-height: 42px;
  border-radius: 12px;
  background: var(--paper);
  border-color: transparent;
}
.global-search input:focus {
  background: var(--surface);
}
.global-search kbd,
.pos-keys kbd {
  font: 600 11px var(--sans);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}
.global-search kbd {
  position: absolute;
  right: 10px;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
  max-height: 60vh;
  overflow: auto;
}
.search-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  text-align: left;
  font-weight: 600;
  padding: 8px 10px;
}
.search-results button small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}
.search-results .nav-icon,
.quick-card .nav-icon {
  width: 34px;
  height: 34px;
}
.topbar-end {
  gap: 10px;
}
.cash-chip {
  border-radius: 999px;
  padding: 7px 13px 7px 11px;
  font-size: 12.5px;
  background: #fde8db;
  color: #a24611;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.cash-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.cash-chip.open {
  background: #e9f3dc;
  color: #3d6517;
}
.cash-chip.open::before {
  box-shadow: 0 0 0 4px #8cbf3f40;
}
.top-icon {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--forest);
}
.top-icon:hover {
  background: var(--paper);
}
.top-icon svg {
  width: 21px;
  height: 21px;
}
.badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 16px;
  height: 18px;
  border-radius: 999px;
  background: var(--fire);
  color: #fff;
  font: 700 10.5px/18px var(--sans);
  padding: 0 5px;
  border: 2px solid var(--surface);
  box-sizing: content-box;
}
.pos-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fire);
  border-color: var(--fire);
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 6px 18px #e8641c40;
  white-space: nowrap;
}
.pos-cta:hover {
  background: #cf5512;
  border-color: #cf5512;
}
.pos-cta svg {
  width: 19px;
  height: 19px;
}
.top-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
  line-height: 1.2;
}
.top-user strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
.top-user small {
  color: var(--muted);
  font-size: 11.5px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  text-align: left;
  border-radius: 14px;
}
.quick-card:hover {
  border-color: var(--tone);
  background: var(--tone-soft);
}
.alert-list .alert-row small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fire);
  font-weight: 700;
  margin: 0 0 3px;
}
@media (max-width: 1600px) {
  #today {
    display: none;
  }
}
@media (max-width: 1500px) {
  body:not(.nav-collapsed) .crumbs {
    display: none;
  }
  body:not(.nav-collapsed) .global-search {
    margin-left: 0;
  }
}
@media (max-width: 1280px) {
  .top-user div {
    display: none;
  }
}
@media (max-width: 1100px) {
  .crumbs {
    display: none;
  }
  .global-search {
    margin-left: 0;
  }
}
@media (max-width: 900px) {
  .global-search kbd,
  .pos-cta span {
    display: none;
  }
  .pos-cta {
    padding: 10px 12px;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .global-search,
  .top-user {
    display: none;
  }
}

/* ---------- Tablas: buscador, filtros, orden y paginador ---------- */
.table-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fdfbf8;
}
.table-tools .table-find {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  min-height: 38px;
  padding: 7px 12px;
}
.table-tools select {
  width: auto;
  min-height: 38px;
  padding: 6px 10px;
  font-size: 13px;
}
.table-tools .page-size {
  margin-left: auto;
}
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover {
  color: var(--forest);
}
th.sortable::after {
  content: "↕";
  margin-left: 6px;
  opacity: 0.35;
  font-size: 11px;
}
th.sortable.asc::after {
  content: "↑";
  opacity: 1;
  color: var(--forest);
}
th.sortable.desc::after {
  content: "↓";
  opacity: 1;
  color: var(--forest);
}
.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.table-pager:not(:empty) {
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
}
.table-pager .pages {
  display: flex;
  gap: 4px;
  align-items: center;
}
.table-pager button {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
  border-radius: 9px;
}
.table-pager button.current {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.table-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
#modal-body .table-tools {
  padding: 0 0 12px;
  background: none;
  border: 0;
}
#modal-body .table-pager:not(:empty) {
  padding: 12px 0 0;
}

/* ---------- Caja estilo supermercado ---------- */
.pos-screen .pos-grid {
  grid-template-columns: minmax(0, 1fr) 440px;
}
.pos-search {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  align-items: center;
  background: var(--paper);
  padding: 4px 0 12px;
}
.pos-search > svg {
  position: absolute;
  left: 18px;
  width: 22px;
  height: 22px;
  color: var(--muted);
}
.pos-search input {
  min-height: 56px;
  font-size: 17px;
  padding: 0 250px 0 52px;
  border-radius: 14px;
  border: 2px solid var(--line);
}
.pos-search input:focus {
  border-color: var(--forest-2);
}
.pos-keys {
  position: absolute;
  right: 16px;
  font-size: 12px;
  color: var(--muted);
}
.pos-cart {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px #2b1d100f;
}
.pos-display {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 22px;
  background: #0f1d15;
  color: #fff;
}
.pos-display small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #9fd16a;
  font-weight: 700;
}
.pos-display strong {
  display: block;
  font: 700 44px/1.05 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #c9f08f;
  margin-top: 4px;
}
.pos-count {
  text-align: right;
  font-size: 12.5px;
  color: #b9cdbc;
  line-height: 1.6;
}
.pos-count b {
  color: #fff;
  font-size: 15px;
}
.lines-head,
.line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 84px 30px;
  gap: 8px;
  align-items: center;
}
.lines-head {
  padding: 9px 16px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
  background: #fbf8f3;
}
.lines-head span:nth-child(2) {
  text-align: center;
}
.lines-head span:nth-child(3) {
  text-align: right;
}
.pos-cart .cart-items {
  overflow: auto;
  padding: 0;
  max-height: none;
  min-height: 0;
}
.line {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.line:nth-child(even) {
  background: #fdfbf8;
}
.line.fresh {
  background: #eef6e2;
  box-shadow: inset 4px 0 var(--leaf);
}
.line-name strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line-name small {
  color: var(--muted);
  font-size: 11.5px;
}
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.stepper button {
  width: 32px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 17px;
  font-weight: 500;
}
.stepper input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.stepper input:focus {
  box-shadow: none;
}
.line-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
}
.line-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #b8a99a;
  font-size: 18px;
  background: transparent;
}
.line-remove:hover {
  color: var(--red);
  background: #fbe9e6;
}
.cart-empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 50px 20px;
  font-size: 14px;
}
.cart-empty svg {
  width: 54px;
  height: 54px;
  color: #d9cfbf;
  margin-bottom: 10px;
}
.pos-foot {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  background: #fcfaf6;
}
.pos-sums .summary-line {
  margin: 4px 0;
}
.pos-foot .payment-methods {
  margin: 12px 0 10px;
}
.pos-foot .payment-methods button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px;
  font-size: 12.5px;
}
.pos-foot .payment-methods svg {
  width: 20px;
  height: 20px;
}
.pos-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.pos-secondary button {
  padding: 9px;
  font-size: 13px;
}
.pay-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: var(--fire);
  border-color: var(--fire);
  border-radius: 14px;
  box-shadow: 0 10px 26px #e8641c45;
}
.pay-button:hover {
  background: #cf5512;
  border-color: #cf5512;
}
.pos-foot .note {
  margin: 8px 0 0;
  text-align: center;
}
@media (max-width: 1200px) {
  .pos-screen .pos-grid {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
  .pos-keys {
    display: none;
  }
  .pos-search input {
    padding-right: 16px;
  }
}
@media (max-width: 900px) {
  .pos-screen .pos-grid {
    grid-template-columns: 1fr;
  }
  .pos-cart {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .pos-cart .cart-items {
    max-height: 50vh;
  }
}

/* ---------- Caja: panel de venta compacto (más espacio para la lista) ---------- */
.pos-cart {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--forest);
  color: #fff;
}
.cart-head strong {
  display: block;
  font-size: 15px;
}
.cart-head small {
  color: #b9cdbc;
  font-size: 12px;
}
.link-danger {
  background: transparent;
  border-color: #ffffff33;
  color: #ffd2b8;
  padding: 6px 12px;
  font-size: 12.5px;
}
.link-danger:hover {
  background: #ffffff14;
  border-color: #ffffff55;
}
.line {
  padding: 8px 14px;
  gap: 8px;
}
.stepper button {
  width: 28px;
  height: 30px;
}
.stepper input {
  min-height: 30px;
}
.pos-foot {
  padding: 10px 14px 12px;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
.foot-row b {
  color: var(--ink);
  margin-left: 4px;
}
.discount-field {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.discount-field input {
  width: 96px;
  min-height: 32px;
  padding: 4px 8px;
  text-align: right;
}
.pos-foot .payment-methods {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 8px;
}
.pos-foot .payment-methods button {
  flex-direction: row;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  font-size: 12px;
  min-height: 36px;
}
.pos-foot .payment-methods svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pos-foot .payment-methods .mixed {
  color: var(--muted);
}
.pay-button {
  padding: 13px 18px;
  font-size: 18px;
}
.pos-foot .note {
  margin: 6px 0 0;
}
/* Tarjetas del catálogo más compactas */
.pos-screen .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.pos-screen .product-card {
  min-height: 104px;
  padding: 12px 12px 10px;
  border-radius: 12px;
}
.pos-screen .product-card strong {
  font-size: 14px;
  margin: 6px 0 8px;
}
.pos-screen .product-card .card-bottom {
  font-size: 14.5px;
}
.pos-screen .product-card .stock {
  font-size: 11px;
  padding: 2px 7px;
}
.pos-search input {
  min-height: 48px;
  font-size: 16px;
}
.pos-catalog .tabs {
  margin-bottom: 12px;
}
.pos-catalog .tabs button {
  padding: 6px 13px;
}

/* ---------- Fotos de productos ---------- */
.thumb,
.line-thumb,
.mini-img,
.card-img,
.photo-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--paper);
}
.thumb img,
.line-thumb img,
.mini-img img,
.card-img img,
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.placeholder {
  color: var(--tone);
  background:
    radial-gradient(circle at 30% 25%, #ffffffb0, transparent 60%),
    var(--tone-soft);
}
.placeholder svg {
  width: 42%;
  height: 42%;
  opacity: 0.85;
}
.thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}
.cell-product {
  display: flex;
  align-items: center;
  gap: 12px;
}
.line-thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}
.line-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.line-name > div {
  min-width: 0;
}
.pos-screen .product-card {
  padding: 0 0 10px;
  min-height: 0;
  justify-content: flex-start;
}
.pos-screen .product-card > :not(.card-img) {
  margin-inline: 12px;
}
.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}
.card-img img {
  transition: transform 0.3s;
}
.product-card:hover .card-img img {
  transform: scale(1.05);
}
.pos-screen .product-card strong {
  margin: 3px 12px 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.pos-screen .product-card .card-bottom {
  margin-top: auto;
}
.product-card::before {
  z-index: 1;
}
.photo-field {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px dashed #d9cfbf;
  border-radius: 14px;
  background: #fdfbf8;
}
.photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 14px;
}
.photo-field > div {
  flex: 1;
  display: grid;
  gap: 8px;
}
.photo-field input[type="file"] {
  padding: 8px;
  min-height: 0;
  font-size: 13px;
}
.photo-field .note {
  margin: 0;
}

/* ---------- Google Calendar ---------- */
.google-status {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--fire);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.google-status.on {
  border-left-color: var(--leaf);
}
.google-status .nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.google-status .nav-icon svg {
  width: 24px;
  height: 24px;
}
.google-status > div:nth-child(2) {
  flex: 1;
}
.google-status strong {
  font-size: 16px;
}
.google-status p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.steps {
  margin: 0 0 18px;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
}
.copy-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.copy-field code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
}
.copy-field button {
  padding: 7px 12px;
  font-size: 12.5px;
}
.google-embed iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
}
.google-embed .panel-head {
  flex-wrap: wrap;
}
footer .credit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
footer .credit svg {
  width: 16px;
  height: 16px;
  color: var(--forest);
}
footer a {
  color: var(--forest);
  font-weight: 600;
}
footer a:hover {
  text-decoration: underline;
}
@media (max-width: 700px) {
  .google-status {
    flex-direction: column;
    align-items: flex-start;
  }
  .google-embed iframe {
    height: 480px;
  }
}

/* ---------- Pedidos (garzón), barra y cocina ---------- */
button.small {
  padding: 6px 11px;
  font-size: 12.5px;
}
button.ghost {
  background: transparent;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--paper);
  color: var(--muted);
}
.chip-wait {
  background: #fdeadf;
  color: #a24611;
}
.chip-ready {
  background: #e9f3dc;
  color: #3d6517;
}
.chip-cash {
  background: #e2eef5;
  color: #1f5f86;
}
.chip.big {
  padding: 10px 16px;
  font-size: 14px;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.status-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.st-pendiente {
  background: #fdeadf;
  color: #a24611;
}
.st-preparando {
  background: #fff4d6;
  color: #8a6100;
}
.st-listo {
  background: #e9f3dc;
  color: #3d6517;
}
.st-entregado {
  background: var(--paper);
  color: var(--muted);
}
.orders-screen {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 0;
}
.orders-list {
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.orders-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.order-card {
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 400;
}
.order-card.selected {
  border-color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
  background: #f3f8ea;
}
.order-card.por_cobrar {
  opacity: 0.75;
}
.order-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.order-card small {
  color: var(--muted);
}
.order-detail {
  overflow: auto;
  padding: 18px 22px 30px;
  min-height: 0;
}
.big-empty {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 16px;
}
.order-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.order-head h2 {
  margin: 4px 0 2px;
}
.order-head small {
  color: var(--muted);
}
.order-head > div:first-child {
  flex: 1;
}
.order-total {
  text-align: right;
}
.order-total small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.order-total strong {
  font: 600 26px var(--serif);
  color: var(--forest);
}
.order-head .pay-button {
  width: auto;
  font-size: 15px;
  padding: 12px 18px;
}
.order-items {
  display: grid;
  gap: 6px;
}
.oi {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.oi-qty {
  font: 700 18px var(--sans);
  text-align: center;
}
.oi-name strong {
  display: block;
}
.oi-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.oi-note {
  color: #a24611 !important;
  font-weight: 600;
}
.oi-entregado {
  opacity: 0.6;
}
.order-add {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed #d9cfbf;
}
.order-add-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.order-add-head h3 {
  margin: 0;
  white-space: nowrap;
}
.order-add-head input {
  max-width: 320px;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 7px;
  font-weight: 400;
  border-radius: 12px;
  border-left: 4px solid var(--tone);
}
.mini-card strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.25;
}
.mini-card small {
  color: var(--muted);
  font-size: 11.5px;
}
.mini-img {
  width: 44px;
  height: 44px;
  border-radius: 9px;
}
.draft {
  margin-top: 16px;
  padding: 14px;
  background: #fcfaf6;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 8px;
}
.draft h3 {
  margin: 0 0 4px;
}
.draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1.2fr) 30px;
  gap: 8px;
  align-items: center;
}
.draft-note {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}
.pay-button.send {
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 8px 22px #1d332640;
  margin-top: 6px;
}
.kds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  min-height: 0;
  overflow: hidden;
}
.kds-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.kds-col header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.kds-col h3 {
  margin: 0;
}
.kds-col .count {
  font: 700 15px var(--sans);
  min-width: 30px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper);
}
.kds-pendiente header {
  border-top: 5px solid var(--fire);
}
.kds-preparando header {
  border-top: 5px solid #e6b422;
}
.kds-listo header {
  border-top: 5px solid var(--leaf);
}
.kds-col > :not(header) {
  margin: 10px 12px 0;
}
.kds-col {
  overflow-y: auto;
  padding-bottom: 12px;
}
.kds-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.kds-card.late {
  border-color: var(--red);
  box-shadow: 0 0 0 2px #b23a2e33;
}
.kds-top {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.kds-qty {
  font: 700 22px var(--sans);
  color: var(--forest);
}
.kds-top strong {
  font-size: 18px;
  line-height: 1.2;
}
.kds-note {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff4d6;
  color: #6b4b00;
  font-weight: 700;
}
.kds-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.kds-card.late .kds-meta span {
  color: var(--red);
  font-weight: 700;
}
.kds-delivered {
  padding: 10px 16px 14px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pos-screen:has(.kds) {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.to-cash {
  position: relative;
}
.badge-inline {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--fire);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
.cash-orders {
  display: grid;
  gap: 10px;
}
.cash-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.cash-order small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.cash-order b {
  font: 600 20px var(--serif);
}
@media (max-width: 900px) {
  .orders-screen {
    grid-template-columns: 1fr;
  }
  .orders-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 38vh;
  }
  .kds {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .draft-row {
    grid-template-columns: minmax(0, 1fr) 112px 30px;
  }
  .draft-note {
    grid-column: 1 / -1;
  }
  .cash-order {
    grid-template-columns: 1fr auto;
  }
  .cash-order .actions {
    grid-column: 1 / -1;
  }
}

/* Impresión: solo el ticket, en papel térmico de 80 mm (72 mm imprimibles). */
@page {
  size: 80mm 297mm;
  margin: 0;
}
@media print {
  body > * {
    display: none !important;
  }
  body {
    background: #fff;
    margin: 0;
  }
  body > #print-area {
    display: block !important;
  }
  #print-area .ticket {
    margin: 0 auto;
    box-shadow: none;
    border: 0;
  }
}
