@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700;9..144,850&family=Nunito+Sans:wght@400;700;800;900&display=swap");

:root {
  --ink: #241b16;
  --muted: #6e6256;
  --paper: #fbf3e5;
  --surface: #fffdf8;
  --line: #e5cba5;
  --green: #2f6b4f;
  --green-dark: #1e4d3b;
  --gold: #dba63a;
  --red: #9d2b32;
  --blue: #1e5f78;
  --pink: #cf6a30;
  --clay: #b8492f;
  --cream: #f8e6c2;
  --talavera: #1f6681;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", Arial, Helvetica, sans-serif;
  --shadow: 0 16px 38px rgba(54, 39, 23, 0.14);
  --soft-shadow: 0 10px 24px rgba(54, 39, 23, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: 96px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(207, 106, 48, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 14%, rgba(219, 166, 58, 0.2), transparent 24rem),
    linear-gradient(180deg, #fbf3e5, #f5e5c8);
  font-family: var(--font-body);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
}

:where(.button, .chip, .nav a, .cart-link, .profile-corner, .app-nav a, .quantity button, .remove-icon):active {
  filter: brightness(0.93);
  transform: scale(0.98);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(201, 71, 111, 0.1), transparent 35%),
    rgba(255, 243, 235, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: -1px;
  width: min(280px, 46vw);
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--red));
  border-radius: 999px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 850;
  letter-spacing: 0;
  color: var(--red);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--cream);
  border: 1px solid rgba(16, 60, 45, 0.14);
  box-shadow: 0 6px 18px rgba(16, 60, 45, 0.16);
}

.nav {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.nav a:hover,
.nav .active {
  color: var(--green-dark);
  background: rgba(31, 111, 85, 0.09);
}

.profile-corner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid rgba(31, 111, 85, 0.22);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 248, 236, 0.92);
  font-weight: 800;
  white-space: nowrap;
}

.profile-corner:hover,
.profile-corner.active {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.cart-link span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-left: 4px;
  padding: 0 7px;
  color: white;
  background: var(--red);
  border-radius: 999px;
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: min(680px, calc(100svh - 72px));
  display: grid;
  align-items: end;
  padding: clamp(42px, 5.5vw, 68px) clamp(18px, 6vw, 80px) clamp(62px, 6vw, 82px);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 22%, rgba(215, 154, 58, 0.26), transparent 18rem),
    linear-gradient(90deg, rgba(74, 19, 26, 0.95) 0%, rgba(116, 31, 47, 0.78) 45%, rgba(42, 23, 24, 0.28)),
    url("assets/fonda-mexicana-hero.png") center right / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 10px;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--red), var(--pink));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  color: white;
}

.hero-content::before {
  content: "✿";
  position: absolute;
  top: -34px;
  left: -10px;
  color: rgba(255, 210, 122, 0.72);
  font-size: 32px;
  text-shadow: 30px 8px 0 rgba(255, 243, 235, 0.28), 60px -3px 0 rgba(201, 71, 111, 0.5);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  max-width: 700px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 12px 30px rgba(36, 28, 25, 0.26);
}

.hero-copy {
  max-width: 560px;
  margin: 16px 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.55vw, 19px);
}

.hero-proof {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.hero-proof span {
  padding: 8px 11px;
  color: #fff9ec;
  background: rgba(255, 243, 235, 0.15);
  border: 1px solid rgba(255, 246, 231, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.service-ribbon {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(900px, 100%);
  margin-top: 28px;
  padding: 10px;
  color: var(--ink);
  background: rgba(255, 243, 235, 0.92);
  border: 1px solid rgba(255, 243, 235, 0.52);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(16, 60, 45, 0.2);
  backdrop-filter: blur(14px);
}

.service-ribbon article {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(232, 216, 195, 0.75);
  border-radius: 16px;
}

.service-ribbon article::before {
  content: "✿";
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
}

.service-ribbon strong {
  color: var(--red);
  font-size: 14px;
}

.service-ribbon span {
  color: var(--muted);
  font-size: 13px;
}

.hours-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 8px 11px;
  color: var(--red);
  background: rgba(255, 241, 220, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(36, 28, 25, 0.18);
}

.hero-actions,
.page-title,
.product-actions,
.detail-actions,
.cart-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary,
.button.whatsapp {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: var(--shadow);
}

.button.primary:hover,
.button.whatsapp:hover {
  background: linear-gradient(135deg, #7e1727, var(--red));
}

.button.whatsapp {
  background: linear-gradient(135deg, #1f7a4d, var(--green-dark));
}

.button.secondary {
  color: var(--red);
  background: var(--cream);
  border-color: #d9cfbd;
}

.button.ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.button.danger {
  color: white;
  background: var(--red);
}

.button.full {
  width: 100%;
}

.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.app-nav {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: min(430px, calc(100% - 22px));
  padding: 7px;
  border: 1px solid rgba(31, 111, 85, 0.2);
  border-radius: 22px;
  background: rgba(255, 248, 236, 0.97);
  box-shadow: 0 18px 44px rgba(36, 28, 25, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.app-nav a {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 58px;
  padding: 7px 8px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, background 140ms ease, filter 140ms ease;
}

.app-nav a:active {
  background: rgba(0, 104, 71, 0.14);
  transform: scale(0.96);
}

.app-nav a.active:active {
  background: linear-gradient(135deg, var(--red), var(--pink));
  filter: brightness(0.9);
}

.app-nav a:focus-visible {
  outline: 3px solid rgba(0, 104, 71, 0.42);
  outline-offset: 2px;
}

.app-nav a.active {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.app-nav-icon {
  position: relative;
  display: grid;
  place-items: center;
}

.app-nav svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-nav-badge {
  position: absolute;
  top: -7px;
  right: -12px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: white;
  background: var(--red);
  border: 2px solid var(--paper);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  z-index: 3;
}

[data-cart-count].cart-count-bump {
  animation: cartCountPop 260ms ease-out;
}

@keyframes cartCountPop {
  0% {
    opacity: 0.55;
    transform: scale(0.7);
  }

  65% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.section {
  width: min(1180px, calc(100% - clamp(28px, 5vw, 64px)));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) 0;
}

.strip {
  position: relative;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 8% 8%, rgba(215, 154, 58, 0.2), transparent 13rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 230, 222, 0.82));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
}

.strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.home-location {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(340px, 1.15fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(28px, 4vw, 44px);
}

.today-menu {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 14px;
  align-items: stretch;
}

.today-feature,
.today-list article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.today-feature {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  color: white;
  background:
    radial-gradient(circle at 90% 5%, rgba(255, 218, 134, 0.28), transparent 12rem),
    linear-gradient(135deg, var(--red), var(--pink));
}

.today-feature .section-kicker {
  color: rgba(255, 241, 220, 0.9);
}

.today-feature h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1;
}

.today-feature p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.today-feature .button {
  width: max-content;
  background: var(--cream);
  color: var(--red);
}

.today-list {
  display: grid;
  gap: 10px;
}

.today-list article {
  display: grid;
  gap: 5px;
  padding: 15px 16px 15px 18px;
  background: rgba(255, 255, 255, 0.86);
}

.today-list article::before {
  content: "✿";
  position: absolute;
  top: 12px;
  right: 14px;
  color: rgba(201, 71, 111, 0.22);
  font-size: 26px;
}

.today-list span {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 850;
}

.today-list p {
  margin: 0;
  color: var(--muted);
}

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

.highlights article,
.review-panel {
  position: relative;
  overflow: hidden;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.highlights article::before,
.review-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--pink), var(--gold), var(--red));
}

.highlights h2,
.review-panel h2 {
  margin: 0 0 8px;
  color: var(--red);
  font-family: var(--font-display);
  line-height: 1.05;
  font-size: clamp(21px, 2.4vw, 30px);
}

.highlights p,
.review-panel p {
  margin: 0;
  color: var(--muted);
}

.review-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
  background:
    radial-gradient(circle at 90% 20%, rgba(29, 77, 119, 0.1), transparent 18rem),
    var(--surface);
}

.review-panel p:last-child {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink);
}

.location-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.home-location h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 850;
  line-height: 1.02;
}

.home-location p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
}

.store-hours {
  margin-top: 10px;
  color: var(--clay);
  font-weight: 800;
}

.home-map {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-map iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 42vw, 460px);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.page-title {
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title h1,
.strip h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
}

.page-title h1,
.home-location h2 {
  color: var(--red);
}

.page-title-small {
  margin-top: 30px;
  margin-bottom: 12px;
}

.page-title-small h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--green-dark);
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 16px;
  align-items: end;
  padding: 16px;
  margin-bottom: 22px;
  background:
    linear-gradient(90deg, rgba(31, 111, 85, 0.06), rgba(200, 63, 138, 0.05)),
    rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

label span,
legend {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(27, 107, 95, 0.18);
  border-color: var(--green);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fffdf8;
  cursor: pointer;
  font-weight: 800;
}

.chip.active {
  color: white;
  background: linear-gradient(135deg, var(--pink), #a83272);
  border-color: transparent;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.catalog-view-restoring .product-grid {
  opacity: 0;
  transform: translateY(8px);
}

.product-card,
.cart-item,
.checkout-panel,
.history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 4px solid rgba(201, 71, 111, 0.7);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(36, 28, 25, 0.11);
}

.product-card img,
.detail-media img,
.cart-item img {
  display: block;
  width: 100%;
  height: auto;
}

.product-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f3eadb;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 14px;
  flex: 1;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.price {
  font-weight: 900;
  color: var(--green-dark);
}

.product-card h2,
.detail-copy h1,
.checkout-panel h2,
.history-card h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
}

.product-card p,
.detail-copy p,
.muted,
.history-card p {
  margin: 0;
  color: var(--muted);
}

.detail-view {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.detail-media {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail-copy {
  display: grid;
  gap: 18px;
  padding-top: 10px;
}

.detail-copy h1 {
  font-size: clamp(30px, 4.5vw, 50px);
}

.detail-quantity {
  display: grid;
  gap: 8px;
  width: max-content;
}

.quantity-input {
  grid-template-columns: 40px 68px 40px;
}

.quantity-input input {
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 900;
  appearance: textfield;
}

.quantity-input input:focus {
  outline: 3px solid rgba(27, 107, 95, 0.18);
  border-color: transparent;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--green-dark);
  font-weight: 800;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.cart-layout.is-empty {
  display: block;
}

.cart-layout.is-empty > div:first-child {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}

.checkout-panel[hidden],
#clearCartBtn[hidden],
#continueShoppingLink[hidden] {
  display: none !important;
}

.cart-list {
  display: grid;
  gap: 8px;
  max-height: min(64vh, 680px);
  margin-bottom: 14px;
  padding-right: 3px;
  overflow-y: auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
}

.cart-item.is-unavailable {
  border-color: rgba(180, 58, 58, 0.48);
  background: rgba(180, 58, 58, 0.05);
}

.cart-unavailable-note {
  color: #a12f2f !important;
  font-weight: 800;
}

.cart-item img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f3eadb;
}

.cart-item-main {
  min-width: 0;
}

.cart-item h2 {
  margin: 0 0 2px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cart-item-controls {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
  align-items: center;
}

.cart-item-controls strong {
  min-width: 72px;
  color: var(--clay);
  font-size: 14px;
  text-align: right;
}

.quantity {
  display: inline-grid;
  grid-template-columns: 36px 42px 36px;
  align-items: center;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.quantity.compact {
  grid-template-columns: 30px 34px 30px;
}

.quantity button {
  width: 36px;
  height: 36px;
  border: 0;
  cursor: pointer;
  color: var(--green-dark);
  background: #edf5ee;
  font-size: 19px;
  font-weight: 900;
}

.quantity.compact button {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.quantity span {
  text-align: center;
  font-weight: 900;
}

.remove-icon {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #eccfcf;
  border-radius: 999px;
  color: var(--red);
  background: #fff7f5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.checkout-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  position: sticky;
  top: 92px;
  border-top: 4px solid rgba(31, 111, 85, 0.55);
}

.field-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.location-options {
  display: grid;
  gap: 10px;
}

.payment-code-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 244, 220, 0.66);
}

.payment-code-panel[hidden] {
  display: none;
}

.location-method {
  display: grid;
  gap: 8px;
}

.location-method-body {
  display: none;
  gap: 8px;
}

.location-method.active .location-method-body {
  display: grid;
}

.location-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 244, 220, 0.68);
}

.location-method.active .location-option {
  border-color: rgba(31, 111, 85, 0.42);
  background: rgba(31, 111, 85, 0.09);
}

.location-option input {
  width: auto;
}

.location-option span {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-row[hidden] {
  display: none !important;
}

#code-payment-option[hidden],
#payment-code-panel[hidden] {
  display: none !important;
}

.map-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #6b7a76);
}

.button.remove {
  color: var(--red);
  background: #fdf1f1;
  border-color: #eccfcf;
  margin-top: 4px;
}

.button.remove:hover {
  background: #fbe4e4;
}

#pickupPanel[hidden],
#deliveryPanel[hidden] {
  display: none;
}

.pickup-card {
  display: grid;
  gap: 10px;
}

.pickup-card iframe {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  border: 0;
  display: block;
}

.pickup-address {
  margin: 0;
  font-weight: 700;
  color: var(--ink, #16302b);
}

.map-preview {
  display: none;
}

.map-preview.show {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line, #d9e2df);
  border-radius: 14px;
  background: rgba(31, 111, 85, 0.06);
}

.map-preview strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand, #1b6b5f);
}

.map-preview a {
  font-size: 14px;
  color: var(--brand, #1b6b5f);
  word-break: break-all;
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(36, 28, 25, 0.58);
}

.map-modal.open {
  display: flex;
}

.map-modal-body {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(12, 32, 29, 0.35);
}

.map-modal-body h2 {
  margin: 0;
  font-size: 20px;
}

.map-style-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line, #d9e2df);
  border-radius: 999px;
  background: rgba(31, 111, 85, 0.06);
}

.map-style-switch button {
  padding: 9px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink, #16302b);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.map-style-switch button.active {
  background: var(--brand, #1b6b5f);
  color: #fff7e8;
}

#mapPicker {
  width: 100%;
  height: 46vh;
  min-height: 260px;
  border-radius: 14px;
  overflow: hidden;
}

.map-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.map-modal-actions .button {
  width: 100%;
}

.loading-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(42, 23, 24, 0.54);
  backdrop-filter: blur(8px);
}

.loading-modal.show {
  display: grid;
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(320px, 100%);
  padding: 22px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-card strong {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 22px;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(201, 71, 111, 0.18);
  border-top-color: var(--red);
  border-radius: 999px;
  animation: spin 0.85s linear infinite;
}

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

.radio-row input {
  width: auto;
}

.radio-row span {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-family: var(--font-display);
  color: var(--green-dark);
}

.history-list {
  display: grid;
  gap: 8px;
}

.current-orders {
  display: grid;
  gap: 12px;
}

/* Aviso de sesion en Mis pedidos: explica de donde viene cada pedido. */
.notice {
  display: block;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 14px;
  font-size: 0.92rem;
}

.notice p {
  margin: 0;
}

.current-order-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(217, 165, 51, 0.18), transparent 16rem),
    var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid rgba(31, 111, 85, 0.62);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.current-order-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.current-order-head h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--green-dark);
}

.current-order-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.current-order-head strong {
  color: var(--clay);
  font-size: 20px;
}

.status-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-timeline li {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status-timeline li span {
  height: 8px;
  border-radius: 999px;
  background: #eadfce;
}

.status-timeline li.done span,
.status-timeline li.current span {
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.status-timeline li.current {
  color: var(--green-dark);
}

.current-order-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.current-order-grid span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(31, 111, 85, 0.08);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.history-card {
  padding: 0;
  overflow: hidden;
}

.history-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, rgba(255, 244, 220, 0.6), rgba(255, 255, 255, 0));
}

.history-card summary::-webkit-details-marker {
  display: none;
}

.history-card summary span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.history-card summary small,
.history-card summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.history-card summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-total {
  color: var(--clay);
  font-weight: 900;
}

.history-detail {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.history-detail p {
  margin: 10px 0 0;
  color: var(--muted);
}

.history-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.history-card li strong {
  color: var(--clay);
}

.location-display {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.location-display a {
  width: max-content;
  max-width: 100%;
  color: var(--green-dark);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.panel-board {
  display: grid;
  gap: 24px;
}

.local-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.local-stats article,
.report-stats article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.local-stats span,
.report-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.local-stats strong,
.report-stats strong {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.local-stats small,
.report-stats small {
  color: var(--clay);
  font-weight: 800;
}

.work-queue {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.work-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(31, 111, 85, 0.54);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.work-card h3 {
  margin: 2px 0;
}

.work-card small,
.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-section {
  display: grid;
  gap: 12px;
}

.panel-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(31, 111, 85, 0.09), rgba(200, 63, 138, 0.06)),
    var(--surface);
  box-shadow: var(--soft-shadow);
}

.panel-section-title h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--green-dark);
}

.panel-section-title span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  color: white;
  background: var(--green);
  border-radius: 999px;
  font-weight: 900;
}

.panel-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.panel-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.panel-column-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel-column-title h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--green-dark);
  font-size: 20px;
}

.panel-column-title span {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  color: white;
  background: var(--pink);
  border-radius: 999px;
  font-weight: 900;
}

.local-order-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.local-order-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.local-order-head h3 {
  margin: 2px 0;
}

.local-order-head small,
.local-order-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.local-order-card ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.local-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.local-order-actions span {
  color: var(--green-dark);
  font-weight: 900;
}

.local-history-panel {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.calendar-card,
.day-report {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.calendar-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-controls h3 {
  margin: 0;
  color: var(--green-dark);
  font-family: var(--font-display);
  text-align: center;
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-grid > strong {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.calendar-grid button,
.calendar-empty {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.calendar-grid button {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.calendar-grid button span {
  font-weight: 900;
}

.calendar-grid button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.calendar-grid button.has-orders {
  border-color: rgba(31, 111, 85, 0.42);
  background: rgba(31, 111, 85, 0.08);
}

.calendar-grid button.selected {
  color: white;
  background: linear-gradient(135deg, var(--green), var(--pink));
}

.calendar-grid button.selected small {
  color: rgba(255, 255, 255, 0.84);
}

.day-report {
  display: grid;
  gap: 12px;
}

.day-report-head h3 {
  margin: 0;
  color: var(--green-dark);
  font-family: var(--font-display);
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.report-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.report-order-row:last-child {
  border-bottom: 0;
}

.report-order-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-order-row span,
.report-order-row small {
  color: var(--muted);
  font-size: 12px;
}

.report-order-row b {
  color: var(--clay);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fffdf8;
  border: 1px dashed #d8cdbd;
  border-radius: 16px;
}

.empty-state strong {
  color: var(--green-dark);
  font-size: 18px;
}

.cart-loading-state {
  min-height: 148px;
}

.cart-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(31, 111, 85, 0.18);
  border-top-color: var(--green-dark);
  border-radius: 50%;
  animation: cart-loading-spin 0.75s linear infinite;
}

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

.toast {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  right: auto;
  bottom: auto;
  z-index: 120;
  width: max-content;
  max-width: min(440px, calc(100% - 28px));
  padding: 13px 16px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--pink));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(42, 23, 24, 0.28);
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  text-align: center;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.internal-topbar {
  gap: 12px;
  flex-wrap: wrap;
}

.internal-topbar .nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.internal-topbar .session-chip {
  display: grid;
  gap: 1px;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-align: right;
}

.internal-topbar .session-chip strong {
  font-size: 13px;
}

.internal-topbar .session-chip span {
  color: var(--clay);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-section {
  max-width: 720px;
  margin-inline: auto;
}

.role-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.role-card {
  display: grid;
  gap: 6px;
  padding: 16px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.role-card:hover {
  transform: translateY(-2px);
}

.role-card strong {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 17px;
}

.role-card span {
  color: var(--muted);
  font-size: 12px;
}

.role-card.active {
  border-color: var(--green);
  background: #e7f2ed;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-error {
  min-height: 18px;
  color: var(--clay);
  font-weight: 800;
  font-size: 13px;
}

.login-back {
  margin-top: 16px;
  text-align: center;
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-family: var(--font-display);
  font-size: 20px;
}

.orders-layout {
  margin-top: 16px;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.internal-order {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.internal-order header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.internal-order header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.internal-order header h3 {
  margin: 2px 0;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 20px;
}

.internal-order header p {
  color: var(--muted);
  font-size: 12px;
}

.order-total {
  color: var(--clay);
  font-family: var(--font-display);
  font-size: 22px;
  white-space: nowrap;
}

.internal-order-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.tone-nuevo {
  color: #5a4a3a;
  background: #f0e6d8;
}

.tone-aceptado {
  color: #1c5a7e;
  background: #dceaf5;
}

.tone-alistando {
  color: #8a6410;
  background: #fdf0cd;
}

.tone-listo {
  color: #4a3c86;
  background: #e6e1f7;
}

.tone-asignado {
  color: #0f5f52;
  background: #d5ece5;
}

.tone-recogido {
  color: #7a4b12;
  background: #fbe6cd;
}

.tone-en-camino {
  color: #1c5a7e;
  background: #d2e6f7;
}

.tone-entregado {
  color: #2c6a34;
  background: #d8f0dc;
}

.tone-cancelado {
  color: #8f2f2f;
  background: #f8dede;
}

.driver-tag {
  padding: 5px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.internal-items {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #faf6ef;
  font-size: 13px;
  list-style: none;
}

.internal-items li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.location-display-wrap {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.problem-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #eccfcf;
  border-radius: 12px;
  background: #fdf1f1;
  color: #8f2f2f;
  font-size: 13px;
}

.problem-box ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.problem-box span {
  color: var(--muted);
  font-size: 11px;
}

.inline-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.inline-field select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
}

.internal-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.internal-order-actions .button {
  margin-top: 0;
}

.route-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  background: #faf6ef;
  font-size: 13px;
}

.route-box p {
  margin: 0;
}

.code-hint {
  color: var(--muted);
  font-size: 12px;
}

.driver-totals {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.driver-totals small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-offers {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 2px dashed var(--gold);
  border-radius: 18px;
  background: #fffaf0;
}

.driver-offers h2 {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 18px;
}

.driver-offers .driver-order {
  background: var(--surface);
}

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

.kpi {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi strong {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.kpi small {
  color: var(--clay);
  font-weight: 800;
}

.admin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.admin-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.admin-card h2 {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 18px;
}

.admin-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.admin-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-list span {
  color: var(--muted);
  font-size: 12px;
}

.whatsapp-order {
  border-color: #cfe6d8;
  background: linear-gradient(180deg, #f4fbf6 0%, var(--surface) 60%);
}

.whatsapp-order .current-order-head h2 {
  color: #16803e;
}

.whatsapp-order-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eaf7ee;
  color: #14663a;
  font-size: 13px;
  font-weight: 700;
}

.whatsapp-order-items {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #faf6ef;
  font-size: 14px;
  list-style: none;
}

.whatsapp-order-items li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.whatsapp-order-foot {
  display: grid;
  gap: 8px;
}

.whatsapp-order-foot .muted {
  text-align: center;
  font-size: 12px;
}

.client-code {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px;
  border: 2px dashed var(--gold);
  border-radius: 16px;
  background: #fffaf0;
  text-align: center;
}

.client-code span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-code strong {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.18em;
}

.client-code small {
  color: var(--clay);
  font-weight: 700;
}

.panel-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-dialog::backdrop {
  background: rgba(24, 33, 31, 0.45);
}

.panel-dialog form {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.panel-dialog h2 {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 20px;
}

.panel-dialog textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .role-picker {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

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

  .internal-topbar .session-chip {
    display: none;
  }

  .internal-order-actions .button {
    flex: 1 1 auto;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    min-height: auto;
    padding: 10px 14px;
  }

  .nav {
    justify-content: flex-end;
    gap: 4px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
    padding: 34px clamp(14px, 4vw, 24px) 76px;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(92, 24, 36, 0.94), rgba(42, 23, 24, 0.36)),
      url("assets/fonda-mexicana-hero.png") center / cover no-repeat;
  }

  .service-ribbon {
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 20px;
  }

  .section {
    width: min(100% - 24px, 1180px);
    padding: 28px 0;
  }

  .page-title {
    margin-bottom: 16px;
  }

  .catalog-tools {
    gap: 12px;
    padding: 12px;
    margin-bottom: 14px;
  }

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

  .product-card img {
    aspect-ratio: 1.08 / 1;
  }

  .product-body {
    gap: 7px;
    padding: 10px;
  }

  .product-card h2 {
    font-size: 16px;
  }

  .product-card p {
    font-size: 13px;
  }

  .product-meta {
    align-items: flex-start;
    gap: 6px;
    flex-direction: column;
  }

  .category {
    font-size: 12px;
  }

  .catalog-tools,
  .detail-view,
  .cart-layout,
  .today-menu,
  .home-location,
  .strip,
  .review-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-map iframe {
    height: clamp(280px, 58vw, 390px);
  }

  .checkout-panel {
    position: static;
  }

  .local-stats,
  .report-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-controls {
    grid-template-columns: 1fr;
  }

  .status-timeline {
    grid-template-columns: repeat(4, 1fr);
  }

  .current-order-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    padding-bottom: 86px;
  }

  .toast {
    top: calc(10px + env(safe-area-inset-top));
    width: calc(100% - 20px);
    max-width: none;
    padding: 12px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.25;
  }

  .topbar {
    padding: 9px 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar .profile-corner{
    position:absolute;
    top:9px;
    right:10px;
    margin:0;
  }

  .topbar .brand{
    padding-right:44px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .brand span:last-child {
    font-size: 14px;
  }

  .nav {
    width: 100%;
    gap: 4px;
    justify-content: space-between;
  }

  .nav a {
    flex: 1;
    padding: 7px 6px;
    font-size: 12px;
    text-align: center;
  }

  .cart-link span {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 12px;
  }

  .app-nav {
    bottom: 0;
    width: 100%;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }

  .app-nav a {
    min-height: 54px;
    padding: 6px 5px;
    border-radius: 14px;
    font-size: 11px;
  }

  .app-nav svg {
    width: 21px;
    height: 21px;
  }

  .hero {
    padding: 26px 12px 72px;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(92, 24, 36, 0.96), rgba(42, 23, 24, 0.4)),
      url("assets/fonda-mexicana-hero.png") center / cover no-repeat;
  }

  .hero h1 {
    font-size: clamp(29px, 8.8vw, 36px);
    line-height: 1;
  }

  .hero-copy {
    margin: 14px 0 18px;
    font-size: 15px;
  }

  .hero-actions,
  .location-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-proof span {
    flex: 1 1 auto;
    font-size: 12px;
    text-align: center;
  }

  .service-ribbon {
    padding: 8px;
    border-radius: 18px;
  }

  .service-ribbon article {
    padding: 10px;
  }

  .section {
    width: min(100% - 18px, 1180px);
    padding: 20px 0;
  }

  .page-title h1,
  .strip h2,
  .home-location h2 {
    font-size: 25px;
  }

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

  .highlights article,
  .review-panel,
  .strip,
  .today-feature,
  .today-list article {
    padding: 16px;
    border-radius: 18px;
  }

  .today-feature .button {
    width: 100%;
  }

  .home-map iframe {
    height: 300px;
  }

  .catalog-tools {
    padding: 10px;
  }

  input,
  textarea {
    padding: 10px 11px;
  }

  .chip {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .product-actions,
  .detail-actions,
  .page-title {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .product-actions {
    flex-direction: row;
    gap: 6px;
  }

  .product-actions .button {
    flex: 1;
    width: auto;
    padding-inline: 7px;
  }

  .detail-copy {
    gap: 12px;
  }

  .detail-copy h1 {
    font-size: 28px;
  }

  .detail-media img {
    max-height: 260px;
    object-fit: cover;
  }

  .cart-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .cart-item h2 {
    font-size: 14px;
  }

  .cart-item-controls {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .cart-item-controls strong {
    min-width: 0;
    text-align: center;
  }

  .cart-list {
    max-height: none;
    overflow: visible;
  }

  .checkout-panel,
  .history-card {
    padding: 12px;
  }

  .history-card {
    padding: 0;
  }

  .history-card summary {
    padding: 11px 12px;
  }

  .history-detail {
    padding: 0 12px 12px;
  }

  .checkout-total {
    font-size: 18px;
  }

  .current-order-head,
  .local-order-head,
  .local-order-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-columns {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .local-stats,
  .report-stats {
    grid-template-columns: 1fr;
  }

  .work-list {
    max-height: none;
    overflow: visible;
  }

  .work-card,
  .report-order-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-grid button,
  .calendar-empty {
    min-height: 52px;
    border-radius: 10px;
  }

  .calendar-grid button {
    padding: 6px;
  }

  .calendar-grid button small {
    font-size: 9px;
  }
}

.code-hint {
  padding: 10px 12px;
  color: var(--green-dark);
  background: rgba(31, 111, 85, 0.08);
  border: 1px solid rgba(31, 111, 85, 0.18);
  border-radius: 12px;
  font-weight: 800;
}

.problem-box strong + ul {
  margin-top: 6px;
}

.problem-box strong:not(:first-child) {
  display: block;
  margin-top: 10px;
}

.catalog-slot {
  min-height: 420px;
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.catalog-slot .product-card {
  height: 100%;
}

.catalog-sentinel {
  grid-column: 1 / -1;
  min-height: 40px;
  padding: 18px;
  text-align: center;
  color: #667085;
}

.profile-corner{
  display:inline-grid;
  place-items:center;
  align-self:center;
  width:36px;
  height:36px;
  min-height:36px;
  flex:0 0 36px;
  margin-left:auto;
  padding:0;
  border:0;
  border-radius:50%;
  color:var(--green-dark);
  background:rgba(255,248,236,.92);
  cursor:pointer;
}

.profile-avatar{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(135deg,var(--red),var(--pink));
  font-size:13px;
  font-weight:800;
  letter-spacing:.03em;
}

.profile-overlay{
  position:fixed;
  inset:0;
  z-index:2000;
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
  padding:76px 22px 22px;
  background:rgba(15,23,42,.48);
}

.profile-overlay[hidden]{
  display:none;
}

.profile-popover{
  position:relative;
  width:min(100%,340px);
  padding:22px;
  border:1px solid rgba(31,111,85,.18);
  border-radius:20px;
  background:#fffaf2;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}

.profile-close{
  position:absolute;
  top:10px;
  right:12px;
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  color:var(--muted);
  background:transparent;
  cursor:pointer;
  font-size:22px;
}

.profile-identity{
  display:flex;
  align-items:center;
  gap:12px;
  padding-right:28px;
}

.profile-menu-avatar{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(135deg,var(--red),var(--pink));
  font-weight:800;
}

.profile-identity strong,
.profile-identity small{
  display:block;
}

.profile-identity small{
  margin-top:3px;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.profile-message{
  margin:18px 0;
  color:var(--muted);
}

.profile-actions{
  display:grid;
  gap:9px;
}

.profile-actions .button{
  width:100%;
  text-align:center;
}

.customer-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.customer-profile-actions .button {
  flex: 1 1 180px;
  justify-content: center;
}

#save-customer-profile-btn[hidden] {
  display: none !important;
}

.profile-status{
  min-height:20px;
  margin:12px 0 0;
  color:var(--muted);
  font-size:.9rem;
}

@media (max-width:600px){
  .profile-overlay{
    padding:68px 12px 12px;
  }

  .profile-popover{
    width:100%;
  }
}

.profile-actions [hidden]{
  display:none !important;
}

.profile-avatar svg,
.profile-menu-avatar svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.profile-overlay.is-loading .profile-status{
  display:flex;
  align-items:center;
  gap:8px;
}

.profile-overlay.is-loading .profile-status::before{
  content:"";
  width:15px;
  height:15px;
  flex:0 0 15px;
  border:2px solid rgba(31,111,85,.2);
  border-top-color:var(--green-dark);
  border-radius:50%;
  animation:profile-loading-spin .75s linear infinite;
}

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

.product-payment-method{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin:0;
  padding:6px 10px;
  border:1px solid transparent;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  line-height:1;
}

.product-payment-method[data-payment-method="whatsapp"]{
  border-color:#5da96e;
  background:#e9f7eb;
  color:#216b36;
}

.product-payment-method[data-payment-method="code"]{
  border-color:#d69b25;
  background:#fff4d8;
  color:#765000;
}

/* ===== Mis pedidos: base visual ===== */
.orders-page {
  --orders-ink: #321e22;
  --orders-muted: #85696c;
  --orders-paper: #fff8f3;
  --orders-card: #fffdfb;
  --orders-line: #ecd8d2;
  --orders-red: #ad2d4a;
  --orders-red-soft: #fae5e9;
  --orders-gold: #c9892f;
  --orders-blue: #2f6c89;

  background:
    radial-gradient(circle at 0 0, rgba(201, 71, 111, 0.12), transparent 22rem),
    radial-gradient(circle at 100% 8%, rgba(201, 137, 47, 0.13), transparent 20rem),
    var(--orders-paper);
  color: var(--orders-ink);
}

.orders-page .section {
  width: min(100% - 32px, 860px);
  padding: 28px 0 120px;
}

.orders-page .orders-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 132px;
  margin-bottom: 14px;
  padding: 20px 22px;
  overflow: hidden;
  background:
    linear-gradient(125deg, #fffdfb 0%, #fff4ed 100%);
  border: 1px solid var(--orders-line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(70, 32, 38, 0.08);
}

.orders-page .orders-hero > div {
  position: relative;
  z-index: 1;
}

.orders-page .orders-eyebrow {
  margin: 0 0 5px;
  color: var(--orders-red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.orders-page .orders-hero h1 {
  margin: 0;
  color: var(--orders-ink);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
}

.orders-page .orders-copy {
  margin: 8px 0 0;
  color: var(--orders-muted);
  font-size: 14px;
}

.orders-page .orders-hero-orbit {
  position: relative;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  margin-right: 6px;
  border: 2px solid rgba(173, 45, 74, 0.22);
  border-radius: 50%;
}

.orders-page .orders-hero-orbit::before,
.orders-page .orders-hero-orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.orders-page .orders-hero-orbit::before {
  top: 18px;
  left: 18px;
  width: 38px;
  height: 38px;
  background: var(--orders-red);
  box-shadow: 0 8px 18px rgba(173, 45, 74, 0.22);
}

.orders-page .orders-hero-orbit::after {
  right: -8px;
  bottom: 5px;
  width: 16px;
  height: 16px;
  background: var(--orders-gold);
  border: 3px solid #fff8f3;
}

.orders-page .notice {
  margin-bottom: 20px;
  padding: 10px 13px;
  color: var(--orders-muted);
  background: rgba(255, 253, 251, 0.78);
  border: 1px solid var(--orders-line);
  border-radius: 12px;
  font-size: 13px;
}

.orders-page .page-title-small {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 24px 0 10px;
  padding: 0 2px;
}

.orders-page .page-title-small::before {
  width: 4px;
  height: 22px;
  margin-right: 9px;
  background: var(--orders-red);
  border-radius: 999px;
  content: "";
}

.orders-page .page-title-small .section-kicker {
  margin: 0 0 1px;
  color: var(--orders-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.orders-page .page-title-small h2 {
  margin: 0;
  color: var(--orders-ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
}

.orders-page .current-orders {
  gap: 10px;
}

.orders-page .current-order-card {
  gap: 14px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(250, 229, 233, 0.7), transparent 58%),
    var(--orders-card);
  border: 1px solid var(--orders-line);
  border-left: 4px solid var(--orders-red);
  border-top: 1px solid var(--orders-line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(70, 32, 38, 0.07);
}

.orders-page .current-order-head {
  align-items: flex-start;
  gap: 14px;
}

.orders-page .current-order-head .section-kicker {
  margin: 0 0 4px;
  color: var(--orders-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.orders-page .current-order-head h2 {
  color: var(--orders-ink);
  font-family: var(--font-body);
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 900;
  line-height: 1.18;
}

.orders-page .current-order-head p {
  margin-top: 6px;
  color: var(--orders-muted);
  font-size: 12px;
}

.orders-page .current-order-head strong {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--orders-red);
  background: var(--orders-red-soft);
  border-radius: 10px;
  font-size: 16px;
  line-height: 1;
}

.orders-page .current-order-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.orders-page .current-order-grid span {
  padding: 6px 9px;
  color: var(--orders-muted);
  background: #fff;
  border: 1px solid var(--orders-line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

/* ===== Mis pedidos: laptop, detalle y seguimiento ===== */
.orders-page .orders-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.55fr);
  gap: 16px;
  align-items: start;
}

/* El atributo hidden debe ganar frente al layout de Mis pedidos. */
.orders-page #ordersWorkspace[hidden],
.orders-page #currentOrderDetail[hidden],
.orders-page #completedOrdersHeading[hidden],
.orders-page #completedOrders[hidden],
.orders-page #whatsappOrdersHeading[hidden],
.orders-page #whatsappOrders[hidden],
.orders-page #clearWhatsappHistoryBtn[hidden] {
  display: none !important;
}

.orders-page .orders-queue,
.orders-page .orders-detail {
  min-width: 0;
}

.orders-page .orders-queue {
  padding: 14px;
  background: rgba(255, 253, 251, 0.78);
  border: 1px solid var(--orders-line);
  border-radius: 18px;
}

.orders-page .orders-queue-heading {
  margin-bottom: 10px;
  padding: 2px 3px 12px;
  border-bottom: 1px solid var(--orders-line);
}

.orders-page .orders-queue-heading p {
  margin: 0 0 2px;
  color: var(--orders-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.orders-page .orders-queue-heading h2 {
  margin: 0;
  color: var(--orders-ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 900;
}

.orders-page .orders-queue-list {
  display: grid;
  gap: 7px;
}

.orders-page .order-queue-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 10px;
  color: var(--orders-ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}

.orders-page .order-queue-card:hover {
  background: #fff8f5;
  border-color: var(--orders-line);
}

.orders-page .order-queue-card.is-selected {
  background: var(--orders-red-soft);
  border-color: rgba(173, 45, 74, 0.25);
}

.orders-page .order-queue-status {
  min-width: 58px;
  padding: 5px 6px;
  color: var(--orders-red);
  background: rgba(173, 45, 74, 0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.orders-page .order-queue-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.orders-page .order-queue-main strong {
  overflow: hidden;
  color: var(--orders-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-page .order-queue-main small {
  color: var(--orders-muted);
  font-size: 11px;
}

.orders-page .order-queue-total {
  color: var(--orders-red);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.orders-page .orders-detail .current-order-card {
  min-height: 100%;
}

.orders-page .order-tracking {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--orders-line);
  border-radius: 12px;
  background: #fff;
}

.orders-page .order-tracking summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--orders-blue);
  background: #f4f8fa;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.orders-page .order-tracking summary::-webkit-details-marker {
  display: none;
}

.orders-page .order-tracking summary::after {
  color: var(--orders-blue);
  content: "+";
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.orders-page .order-tracking[open] summary {
  border-bottom: 1px solid var(--orders-line);
}

.orders-page .order-tracking[open] summary::after {
  content: "−";
}

.orders-page .status-timeline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 12px;
}

.orders-page .status-timeline li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 8px;
  color: var(--orders-muted);
  background: #fffaf7;
  border: 1px solid #f0e3de;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.orders-page .status-timeline li span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #dfd4cf;
}

.orders-page .status-timeline li.done,
.orders-page .status-timeline li.current {
  color: var(--orders-ink);
  background: var(--orders-red-soft);
  border-color: rgba(173, 45, 74, 0.2);
}

.orders-page .status-timeline li.done span,
.orders-page .status-timeline li.current span {
  background: var(--orders-red);
}

.orders-page .history-list {
  gap: 8px;
}

.orders-page .history-card:not(.order-tracking) {
  background: rgba(255, 253, 251, 0.86);
  border-color: var(--orders-line);
  border-radius: 14px;
  box-shadow: none;
}

.orders-page .history-card:not(.order-tracking) summary {
  padding: 11px 13px;
  background: transparent;
}

.orders-page .history-card:not(.order-tracking) summary strong {
  color: var(--orders-ink);
  font-size: 13px;
}

.orders-page .history-total {
  color: var(--orders-red);
  font-size: 13px;
}

.orders-page .history-detail {
  gap: 8px;
  padding: 0 13px 13px;
  font-size: 13px;
}

.orders-page .history-detail p,
.orders-page .history-detail li,
.orders-page .location-display {
  color: var(--orders-muted);
  font-size: 12px;
}

.orders-page .history-card li strong,
.orders-page .location-display a {
  color: var(--orders-blue);
}

.orders-page .whatsapp-order {
  background:
    linear-gradient(135deg, rgba(47, 108, 137, 0.09), transparent 58%),
    var(--orders-card);
  border-color: rgba(47, 108, 137, 0.22);
  border-left-color: var(--orders-blue);
}

.orders-page .whatsapp-order .current-order-head h2,
.orders-page .whatsapp-order-note {
  color: var(--orders-blue);
}

.orders-page .whatsapp-order-note {
  padding: 10px 12px;
  background: #f1f7fa;
  border-radius: 10px;
  font-size: 12px;
}

.orders-page .whatsapp-order-items {
  padding: 10px 12px;
  background: #fffaf7;
  border: 1px solid var(--orders-line);
  border-radius: 10px;
  font-size: 12px;
}

.orders-page .client-code {
  padding: 13px;
  background: #fffaf1;
  border-color: var(--orders-gold);
  border-radius: 12px;
}

.orders-page .client-code strong {
  color: var(--orders-red);
  font-size: 27px;
}

.orders-page .client-code small {
  color: var(--orders-muted);
  font-size: 11px;
}

@media (max-width: 860px) {
  .orders-page .section {
    width: min(100% - 22px, 860px);
  }

  .orders-page .orders-workspace {
    display: block;
  }

  .orders-page .orders-queue {
    padding: 0;
    background: transparent;
    border: 0;
  }

  .orders-page .orders-queue-heading {
    margin: 0 2px 10px;
    padding: 0 0 9px;
  }

  .orders-page .orders-detail {
    display: none;
  }

  .orders-page .current-orders {
    display: grid;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .orders-page .section {
    width: min(100% - 18px, 860px);
    padding-top: 16px;
  }

  .orders-page .orders-hero {
    min-height: 112px;
    padding: 17px;
    border-radius: 18px;
  }

  .orders-page .orders-hero h1 {
    font-size: 29px;
  }

  .orders-page .orders-copy {
    max-width: 210px;
    font-size: 12px;
  }

  .orders-page .orders-hero-orbit {
    width: 58px;
    height: 58px;
    margin-right: 0;
  }

  .orders-page .orders-hero-orbit::before {
    top: 13px;
    left: 13px;
    width: 28px;
    height: 28px;
  }

  .orders-page .current-order-card {
    padding: 14px;
    border-radius: 15px;
  }

  .orders-page .current-order-head strong {
    width: max-content;
  }

  .orders-page .order-tracking summary {
    min-height: 38px;
    padding: 9px 10px;
  }

  .orders-page .status-timeline {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .orders-page .status-timeline li {
    min-height: 34px;
    font-size: 10px;
  }

  .orders-page .page-title-small {
    margin-top: 20px;
  }
}

/* Seguimiento en vivo del repartidor */
.customer-live-tracking {
  margin-top: 18px;
  border: 1px solid var(--orders-line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.customer-live-tracking__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.customer-live-tracking__head strong {
  display: block;
  font-size: 0.95rem;
  color: var(--orders-ink);
}
.customer-live-tracking__head small {
  display: block;
  margin-top: 4px;
  color: var(--orders-muted);
  font-size: 0.8rem;
}
.customer-live-tracking__head button {
  border: 1px solid var(--orders-line);
  background: var(--orders-ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.85rem;
  cursor: pointer;
}
.customer-live-tracking__map {
  margin-top: 12px;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef1f5;
}
.customer-live-marker span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1f9d55;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
@media (max-width: 560px) {
  .customer-live-tracking__map {
    height: 220px;
  }
}
