/* ─── Reset / Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #f5f6fa; color: #1a1a2e; }

/* ─── Login ─────────────────────────────────────────────────────────────────── */
.login-screen { min-height: 100vh; background: linear-gradient(135deg, #000000 0%, #071428 100%); padding: 16px; }
.login-card { background: #fff; border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.18); }

/* Brand mark */
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.login-brand-icon { font-size: 1.7rem; background: linear-gradient(135deg,#38c5e6,#5dd5f0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.login-brand-name { font-size: 1.25rem; font-weight: 800; background: linear-gradient(135deg,#38c5e6,#5dd5f0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -.02em; }
.login-title { text-align: center; font-size: .9rem; color: #9ca3af; font-weight: 500; margin-bottom: 28px; margin-top: 2px; }

/* Fields */
.login-label { font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.login-hint  { font-size: .75rem; color: #9ca3af; margin-top: 4px; }

/* Password with eye toggle */
.login-pwd-wrap  { position: relative; }
.login-pwd-input { padding-right: 40px; }
.login-eye-btn   { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 0; color: #9ca3af; cursor: pointer; line-height: 1; font-size: 1rem; }
.login-eye-btn:hover { color: #6b7280; }

/* Support link */
.login-support { font-size: .78rem; color: #9ca3af; text-decoration: none; }
.login-support:hover { color: #38c5e6; text-decoration: underline; }

/* ─── App Layout ────────────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px; min-height: 100vh; background: #000913;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  padding: 24px 20px 20px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon { font-size: 1.4rem; }
.brand-name { font-size: .95rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: rgba(255,255,255,.6);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border-left: 3px solid transparent; transition: all .15s;
  text-decoration: none;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: #38c5e6; }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-logout {
  margin: 16px; padding: 8px; border: 1px solid rgba(255,255,255,.15);
  background: transparent; color: rgba(255,255,255,.5); border-radius: 8px;
  font-size: .8rem; cursor: pointer; transition: all .15s;
}
.sidebar-logout:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ─── Main Content ──────────────────────────────────────────────────────────── */
.main-content { flex: 1; overflow-y: auto; padding: 28px 32px; min-width: 0; }

.section { display: none; }
.section.active { display: block; }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; color: #1a1a2e; }

/* ─── KPI Grid ──────────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.kpi-card {
  background: #fff; border-radius: 12px; padding: 20px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); text-align: center;
}
.kpi-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.kpi-label { font-size: .75rem; color: #888; margin-top: 6px; }

/* ─── Charts ────────────────────────────────────────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.chart-title { font-size: .85rem; font-weight: 600; color: #555; margin-bottom: 12px; }
canvas { max-height: 220px; }

/* ─── Filters ───────────────────────────────────────────────────────────────── */
.filters-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }

/* ─── Table Card ────────────────────────────────────────────────────────────── */
.table-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.table { margin: 0; font-size: .875rem; }
.table thead th { background: #f8f9fc; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #777; border-bottom: 1px solid #eee; padding: 10px 16px; }
.table tbody td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid #f0f0f0; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { cursor: pointer; transition: background .1s; }
.table tbody tr:hover td { background: #f8f9fc; }

/* ─── Status badges ─────────────────────────────────────────────────────────── */
.badge-pending   { background: #fff3cd; color: #856404; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 600; }
.badge-completed { background: #d1fae5; color: #065f46; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 600; }
.badge-cancelled { background: #fee2e2; color: #991b1b; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 600; }
.badge-future    { background: #eff6ff; color: #1d4ed8; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 600; }

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid #f0f0f0; font-size: .8rem; color: #888; }
.pagination-bar .pages { display: flex; gap: 4px; }
.page-btn { border: 1px solid #e0e0e0; background: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: .8rem; transition: all .1s; }
.page-btn:hover { background: #f0f0f0; }
.page-btn.active { background: #38c5e6; color: #fff; border-color: #38c5e6; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── Search ────────────────────────────────────────────────────────────────── */
.search-bar { margin-bottom: 14px; max-width: 360px; }

/* ─── Chat modal ────────────────────────────────────────────────────────────── */
.chat-body { background: #f0f2f5; min-height: 300px; max-height: 60vh; overflow-y: auto; padding: 16px; }
.chat-row { display: flex; margin-bottom: 10px; }
.chat-row.user  { justify-content: flex-end; }
.chat-row.bot   { justify-content: flex-start; }
.chat-bubble { max-width: 75%; padding: 8px 13px; border-radius: 14px; font-size: .875rem; line-height: 1.5; word-break: break-word; }
.chat-user { background: #dcf8c6; border-bottom-right-radius: 3px; }
.chat-bot  { background: #fff; border: 1px solid #e8e8e8; border-bottom-left-radius: 3px; }
.chat-time { font-size: .7rem; color: #aaa; margin-top: 3px; }
.modal-footer { padding: 10px 16px; }

/* ─── WhatsApp section ──────────────────────────────────────────────────────── */
.wa-card { background: #fff; border-radius: 12px; padding: 28px; max-width: 680px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* Two-column layout: QR left, steps right */
.wa-connecting-layout { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; }
.wa-qr-col { display: flex; flex-direction: column; align-items: center; }
.wa-qr-loading { display: flex; align-items: center; margin-bottom: 8px; }
.wa-qr { border-radius: 10px; border: 2px solid #e5e7eb; max-width: 220px; width: 100%; transition: opacity .2s; }

/* Steps */
.wa-steps-title { font-weight: 700; font-size: .9rem; color: #1a1a2e; margin-bottom: 12px; }
.wa-steps { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wa-steps li { font-size: .88rem; color: #374151; line-height: 1.45; }
.wa-steps li strong { color: #1a1a2e; }

/* Connected / Error state cards */
.wa-status-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 10px; }
.wa-status-card--ok  { background: #f0fdf4; border: 1px solid #bbf7d0; }
.wa-status-card--err { background: #fff7ed; border: 1px solid #fed7aa; }
.wa-status-icon { font-size: 2rem; flex-shrink: 0; }
.wa-status-card--ok  .wa-status-icon { color: #16a34a; }
.wa-status-card--err .wa-status-icon { color: #ea580c; }
.wa-status-title { font-weight: 700; font-size: 1rem; color: #1a1a2e; }
.wa-status-sub   { font-size: .83rem; color: #6b7280; margin-top: 2px; }

/* Informative note */
.wa-note { font-size: .8rem; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 14px; }

@media (max-width: 560px) {
  .wa-connecting-layout { grid-template-columns: 1fr; gap: 20px; }
  .wa-qr-col { width: 100%; }
  .wa-qr { max-width: 200px; }
}

/* ─── Client detail modal ───────────────────────────────────────────────────── */
.detail-section { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.detail-section:last-of-type { border-bottom: none; }
.detail-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: .875rem; }
.detail-label { color: #888; font-size: .8rem; }
.detail-value { font-weight: 500; color: #1a1a2e; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-box { background: #f8f9fc; border-radius: 8px; padding: 10px; text-align: center; }
.stat-val { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.stat-lbl { font-size: .7rem; color: #888; margin-top: 4px; }

/* ─── Services editor ───────────────────────────────────────────────────────── */
.services-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.service-row { display: grid; grid-template-columns: 1fr 110px 90px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.services-header { margin-bottom: 4px !important; }
.services-header span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #888; padding: 0 4px; }
.add-service-row { display: grid; grid-template-columns: 1fr 110px 90px auto; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid #f0f0f0; }
@media (max-width: 600px) {
  .service-row, .add-service-row { grid-template-columns: 1fr 1fr; }
}

/* ─── Agenda / Calendar ─────────────────────────────────────────────────────── */
.ag-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ag-day-header { text-align: center; font-size: .7rem; font-weight: 600; color: #aaa; padding: 4px 0; }
.ag-day {
  min-height: 72px; border-radius: 8px; padding: 6px 8px; font-size: .8rem; cursor: default;
  background: #f8f9fa; border: 1px solid #eee; display: flex; flex-direction: column; gap: 2px;
}
.ag-day.other-month { opacity: .3; }
.ag-day.ag-past    { opacity: .45; }
.ag-day.ag-free    { cursor: pointer; }
.ag-day.ag-free:hover { background: #eef0ff; border-color: #c7c9f0; }
.ag-day.today      { border-color: #0d6efd; background: #e8f0fe; }
.ag-day.blocked    { background: #fee2e2; border-color: #fca5a5; cursor: pointer; }
.ag-day.blocked:hover { background: #fecaca; }
.ag-day-head       { display: flex; align-items: center; gap: 5px; }
.ag-day-num        { font-weight: 600; color: #333; font-size: .82rem; }
.ag-day.blocked .ag-day-num { color: #b91c1c; }
.ag-day.today .ag-day-num   { color: #0d6efd; }
.ag-day:not(.other-month) { cursor: pointer; }
.ag-today-dot      { width: 5px; height: 5px; border-radius: 50%; background: #0d6efd; display: inline-block; }
.ag-block-label    { font-size: .62rem; color: #b91c1c; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-event-count    { margin-left: auto; font-size: .62rem; font-weight: 700; background: #38c5e6; color: #fff; border-radius: 10px; padding: 0 5px; line-height: 1.5; }
.ag-event-chip     {
  font-size: .6rem; font-weight: 600; line-height: 1.4;
  background: #e0f7fa; color: #006064; border: 1px solid #80deea;
  border-radius: 5px; padding: 1px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.ag-day.has-events  { min-height: 80px; }
.ag-calendar-hint   { font-size: .75rem; }

/* ─── Popover de día ─────────────────────────────────────────────────────────── */
.ag-popover {
  position: fixed; z-index: 1050;
  width: 320px; max-height: 460px;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.18);
  overflow: hidden; display: flex; flex-direction: column;
}
.ag-popover-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: #f8f9fa; border-bottom: 1px solid #e9ecef;
  flex-shrink: 0;
}
.ag-popover-body { padding: 12px 14px; overflow-y: auto; flex: 1; }
.ag-pop-section  { font-size: .68rem; font-weight: 700; color: #6c757d; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.ag-pop-event    {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px; background: #f8f9fa;
  border: 1px solid #e9ecef; margin-bottom: 8px;
}
.ag-pop-event-info  { flex: 1; min-width: 0; }
.ag-pop-event-name  { font-size: .85rem; font-weight: 600; line-height: 1.3; word-break: break-word; }
.ag-pop-event-meta  { font-size: .75rem; color: #6c757d; margin-top: 2px; }
.ag-pop-form    { background: #f8f9fa; border-radius: 8px; padding: 10px; }
.btn-xs { padding: 3px 8px; font-size: .72rem; }
@media (prefers-color-scheme: dark) {
  .ag-popover { background: #1e2329; border-color: #30363d; color: #e6edf3; }
  .ag-popover-hdr { background: #161b22; border-color: #30363d; color: #e6edf3; }
  .ag-popover-hdr .fw-semibold { color: #e6edf3; }
  .ag-pop-section { color: #8b949e; }
  .ag-pop-event { background: #161b22; border-color: #30363d; color: #e6edf3; }
  .ag-pop-event-name { color: #e6edf3; }
  .ag-pop-event-meta { color: #8b949e; }
  .ag-pop-form  { background: #161b22; color: #e6edf3; }
  .ag-pop-form label { color: #c9d1d9; }
  .ag-popover .ag-pop-form .form-control,
  .ag-popover .ag-pop-form .form-select {
    background: #0d1117 !important; border-color: #30363d !important; color: #e6edf3 !important;
  }
  .ag-popover .ag-pop-form .form-control::placeholder {
    color: #6e7681 !important;
  }
  .ag-pop-empty { color: #8b949e; }
}

/* ─── Simulator section ─────────────────────────────────────────────────────── */

/* Section fills the full panel height — only when active to not override .section{display:none} */
#sec-simulador.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px); /* 28px top + 28px bottom padding of main-content */
  gap: 12px;
}

/* Header row: note + reset button side by side */
.sim-header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sim-note { flex: 1; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 9px 14px; font-size: .82rem; color: #0369a1; display: flex; align-items: center; }
.sim-reset-btn { flex-shrink: 0; white-space: nowrap; }

/* Chat window fills the remaining height */
.sim-chat-wrap { flex: 1; min-height: 0; background: #ece5dd; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.sim-messages  { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }

/* Bubbles */
.sim-row      { display: flex; }
.sim-row-user { justify-content: flex-end; }
.sim-row-bot  { justify-content: flex-start; }
.sim-bubble   { max-width: 72%; padding: 8px 12px; border-radius: 10px; font-size: .9rem; line-height: 1.5; word-break: break-word; }
.sim-bubble-user { background: #dcf8c6; border-radius: 10px 10px 2px 10px; color: #111; }
.sim-bubble-bot  { background: #fff; border-radius: 10px 10px 10px 2px; color: #111; box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* Typing indicator */
.sim-typing { display: flex; align-items: center; gap: 4px; padding: 8px 18px 2px; flex-shrink: 0; }
.sim-typing-dot { width: 7px; height: 7px; border-radius: 50%; background: #7c7c7c; animation: simDotPulse .9s infinite ease-in-out; }
.sim-typing-dot:nth-child(2) { animation-delay: .15s; }
.sim-typing-dot:nth-child(3) { animation-delay: .30s; }
@keyframes simDotPulse { 0%,80%,100% { transform: scale(.55); opacity: .35; } 40% { transform: scale(1); opacity: 1; } }

/* Input row */
.sim-input-row { display: flex; gap: 8px; padding: 10px 14px; background: #f0f2f5; flex-shrink: 0; }
.sim-input-row .form-control { border-radius: 20px; font-size: .9rem; }
.sim-send-btn  { border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0; padding: 0; display: flex; align-items: center; justify-content: center; }

/* Lead banner (amber-gold) */
.sim-lead-banner  { background: linear-gradient(135deg, #fff7ed, #fef3c7); border: 1px solid #f59e0b; border-radius: 10px; padding: 12px 16px; margin: 4px 0; }
.sim-lead-title   { font-weight: 700; color: #92400e; font-size: .88rem; }
.sim-lead-toggle  { background: none; border: none; color: #92400e; font-size: .77rem; padding: 5px 0 0; cursor: pointer; text-decoration: underline; display: block; }
.sim-lead-preview { background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 12px; font-size: .76rem; margin-top: 8px; white-space: pre-wrap; word-break: break-word; font-family: monospace; }

/* Human handoff banner (orange) */
.sim-human-banner  { background: linear-gradient(135deg, #fff8f1, #ffedd5); border: 1px solid #ea580c; border-radius: 10px; padding: 12px 16px; margin: 4px 0; }
.sim-human-title   { font-weight: 700; color: #9a3412; font-size: .88rem; }
.sim-human-toggle  { background: none; border: none; color: #9a3412; font-size: .77rem; padding: 5px 0 0; cursor: pointer; text-decoration: underline; display: block; }
.sim-human-preview { background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 12px; font-size: .76rem; margin-top: 8px; white-space: pre-wrap; word-break: break-word; font-family: monospace; }

/* Service card bubble in simulator */
.sim-service-card    { background: #fff; border-radius: 10px; overflow: hidden; max-width: 320px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.sim-service-img     { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.sim-service-caption { padding: 10px 12px; font-size: .83rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }

.sim-error-row    { text-align: center; font-size: .78rem; color: #dc2626; padding: 6px 0; }

/* Pause banner (blue) */
.sim-pause-banner  { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #3b82f6; border-radius: 10px; padding: 12px 16px; margin: 4px 0; }
.sim-pause-title   { font-weight: 700; color: #1d4ed8; font-size: .88rem; }
.sim-pause-silence { text-align: center; font-size: .76rem; color: #94a3b8; padding: 4px 0; font-style: italic; }

/* Config — service image upload */
.csvc-img-row         { margin-top: 8px; }
.csvc-img-wrap        { display: flex; align-items: center; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.csvc-img-preview     { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; flex-shrink: 0; }
.csvc-img-placeholder { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; background: #f3f4f6; border-radius: 8px; border: 1px dashed #d1d5db; font-size: .7rem; color: #9ca3af; flex-shrink: 0; text-align: center; padding: 4px; }
.csvc-img-btns        { display: flex; gap: 6px; flex-direction: column; }
.csvc-img-status      { font-size: .75rem; margin-top: 4px; display: block; }

@media (max-width: 768px) {
  #sec-simulador.active { height: calc(100vh - 32px); }
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .brand-name, .nav-item span:last-child, .sidebar-logout { display: none; }
  .nav-item { justify-content: center; padding: 14px; }
  .main-content { padding: 16px; }
  .charts-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Catering dashboard ────────────────────────────────────────────────────── */

/* KPI grid */
.cat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid transparent;
  transition: box-shadow .15s, border-color .15s, transform .12s;
}
.cat-kpi-card[role="button"] { cursor: pointer; }
.cat-kpi-card[role="button"]:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  border-color: #e0e3f0;
  transform: translateY(-1px);
}
.cat-kpi-card[role="button"]:focus-visible { outline: 2px solid #38c5e6; outline-offset: 2px; }
.cat-kpi-icon { font-size: 1rem; color: #d1d5db; margin-bottom: 10px; }
.cat-kpi-value { font-size: 2rem; font-weight: 700; line-height: 1; color: #1a1a2e; }
.cat-kpi-label { font-size: .75rem; color: #9ca3af; margin-top: 6px; }
.cat-kpi-trend { font-size: .72rem; margin-top: 5px; min-height: 1em; color: #9ca3af; }
.cat-kpi-trend .up   { color: #059669; font-weight: 600; }
.cat-kpi-trend .down { color: #dc2626; font-weight: 600; }

/* Semantic state: sin respuesta > 0 */
.cat-kpi-card--warn .cat-kpi-value { color: #d97706; }
.cat-kpi-card--warn .cat-kpi-icon  { color: #fbbf24; }

/* Conversion rate */
.cat-conv-rate {
  font-size: 2.8rem;
  font-weight: 700;
  color: #38c5e6;
  line-height: 1;
}

/* Bottom row */
.cat-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Onboarding banner */
.cat-ob {
  background: linear-gradient(135deg, #f0f3ff 0%, #f5f0ff 100%);
  border: 1px solid #dde2ff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.cat-ob-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: .875rem;
}
.cat-ob-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .8rem;
  line-height: 1;
  transition: color .1s, background .1s;
}
.cat-ob-close:hover { color: #374151; background: rgba(0,0,0,.06); }
.cat-ob-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cat-ob-step { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: #374151; }
.cat-ob-step--done .cat-ob-text { color: #9ca3af; text-decoration: line-through; }
.cat-ob-icon { font-size: .95rem; display: flex; align-items: center; flex-shrink: 0; }
.cat-ob-icon.done    { color: #059669; }
.cat-ob-icon.pending { color: #c7d2fe; }
.cat-ob-link {
  margin-left: auto;
  font-size: .78rem;
  color: #38c5e6;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-ob-link:hover { text-decoration: underline; }

@media (max-width: 900px) { .cat-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .cat-kpi-grid { grid-template-columns: 1fr; } }

/* ─── Catering config — service cards ──────────────────────────────────────── */
.cfg-svc-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .15s, border-color .15s;
}
.cfg-svc-card--open {
  border-color: #38c5e6;
  box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.cfg-svc-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}
.cfg-svc-summary:hover { background: #f8f9fc; }
.cfg-svc-card--open > .cfg-svc-summary { background: #f9faff; border-bottom: 1px solid #ebebf5; }
.cfg-svc-card--open > .cfg-svc-summary:hover { background: #f3f4ff; }

.cfg-svc-emoji-disp { font-size: 1.4rem; flex: 0 0 32px; text-align: center; line-height: 1; }

.cfg-svc-info { flex: 1; min-width: 0; overflow: hidden; }
.cfg-svc-name-disp { font-weight: 700; font-size: .95rem; color: #1a1a2e; line-height: 1.3; }
.cfg-svc-desc-disp {
  font-size: .73rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.cfg-svc-price-disp { flex: 0 0 96px; text-align: right; font-weight: 600; font-size: .875rem; color: #111827; white-space: nowrap; }
.cfg-svc-ptype-disp { flex: 0 0 96px; font-size: .72rem; color: #9ca3af; text-align: center; }
.cfg-svc-min-disp   { flex: 0 0 84px; font-size: .72rem; color: #9ca3af; text-align: center; }

.cfg-svc-del {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: #d1d5db;
  padding: 5px 7px;
  border-radius: 6px;
  margin-left: 6px;
  cursor: pointer;
  font-size: .85rem;
  transition: color .12s, background .12s;
  line-height: 1;
}
.cfg-svc-del:hover { color: #dc2626; background: #fee2e2; }

.cfg-svc-chevron {
  flex: 0 0 18px;
  color: #9ca3af;
  font-size: .8rem;
  transition: transform .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfg-svc-chevron.open { transform: rotate(180deg); }

.cfg-svc-details { padding: 14px 14px 12px; }

.cfg-svc-grid {
  display: grid;
  grid-template-columns: 52px 1fr 100px 130px 88px;
  gap: 8px;
  align-items: end;
}
.cfg-svc-label {
  display: block;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #9ca3af;
  margin-bottom: 3px;
}
.csvc-desc,
.csvc-incl {
  resize: none;
  overflow: hidden;
  min-height: 56px;
}

@media (max-width: 720px) {
  .cfg-svc-grid { grid-template-columns: 44px 1fr 90px; }
  .cfg-svc-ptype-disp, .cfg-svc-min-disp { display: none; }
}
