
:root {
  --red: #f31f2a;
  --red-dark: #c70d18;
  --yellow: #ffdd00;
  --cyan: #08cbea;
  --turquoise: #00d9c6;
  --lime: #62e500;
  --blue: #1949e8;
  --ink: #172033;
  --muted: #667085;
  --bg: #f4f6fa;
  --white: #fff;
  --border: #e5e8ef;
  --sidebar: #131927;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(26, 34, 53, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: white; }
.login-art { position: relative; overflow: hidden; display: grid; place-items: center; padding: 48px; color: white; background: radial-gradient(circle at 75% 25%, #ff6871, var(--red) 38%, var(--red-dark)); }
.login-art::before { content: ""; position: absolute; width: 560px; height: 560px; border: 56px solid rgba(255,255,255,.1); border-radius: 50%; right: -220px; top: -230px; }
.login-art::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: var(--yellow); left: -150px; bottom: -130px; }
.login-art-inner { position: relative; z-index: 2; max-width: 600px; }
.login-brand { display: flex; align-items: center; gap: 15px; margin-bottom: 48px; }
.login-brand img { width: 80px; height: 80px; border-radius: 50%; border: 6px solid white; box-shadow: 0 20px 40px rgba(80,0,5,.28); }
.login-brand strong { display: block; font-size: 1.45rem; }
.login-brand span { display: block; color: rgba(255,255,255,.7); }
.login-art h1 { margin: 0; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .93; letter-spacing: -.06em; }
.login-art p { max-width: 560px; color: rgba(255,255,255,.82); font-size: 1.1rem; }
.login-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.login-pills span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .84rem; font-weight: 750; }
.login-form-wrap { display: grid; place-items: center; padding: 42px; }
.login-card { width: min(440px, 100%); }
.login-kicker { display: inline-flex; padding: 7px 11px; border-radius: 999px; color: #9a1019; background: #ffe5e8; font-size: .76rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.login-card h2 { margin: 18px 0 7px; font-size: 2.25rem; letter-spacing: -.045em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); }
.form-field { display: grid; gap: 8px; margin-bottom: 16px; }
.form-field label { font-weight: 800; font-size: .88rem; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #d8dce5; border-radius: 13px; outline: none; color: var(--ink); background: white; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(243,31,42,.1); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; right: 8px; top: 8px; width: 37px; height: 37px; border: 0; border-radius: 10px; background: #f2f4f7; }
.login-options { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 16px 0 22px; color: var(--muted); font-size: .86rem; }
.login-options label { display: inline-flex; align-items: center; gap: 7px; }
.login-options input { accent-color: var(--red); }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 13px; font-weight: 900; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--red-dark), var(--red)); box-shadow: 0 11px 24px rgba(243,31,42,.22); }
.btn-secondary { color: var(--ink); background: white; border: 1px solid var(--border); }
.btn-success { color: #073f20; background: #b9f5cb; }
.btn-warning { color: #604400; background: #ffe78a; }
.btn-danger { color: white; background: var(--red); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: .84rem; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 268px 1fr; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 268px; display: flex; flex-direction: column; color: rgba(255,255,255,.72); background: var(--sidebar); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand img { width: 52px; height: 52px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); }
.sidebar-brand strong { display: block; color: white; }
.sidebar-brand span { display: block; margin-top: 3px; color: rgba(255,255,255,.46); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 18px 13px; }
.menu-label { padding: 12px 12px 7px; color: rgba(255,255,255,.34); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.sidebar-menu a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; margin-bottom: 4px; border-radius: 12px; font-size: .9rem; font-weight: 750; }
.sidebar-menu a:hover { color: white; background: rgba(255,255,255,.06); }
.sidebar-menu a.active { color: white; background: linear-gradient(135deg, rgba(243,31,42,.95), rgba(199,13,24,.95)); box-shadow: 0 10px 22px rgba(0,0,0,.22); }
.menu-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.07); font-style: normal; }
.sidebar-menu a.active .menu-icon { background: rgba(255,255,255,.16); }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.user-mini { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 13px; background: rgba(255,255,255,.05); }
.user-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); background: var(--yellow); font-weight: 950; }
.user-mini strong { display: block; color: white; font-size: .84rem; }
.user-mini span { display: block; color: rgba(255,255,255,.45); font-size: .72rem; }

.admin-main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 28px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.93); backdrop-filter: blur(16px); }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle { display: none; width: 43px; height: 43px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.page-heading h1 { margin: 0; font-size: 1.65rem; letter-spacing: -.035em; }
.page-heading p { margin: 3px 0 0; color: var(--muted); font-size: .83rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.top-icon { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.top-icon .dot { position: absolute; right: 8px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid white; }
.content { padding: 28px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi-card { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.kpi-card::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; right: -35px; top: -35px; background: var(--kpi-soft, rgba(243,31,42,.08)); }
.kpi-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.kpi-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--kpi-soft, rgba(243,31,42,.09)); font-size: 1.25rem; }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; color: #15713a; background: #e3f8e9; font-size: .72rem; font-weight: 850; }
.kpi-card h3 { margin: 17px 0 3px; font-size: 1.8rem; letter-spacing: -.045em; }
.kpi-card p { margin: 0; color: var(--muted); font-size: .84rem; }

.panel-grid-2 { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; margin-bottom: 20px; }
.panel-grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--shadow); overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 19px 21px; border-bottom: 1px solid var(--border); }
.panel-header h2 { margin: 0; font-size: 1.05rem; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.panel-body { padding: 21px; }
.chart-wrap { position: relative; height: 320px; }
.chart-wrap canvas { width: 100%; height: 100%; }
.donut-wrap { display: grid; place-items: center; min-height: 260px; }
.donut { position: relative; width: 190px; height: 190px; border-radius: 50%; background: conic-gradient(var(--red) 0 42%, var(--cyan) 42% 69%, var(--yellow) 69% 88%, var(--lime) 88% 100%); }
.donut::after { content: ""; position: absolute; inset: 35px; border-radius: 50%; background: white; }
.donut-center { position: absolute; z-index: 2; display: grid; place-items: center; text-align: center; inset: 0; }
.donut-center strong { display: block; font-size: 1.35rem; }
.donut-center span { color: var(--muted); font-size: .73rem; }
.legend { display: grid; gap: 10px; margin-top: 18px; }
.legend-row { display: flex; justify-content: space-between; gap: 15px; font-size: .82rem; }
.legend-label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.legend-row strong { color: var(--ink); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #fafbfc; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
td { font-size: .84rem; }
tr:last-child td { border-bottom: 0; }
.cell-main { display: flex; align-items: center; gap: 10px; }
.cell-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #f4f5f7; font-size: 1.15rem; }
.cell-copy strong { display: block; }
.cell-copy span { display: block; color: var(--muted); font-size: .74rem; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-success { color: #15713a; background: #e4f8ea; }
.status-warning { color: #946a00; background: #fff4c6; }
.status-danger { color: #b51c25; background: #ffe5e8; }
.status-info { color: #145f92; background: #e4f4ff; }
.quick-list { display: grid; gap: 12px; }
.quick-item { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 13px; }
.quick-item-left { display: flex; gap: 11px; align-items: center; }
.quick-item-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #f4f5f7; }
.quick-item strong { display: block; font-size: .85rem; }
.quick-item span { display: block; color: var(--muted); font-size: .74rem; }

.toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 20px; }
.toolbar-left, .toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; min-width: 280px; }
.search-box input { width: 100%; min-height: 44px; padding: 10px 13px 10px 42px; border: 1px solid var(--border); border-radius: 12px; background: white; outline: none; }
.search-box span { position: absolute; left: 14px; top: 11px; color: var(--muted); }
.filter-select { min-height: 44px; padding: 0 34px 0 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); background: white; }

.pos-layout { display: grid; grid-template-columns: 1fr 390px; gap: 20px; min-height: calc(100vh - 138px); }
.pos-catalog { min-width: 0; }
.category-tabs { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; }
.category-btn { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: white; font-weight: 800; }
.category-btn.active { color: white; background: var(--red); border-color: var(--red); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-card { position: relative; overflow: hidden; padding: 15px; border: 1px solid var(--border); border-radius: 16px; background: white; box-shadow: 0 8px 22px rgba(26,34,53,.05); transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-art { display: grid; place-items: center; min-height: 120px; margin-bottom: 13px; border-radius: 14px; background: #f7f8fa; font-size: 3.9rem; }
.product-card h3 { margin: 0; font-size: .94rem; }
.product-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: var(--muted); font-size: .72rem; }
.product-price { margin-top: 11px; color: var(--red); font-weight: 950; }
.product-add { position: absolute; right: 13px; bottom: 13px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 11px; color: white; background: var(--red); font-size: 1.2rem; }
.product-card.out { opacity: .58; }
.product-card.out .product-add { background: #9aa1ad; cursor: not-allowed; }

.cart-panel { position: sticky; top: 102px; align-self: start; display: flex; flex-direction: column; max-height: calc(100vh - 124px); border: 1px solid var(--border); border-radius: 18px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.cart-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.cart-header h2 { margin: 0; font-size: 1.05rem; }
.cart-header button { border: 0; color: var(--red); background: transparent; font-weight: 850; font-size: .78rem; }
.cart-items { flex: 1; min-height: 180px; overflow-y: auto; padding: 10px 15px; }
.cart-empty { display: grid; place-items: center; min-height: 220px; color: var(--muted); text-align: center; }
.cart-empty b { display: block; font-size: 2.5rem; margin-bottom: 8px; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.cart-row h4 { margin: 0 0 4px; font-size: .85rem; }
.cart-row small { color: var(--muted); }
.qty-control { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.qty-control button { width: 29px; height: 29px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.qty-control strong { min-width: 20px; text-align: center; font-size: .83rem; }
.cart-line-total { text-align: right; font-weight: 900; font-size: .85rem; }
.cart-line-total button { display: block; margin: 8px 0 0 auto; border: 0; color: var(--muted); background: transparent; font-size: .75rem; }
.cart-summary { padding: 15px 18px; border-top: 1px solid var(--border); background: #fafbfc; }
.cart-summary-row { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; color: var(--muted); font-size: .84rem; }
.cart-summary-row.total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--ink); font-size: 1.08rem; font-weight: 950; }
.payment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 13px 0; }
.payment-option { min-height: 42px; border: 1px solid var(--border); border-radius: 11px; background: white; font-weight: 800; font-size: .78rem; }
.payment-option.active { color: var(--red); border-color: var(--red); background: rgba(243,31,42,.06); }

.stock-bar { width: 110px; height: 7px; border-radius: 999px; background: #edf0f4; overflow: hidden; }
.stock-bar span { display: block; height: 100%; border-radius: inherit; background: var(--bar-color, var(--lime)); }
.inline-actions { display: flex; gap: 7px; }
.icon-btn { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--border); border-radius: 10px; background: white; }

.reservation-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; }
.calendar-card { border: 1px solid var(--border); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.calendar-header { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.calendar-header h2 { margin: 0; font-size: 1.05rem; }
.calendar-nav { display: flex; gap: 8px; }
.calendar-nav button { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 14px; }
.calendar-day-name { padding: 10px 5px; color: var(--muted); text-align: center; font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 92px; padding: 8px; border: 1px solid #eef0f4; background: white; }
.calendar-day.muted { color: #b1b5bd; background: #fafbfc; }
.calendar-day.today { border: 2px solid var(--red); }
.day-number { font-size: .76rem; font-weight: 850; }
.event-pill { display: block; margin-top: 6px; padding: 5px 6px; border-radius: 7px; overflow: hidden; color: #7e0710; background: #ffe1e4; text-overflow: ellipsis; white-space: nowrap; font-size: .65rem; font-weight: 800; }
.event-pill.blue { color: #0a4a73; background: #ddf2ff; }
.upcoming-list { display: grid; gap: 11px; }
.upcoming-card { padding: 15px; border: 1px solid var(--border); border-radius: 14px; }
.upcoming-date { display: inline-flex; padding: 5px 8px; border-radius: 8px; color: var(--red); background: rgba(243,31,42,.08); font-size: .72rem; font-weight: 900; }
.upcoming-card h3 { margin: 10px 0 4px; font-size: .9rem; }
.upcoming-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.upcoming-footer { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 12px; }

.report-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 18px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 16px; background: white; }
.report-filter .form-field { min-width: 160px; margin: 0; }
.report-filter .form-field input, .report-filter .form-field select { min-height: 42px; }
.profit-table td:nth-child(n+2), .profit-table th:nth-child(n+2) { text-align: right; }
.profit-positive { color: #15713a; font-weight: 900; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(10,15,27,.62); }
.modal-backdrop.show { display: grid; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 20px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 19px 21px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 1.1rem; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f2f4f7; }
.modal-body { padding: 21px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 21px; border-top: 1px solid var(--border); }
.toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; max-width: 360px; display: none; gap: 12px; align-items: center; padding: 15px 17px; border-radius: 14px; color: white; background: #15211a; box-shadow: 0 16px 38px rgba(0,0,0,.23); }
.toast.show { display: flex; animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* Autenticación, usuarios y cuenta */
body.auth-pending .admin-shell { visibility: hidden; }
.login-kicker { display: inline-flex; align-items: center; gap: 7px; }
.login-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(243,31,42,.12); }
.login-helper { margin-top: 18px; color: var(--muted); text-align: center; font-size: .82rem; line-height: 1.5; }
.form-message { display: none; margin: 14px 0; padding: 12px 14px; border-radius: 12px; font-size: .84rem; font-weight: 750; line-height: 1.45; }
.form-message.show { display: block; }
.form-message.error { color: #8d1018; background: #ffe7e9; border: 1px solid #ffc7cb; }
.form-message.success { color: #0e6331; background: #e3f8e9; border: 1px solid #b8eac8; }
.password-toggle { width: auto; min-width: 44px; padding: 0 10px; color: var(--muted); font-size: .72rem; font-weight: 850; }
.password-wrap input { padding-right: 68px; }
.btn:disabled, .icon-btn:disabled, .permission-denied { opacity: .48; cursor: not-allowed; box-shadow: none; }
.btn-ghost { color: var(--muted); background: transparent; border: 1px solid transparent; }
.btn-ghost:hover { color: var(--ink); background: #f5f6f8; }
.btn-link-danger { color: #a2131c; background: #fff0f1; border: 1px solid #ffd0d4; }
.menu-disabled { display: flex; align-items: center; gap: 12px; padding: 12px 13px; margin-bottom: 4px; border-radius: 12px; color: rgba(255,255,255,.32); font-size: .9rem; font-weight: 750; cursor: not-allowed; }
.menu-disabled .menu-soon { margin-left: auto; padding: 3px 6px; border-radius: 999px; color: rgba(255,255,255,.48); background: rgba(255,255,255,.06); font-size: .56rem; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-footer { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.user-mini { min-width: 0; }
.user-mini-main { display: flex; min-width: 0; gap: 10px; align-items: center; }
.user-mini-main > div:last-child { min-width: 0; }
.user-mini-main strong, .user-mini-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: rgba(255,255,255,.72); background: rgba(255,255,255,.05); }
.sidebar-logout:hover { color: white; background: rgba(243,31,42,.7); }
.topbar-user { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.topbar-user .user-avatar { width: 30px; height: 30px; font-size: .72rem; }
.topbar-user-copy { text-align: left; line-height: 1.12; }
.topbar-user-copy strong { display: block; font-size: .78rem; }
.topbar-user-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: .66rem; }
.status-muted { color: #596273; background: #eef0f3; }
.empty-state { padding: 34px 18px; color: var(--muted); text-align: center; }
.user-table-avatar { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; color: #5d4600; background: #ffeb8a; font-size: .76rem; font-weight: 950; }
.current-user-mark { display: inline-flex; margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: #0c5d2c; background: #dff6e6; font-size: .58rem; text-transform: uppercase; vertical-align: middle; }
.permission-summary { display: flex; flex-wrap: wrap; gap: 5px; max-width: 270px; }
.permission-summary span, .permission-summary small { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: .64rem; font-weight: 750; }
.permission-summary span { color: #344054; background: #f0f2f5; }
.permission-summary small { color: #0d5878; background: #dff5ff; }
.user-actions { flex-wrap: nowrap; }
.icon-btn-danger { color: #aa1520; background: #fff7f7; }
.modal.modal-lg { width: min(820px, 100%); }
.form-grid-admin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-admin .form-field.full { grid-column: 1 / -1; }
.field-help { margin: -2px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.switch-field { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 60px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; }
.switch-copy strong { display: block; font-size: .86rem; }
.switch-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 46px; height: 26px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #c8ced8; transition: .2s ease; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s ease; }
.switch input:checked + span { background: var(--lime); }
.switch input:checked + span::after { transform: translateX(20px); }
.permission-section { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.permission-section-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 13px; }
.permission-section-head h3 { margin: 0; font-size: .94rem; }
.permission-tools { display: flex; gap: 7px; }
.permission-tools button { min-height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: white; font-size: .7rem; font-weight: 800; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.permission-option { display: flex; gap: 10px; align-items: flex-start; min-height: 58px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fbfcfd; cursor: pointer; }
.permission-option:hover { border-color: #cbd1dc; background: white; }
.permission-option input { margin-top: 2px; accent-color: var(--red); }
.permission-option strong { display: block; font-size: .78rem; }
.permission-option span { display: block; margin-top: 3px; color: var(--muted); font-size: .67rem; line-height: 1.35; }
.account-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 20px; }
.profile-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.profile-cover { height: 112px; background: linear-gradient(135deg, var(--red-dark), var(--red) 48%, #ff6972); }
.profile-content { position: relative; padding: 0 22px 22px; }
.profile-avatar-large { display: grid; place-items: center; width: 82px; height: 82px; margin-top: -42px; border: 6px solid white; border-radius: 50%; color: #574200; background: var(--yellow); box-shadow: 0 9px 25px rgba(0,0,0,.12); font-size: 1.3rem; font-weight: 950; }
.profile-content h2 { margin: 14px 0 3px; }
.profile-content > p { margin: 0; color: var(--muted); }
.profile-meta { display: grid; gap: 10px; margin-top: 22px; }
.profile-meta-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .8rem; }
.profile-meta-row span { color: var(--muted); }
.profile-meta-row strong { text-align: right; }
.permission-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.permission-chip { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: #344054; background: #eff2f6; font-size: .68rem; font-weight: 780; }
.security-note { display: flex; gap: 11px; align-items: flex-start; margin-top: 18px; padding: 13px 14px; border: 1px solid #dce7f0; border-radius: 13px; color: #315269; background: #f2f9fd; font-size: .78rem; line-height: 1.5; }
.security-note strong { display: block; margin-bottom: 2px; color: #17384e; }
.password-rules { margin: 10px 0 18px; padding: 13px 15px; border-radius: 12px; color: var(--muted); background: #f7f8fa; font-size: .76rem; line-height: 1.55; }
.table-wrap table { min-width: 720px; }
.toast-error { background: #7f1119; }
.toast-success { background: #15211a; }

@media (max-width: 1200px) {
  .account-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid-2, .reservation-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { min-height: 420px; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { grid-column: 1; }
  .sidebar-toggle { display: grid; place-items: center; }
  .pos-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static; max-height: none; }
}
@media (max-width: 700px) {
  .form-grid-admin, .permission-grid { grid-template-columns: 1fr; }
  .topbar-user-copy { display: none; }
  .topbar-user { padding: 0 5px; }
  .permission-section-head { align-items: flex-start; flex-direction: column; }
  .login-form-wrap { padding: 28px 20px; }
  .login-art { padding: 34px 22px; }
  .topbar { padding: 12px 15px; }
  .page-heading p, .top-icon:nth-child(1) { display: none; }
  .content { padding: 18px 14px; }
  .kpi-grid, .panel-grid-equal, .product-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-box { min-width: 0; width: 100%; }
  .toolbar-right .btn { flex: 1; }
  .calendar-day { min-height: 68px; padding: 4px; }
  .event-pill { font-size: 0; width: 8px; height: 8px; border-radius: 50%; padding: 0; }
}

/* Módulos operativos: reinicio, clientes, compras, gastos y caja */
.reset-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 18px;
  margin-bottom: 20px;
  border: 1px solid #bfe7cb;
  border-radius: 15px;
  color: #145b30;
  background: linear-gradient(135deg, #effcf3, #f8fffa);
  box-shadow: 0 8px 22px rgba(21, 113, 58, .05);
}
.reset-notice::before { content: "✓"; display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; color: white; background: #1f9d55; font-weight: 950; }
.reset-notice strong { display: block; min-width: max-content; }
.reset-notice span { color: #477259; line-height: 1.45; }
.kpi-trend.neutral { color: #5f6878; background: #eef1f5; }
.status-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 62px;
  padding: 13px 17px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: white;
  box-shadow: 0 8px 20px rgba(26,34,53,.05);
}
.status-banner strong { display: block; font-size: .88rem; }
.status-banner span { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.status-banner a { color: inherit; font-weight: 900; text-decoration: underline; }
.status-banner.ok { color: #145d31; border-color: #bee8cb; background: #effcf3; }
.status-banner.ok span { color: #417255; }
.status-banner.warn { color: #805900; border-color: #f2dc8f; background: #fff9df; }
.status-banner.warn span { color: #796a38; }
.mini-label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: .72rem; font-weight: 850; }
.compact-input { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; outline: none; background: white; }
.compact-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(243,31,42,.08); }
.category-row { display: flex; gap: 9px; overflow-x: auto; padding: 1px 0 12px; margin-bottom: 3px; scrollbar-width: thin; }
.empty-state.wide { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; align-content: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state span { margin-top: 5px; }
.pending-cost { display: inline-flex; margin-top: 4px; padding: 3px 7px; border-radius: 999px; color: #8a6100; background: #fff3bf; font-size: .64rem; font-weight: 850; }
.table-sub { display: block; max-width: 270px; margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.text-danger { color: #b51c25 !important; font-weight: 900; }
.modal.modal-xl { width: min(1040px, 100%); }
.line-items-head { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(90px, .55fr) minmax(120px, .72fr) minmax(120px, .72fr) 42px; gap: 10px; padding: 0 4px 7px; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.line-items { display: grid; gap: 9px; }
.purchase-line { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(90px, .55fr) minmax(120px, .72fr) minmax(120px, .72fr) 42px; gap: 10px; align-items: center; }
.purchase-line select, .purchase-line input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.purchase-line-total { text-align: right; font-weight: 900; }
.purchase-line .remove-line { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #ffd3d7; border-radius: 10px; color: #a8141e; background: #fff5f6; }
.purchase-total { display: flex; justify-content: flex-end; gap: 18px; align-items: center; padding: 15px 0 2px; margin-top: 14px; border-top: 1px solid var(--border); }
.purchase-total span { color: var(--muted); font-weight: 800; }
.purchase-total strong { min-width: 140px; text-align: right; font-size: 1.25rem; }
.cash-hero { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 22px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(135deg, white, #fafbfe); box-shadow: var(--shadow); }
.cash-hero h2 { margin: 10px 0 5px; font-size: 1.25rem; }
.cash-hero p { margin: 0; color: var(--muted); line-height: 1.5; }
.cash-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.summary-box { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 16px; margin-bottom: 18px; border: 1px solid #d9e5ef; border-radius: 13px; background: #f5faff; }
.summary-box span { color: var(--muted); font-size: .82rem; }
.summary-box strong { font-size: 1.15rem; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 17px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 15px; box-shadow: none; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%; color: #584300; background: var(--yellow); font-size: 1rem; font-weight: 950; }
.profile-card h3 { margin: 0 0 3px; }
.profile-card p { margin: 0; color: var(--muted); }
.detail-list { display: grid; gap: 0; border-top: 1px solid var(--border); }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: .82rem; }
.detail-list span { color: var(--muted); }
.detail-list strong { text-align: right; }
.permission-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.permission-chip-list:empty::before { content: "Sin permisos adicionales"; color: var(--muted); font-size: .78rem; }
.pos-toolbar { margin-bottom: 10px; }
.inventory-cost-note { max-width: 360px; color: var(--muted); font-size: .72rem; line-height: 1.45; }

@media (max-width: 860px) {
  .cash-hero { align-items: flex-start; flex-direction: column; }
  .cash-hero-actions { width: 100%; justify-content: flex-start; }
  .line-items-head { display: none; }
  .purchase-line { grid-template-columns: 1fr 1fr; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: #fbfcfd; }
  .purchase-line > :first-child { grid-column: 1 / -1; }
  .purchase-line .remove-line { justify-self: end; }
  .purchase-line-total { text-align: left; }
}
@media (max-width: 700px) {
  .reset-notice { flex-direction: column; }
  .reset-notice strong { min-width: 0; }
  .status-banner { align-items: flex-start; flex-direction: column; }
  .cash-hero-actions .btn { flex: 1 1 150px; }
  .purchase-line { grid-template-columns: 1fr; }
  .purchase-line > :first-child { grid-column: auto; }
  .purchase-total { justify-content: space-between; }
  .detail-list > div { flex-direction: column; gap: 4px; }
  .detail-list strong { text-align: left; }
}
.toast.error { background: #86141d; }
.toast.success { background: #15211a; }

/* Recetas e inventario por unidades, gramos y mililitros */
.login-access-note {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  margin: 14px 0 2px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  color: #435066;
  background: #f7f9fc;
  font-size: .78rem;
}
.login-access-note strong { color: #182035; }
.recipe-help-banner,
.recipe-example {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 17px 18px;
  margin-bottom: 20px;
  border: 1px solid #d8e5f3;
  border-radius: 17px;
  background: linear-gradient(135deg, #f5faff, #ffffff);
  box-shadow: 0 9px 24px rgba(32, 65, 104, .05);
}
.recipe-help-icon,
.recipe-example-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff2c3;
  font-size: 1.5rem;
}
.recipe-help-banner > div:nth-child(2),
.recipe-example > div:nth-child(2) { flex: 1; min-width: 0; }
.recipe-help-banner strong { display: block; margin-bottom: 3px; }
.recipe-help-banner span,
.recipe-example p { color: var(--muted); line-height: 1.55; font-size: .8rem; }
.recipe-example h2 { margin: 0 0 5px; font-size: 1.05rem; }
.recipe-example p { margin: 0; }
.type-badge,
.recipe-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 900;
  white-space: nowrap;
}
.type-simple { color: #245b8d; background: #eaf4ff; }
.type-ingredient { color: #5f4b09; background: #fff4c9; }
.type-prepared { color: #7c2730; background: #ffecef; }
.recipe-mini-badge { width: fit-content; margin: 7px 0 -1px; color: #7b2831; background: #fff0f2; }
.recipe-form-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 22px 0 10px;
}
.recipe-form-head h3 { margin: 0 0 3px; font-size: .95rem; }
.recipe-form-head p { margin: 0; color: var(--muted); font-size: .73rem; }
.recipe-line-head,
.recipe-line {
  display: grid;
  grid-template-columns: minmax(250px, 1.7fr) minmax(105px, .55fr) minmax(70px, .38fr) minmax(110px, .6fr) 42px;
  gap: 10px;
  align-items: center;
}
.recipe-line-head {
  padding: 0 5px 7px;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.recipe-lines { display: grid; gap: 9px; }
.recipe-line {
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
}
.recipe-line select,
.recipe-line input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
}
.recipe-unit { color: #465267; font-size: .78rem; font-weight: 900; }
.recipe-line-cost { text-align: right; font-size: .83rem; }
.recipe-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.recipe-preview-grid > div {
  padding: 15px 16px;
  border: 1px solid #dce5ef;
  border-radius: 13px;
  background: #f7faff;
}
.recipe-preview-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; }
.recipe-preview-grid strong { font-size: 1rem; }
.recipe-detail { max-width: 320px; }
.purchase-unit-note {
  padding: 11px 13px;
  margin: 7px 0 12px;
  border: 1px solid #e6dfb8;
  border-radius: 11px;
  color: #625722;
  background: #fffbdf;
  font-size: .72rem;
  line-height: 1.5;
}
.form-field input[readonly] { color: #687386; background: #f3f5f8; cursor: not-allowed; }

@media (max-width: 900px) {
  .recipe-help-banner,
  .recipe-example { align-items: flex-start; flex-wrap: wrap; }
  .recipe-help-banner .btn,
  .recipe-example .btn { margin-left: 63px; }
  .recipe-line-head { display: none; }
  .recipe-line { grid-template-columns: 1fr 1fr; }
  .recipe-line > :first-child { grid-column: 1 / -1; }
  .recipe-line-cost { text-align: left; }
}
@media (max-width: 620px) {
  .recipe-help-banner,
  .recipe-example { flex-direction: column; }
  .recipe-help-banner .btn,
  .recipe-example .btn { width: 100%; margin-left: 0; }
  .recipe-line { grid-template-columns: 1fr; }
  .recipe-line > :first-child { grid-column: auto; }
  .recipe-preview-grid { grid-template-columns: 1fr; }
}


/* Versión 3.2: fotografías miniatura de productos */
.product-visual {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  color: #566074;
  background: linear-gradient(145deg, #f5f7fa, #e9edf3);
}
.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-visual-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #687386;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .04em;
}
.product-visual.image-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.75) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: image-shimmer 1.1s infinite;
}
@keyframes image-shimmer { to { transform: translateX(100%); } }
.cell-icon.product-visual,
.quick-item-icon.product-visual { overflow: hidden; }
.cell-icon.product-visual { width: 44px; height: 44px; border: 1px solid #e7eaf0; }
.quick-item-icon.product-visual { flex: 0 0 42px; border: 1px solid #e7eaf0; }
.product-art.product-visual {
  width: 100%;
  height: 132px;
  min-height: 132px;
  padding: 0;
  border: 1px solid #edf0f4;
}
.product-art.product-visual .product-visual-fallback { font-size: 1.45rem; }
.cart-product-main { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.cart-product-copy { min-width: 0; }
.cart-thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.product-photo-editor {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
  padding: 15px;
  border: 1px dashed #c9cfda;
  border-radius: 15px;
  background: #fafbfc;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.product-photo-editor.dragging {
  border-color: var(--red);
  background: #fff7f8;
  box-shadow: 0 0 0 4px rgba(243,31,42,.08);
}
.product-photo-preview {
  display: grid;
  place-items: center;
  width: 160px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #e0e4eb;
  border-radius: 16px;
  color: #667085;
  background: linear-gradient(145deg, #f2f4f7, #ffffff);
}
.product-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: grid; gap: 5px; text-align: center; }
.photo-placeholder strong { font-size: .86rem; }
.photo-placeholder small { color: #8a93a3; font-size: .68rem; }
.product-photo-controls { min-width: 0; }
.product-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
.product-photo-controls > strong { display: block; margin-bottom: 5px; font-size: .8rem; }
.product-photo-controls > small { display: block; max-width: 560px; color: var(--muted); font-size: .72rem; line-height: 1.5; }

@media (max-width: 700px) {
  .product-photo-editor { grid-template-columns: 1fr; }
  .product-photo-preview { width: min(210px, 100%); justify-self: center; }
  .product-photo-actions .btn { flex: 1 1 145px; }
  .product-art.product-visual { height: 170px; min-height: 170px; }
}


/* Versión 3.3: cálculo automático del precio de venta por porcentaje */
.switch-field + .switch-field { margin-top: 10px; }
.input-suffix {
  position: relative;
}
.input-suffix input {
  padding-right: 46px !important;
}
.input-suffix > span {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #5f697b;
  font-size: .86rem;
  font-weight: 900;
  pointer-events: none;
}
.pricing-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 3px 0 4px;
  padding: 12px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7faff, #ffffff);
}
.pricing-preview > div {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #fff;
}
.pricing-preview span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 750;
}
.pricing-preview strong {
  display: block;
  overflow: hidden;
  font-size: .95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pricing-preview-total {
  color: #9f121c;
  background: #fff0f2 !important;
}
.switch-field.is-disabled,
.form-field.is-disabled {
  opacity: .58;
}
.form-field.is-disabled input {
  cursor: not-allowed;
}
.recipe-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .pricing-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-preview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .pricing-preview { grid-template-columns: 1fr; }
}


/* Versión 3.4: impresión de tickets, informes y cierres en impresora POS */
.pos-paper-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 7px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.pos-paper-control select {
  min-height: 32px;
  padding: 0 27px 0 9px;
  border: 1px solid #d9dee7;
  border-radius: 9px;
  color: var(--ink);
  background: #f8f9fb;
  font: inherit;
  cursor: pointer;
}
.pos-paper-control-wide {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 15px;
}
.modal-compact { max-width: 560px; }
.receipt-result-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 13px;
  border: 1px solid #e1e5ec;
  border-radius: 15px;
  background: #f8fafc;
}
.receipt-result-card > div {
  min-width: 0;
  padding: 11px;
  border-radius: 11px;
  background: #fff;
}
.receipt-result-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 750;
}
.receipt-result-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .98rem;
}
.print-help {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
}
.btn-xs {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: .68rem;
}
.btn-dark {
  border-color: #242b38;
  color: #fff;
  background: #242b38;
}
.btn-dark:hover { background: #151a23; }

@media (max-width: 760px) {
  .pos-paper-control { flex: 1 1 145px; justify-content: space-between; }
  .receipt-result-card { grid-template-columns: 1fr; }
  .cash-hero-actions .pos-paper-control { width: 100%; }
}

/* Versión 3.5: planes editables, reservas calculadas, proformas y campañas */
.modal-xxl { max-width: 1180px; }
.full-span { grid-column: 1 / -1; }
.form-section {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e4e8ef;
  border-radius: 16px;
  background: #fbfcfe;
}
.form-section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 13px;
}
.form-section-title h3 { margin: 0; font-size: .98rem; }
.form-section-title p { margin: 2px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.party-plan-summary {
  margin: 13px 0;
  padding: 14px;
  border: 1px solid #dde5ef;
  border-radius: 15px;
  background: #fff;
}
.plan-summary-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.plan-summary-main > div,
.quote-mini {
  padding: 10px 11px;
  border-radius: 11px;
  background: #f5f7fa;
}
.plan-summary-main span,
.quote-mini span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 750;
}
.plan-summary-main strong,
.quote-mini strong { display: block; font-size: .88rem; }
.party-plan-summary ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 5px 24px;
  margin: 13px 0 8px;
  padding-left: 20px;
  color: #465064;
  font-size: .76rem;
}
.party-plan-summary p { margin: 8px 0 0; color: #515c70; font-size: .75rem; }
.guest-grid { align-items: stretch; }
.quote-mini { border: 1px solid #e6eaf0; background: #fff; }
.addon-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.addon-select-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dfe4ec;
  border-radius: 14px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.addon-select-card.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(243,31,42,.08); }
.addon-select-card.disabled { opacity: .62; }
.addon-select-card > label {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 13px;
  cursor: pointer;
}
.addon-select-card input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
.addon-select-copy { min-width: 0; }
.addon-select-copy strong { display: block; margin-bottom: 3px; font-size: .82rem; }
.addon-select-copy small { display: block; color: var(--muted); font-size: .69rem; line-height: 1.4; }
.addon-select-copy em { display: block; margin-top: 6px; color: #516077; font-size: .65rem; font-style: normal; font-weight: 750; }
.addon-select-price { color: #a6151d; font-size: .82rem; font-weight: 900; white-space: nowrap; }
.addon-qty-control {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 9px 13px;
  border-top: 1px solid #edf0f4;
  background: #fafbfc;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 750;
}
.addon-qty-control input { width: 90px; min-height: 34px; padding: 5px 9px; }
.addon-rule-note { padding: 7px 13px 10px; color: #6b7280; font-size: .65rem; }
.reservation-quote-panel {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #d9e2ec;
  border-radius: 16px;
  background: linear-gradient(135deg,#fff,#f7faff);
}
.reservation-quote-lines > div,
.reservation-payment-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed #d9dee6;
  font-size: .78rem;
}
.reservation-quote-lines > div:last-child,
.reservation-payment-summary > div:last-child { border-bottom: 0; }
.reservation-quote-lines .quote-total {
  margin-top: 5px;
  padding-top: 11px;
  color: #a3151d;
  font-size: 1rem;
  font-weight: 900;
}
.reservation-payment-summary {
  padding: 12px;
  border-radius: 13px;
  background: #fff;
}
.charge-preview-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 9px;
  margin-top: 14px;
}
.charge-preview-grid > div,
.proforma-hero > div,
.income-split > div {
  padding: 11px;
  border: 1px solid #e2e6ed;
  border-radius: 12px;
  background: #f8fafc;
}
.charge-preview-grid span,
.proforma-hero span,
.income-split span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 750;
}
.charge-preview-grid strong,
.proforma-hero strong,
.income-split strong { display: block; overflow-wrap: anywhere; font-size: .88rem; }
.proforma-hero {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.proforma-lines { margin: 14px 0; padding: 12px; border: 1px solid #e4e8ee; border-radius: 13px; }
.proforma-line { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; border-bottom: 1px dashed #e0e4ea; font-size: .77rem; }
.proforma-line:last-child { border-bottom: 0; }
.proforma-line.discount { color: #13804a; }
.proforma-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.proforma-totals > div { padding: 12px; border-radius: 12px; background: #f4f6f9; }
.proforma-totals span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .68rem; }
.proforma-totals strong { font-size: 1rem; }
.proforma-totals .balance { color: #a3151d; background: #fff0f2; }
.reservation-actions { min-width: 205px; }
.dashboard-reservation-actions { min-width: 190px; }
.dashboard-today-panel { border-top: 3px solid var(--red); }
.settings-check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.weekday-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.weekday-grid label {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  background: #fff;
  font-size: .68rem;
  font-weight: 750;
}
.weekday-grid input { accent-color: var(--red); }
.party-campaign-notice { margin: 0 16px 12px; }
.campaign-active-banner {
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid #bce3cf;
  border-radius: 12px;
  color: #126a3f;
  background: #effbf5;
  font-size: .75rem;
}
.campaign-price { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.campaign-price span { color: #8a93a3; font-size: .72rem; text-decoration: line-through; }
.campaign-price strong { color: #a3151d; font-size: 1.08rem; }
.campaign-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #126a3f;
  background: #eaf9f1;
  font-size: .61rem;
  font-weight: 850;
}
.cart-campaign { display: block !important; margin-top: 4px; color: #13804a !important; }
.discount-row { color: #13804a; }
.cart-campaign-summary { margin: 7px 0; padding: 8px 9px; border-radius: 9px; color: #126a3f; background: #edf9f3; font-size: .67rem; line-height: 1.4; }
.income-split { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.income-split > div { background: #fff; }

@media (max-width: 900px) {
  .plan-summary-main,
  .charge-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .party-plan-summary ul,
  .addon-selection-grid,
  .reservation-quote-panel { grid-template-columns: 1fr; }
  .weekday-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .settings-check-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .plan-summary-main,
  .charge-preview-grid,
  .proforma-hero,
  .proforma-totals,
  .income-split { grid-template-columns: 1fr; }
  .weekday-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .addon-select-card > label { grid-template-columns: auto minmax(0,1fr); }
  .addon-select-price { grid-column: 2; }
}

/* Versión 3.6: proforma A4 en PDF y envío por WhatsApp */
.btn-outline-cyan {
  color: #066b78;
  background: #effbfc;
  border: 1px solid #8bd6df;
}
.btn-outline-cyan:hover { background: #ddf6f8; }
.btn-whatsapp {
  color: #fff;
  background: linear-gradient(135deg, #128c4d, #20bd68);
  box-shadow: 0 11px 24px rgba(18, 140, 77, .22);
}
.btn-whatsapp:hover { filter: brightness(.96); }
.btn.is-busy { cursor: progress; }
.proforma-delivery-box {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding: 13px 14px;
  border: 1px solid #b9e4e9;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2fcfd, #fff);
}
.proforma-delivery-box > div:first-child { min-width: 0; }
.proforma-delivery-box strong {
  display: block;
  margin-bottom: 4px;
  color: #075f6b;
  font-size: .84rem;
}
.proforma-delivery-box span {
  display: block;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.45;
}
.proforma-pos-option { flex: 0 0 auto; }
.proforma-modal-actions {
  flex-wrap: wrap;
  align-items: center;
}
.proforma-modal-actions .btn { min-height: 42px; }
.proforma-modal-actions #shareReservationProformaPdf { min-width: 205px; }

@media (max-width: 760px) {
  .proforma-delivery-box { align-items: stretch; flex-direction: column; }
  .proforma-pos-option,
  .proforma-pos-option .pos-paper-control { width: 100%; }
  .proforma-modal-actions { display: grid; grid-template-columns: 1fr; }
  .proforma-modal-actions .btn { width: 100%; }
}


/* Acciones PDF del dashboard */
.dashboard-reservation-actions { min-width: 270px; flex-wrap: wrap; }
.dashboard-reservation-actions .btn-whatsapp { box-shadow: none; }
.dashboard-reservation-actions .btn { white-space: nowrap; }
.btn.is-busy { opacity: .72; }

/* Versión 4.0: MySQL central, respaldos y protección de datos */
.storage-origin-warning,
.origin-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f1c56b;
  border-radius: 15px;
  background: #fff8e8;
  color: #6f4d08;
}
.storage-origin-warning strong,
.origin-alert strong { flex: 0 0 auto; }
.storage-origin-warning span,
.origin-alert span { flex: 1 1 auto; font-size: .82rem; line-height: 1.5; }
.storage-origin-warning .btn { flex: 0 0 auto; }
.eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.backup-hero { overflow: hidden; }
.backup-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(260px,.7fr);
  gap: 28px;
  align-items: center;
  background: radial-gradient(circle at 88% 12%, rgba(8,203,234,.13), transparent 34%), linear-gradient(135deg, #fff, #fbfcff);
}
.backup-hero h2 { margin: 0 0 8px; overflow-wrap: anywhere; font-size: clamp(1.35rem, 2.4vw, 2.1rem); }
.backup-hero p { max-width: 760px; margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.backup-origin-facts { display: grid; gap: 10px; }
.backup-origin-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.84);
}
.backup-origin-facts span { color: var(--muted); font-size: .76rem; }
.backup-origin-facts strong { font-size: .95rem; }
.backup-kpis { margin-top: 18px; }
.backup-main-grid { align-items: start; }
.backup-restore-controls { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 13px; }
.backup-import-preview {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid #9bd5b6;
  border-radius: 13px;
  background: #effaf4;
  color: #185c37;
}
.backup-import-preview span { font-size: .76rem; line-height: 1.45; }
.danger-note {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 12px 13px;
  border-left: 4px solid #ef9e22;
  border-radius: 8px 12px 12px 8px;
  background: #fff8e9;
  color: #714b08;
}
.danger-note span { font-size: .76rem; line-height: 1.5; }
.legacy-recovery-number { display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.legacy-recovery-number strong { color: var(--red); font-size: 2.25rem; }
.legacy-recovery-number span { color: var(--muted); font-size: .82rem; }
.backup-rules { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.backup-rules > div { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; }
.backup-rules span { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.backup-status {
  position: sticky;
  bottom: 15px;
  z-index: 30;
  display: none;
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 13px;
  box-shadow: 0 14px 34px rgba(17,24,39,.16);
  font-size: .82rem;
  font-weight: 700;
}
.backup-status.show { display: block; }
.backup-status.info { color: #075f6b; background: #e9fafc; border: 1px solid #92d9e1; }
.backup-status.success { color: #17603a; background: #ebf9f1; border: 1px solid #91d4ae; }
.backup-status.error { color: #8f1a23; background: #fff0f1; border: 1px solid #efabb0; }
.recovery-page { min-height: 100vh; background: #f3f5f9; }
.recovery-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 44px; }
.recovery-header { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.recovery-header img { width: 135px; height: 72px; object-fit: contain; }
.recovery-header h1 { margin: 0 0 5px; }
.recovery-header p { margin: 0; color: var(--muted); line-height: 1.5; }
.recovery-warning { border-color: #efabb0; background: #fff0f1; color: #8f1a23; }
.recovery-steps { display: grid; gap: 12px; }
.recovery-steps > div { display: grid; gap: 5px; }
.recovery-steps code { overflow-wrap: anywhere; padding: 10px 12px; border-radius: 10px; background: #f1f3f7; color: #253047; }
.recovery-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; color: var(--muted); font-size: .8rem; }

@media (max-width: 900px) {
  .backup-hero-grid { grid-template-columns: 1fr; }
  .backup-rules { grid-template-columns: 1fr; }
  .storage-origin-warning,
  .origin-alert { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 640px) {
  .backup-restore-controls { grid-template-columns: 1fr; }
  .recovery-shell { width: min(100% - 18px, 1180px); padding-top: 10px; }
  .recovery-header { align-items: flex-start; flex-direction: column; }
  .recovery-header img { width: 115px; height: 62px; }
  .recovery-footer { align-items: stretch; flex-direction: column; }
}
.login-origin-warning {
  display: grid;
  gap: 5px;
  margin: 14px 0 18px;
  padding: 12px 13px;
  border: 1px solid #efabb0;
  border-radius: 12px;
  background: #fff0f1;
  color: #8f1a23;
}
.login-origin-warning span { font-size: .75rem; line-height: 1.45; }
.login-origin-warning a { color: #8f1a23; font-weight: 800; text-decoration: underline; }
.login-origin-warning > a { justify-self: start; font-size: .74rem; }

/* Versión 4.0: MySQL central, secciones, campañas múltiples y taquilla */
.sql-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid #a7dbc0;
  border-radius: 999px;
  background: #effaf4;
  color: #17603a;
  font-size: .7rem;
  font-weight: 850;
  white-space: nowrap;
}
.sql-sync-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sql-sync-status.saving { border-color: #9bdce5; background: #ecfbfd; color: #076b78; }
.sql-sync-status.saving::before { animation: sqlPulse .8s ease-in-out infinite alternate; }
.sql-sync-status.error { border-color: #efabb0; background: #fff0f1; color: #9a1b25; }
@keyframes sqlPulse { to { opacity: .28; transform: scale(.72); } }

.mysql-info-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #a7dbc0;
  border-radius: 15px;
  background: linear-gradient(135deg,#effaf4,#f8fffb);
  color: #185c37;
}
.mysql-info-banner strong { flex: 0 0 auto; }
.mysql-info-banner span { font-size: .8rem; line-height: 1.5; }

.campaign-rules-editor {
  margin: 15px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f9fafc;
}
.campaign-rules-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.campaign-rules-head h3 { margin: 0 0 3px; font-size: .95rem; }
.campaign-rules-head p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.campaign-rules { display: grid; gap: 9px; }
.campaign-rule-row {
  display: grid;
  grid-template-columns: minmax(200px,1fr) minmax(125px,.32fr) 38px;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.campaign-rule-row .input-suffix { min-width: 0; }
.campaign-rule-summary { display: grid; gap: 3px; min-width: 190px; }
.campaign-rule-summary span { font-size: .77rem; line-height: 1.35; }
.campaign-rule-summary small { color: var(--muted); }
.party-campaign-notice { margin: 0 18px 14px; }

.service-mini-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eeeaff;
  color: #5443aa;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.type-service { border-color: #cbc3ff !important; background: #f2efff !important; color: #4c3ba1 !important; }

.category-name-cell { display: grid; gap: 3px; }
.category-name-cell strong { font-size: .88rem; }
.category-code { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.bulk-preview {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #9bdce5;
  border-radius: 13px;
  background: #edfbfd;
}
.bulk-preview > div { display: flex; justify-content: space-between; gap: 14px; }
.bulk-preview span { color: #49636a; font-size: .76rem; }
.bulk-preview strong { color: #075f6b; font-size: 1rem; }
.bulk-preview p { margin: 0; color: #476168; font-size: .74rem; line-height: 1.45; }

.backup-action-grid { align-items: start; }
.backup-safe-card {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #a7dbc0;
  border-radius: 13px;
  background: #effaf4;
  color: #185c37;
}
.backup-safe-card p { margin: 0; font-size: .78rem; line-height: 1.5; }
.notice-danger { border-color: #efabb0 !important; background: #fff0f1 !important; color: #8f1a23 !important; }
.connection-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid #f1c56b;
  border-radius: 14px;
  background: #fff8e8;
}
.connection-file-card code { flex: 0 0 auto; padding: 8px 10px; background: #fff; border: 1px solid #ead08f; border-radius: 8px; font-weight: 800; }
.connection-file-card div { display: grid; gap: 3px; }
.connection-file-card span { color: #6f5a2c; font-size: .77rem; line-height: 1.45; }

@media (max-width: 860px) {
  .mysql-info-banner, .connection-file-card { align-items: flex-start; flex-direction: column; }
  .campaign-rule-row { grid-template-columns: 1fr 130px 38px; }
}
@media (max-width: 620px) {
  .sql-sync-status { order: 20; width: 100%; justify-content: center; }
  .campaign-rules-head { align-items: stretch; flex-direction: column; }
  .campaign-rule-row { grid-template-columns: 1fr 82px 38px; }
}
.mysql-login-note { display:grid; gap:4px; margin:14px 0 16px; padding:12px 13px; border:1px solid #a7dbc0; border-radius:12px; background:#effaf4; color:#185c37; }
.mysql-login-note span { font-size:.74rem; line-height:1.45; }
.product-price.price-pending { color:#9a1b25; font-size:.72rem; line-height:1.2; }

/* v5.1 — Punto de venta: fotografías realmente visibles y responsive */
.pos-catalog .product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.pos-catalog .product-art.product-visual {
  width: 100%;
  height: auto;
  min-height: 190px;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  padding: 8px;
  border-color: #e5e9f0;
  background: #fff;
}
.pos-catalog .product-art.product-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.pos-catalog .product-card h3 {
  min-height: 2.5em;
  font-size: 1rem;
  line-height: 1.25;
}
.pos-catalog .product-price,
.pos-catalog .campaign-price {
  margin-top: 12px;
  padding-right: 48px;
  font-size: 1.08rem;
}

/* En portátiles y monitores normales se prioriza el tamaño de la foto. */
@media (max-width: 1750px) and (min-width: 981px) {
  .pos-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .pos-catalog .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .pos-catalog .product-art.product-visual { min-height: 220px; }
}

/* En pantallas grandes caben tres productos sin volver pequeñas las fotos. */
@media (min-width: 1751px) {
  .pos-catalog .product-grid { grid-template-columns: repeat(3, minmax(270px, 1fr)); }
  .pos-catalog .product-art.product-visual { min-height: 205px; }
}

@media (max-width: 1200px) and (min-width: 981px) {
  .pos-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 15px; }
  .pos-catalog .product-art.product-visual { min-height: 190px; }
}

@media (max-width: 980px) {
  .pos-catalog .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-catalog .product-art.product-visual { min-height: 210px; }
}

@media (max-width: 620px) {
  .pos-catalog .product-grid { grid-template-columns: 1fr; }
  .pos-catalog .product-art.product-visual {
    min-height: 230px;
    aspect-ratio: 16 / 10;
  }
}

/* Versión 5.2: creador completo de ingredientes, preparados y recetas */
.recipe-workflow-panel {
  padding: 22px;
  margin-bottom: 20px;
  border: 1px solid #dfe6ef;
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 0%, rgba(255,214,0,.18), transparent 28%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(28, 43, 70, .06);
}
.recipe-workflow-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.recipe-workflow-heading h2 { margin: 0 0 5px; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.recipe-workflow-heading p { margin: 0; color: var(--muted); font-size: .8rem; }
.recipe-workflow-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #bfe6cb;
  border-radius: 999px;
  color: #17642d;
  background: #eefaf2;
  font-size: .72rem;
  font-weight: 900;
}
.recipe-workflow-status span { width: 8px; height: 8px; border-radius: 50%; background: #21a447; }
.recipe-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.recipe-step-card {
  display: flex;
  flex-direction: column;
  min-height: 215px;
  padding: 17px;
  border: 1px solid #e0e6ee;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
}
.recipe-step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  border-radius: 11px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
}
.recipe-step-card h3 { margin: 0 0 6px; font-size: .94rem; }
.recipe-step-card p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.recipe-step-card > div { flex: 1; }
.recipe-step-card .btn { width: 100%; margin-top: 15px; }
.recipe-panel-header { align-items: center; }
.recipe-panel-header .btn { flex: 0 0 auto; }
.recipe-ingredient-panel { margin-bottom: 20px; }
.recipe-form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.modal-backdrop.modal-stack { z-index: 112; }
.recipe-modal-note {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #d9e5f2;
  border-radius: 12px;
  color: #44536b;
  background: #f5f9fd;
  font-size: .77rem;
  line-height: 1.5;
}
.ingredient-calculation-card,
.prepared-price-preview {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  margin-top: 16px;
  border: 1px solid #e2d68c;
  border-radius: 13px;
  background: #fffbea;
}
.ingredient-calculation-card span,
.prepared-price-preview span { color: var(--muted); font-size: .72rem; }
.ingredient-calculation-card strong,
.prepared-price-preview strong { text-align: right; font-size: .86rem; }
.switch-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfcfe;
  cursor: pointer;
}
.switch-row input { width: 18px; height: 18px; accent-color: var(--red); }
.switch-row strong { font-size: .78rem; }
.switch-row.compact { min-height: 42px; }

@media (max-width: 1050px) {
  .recipe-workflow-grid { grid-template-columns: 1fr; }
  .recipe-step-card { min-height: 0; }
}
@media (max-width: 760px) {
  .recipe-workflow-heading { flex-direction: column; }
  .recipe-workflow-status { align-self: flex-start; }
  .recipe-form-head { align-items: flex-start; flex-direction: column; }
  .recipe-form-actions { width: 100%; }
  .recipe-form-actions .btn { flex: 1 1 180px; }
  .recipe-panel-header { align-items: flex-start; flex-direction: column; }
  .recipe-panel-header .btn { width: 100%; }
  .ingredient-calculation-card,
  .prepared-price-preview { align-items: flex-start; flex-direction: column; }
  .ingredient-calculation-card strong,
  .prepared-price-preview strong { text-align: left; }
}
