.owner-page { background: #f2f0e8; }
.owner-page .site-header { background: var(--paper); }
.owner-store-link { color: var(--green); font-size: 13px; font-weight: 700; }
.owner-main { width: min(1060px, 92%); margin: 0 auto; padding: 46px 0 80px; }
.owner-login { width: min(410px, 100%); margin: 70px auto; padding: 30px; border: 1px solid var(--line); background: var(--white); }
.owner-login h1, .dashboard-heading h1 { margin: 8px 0; font: 600 32px var(--heading); letter-spacing: -1.4px; }
.owner-login > p:not(.eyebrow), .dashboard-heading > div > p:last-child { color: var(--muted); font-size: 12px; line-height: 1.6; }
.owner-login form { display: grid; gap: 10px; margin-top: 22px; }
.owner-login label, .coupon-create-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.owner-login input, .coupon-create-form input { min-height: 42px; padding: 0 10px; border: 1px solid #dedbd1; border-radius: 3px; background: white; font-size: 12px; }
.owner-login .primary-button { width: 100%; margin-top: 5px; }
.owner-error { color: #b43d29; font-size: 13px; line-height: 1.5; }
.owner-error[hidden] { display: none; }
/* Cualquier elemento marcado como oculto debe desaparecer, aunque tenga su propia regla de display. */
.owner-page [hidden] { display: none !important; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.dashboard-heading > div > p:last-child { margin-bottom: 0; }
.dashboard-actions { display: flex; align-items: center; gap: 16px; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #6c9c61; box-shadow: 0 0 0 3px #6c9c6120; }
.logout-button, .refresh-button { min-height: 35px; padding: 0 12px; border: 1px solid #dcd9cf; border-radius: 3px; color: var(--ink); background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 30px; }
.dashboard-stats article { min-height: 91px; padding: 16px; display: grid; align-content: space-between; border: 1px solid var(--line); background: var(--white); }
.dashboard-stats article span { color: var(--muted); font-size: 12px; }
.dashboard-stats article strong { color: var(--green); font: 600 26px var(--heading); }
.owner-section { margin-top: 18px; padding: 21px; border: 1px solid var(--line); background: var(--white); }
.owner-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.owner-section-heading .eyebrow { font-size: 10px; }
.owner-section-heading h2 { margin: 5px 0 0; font: 600 22px var(--heading); letter-spacing: -.5px; }
.orders-list, .coupons-list { display: grid; gap: 11px; }
.owner-empty { padding: 20px; color: var(--muted); text-align: center; font-size: 13px; }
.order-card { overflow: hidden; border: 1px solid #e7e4da; }
.order-card-header { padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #f5f3ec; }
.order-card-header > div { display: grid; gap: 4px; }
.order-number { font: 600 13px var(--heading); }
.order-time { color: var(--muted); font-size: 11px; }
.status-select { min-height: 31px; padding: 0 8px; border: 1px solid #d8d5cb; border-radius: 3px; background: white; font-size: 11px; }
.order-card-content { padding: 13px 14px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); gap: 15px; }
.order-lines { display: grid; align-content: start; gap: 10px; }
.order-line { padding-bottom: 9px; border-bottom: 1px solid #efede6; }
.order-line:last-child { padding-bottom: 0; border: 0; }
.order-line-heading { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; }
.order-line-details { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.order-customer { display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.order-customer strong { color: var(--ink); }
.order-payment-status { font-weight: 700; }
.order-payment-status.pending { color: #9a4c28; }
.order-payment-status.approved { color: var(--green); }
.order-payment-status.rejected, .order-payment-status.refunded { color: #b43d29; }
.confirm-transfer-button { justify-self: start; min-height: 31px; padding: 0 10px; border: 1px solid #dcd9cf; border-radius: 3px; color: var(--green); background: #f7f5ef; font-size: 11px; font-weight: 700; cursor: pointer; }
.confirm-transfer-button:disabled { opacity: .6; cursor: wait; }
.order-customer a { color: var(--green); font-weight: 700; text-decoration: underline; }
.order-location { display: grid; gap: 4px; }
.order-map { position: relative; width: 100%; max-width: 220px; overflow: hidden; border: 1px solid #dcd9cf; border-radius: 3px; }
.order-map-canvas { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: 100%; aspect-ratio: 1; }
.order-map-tile { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-map-pin { position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid #fff; border-radius: 50% 50% 50% 0; background: #e95b36; box-shadow: 0 2px 6px #0007; transform: rotate(-45deg); pointer-events: none; }
.order-map-attribution { position: absolute; right: 0; bottom: 0; padding: 1px 4px; background: #ffffffd9; color: #444; font-size: 8px; }
:root[data-theme="dark"] .order-map { border-color: #3a3a3a; }
:root[data-theme="dark"] .order-map-attribution { background: #000000b3; color: #ccc; }
.order-price-breakdown { margin-top: 3px; padding-top: 8px; display: grid; gap: 4px; border-top: 1px solid #efede6; font-size: 11px; }
.order-price-breakdown span { display: flex; justify-content: space-between; gap: 8px; }
.order-price-breakdown .order-grand-total { color: var(--ink); font-size: 13px; font-weight: 700; }
.coupon-badge { padding: 7px 10px; border-radius: 20px; color: var(--green); background: #edf2e9; font-size: 12px; font-weight: 700; }
.coupon-description { max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.coupon-create-form { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(140px, 1fr) minmax(100px, .6fr) minmax(110px, .6fr) auto; gap: 11px; align-items: end; margin: 17px 0; }
.coupon-create-form .primary-button { min-height: 42px; font-size: 12px; }
.coupon-create-form .optional { color: var(--muted); font-weight: 400; }
.coupon-card { min-height: 54px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #e7e4da; }
.coupon-card > div:first-child { display: grid; gap: 4px; }
.coupon-card strong { font: 600 13px var(--heading); letter-spacing: .5px; }
.coupon-card span { color: var(--muted); font-size: 11px; }
.coupon-card-actions { display: flex; gap: 7px; align-items: center; }
.coupon-card-actions button { min-height: 29px; padding: 0 9px; border: 1px solid #dedbd1; border-radius: 3px; background: white; font-size: 11px; cursor: pointer; }
.coupon-card-controls { display: flex; align-items: end; gap: 5px; flex-wrap: wrap; }
.coupon-percent-editor { display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.coupon-percent-editor input { width: 72px; min-height: 29px; padding: 0 5px; border: 1px solid #dedbd1; border-radius: 3px; background: white; font-size: 12px; }
.coupon-card-actions .coupon-toggle.active { color: #8e3926; }
.coupon-card-actions .coupon-toggle.inactive { color: var(--green); }
.coupon-card-actions .coupon-delete { color: #b43d29; border-color: #e7c9c2; }
.coupon-card-actions .coupon-delete:disabled { opacity: .5; cursor: wait; }
.store-settings-description { max-width: 700px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.store-open-control { min-height: 48px; margin: 15px 0 20px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid #e7e4da; background: #f7f5ef; font-size: 13px; }
.inventory-heading, .report-columns h3 { margin: 16px 0 10px; font: 600 14px var(--heading); }
.product-availability-list { display: grid; gap: 7px; }
.availability-row { min-height: 42px; padding: 7px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-bottom: 1px solid #efede6; font-size: 12px; }
.availability-row button { min-height: 29px; padding: 0 9px; border: 1px solid #dedbd1; border-radius: 3px; background: white; font-size: 11px; cursor: pointer; }
.availability-row button:disabled { opacity: .5; cursor: not-allowed; }
.availability-row-actions { display: flex; gap: 6px; }
.availability-in-stock { color: var(--green); }
.availability-out-of-stock { color: #b43d29; font-weight: 700; }
.availability-extras { grid-column: 1 / -1; display: grid; gap: 4px; padding: 6px 0 2px; border-top: 1px dashed #e7e4da; }
.availability-extras-title { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.availability-extra-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; font-size: 11px; }
.availability-extra-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.availability-extra-price { color: var(--muted); }
.availability-extra-button { min-height: 24px !important; padding: 0 8px !important; font-size: 10px !important; }
.availability-extra-button.is-off { border-color: #d9a89e !important; background: #fbeeea !important; color: #b43d29 !important; font-weight: 700; }
:root[data-theme="dark"] .availability-extras { border-color: var(--line); }
:root[data-theme="dark"] .availability-extra-button.is-off { border-color: #7d3a2c !important; background: #2b1a16 !important; color: #f0a595 !important; }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.report-stats article { min-height: 72px; padding: 12px; display: grid; align-content: space-between; border: 1px solid #e7e4da; background: #f7f5ef; }
.report-stats article span { color: var(--muted); font-size: 11px; }
.report-stats article strong { color: var(--green); font: 600 20px var(--heading); }
.report-columns { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.report-columns > div { padding: 12px; border: 1px solid #e7e4da; }
.report-row, .report-empty { margin: 0; padding: 7px 0; border-bottom: 1px solid #efede6; color: var(--muted); font-size: 12px; }
.report-empty { color: var(--muted); }
.order-eta-editor { display: grid; gap: 6px; padding: 8px 9px; margin-top: 2px; border: 1px solid var(--line); background: var(--paper); }
.order-eta-label { font-size: 11px; color: var(--ink); font-weight: 700; }
.order-eta-row { display: flex; gap: 6px; flex-wrap: wrap; }
.order-eta-row input { min-height: 30px; padding: 0 6px; border: 1px solid #dedbd1; border-radius: 3px; background: white; color: var(--ink); font-size: 11px; }
.order-eta-row button { min-height: 30px; padding: 0 9px; border: 1px solid #dedbd1; border-radius: 3px; background: white; font-size: 11px; cursor: pointer; }
.order-eta-row button:disabled { opacity: .6; cursor: wait; }
.order-eta-reset { justify-self: start; padding: 0; border: 0; background: none; color: var(--green); font-size: 11px; text-decoration: underline; cursor: pointer; }
:root[data-theme="dark"] .order-eta-row input,
:root[data-theme="dark"] .order-eta-row button { border-color: var(--line); background: var(--paper); color: var(--ink); }
.finished-orders { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
.finished-orders-toggle { width: 100%; min-height: 44px; padding: 6px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.finished-orders-toggle:hover { border-color: var(--line); background: var(--paper); }
.finished-orders-label { display: grid; gap: 2px; }
.finished-orders-label strong { color: var(--ink); font: 600 14px var(--heading); }
.finished-orders-label small { color: var(--muted); font-size: 11px; }
.finished-orders-arrow { font-size: 15px; line-height: 1; transition: transform .18s ease; }
.finished-orders-toggle[aria-expanded="false"] .finished-orders-arrow { transform: rotate(-90deg); }
.finished-orders-list { display: grid; gap: 11px; margin-top: 12px; }
.finished-orders-list[hidden] { display: none; }
.owner-section-heading-actions { display: flex; align-items: center; gap: 10px; }
.owner-section-summary { color: var(--muted); font-size: 12px; text-align: right; }
.owner-section-collapse { min-height: 32px; min-width: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dedbd1; border-radius: 3px; background: white; color: var(--muted); cursor: pointer; }
.owner-section-collapse:hover { color: var(--ink); border-color: var(--line); }
.owner-section-collapse .finished-orders-arrow { display: inline-block; font-size: 14px; line-height: 1; transition: transform .18s ease; }
.owner-section-collapse[aria-expanded="false"] .finished-orders-arrow { transform: rotate(-90deg); }
:root[data-theme="dark"] .owner-section-collapse { border-color: var(--line); background: var(--paper); color: var(--ink); }
:root[data-theme="dark"] .finished-orders-toggle:hover,
:root[data-theme="dark"] .owner-section-collapse:hover { background: var(--palette-section); }
:root[data-theme="dark"] .finished-orders-toggle:hover { background: var(--palette-section); }

:root[data-theme="dark"] .owner-page { background: var(--paper); }
:root[data-theme="dark"] .owner-page .site-header { background: var(--paper); }
.owner-header-actions { display: flex; align-items: center; gap: 18px; }

/* Notificaciones de pedidos nuevos */
.owner-notifications { position: relative; }
.owner-notifications-bell { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #dcd9cf; border-radius: 50%; background: transparent; font-size: 16px; line-height: 1; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.owner-notifications-bell:hover { background: #f2efe6; }
.owner-notifications-bell:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.owner-notifications-badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d93025; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 1px 3px #0004; animation: owner-badge-pop .25s ease; }
:root[data-theme="dark"] .owner-notifications-bell { border-color: #3a3a3a; }
:root[data-theme="dark"] .owner-notifications-bell:hover { background: #2a2a2a; }
@keyframes owner-badge-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.owner-notifications-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: min(300px, calc(100vw - 32px)); max-height: 340px; overflow-y: auto; padding: 6px; border: 1px solid #dcd9cf; border-radius: 6px; background: #fff; box-shadow: 0 10px 30px #0000002e; }
:root[data-theme="dark"] .owner-notifications-list { border-color: #3a3a3a; background: #1f1f1f; box-shadow: 0 10px 30px #000000a6; }
.owner-notifications-title { margin: 2px 4px 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.owner-notifications-empty { margin: 4px 6px; color: var(--muted); font-size: 12px; }
.owner-notification-item { display: grid; gap: 2px; width: 100%; padding: 8px 9px; border: 0; border-radius: 4px; background: transparent; text-align: left; cursor: pointer; }
.owner-notification-item:hover { background: #f2efe6; }
:root[data-theme="dark"] .owner-notification-item:hover { background: #2a2a2a; }
.owner-notification-label { color: var(--ink); font-size: 13px; font-weight: 600; }
.owner-notification-meta { color: var(--muted); font-size: 11px; }
:root[data-theme="dark"] .owner-login input,
:root[data-theme="dark"] .coupon-create-form input,
:root[data-theme="dark"] .coupon-percent-editor input,
:root[data-theme="dark"] .status-select,
:root[data-theme="dark"] .logout-button,
:root[data-theme="dark"] .refresh-button,
:root[data-theme="dark"] .coupon-card-actions button,
:root[data-theme="dark"] .availability-row button { border-color: var(--line); color: var(--ink); background: var(--paper); }
:root[data-theme="dark"] .order-card,
:root[data-theme="dark"] .coupon-card,
:root[data-theme="dark"] .store-open-control,
:root[data-theme="dark"] .report-columns > div { border-color: var(--line); }
:root[data-theme="dark"] .order-card-header,
:root[data-theme="dark"] .confirm-transfer-button,
:root[data-theme="dark"] .store-open-control,
:root[data-theme="dark"] .report-stats article { background: var(--palette-section); }
:root[data-theme="dark"] .order-line,
:root[data-theme="dark"] .order-price-breakdown,
:root[data-theme="dark"] .availability-row,
:root[data-theme="dark"] .report-row,
:root[data-theme="dark"] .order-customer { border-color: var(--line); }
:root[data-theme="dark"] .order-customer,
:root[data-theme="dark"] .report-row { color: #c4c7bd; }
:root[data-theme="dark"] .coupon-badge { color: #c9e0cb; background: #2c3b2d; }
:root[data-theme="dark"] .owner-page .theme-toggle { border-color: var(--line); }

.confirm-transfer-button { justify-self: start; min-height: 31px; padding: 0 10px; border: 1px solid #dcd9cf; border-radius: 3px; color: var(--green); background: #f7f5ef; font-size: 11px; font-weight: 700; cursor: pointer; }
.confirm-transfer-button:disabled { opacity: .6; cursor: wait; }
.order-customer a { color: var(--green); font-weight: 700; text-decoration: underline; }
.payment-confirmation-detail { color: var(--green); font-weight: 700; }
.payment-confirmation-note { font-style: italic; }
.payment-confirmation-history { margin-top: 2px; padding: 6px 8px; border: 1px solid var(--line); background: var(--paper); font-size: 11px; }
.payment-confirmation-history summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.payment-confirmation-entry { margin: 6px 0 0; color: var(--muted); }
.confirm-payment-dialog { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 4px; padding: 26px; background: var(--white); color: var(--ink); }
.confirm-payment-dialog::backdrop { background: #1a1a1a9c; }
.confirm-payment-dialog h2 { margin: 8px 0 6px; font: 600 24px var(--heading); letter-spacing: -.6px; }
.confirm-payment-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.confirm-payment-summary { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.confirm-payment-note-label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.confirm-payment-note-label .optional { color: var(--muted); font-weight: 400; }
.confirm-payment-dialog textarea { width: 100%; padding: 10px; border: 1px solid #dedbd1; border-radius: 3px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; resize: vertical; }
.confirm-payment-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.confirm-payment-actions .primary-button, .confirm-payment-actions .refresh-button { min-height: 40px; font-size: 12px; }
.confirm-payment-submit:disabled { opacity: .6; cursor: wait; }
:root[data-theme="dark"] .confirm-payment-dialog textarea { border-color: var(--line); background: var(--paper); color: var(--ink); }
.product-pause-options { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.product-pause-options .refresh-button { flex: 1 1 auto; }
.product-pause-until-input { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid #dedbd1; border-radius: 3px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
:root[data-theme="dark"] .product-pause-until-input { border-color: var(--line); }

@media (max-width: 650px) {
  .owner-main { width: 92%; padding-top: 28px; }
  .owner-login { margin: 45px auto; padding: 23px; }
  .owner-header-actions { gap: 10px; }
  .dashboard-heading { align-items: start; flex-direction: column; gap: 13px; }
  .dashboard-actions { width: 100%; justify-content: space-between; }
  .dashboard-stats { gap: 7px; }
  .dashboard-stats article { min-height: 78px; padding: 10px; }
  .dashboard-stats article span { font-size: 10px; }
  .dashboard-stats article strong { font-size: 21px; }
  .owner-section { padding: 14px; }
  .order-card-content { grid-template-columns: 1fr; }
  .order-customer { padding-top: 11px; border-top: 1px solid #efede6; }
  .coupon-create-form { grid-template-columns: 1fr; }
  .coupon-create-form .primary-button { width: 100%; }
  .coupon-card { align-items: start; flex-direction: column; }
  .coupon-card-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .availability-row { grid-template-columns: 1fr auto; }
  .availability-row button { grid-column: 1 / -1; }
  .report-stats { gap: 6px; }
  .report-stats article { padding: 9px; }
  .report-stats article strong { font-size: 16px; }
  .report-columns { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .owner-main { width: 94%; }
  .owner-section { padding: 12px; }
  .owner-section-heading { align-items: flex-start; }
  .owner-section-heading h2 { font-size: 19px; }
  .dashboard-stats, .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-stats article:last-child, .report-stats article:last-child { grid-column: 1 / -1; }
  .dashboard-stats article strong { font-size: 18px; }
  .report-stats article strong { font-size: 18px; }
  .owner-header-actions { gap: 7px; }
  .owner-store-link { font-size: 11px; }
  .store-open-control { align-items: flex-start; flex-direction: column; }
  .availability-row { gap: 7px; }
  .coupon-card-actions { gap: 8px; }
}
