/*
  Identidad Vilu Repostería
    café #5A3E2B · rosa #E8A5A5 · crema #F6EFEA · dorado #D4A373
    Playfair Display (títulos) · Montserrat (texto)
*/
:root {
  --pink: #E8A5A5;
  --gold: #D4A373;
  --paper: #F6EFEA;
  --white: #FFFDFB;
  --ink: #5A3E2B;
  --muted: #9A8275;
  --line: #EBDDD3;
  --brand: #5A3E2B;
  --brand-dark: #432D1F;
  --pale: #FBEDEC;
  --sand: #F6E9D9;
  --red: #B0534F;
  --shadow: 0 12px 35px #5A3E2B0F;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px 'Montserrat',sans-serif;
}

button,input,select,textarea {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: #FBF5F1;
  border-right: 1px solid var(--line);
  padding: 26px 17px 18px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.brand {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--brand-dark);
  font: 700 22px 'Playfair Display',serif;
  padding: 0 8px;
}

.brand small {
  display: block;
  font: 600 9px 'Montserrat',sans-serif;
  letter-spacing: 2px;
  color: #9A8275;
}

.brand-logo {
  display: block;
  width: 43px;
  height: 43px;
  object-fit: contain;
  border-radius: 50%;
  flex: none;
}

.brand small {
  font-size: 8px;
  letter-spacing: 1.45px;
}

.workspace-label {
  font-size: 9px;
  color: #C4B2A6;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin: 40px 10px 12px;
}

.main-nav {
  display: grid;
  gap: 5px;
  margin-top: 40px;
}

.nav-link {
  border: 0;
  background: none;
  text-align: left;
  min-height: 43px;
  padding: 0 11px;
  border-radius: 8px;
  color: #7A5F4E;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link:hover {
  background: #F3E8E1;
  color: var(--brand-dark);
}

.nav-link.active {
  background: #FAE6E6;
  color: var(--brand-dark);
  font-weight: 700;
}

.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 17px;
  color: #B38B6D;
}

.nav-count {
  margin-left: auto;
  font-size: 10px;
  background: white;
  border-radius: 10px;
  padding: 2px 7px;
}

.sidebar-bottom {
  margin-top: auto;
}

.sync-card {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #7f9b66;
  box-shadow: 0 0 0 3px #eaf0e4;
}

.sync-card strong,.profile strong {
  font-size: 10px;
  display: block;
  font-weight: 600;
}

.sync-card small,.profile small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}

.profile {
  border-top: 1px solid var(--line);
  padding: 17px 6px 0;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F5D5D5;
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.profile-menu {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
}

.main-area {
  margin-left: 250px;
  min-height: 100vh;
}

.topbar {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: #FBF5F1;
}

.crumb {
  font-size: 11px;
  color: #9A8275;
}

.crumb span {
  margin: 0 9px;
  color: #C4B2A6;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.today-label {
  font-size: 11px;
  color: #7A5F4E;
}

.icon-button,.mobile-menu {
  background: transparent;
  border: 0;
  font-size: 19px;
  color: #9A8275;
}

.mobile-menu {
  display: none;
}

.small-avatar {
  width: 27px;
  height: 27px;
  font-size: 11px;
}

.view {
  display: none;
  max-width: 1440px;
  margin: auto;
  padding: 37px 42px 55px;
}

.view.active {
  display: block;
}

.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #B07E45;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 27px;
}

.page-heading h1 {
  font: 600 30px 'Playfair Display',serif;
  margin: 0;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 15px;
  font-weight: 600;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--brand);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-light {
  background: var(--white);
  border-color: var(--line);
  color: #5A3E2B;
}

.btn-sm {
  padding: 7px 10px;
  font-size: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card,.panel,.recipe-card,.ingredient-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px 17px;
  min-height: 104px;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  color: #9A8275;
  font-size: 10px;
}

.stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #F6E9D9;
  display: grid;
  place-items: center;
  color: #B07E45;
}

.stat-value {
  font: 600 26px 'Playfair Display',serif;
  margin-top: 9px;
}

.stat-note {
  font-size: 9px;
  color: #9A8275;
  margin-top: 3px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(260px,1fr);
  gap: 16px;
}

.panel {
  padding: 19px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.panel-heading h2 {
  font: 600 16px 'Playfair Display',serif;
  margin: 0;
}

.subtle-link {
  color: var(--brand);
  font-weight: 700;
  font-size: 10px;
  border: 0;
  background: none;
}

.production-row {
  display: grid;
  grid-template-columns: 47px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #F3E8E1;
}

.date-chip {
  text-align: center;
  background: #F3E8E1;
  border-radius: 7px;
  padding: 7px 3px;
  color: #7A5F4E;
  font-size: 9px;
}

.date-chip b {
  font: 600 17px 'Playfair Display',serif;
  display: block;
  color: #5A3E2B;
}

.row-title {
  font-weight: 600;
  font-size: 11px;
}

.row-sub {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  padding: 5px 8px;
  border-radius: 99px;
  white-space: nowrap;
  background: #F3E8E0;
  color: #8A6A4F;
}

.status:before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status.en-proceso {
  background: #F6E9D9;
  color: #9C6A2E;
}

.status.completada {
  background: #e8efe3;
  color: #628052;
}

.status.cancelada {
  background: #F9E3E1;
  color: #B0534F;
}

.ingredient-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid #F3E8E1;
}

.alert-dot {
  width: 7px;
  height: 7px;
  background: #DE8E8E;
  border-radius: 50%;
}

.ingredient-alert span:nth-child(2) {
  font-size: 10px;
  flex: 1;
}

.ingredient-alert small {
  color: var(--muted);
  font-size: 9px;
}

.quick-actions,.section-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.search-box {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 7px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-width: 200px;
  color: #9A8275;
}

.search-box input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  font-size: 11px;
}

.select,.field input,.field select,.field textarea {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 7px;
  padding: 9px 10px;
  color: #5A3E2B;
  outline-color: #E8A5A5;
}

.select {
  height: 36px;
  font-size: 11px;
}

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

.recipe-card {
  overflow: hidden;
  transition: transform .15s,border .15s;
  cursor: pointer;
}

.recipe-card:hover {
  transform: translateY(-2px);
  border-color: #E8A5A5;
}

.recipe-art {
  height: 108px;
  position: relative;
  display: grid;
  place-items: center;
  background: #F3DCCB;
  overflow: hidden;
}

.recipe-art:before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  top: -80px;
  right: -35px;
  border-radius: 50%;
  background: #FFF7F2AA;
}

.recipe-art span {
  font-size: 43px;
  position: relative;
  filter: drop-shadow(0 7px 5px #5A3E2B1E);
}

.recipe-art[data-type="Pan dulce"] {
  background: #F6DDC6;
}

.recipe-art[data-type="Masas"] {
  background: #F1E4D0;
}

.recipe-art[data-type="Pastelería"] {
  background: #F5D3D3;
}

.recipe-card-body {
  padding: 14px;
}

.recipe-card-top,.recipe-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-tag {
  font-size: 8px;
  color: #7A5F4E;
  background: #F3E8E1;
  padding: 5px 7px;
  border-radius: 4px;
}

.recipe-version {
  font-size: 9px;
  color: #9A8275;
}

.recipe-card h3 {
  font: 600 17px 'Playfair Display',serif;
  margin: 10px 0 5px;
}

.recipe-card p {
  font-size: 10px;
  line-height: 1.5;
  color: #9A8275;
  margin: 0;
  min-height: 30px;
}

.recipe-card-foot {
  border-top: 1px solid #F3E8E1;
  margin-top: 12px;
  padding-top: 10px;
  font-size: 9px;
  color: #7A5F4E;
}

.recipe-card-foot strong {
  color: #5A3E2B;
}

.empty-state {
  text-align: center;
  padding: 48px 12px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.empty-state b {
  display: block;
  color: #5A3E2B;
  font: 600 17px 'Playfair Display',serif;
  margin-bottom: 7px;
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

.data-table th {
  text-align: left;
  color: #9A8275;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #F3E8E1;
  font-size: 11px;
}

.stock-low {
  color: #C0604A;
  font-weight: 600;
}

.stock-meter {
  height: 5px;
  background: #F3E8E1;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 7px;
  width: 95px;
}

.stock-meter span {
  display: block;
  height: 100%;
  background: #D4A373;
}

.stock-meter span.low {
  background: #E08A7A;
}

.week-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.week-nav {
  display: flex;
  gap: 7px;
  align-items: center;
}

.week-nav button {
  height: 30px;
  width: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.week-label {
  font: 600 17px 'Playfair Display',serif;
  margin: 0 8px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(90px,1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.day-column {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 170px;
  padding: 9px;
}

.day-column.today {
  border-color: #E8A5A5;
  background: #FFF7F6;
}

.day-head {
  font-size: 9px;
  color: #9A8275;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}

.day-head strong {
  color: #5A3E2B;
}

.plan-chip {
  padding: 7px 6px;
  border-radius: 5px;
  background: #F3E8E1;
  font-size: 9px;
  margin: 5px 0;
  cursor: pointer;
  line-height: 1.4;
}

.day-empty {
  font-size: 8px;
  color: #C4B2A6;
  padding: 8px 1px;
}

.status-select {
  border: 0;
  background: transparent;
}

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

.ingredient-card {
  padding: 17px;
}

.ingredient-card h3 {
  font: 600 15px 'Playfair Display',serif;
  margin: 0 0 15px;
}

.purchase-summary,.import-hint {
  background: #F3E8E1;
  border-radius: 8px;
  padding: 14px;
  margin-top: 13px;
  font-size: 10px;
  line-height: 1.6;
  color: #7A5F4E;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #3A2619B0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  width: min(660px,100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  box-shadow: 0 25px 75px #1114;
}

.modal.wide {
  width: min(800px,100%);
}

.modal-head {
  padding: 21px 24px 15px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-head h2 {
  font: 600 23px 'Playfair Display',serif;
  margin: 0;
}

.modal-head p {
  color: var(--muted);
  font-size: 10px;
  margin: 6px 0 0;
}

.modal-close {
  border: 0;
  background: #F3E8E1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 17px;
}

.modal-body {
  padding: 20px 24px;
}

.modal-foot {
  padding: 13px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.detail-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #9A8275;
  font-size: 10px;
  margin: 0 0 17px;
}

.detail-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-layout h3,.scale-box h3 {
  font: 600 15px 'Playfair Display',serif;
  margin: 0 0 12px;
}

.detail-ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}

.detail-ingredients li {
  padding: 9px 0;
  border-bottom: 1px solid #F3E8E1;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.steps {
  padding-left: 18px;
  margin: 0;
  color: #7A5F4E;
}

.steps li {
  padding: 0 0 10px 4px;
  font-size: 10px;
  line-height: 1.6;
}

.scale-box {
  margin-top: 20px;
  background: #F8F0EA;
  padding: 15px;
  border-radius: 8px;
}

.scale-control {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.scale-control input {
  width: 85px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}

.scale-control span {
  font-size: 10px;
  color: #7A5F4E;
}

.scaled-copy-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 14px;
}

.scaled-copy-list li {
  font-size: 9px;
  padding: 6px 0;
  border-bottom: 1px solid #EBDDD3;
}

[hidden] { display: none !important; }

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}

.field label {
  font-size: 10px;
  font-weight: 600;
  color: #7A5F4E;
}

.field input,.field select,.field textarea {
  font-size: 11px;
  width: 100%;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.component-row {
  display: grid;
  grid-template-columns: 1fr 85px 74px 30px;
  gap: 6px;
  align-items: center;
  margin: 7px 0;
}

.component-row select,.component-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 6px;
  font-size: 10px;
  background: var(--white);
}

.component-row button {
  border: 0;
  background: none;
  color: #B0534F;
  font-size: 17px;
}

.backdrop-note {
  color: #9A8275;
  font-size: 10px;
  line-height: 1.6;
}

.ai-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #9C6A2E;
  font-size: 9px;
  font-weight: 700;
}

.ai-label:before {
  content: '✦';
  font-size: 12px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 23px;
  z-index: 40;
  background: #4A3122;
  color: white;
  border-radius: 8px;
  padding: 12px 17px;
  font-size: 11px;
  box-shadow: 0 7px 22px #1113;
}

.mobile-overlay {
  display: none;
}

@media(max-width:1050px) {
  .view {
    padding: 30px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .recipe-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .stat-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media(max-width:760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .2s;
    width: 260px;
    box-shadow: 8px 0 25px #1111;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: #3A261966;
    z-index: 4;
  }
  .main-area {
    margin-left: 0;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    height: 58px;
    padding: 0 16px;
    justify-content: flex-start;
    gap: 12px;
  }
  .top-actions {
    margin-left: auto;
    gap: 10px;
  }
  .today-label,.icon-button {
    display: none;
  }
  .view {
    padding: 25px 16px 40px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 19px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading>.btn,.page-heading .section-tools {
    width: 100%;
  }
  .search-box {
    flex: 1;
    min-width: 140px;
  }
  .recipe-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .recipe-art {
    height: 83px;
  }
  .recipe-card-body {
    padding: 10px;
  }
  .recipe-card h3 {
    font-size: 14px;
  }
  .recipe-card p {
    font-size: 9px;
  }
  .recipe-card-foot {
    font-size: 8px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    gap: 8px;
  }
  .stat-card {
    padding: 13px;
    min-height: 93px;
  }
  .stat-value {
    font-size: 23px;
  }
  .detail-layout,.form-grid {
    grid-template-columns: 1fr;
  }
  .modal-head {
    padding: 17px;
  }
  .modal-body {
    padding: 17px;
  }
  .modal-foot {
    padding: 10px 17px 16px;
  }
  .week-grid {
    grid-template-columns: repeat(7,94px);
  }
  .ingredient-grid {
    grid-template-columns: 1fr;
  }
  .scaled-copy-list {
    grid-template-columns: 1fr;
  }
  .component-row {
    grid-template-columns: 1fr 65px 65px 25px;
  }
  .crumb {
    font-size: 10px;
  }
}

@media(max-width:410px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .recipe-art {
    height: 105px;
  }
  .topbar {
    gap: 7px;
  }
}

.recipe-art.has-image:before {
  display: none;
}

.recipe-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-image-preview {
  max-width: 300px;
}

.recipe-image-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.ingredient-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.purchase-lines-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 9px;
}

.purchase-lines-heading h3 {
  font: 600 15px 'Playfair Display',serif;
  margin: 0;
}

.purchase-lines {
  display: grid;
  gap: 8px;
}

.purchase-line {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(74px,.72fr) minmax(70px,.62fr) minmax(105px,.85fr) 32px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFDFB;
}

.purchase-line .field {
  min-width: 0;
  margin: 0;
}

.purchase-line .field input,.purchase-line .field select {
  min-width: 0;
}

.purchase-line-remove {
  height: 35px;
  border: 0;
  border-radius: 6px;
  background: #FAECEA;
  color: #B0534F;
  font-size: 20px;
}

.purchase-ticket-details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
}

.purchase-ticket-details ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.purchase-ticket-details li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-top: 1px solid #F3E8E1;
  font-size: 10px;
}

@media(max-width:760px) {
  .purchase-line {
    grid-template-columns: 1fr 1fr 34px;
  }
  .purchase-line .field:first-child {
    grid-column: 1/-1;
  }
  .purchase-line .field:nth-child(4) {
    grid-column: 1/3;
  }
  .purchase-line-remove {
    grid-column: 3;
    grid-row: 3;
  }
  .purchase-lines-heading {
    align-items: flex-start;
  }
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left,#F9DCDC 0,transparent 45%),var(--paper);
}

.auth-card {
  width: min(100%,410px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 16px 45px #5A3E2B14;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--brand-dark);
  font: 700 21px 'Playfair Display',serif;
}

.auth-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 50%;
}

.auth-brand small {
  display: block;
  font: 600 8px 'Montserrat',sans-serif;
  letter-spacing: 1.4px;
  color: #9A8275;
}

.auth-card h1 {
  font: 600 29px 'Playfair Display',serif;
  margin: 0;
}

.auth-card>p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 8px 0 22px;
}

.auth-card form {
  display: grid;
  gap: 8px;
}

.auth-card label {
  font-size: 11px;
  font-weight: 600;
  color: #7A5F4E;
  margin-top: 7px;
}

.auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 7px;
  padding: 11px;
  color: #5A3E2B;
}

.auth-submit {
  width: 100%;
  margin-top: 10px;
}

.auth-toggle {
  display: block;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  margin: 17px auto 0;
}

.auth-message {
  font-size: 11px;
  line-height: 1.5;
  color: #8A5A2B;
  background: #F8ECDD;
  padding: 10px;
  border-radius: 7px;
}

.auth-forgot {
  display: block;
  min-height: 42px;
  margin: 8px auto 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

/* Mobile and iPhone refinements */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

button,a,input,select,textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #D4A373;
  outline-offset: 2px;
}

@media(max-width:760px) {
  .sidebar {
    height: 100vh;
    height: 100dvh;
    padding-top: calc(22px + env(safe-area-inset-top));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  .main-area {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));
    background: #FBF5F1F2;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .mobile-menu {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: #F3E8E1;
    display: grid;
    place-items: center;
    font-size: 20px;
  }
  .crumb {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }
  .crumb span {
    margin: 0 5px;
  }
  .view {
    min-width: 0;
    padding: 24px max(16px,env(safe-area-inset-right)) calc(34px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  .page-heading {
    gap: 14px;
  }
  .page-heading h1 {
    font-size: clamp(25px,7vw,29px);
    line-height: 1.12;
  }
  .page-heading p {
    font-size: 13px;
    line-height: 1.5;
  }
  .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 10px;
  }
  .btn-sm {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }
  .quick-actions,.section-tools {
    align-items: stretch;
    gap: 9px;
  }
  .search-box,.select {
    height: 44px;
    min-width: 0;
    font-size: 16px;
  }
  .search-box input {
    font-size: 16px;
  }
  .panel {
    min-width: 0;
    padding: 16px;
    border-radius: 13px;
  }
  .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .panel-heading h2 {
    font-size: 18px;
    line-height: 1.25;
  }
  .row-title {
    font-size: 13px;
    line-height: 1.35;
  }
  .row-sub {
    font-size: 12px;
    line-height: 1.5;
  }
  .stat-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }
  .stat-card {
    min-width: 0;
    padding: 13px;
    min-height: 96px;
    border-radius: 12px;
  }
  .stat-top {
    font-size: 11px;
    gap: 6px;
  }
  .stat-value {
    font-size: 25px;
  }
  .recipe-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }
  .recipe-card {
    min-width: 0;
    border-radius: 12px;
  }
  .recipe-art {
    height: 84px;
  }
  .recipe-card-body {
    padding: 11px;
  }
  .recipe-card h3 {
    font-size: clamp(13px,3.8vw,15px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .recipe-card p {
    font-size: 11px;
    line-height: 1.45;
    min-height: 0;
  }
  .recipe-card-foot {
    gap: 5px;
    align-items: flex-start;
    flex-direction: column;
    font-size: 10px;
  }
  .week-bar {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .week-nav {
    width: 100%;
    justify-content: space-between;
  }
  .week-nav button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }
  .week-label {
    font-size: 16px;
    text-align: center;
    flex: 1;
  }
  .week-grid {
    grid-template-columns: repeat(7,minmax(84px,1fr));
    scroll-snap-type: x proximity;
    scroll-padding-inline: 8px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .day-column {
    scroll-snap-align: start;
    min-height: 150px;
    padding: 10px;
  }
  .table-wrap {
    max-width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 620px;
  }
  .ingredient-grid {
    grid-template-columns: 1fr;
  }
  .ingredient-card {
    min-width: 0;
    padding: 16px;
    border-radius: 12px;
  }
  .form-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .field {
    min-width: 0;
    gap: 7px;
    margin-bottom: 14px;
  }
  .field label,.auth-card label {
    font-size: 12px;
  }
  .field input,.field select,.field textarea,.component-row select,.component-row input,.scale-control input,.auth-card input {
    min-height: 46px;
    font-size: 16px;
    padding: 11px 12px;
  }
  .field textarea {
    min-height: 150px;
  }
  .component-row {
    grid-template-columns: minmax(0,1fr) 62px 62px 36px;
    gap: 5px;
  }
  .component-row button {
    min-height: 42px;
  }
  .modal-backdrop {
    align-items: end;
    padding: 0;
  }
  .modal,.modal.wide {
    width: 100%;
    max-width: none;
    max-height: min(90vh, 900px);
    max-height: min(90dvh,900px);
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--white);
    padding: 17px max(17px,env(safe-area-inset-right)) 14px max(17px,env(safe-area-inset-left));
  }
  .modal-head h2 {
    font-size: 21px;
    line-height: 1.2;
  }
  .modal-close {
    width: 40px;
    height: 40px;
    flex: none;
    font-size: 22px;
  }
  .modal-body {
    padding: 16px max(17px,env(safe-area-inset-right)) 20px max(17px,env(safe-area-inset-left));
  }
  .modal-foot {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: var(--white);
    padding: 12px max(17px,env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(17px,env(safe-area-inset-left));
    border-top: 1px solid var(--line);
  }
  .modal-foot .btn {
    flex: 1;
  }
  .detail-layout {
    grid-template-columns: minmax(0,1fr);
    gap: 18px;
  }
  .detail-meta {
    flex-wrap: wrap;
    line-height: 1.5;
  }
  .detail-actions {
    width: 100%;
    margin: 8px 0 0;
    flex-wrap: wrap;
  }
  .detail-actions .btn {
    flex: 1;
  }
  .scaled-copy-list {
    grid-template-columns: minmax(0,1fr);
  }
  .auth-shell {
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(18px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  .auth-card {
    padding: clamp(22px,7vw,30px);
    border-radius: 18px;
  }
  .auth-brand {
    margin-bottom: 24px;
  }
  .auth-card h1 {
    font-size: clamp(27px,8vw,31px);
  }
  .auth-submit {
    min-height: 48px;
    font-size: 14px;
  }
  .auth-toggle {
    min-height: 44px;
    font-size: 13px;
    padding: 8px;
  }
  .toast {
    left: max(14px,env(safe-area-inset-left));
    right: max(14px,env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 13px;
  }
}

@media(max-width:360px) {
  .recipe-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .recipe-art {
    height: 100px;
  }
  .recipe-card-foot {
    flex-direction: row;
    align-items: center;
  }
  .component-row {
    grid-template-columns: minmax(0,1fr) 54px 58px 34px;
    gap: 4px;
  }
  .panel {
    padding: 14px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior: auto!important;
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}

.stat-link {
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stat-link:hover,.stat-link:focus-visible {
  border-color: #E8A5A5;
  box-shadow: 0 5px 18px #5A3E2B14;
  outline: 0;
}

.stat-card[data-dashboard-view] {
  cursor: pointer;
}

.stat-card[data-dashboard-view]:hover {
  border-color: #E8A5A5;
}

.field input[type=checkbox] {
  width: auto;
  min-height: auto;
}

/* ===== Añadidos de la versión reestructurada ===== */
.sidebar { overflow-y: auto; }
.form-subtitle { font: 600 14px 'Playfair Display',serif; margin: 8px 0; }
.component-row.needs-review select, .component-row.needs-review input { border-color: #E08A7A; }
.component-note { grid-column: 1 / -1; font-size: 9px; color: var(--muted); line-height: 1.5; }
.component-note.warning { color: #B0602F; font-weight: 600; }
.notice { background: #F8ECDD; color: #8A5A2B; border-radius: 8px; padding: 10px 12px; font-size: 10px; line-height: 1.55; margin: 0 0 13px; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.table-actions { display: flex; gap: 6px; white-space: nowrap; }
.field textarea.short { min-height: 70px; }
.auth-hint { font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 14px; }
.sync-card[data-status="saving"] .sync-dot { background: #D4A373; }
.sync-card[data-status="error"] .sync-dot, .sync-card[data-status="conflict"] .sync-dot { background: var(--red); }
.sync-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #FBE6E4; color: #8A3F3A; padding: 12px 42px; font-size: 11px; }
.sync-banner[hidden] { display: none; }
.sync-banner span { display: block; margin-top: 3px; }
.sync-banner-actions { display: flex; gap: 8px; }
.order-row, .customer-card, .note-card, .pinned-note, .stat-card[data-view] { cursor: pointer; }
.date-chip.late { background: #F9E3E1; color: #B0534F; }
.plan-chip .plan-chip-order { display: block; color: var(--muted); font-size: inherit; }
.order-item { display: grid; grid-template-columns: minmax(0,1.6fr) 90px 110px 32px; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.order-item .field { margin: 0; min-width: 0; }
.order-item .order-item-detail { grid-column: 1 / 4; grid-row: 2; }
.customer-grid, .note-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.customer-card { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.customer-card .avatar { flex: none; width: 36px; height: 36px; }
.customer-card-body { min-width: 0; }
.note-card { padding: 15px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.note-card.pinned { border-color: #E8A5A5; background: #FFF7F6; }
.note-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.note-card h3 { font: 600 15px 'Playfair Display',serif; margin: 0 0 8px; }
.note-card p, .pinned-note p { font-size: 10px; line-height: 1.55; color: #7A5F4E; margin: 0 0 9px; max-height: 120px; overflow: hidden; }
.pinned-note { padding: 10px 0; border-top: 1px solid #F3E8E1; font-size: 11px; }
@media(max-width:1050px) { .customer-grid, .note-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media(max-width:760px) {
  .toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
  .customer-grid, .note-grid { grid-template-columns: minmax(0,1fr); }
  .component-note, .notice, .note-card p, .pinned-note p, .auth-hint { font-size: 12px; }
  .sync-banner { padding: 12px 16px; font-size: 12px; }
  .order-item { grid-template-columns: 1fr 1fr 34px; }
  .order-item .field:first-child { grid-column: 1 / -1; }
  .order-item .order-item-detail { grid-column: 1 / -1; grid-row: 3; }
  .order-item .purchase-line-remove { grid-column: 3; grid-row: 2; height: 46px; }
}

/* Estados de pedido (los de producción ya tienen su color arriba) */
.status.en-produccion { background: #F6E9D9; color: #9C6A2E; }
.status.listo, .status.entregado { background: #e8efe3; color: #628052; }
.status.cancelado { background: #F9E3E1; color: #B0534F; }

/* Ajustes tras el cambio de tipografía */
.week-nav .btn { width: auto; white-space: nowrap; }
.data-table.compact { min-width: 0; }
.data-table.compact th, .data-table.compact td { padding-left: 8px; padding-right: 8px; }
.check-row { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--ink); font-size: 12px; }
.check-row input { accent-color: var(--accent); }
.product-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px 18px; padding: 16px 0; border-top: 1px solid #F3E8E1; }
.product-row > div { min-width: 0; }
.product-row .row-title { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.product-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
@media(max-width:760px) {
  .product-row { grid-template-columns: minmax(0,1fr) auto; gap: 10px 12px; padding: 15px 0; }
  .product-row > div { grid-column: 1 / -1; }
  .product-row .status { justify-self: start; font-size: 11px; }
  .product-row .btn { justify-self: end; min-width: 82px; }
  .product-meta { gap: 4px 12px; }
}

/* ===== Lotes, estados, notas y catálogo ===== */
.status.agendado { background: #F3E8E0; color: #8A6A4F; }
.status.preparando, .status.en-proceso { background: #F6E9D9; color: #9C6A2E; }
.status.pagado, .status.completada { background: #e8efe3; color: #628052; }
.status.entregado { background: #FBE6E4; color: #B0534F; }
.lot-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lot-figure { background: var(--sand); border-radius: 10px; padding: 11px 13px; display: grid; gap: 3px; }
.lot-figure b { font: 600 20px 'Playfair Display', serif; }
.lot-figure span { font-size: 10px; color: var(--muted); }
.lot-figure.low { background: #FBE6E4; } .lot-figure.low b { color: var(--red); }
.lot-figure.ok { background: #EEF3E9; } .lot-figure.ok b { color: #4F6E42; }
.lot-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #F3E8E1; }
.lot-row[data-action] { cursor: pointer; }
.stepper { display: flex; gap: 6px; align-items: center; }
.stepper input { flex: 1; min-width: 70px; }
.notice.ok { background: #EEF3E9; color: #4F6E42; }
.row-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.pay-badge { font-size: 9px; font-weight: 700; padding: 4px 8px; border-radius: 99px; }
.pay-badge.paid { background: #e8efe3; color: #628052; }
.pay-badge.due { background: #FBE6E4; color: var(--red); }
.order-row { grid-template-columns: 47px 1fr auto; }
.row-step { white-space: nowrap; }
.status-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 18px; }
.status-stepper .step { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 10px; font-weight: 600; color: var(--muted); }
.status-stepper .step-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--muted); font-size: 11px; }
.status-stepper .step.done { color: var(--brand); }
.status-stepper .step.done .step-dot { background: var(--gold); color: #fff; }
.status-stepper .step.current { border-color: var(--pink); background: #FFF7F6; color: var(--brand); }
.status-stepper .step.current .step-dot { background: var(--brand); color: #fff; }
.status-stepper .step:disabled { opacity: .5; cursor: default; }
.folio-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.folio-panel div { display: grid; gap: 3px; }
.folio-panel b { font: 600 19px 'Playfair Display', serif; }
.folio-panel span { font-size: 10px; color: var(--muted); }
.folio-panel .low b { color: var(--red); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.date-filter { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.date-filter input { border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; background: var(--white); color: var(--ink); font: inherit; font-size: 11px; }
.kind-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kind-toggle label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.kind-toggle label:has(input:checked) { border-color: var(--pink); background: #FFF7F6; }
.kind-toggle span { display: grid; font-weight: 600; font-size: 12px; }
.kind-toggle small { font-weight: 400; color: var(--muted); font-size: 10px; }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 11px; padding: 6px 0; }
.check-row input { width: auto; min-height: auto; margin-top: 2px; }
.order-check { border-top: 1px solid #F3E8E1; }
.history { margin-top: 14px; font-size: 11px; }
.history summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.btn-danger { background: var(--red); color: #fff; }
.admin-action { color: var(--muted); }
.product-card .product-price { font: 600 18px 'Playfair Display', serif; margin-top: 8px; }
.product-card .product-price small { font: 400 10px 'Montserrat', sans-serif; color: var(--muted); }
.product-card .row-sub { display: block; }
.product-card.inactive { opacity: .6; }
.product-card .quick-actions { margin-top: 10px; }
@media(max-width:760px) {
  .folio-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-stepper { gap: 4px; }
  .status-stepper .step { font-size: 10px; padding: 8px 2px; }
  .order-row { grid-template-columns: 47px 1fr; }
  .order-row .row-step { grid-column: 2; justify-self: start; }
  .pay-badge, .lot-figure span, .folio-panel span, .date-filter, .check-row, .kind-toggle small { font-size: 12px; }
  .filter-bar .search-box { flex-basis: 100%; }
  .date-filter input { min-height: 44px; font-size: 16px; }
  .lot-row { flex-wrap: wrap; }
}

/* ===== Equipo y roles ===== */
.role-card { font-size: 10px; color: var(--muted); padding: 0 10px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-card:empty { display: none; }
.team-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #F3E8E1; }
.team-row .avatar { width: 36px; height: 36px; }
.team-row.owner .avatar { background: var(--gold); color: #fff; }
.team-info { min-width: 0; }
.team-info .row-title .row-sub { display: inline; margin-left: 6px; }
.team-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.team-actions .select { height: 32px; }
@media(max-width:760px) {
  .team-row { grid-template-columns: 36px minmax(0, 1fr); }
  .team-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .team-actions .select { height: 44px; flex: 1 1 100%; }
  .role-card { font-size: 12px; }
}

/* ---------- Recetas por etapas ---------- */
.stage-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 4px; margin-bottom: 12px; background: var(--white); }
.stage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stage-head .stage-name { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-weight: 600; color: var(--ink); background: var(--paper); }
.stage-number { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--white); font-weight: 700; font-size: 12px; }
.stage-block .component-list { margin-bottom: 8px; }
.stage-title { margin: 12px 0 4px; font-size: 13px; color: var(--brand); }
.new-ingredient { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 9px; border-radius: 9px; background: var(--sand); }
.new-ingredient .new-ingredient-name { flex: 1 1 180px; }
.new-ingredient small { flex-basis: 100%; }

/* ---------- Limpieza de pruebas ---------- */
.danger-panel { border: 1px solid #E8C1BC; }
.danger-text { color: var(--red); border-color: #E8C1BC; }

/* ---------- Catálogo de productos ---------- */
.catalog-card { cursor: pointer; }
.catalog-gallery { display: grid; gap: 6px; }
.catalog-photo { aspect-ratio: 4 / 3; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--sand); display: grid; place-items: center; font-size: 46px; }
.catalog-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-photo.large { aspect-ratio: 1 / 1; border-radius: 14px; }
.catalog-gallery.large .catalog-photo { border-radius: 14px; }
.catalog-thumbs { display: flex; gap: 6px; padding: 0 8px; }
.catalog-thumb { width: 46px; height: 46px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.catalog-thumb.active { border-color: var(--gold); }
.catalog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-prices { list-style: none; margin: 8px 0 0; padding: 0; }
.catalog-prices li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.catalog-prices strong { font-family: 'Playfair Display', serif; font-size: 15px; }
.catalog-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.catalog-description { font-size: 14px; line-height: 1.6; margin-top: 0; }
.catalog-details { margin-top: 18px; }
.presentation-head, .presentation-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.presentation-head { font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.presentation-row { margin-bottom: 8px; }
.presentation-row input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: var(--white); color: var(--ink); }
.presentation-row button { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.presentation-base { font-size: 10px; color: var(--muted); text-align: center; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photo-thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--sand); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #0008; color: #fff; cursor: pointer; line-height: 1; }
.photo-thumb span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; text-align: center; background: #5A3E2BCC; color: #fff; padding: 2px; }
@media (max-width: 640px) {
  .catalog-sheet { grid-template-columns: 1fr; }
  .presentation-head, .presentation-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .8fr) 30px; gap: 6px; }
}
