/* admin-figma.css — Sistema visual del panel (fuente: Figma Make).
   Se carga después de style.css y admin.css. Solo presentación. */

:root {
  --yg-bg: #F7F7F5;
  --yg-card: #FFFFFF;
  --yg-fg: #111110;
  --yg-fg-2: #3A3835;
  --yg-muted: #6B6763;
  --yg-subtle: #8A8680;
  --yg-surface: #F4F3F1;
  --yg-surface-2: #F0EFED;
  --yg-border: #E5E4E0;
  --yg-border-soft: #EFEEEB;
  --yg-sidebar: #0E0E0C;
  --yg-sidebar-fg: #A8A29E;
  --yg-accent: #7C3AED;
  --yg-accent-soft: rgba(124, 58, 237, .14);
  --yg-success: #16A34A; --yg-success-bg: #F0FDF4; --yg-success-bd: #BBF7D0;
  --yg-warning: #B45309; --yg-warning-bg: #FFFBEB; --yg-warning-bd: #FDE68A;
  --yg-error:   #DC2626; --yg-error-bg:   #FEF2F2; --yg-error-bd:   #FECACA;
  --yg-info:    #0369A1; --yg-info-bg:    #F0F9FF; --yg-info-bd:    #BAE6FD;
  --yg-r-sm: 8px; --yg-r: 12px; --yg-r-lg: 16px;
  --yg-shadow-1: 0 1px 2px rgba(17, 17, 16, .04);
  --yg-shadow-2: 0 8px 24px rgba(17, 17, 16, .08);
  --yg-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --yg-font-head: -apple-system, BlinkMacSystemFont, "SF Pro Display", Manrope, Inter, "Segoe UI", sans-serif;
  --yg-sidebar-w: 260px;
  --yg-ease: cubic-bezier(.2, .8, .2, 1);
}

[hidden] { display: none !important; }

/* ---------- Base ---------- */
body.yg-body {
  margin: 0; background: var(--yg-bg); color: var(--yg-fg);
  font-family: var(--yg-font); font-size: 13.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
.yg-body *, .yg-body *::before, .yg-body *::after { box-sizing: border-box; }
.yg-body a { color: inherit; }
.yg-body :focus-visible { outline: 2px solid var(--yg-accent); outline-offset: 2px; border-radius: 6px; }
.yg-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--yg-fg); color: #fff; padding: 8px 12px; border-radius: var(--yg-r-sm); }
.yg-skip:focus { left: 8px; }
.yg-icon { width: 17px; height: 17px; flex: none; }
.yg-inline-icon { width: 15px; height: 15px; vertical-align: -3px; }

/* ---------- Shell ---------- */
.yg-shell { display: flex; min-height: 100vh; }
.yg-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--yg-sidebar-w); z-index: 40;
  background: var(--yg-sidebar); color: var(--yg-sidebar-fg);
  display: flex; flex-direction: column; padding: 16px 12px 12px;
  direction: rtl; /* scrollbar en el borde izquierdo */
}
.yg-sidebar > * { direction: ltr; }
.yg-nav { flex: 1; overflow-y: auto; margin: 0 -12px; padding: 4px 12px 12px; direction: rtl; scrollbar-width: thin; scrollbar-color: #2E2D2A transparent; }
.yg-nav > * { direction: ltr; }
.yg-nav::-webkit-scrollbar { width: 4px; }
.yg-nav::-webkit-scrollbar-thumb { background: #2E2D2A; border-radius: 4px; }

.yg-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
.yg-brand-mark { width: 30px; height: 30px; border-radius: 9px; background: #1E1E1B; color: #fff; display: grid; place-items: center; }
.yg-brand-mark .yg-icon { width: 16px; height: 16px; }
.yg-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.yg-brand-name { font-family: var(--yg-font-head); font-weight: 800; color: #fff; font-size: 15px; letter-spacing: -.01em; }
.yg-brand-sub { font-size: 11.5px; color: #77726C; }
.yg-brand .yg-sidebar-close { margin-left: auto; display: none; }

.yg-sede { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; padding: 8px 10px; border-radius: 10px; background: #171715; color: #D6D3D1; font-size: 12.5px; }
.yg-sede-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yg-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.yg-dot.is-on { background: var(--yg-success); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.yg-dot.is-off { background: #78716C; }

.yg-nav-label { font-size: 11.5px; color: #6F6A64; padding: 14px 10px 6px; font-weight: 500; }
.yg-nav-link, .yg-nav-group-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; margin: 1px 0; border-radius: 8px; border: 0; background: transparent;
  color: var(--yg-sidebar-fg); font: 500 13px/1.3 var(--yg-font); text-decoration: none; text-align: left; cursor: pointer;
  position: relative; transition: background-color .15s var(--yg-ease), color .15s var(--yg-ease);
}
.yg-nav-link:hover, .yg-nav-group-toggle:hover { background: rgba(255, 255, 255, .05); color: #F5F5F4; }
.yg-nav-link.is-active { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600; }
.yg-nav-link.is-kuul::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--yg-accent); }
.yg-nav-group { margin-top: 10px; border-top: 1px solid #1F1F1C; padding-top: 8px; }
.yg-nav-group-toggle { color: #D6D3D1; font-weight: 600; }
.yg-nav-group-toggle.has-active > .yg-icon:first-child { color: #A78BFA; }
.yg-caret { margin-left: auto; width: 14px; height: 14px; transition: transform .2s var(--yg-ease); transform: rotate(-90deg); }
.yg-nav-group.is-open .yg-caret { transform: rotate(0); }
.yg-nav-sub { padding-left: 10px; }
.yg-nav-sub .yg-nav-link { font-size: 12.5px; padding: 6px 10px; }

.yg-user { display: flex; align-items: center; gap: 10px; padding: 10px 6px 2px; border-top: 1px solid #1F1F1C; }
.yg-avatar { width: 30px; height: 30px; border-radius: 50%; background: #262624; color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.yg-user-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.yg-user-text b { color: #F5F5F4; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yg-user-text span { font-size: 11.5px; color: #77726C; }
.yg-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: inherit; cursor: pointer; transition: background-color .15s var(--yg-ease); }
.yg-icon-btn:hover { background: rgba(127, 127, 127, .14); }

.yg-content { flex: 1; min-width: 0; margin-left: var(--yg-sidebar-w); display: flex; flex-direction: column; }
.yg-topbar {
  position: sticky; top: 0; z-index: 20; height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: rgba(247, 247, 245, .86); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--yg-border);
}
.yg-topbar .yg-menu-btn { display: none; color: var(--yg-fg); }
.yg-topbar-title { font-weight: 600; color: var(--yg-fg-2); font-size: 13.5px; }
.yg-topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--yg-muted); font-size: 12.5px; }
.yg-status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: var(--yg-card); border: 1px solid var(--yg-border); font-weight: 600; color: var(--yg-fg-2); }
.yg-main { width: 100%; max-width: 1360px; padding: 24px 28px 64px; animation: yg-in .22s var(--yg-ease) both; }
.yg-scrim { position: fixed; inset: 0; background: rgba(17, 17, 16, .4); z-index: 35; animation: yg-fade .15s ease both; }

@keyframes yg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes yg-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tipografía de página ---------- */
.yg-main h1 { font-family: var(--yg-font-head); font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; color: var(--yg-fg); }
.yg-main h2 { font-family: var(--yg-font-head); font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; color: var(--yg-fg); }
.yg-main h3, .yg-main .admin-subheading { font-size: 13.5px; font-weight: 600; margin: 16px 0 8px; color: var(--yg-fg); }
.yg-main p { margin: 0 0 12px; }
.yg-main .admin-hint { color: var(--yg-muted); font-size: 12.5px; line-height: 1.55; max-width: 76ch; }
.yg-main .admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.yg-main .admin-page-head h1 { margin: 0; }

/* ---------- Superficies ---------- */
.yg-main .admin-section {
  background: var(--yg-card); border: 1px solid var(--yg-border); border-radius: var(--yg-r);
  padding: 20px 22px; margin: 0 0 16px; box-shadow: var(--yg-shadow-1);
}
.yg-main .admin-empty {
  background: var(--yg-card); border: 1px dashed var(--yg-border); border-radius: var(--yg-r);
  color: var(--yg-muted); padding: 22px; text-align: center; font-size: 13px;
}

/* ---------- Mensajes ---------- */
.yg-main .success-text, .yg-main .error-text {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 500; margin: 0 0 16px; border: 1px solid; animation: yg-fade .2s ease both;
}
.yg-main .success-text { background: var(--yg-success-bg); border-color: var(--yg-success-bd); color: #166534; }
.yg-main .error-text { background: var(--yg-error-bg); border-color: var(--yg-error-bd); color: #991B1B; }
.yg-main .free-note {
  display: flex; align-items: center; gap: 8px; background: var(--yg-surface); border: 1px solid var(--yg-border);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--yg-fg-2);
}

/* ---------- Formularios ---------- */
.yg-main .admin-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; align-items: end; }
.yg-main .admin-form > .btn, .yg-main .admin-form > button { justify-self: start; }
.yg-main .admin-form label, .yg-main label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--yg-fg-2); }
.yg-main .checkbox-label, .yg-main label:has(> input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.yg-main input[type="text"], .yg-main input[type="number"], .yg-main input[type="email"], .yg-main input[type="tel"],
.yg-main input[type="url"], .yg-main input[type="date"], .yg-main input[type="time"], .yg-main input[type="password"],
.yg-main input[type="search"], .yg-main select, .yg-main textarea, .yg-body .admin-login-box input[type="text"], .yg-body .admin-login-box input[type="password"] {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--yg-border); border-radius: var(--yg-r-sm);
  background: var(--yg-card); color: var(--yg-fg); font: 400 13.5px/1.4 var(--yg-font); font-variant-numeric: tabular-nums;
  transition: border-color .15s var(--yg-ease), box-shadow .15s var(--yg-ease); box-shadow: none; appearance: auto;
}
.yg-main textarea { min-height: 88px; resize: vertical; }
.yg-main input:hover, .yg-main select:hover, .yg-main textarea:hover { border-color: #D6D4CF; }
.yg-main input:focus, .yg-main select:focus, .yg-main textarea:focus,
.yg-body .admin-login-box input:focus { outline: none; border-color: var(--yg-accent); box-shadow: 0 0 0 3px var(--yg-accent-soft); }
.yg-main input:disabled, .yg-main select:disabled, .yg-main textarea:disabled { background: var(--yg-surface); color: var(--yg-subtle); cursor: not-allowed; }
.yg-main input[type="checkbox"], .yg-main input[type="radio"] { width: 16px; height: 16px; accent-color: var(--yg-fg); margin: 0; }
.yg-main input[type="file"] { font: 400 12.5px var(--yg-font); color: var(--yg-muted); max-width: 100%; }
.yg-main input[type="file"]::file-selector-button { font: 500 12.5px var(--yg-font); margin-right: 10px; padding: 6px 12px; border-radius: var(--yg-r-sm); border: 1px solid var(--yg-border); background: var(--yg-surface); color: var(--yg-fg); cursor: pointer; }
.yg-main .admin-input-small { max-width: 110px; }

/* ---------- Botones ---------- */
.yg-body .btn, .yg-main .add-row-btn, .yg-main .btn-icon-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 14px;
  border-radius: var(--yg-r-sm); border: 1px solid transparent; font: 600 13px/1.2 var(--yg-font); text-decoration: none;
  cursor: pointer; white-space: nowrap; box-shadow: none; text-transform: none; letter-spacing: 0;
  transition: background-color .15s var(--yg-ease), border-color .15s var(--yg-ease), opacity .15s, transform .1s;
}
.yg-body .btn:active, .yg-main .add-row-btn:active, .yg-main .btn-icon-danger:active { transform: scale(.98); }
.yg-body .btn-primary { background: var(--yg-fg); color: #fff; border-color: var(--yg-fg); }
.yg-body .btn-primary:hover { background: #2A2926; border-color: #2A2926; color: #fff; }
.yg-body .btn-secondary, .yg-main .add-row-btn { background: var(--yg-card); color: var(--yg-fg); border-color: var(--yg-border); }
.yg-body .btn-secondary:hover, .yg-main .add-row-btn:hover { background: var(--yg-surface); border-color: #D6D4CF; }
.yg-main .add-row-btn { border-style: dashed; color: var(--yg-fg-2); }
.yg-body .btn-small { min-height: 30px; padding: 5px 10px; font-size: 12.5px; }
.yg-body .btn-block { width: 100%; }
.yg-main .btn-icon-danger { background: transparent; color: var(--yg-error); border-color: transparent; padding: 6px 10px; min-height: 32px; font-weight: 500; }
.yg-main .btn-icon-danger:hover { background: var(--yg-error-bg); border-color: var(--yg-error-bd); }
.yg-body .btn:disabled, .yg-body .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.yg-main .btn-icon-only { width: 34px; padding: 0; }
.yg-main .inline-form, .yg-main .inline-form-tiny { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }

/* ---------- Chips / filtros ---------- */
.yg-main .admin-filter, .yg-main .category-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.yg-main .category-jump { margin: 0 0 16px; }
.yg-main .filter-chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--yg-border); background: var(--yg-card); color: var(--yg-fg-2); font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: background-color .15s, border-color .15s, color .15s;
}
.yg-main .filter-chip:hover { border-color: #D6D4CF; background: var(--yg-surface); }
.yg-main .filter-chip.active { background: var(--yg-fg); border-color: var(--yg-fg); color: #fff; }
.yg-main .admin-search { max-width: 320px; }

/* ---------- Badges de estado ---------- */
.yg-main .order-status-badge, .yg-main .badge-inline, .yg-main .warning-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  line-height: 1.35; white-space: nowrap; border: 1px solid transparent;
}
.yg-main .order-status-badge { background: var(--yg-surface-2); color: var(--yg-fg-2); }
.yg-main .status-nuevo { background: var(--yg-info-bg); color: var(--yg-info); border-color: var(--yg-info-bd); }
.yg-main [class*="status-en-prep"] { background: var(--yg-warning-bg); color: var(--yg-warning); border-color: var(--yg-warning-bd); }
.yg-main .status-en-camino { background: #EEF2FF; color: #3730A3; border-color: #C7D2FE; }
.yg-main .status-entregado { background: var(--yg-success-bg); color: #15803D; border-color: var(--yg-success-bd); }
.yg-main .status-cancelado { background: var(--yg-error-bg); color: #B91C1C; border-color: var(--yg-error-bd); }
.yg-main .badge-inline { background: var(--yg-surface-2); color: var(--yg-fg-2); border-color: var(--yg-border); }
.yg-main .warning-badge { background: var(--yg-warning-bg); color: var(--yg-warning); border-color: var(--yg-warning-bd); white-space: normal; }

/* ---------- Tablas ---------- */
.yg-main .admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--yg-card); }
.yg-main .admin-section:has(> .admin-table), .yg-main .admin-table-wrap { overflow-x: auto; }
.yg-main .admin-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--yg-subtle); padding: 9px 10px; border-bottom: 1px solid var(--yg-border); background: var(--yg-card); white-space: nowrap; }
.yg-main .admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--yg-border-soft); vertical-align: middle; }
.yg-main .admin-table tbody tr { transition: background-color .12s; }
.yg-main .admin-table tbody tr:hover { background: #FAFAF8; }
.yg-main .admin-table td input, .yg-main .admin-table td select { min-height: 34px; }

/* ---------- Pedidos ---------- */
.yg-main .orders-split { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.yg-main .orders-list-panel {
  display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 150px); overflow-y: auto; padding: 6px;
  background: var(--yg-card); border: 1px solid var(--yg-border); border-radius: var(--yg-r); position: sticky; top: 68px;
}
.yg-main .order-list-item {
  display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--yg-fg); font: inherit; cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.yg-main .order-list-item:hover { background: var(--yg-surface); }
.yg-main .order-list-item.active { background: var(--yg-surface); border-color: var(--yg-border); box-shadow: inset 2px 0 0 var(--yg-fg); }
.yg-main .order-list-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.yg-main .order-list-item-name { font-size: 13px; color: var(--yg-fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yg-main .order-list-item-meta { font-size: 12px; color: var(--yg-subtle); }
.yg-main .order-list-item .warning-badge { align-self: flex-start; margin-top: 3px; }
.yg-main .orders-detail-panel { min-width: 0; }
.yg-main .order-detail { display: none; background: var(--yg-card); border: 1px solid var(--yg-border); border-radius: var(--yg-r); padding: 22px; box-shadow: var(--yg-shadow-1); }
.yg-main .order-detail.active { display: block; animation: yg-in .2s var(--yg-ease) both; }
.yg-main .order-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.yg-main .order-detail-head h2 { font-size: 18px; margin: 0; }
.yg-main .order-date { font-size: 12.5px; color: var(--yg-subtle); }
.yg-main .order-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 14px 0; padding: 14px 0; border-top: 1px solid var(--yg-border-soft); border-bottom: 1px solid var(--yg-border-soft); }
.yg-main .order-detail-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yg-main .order-detail-field-wide { grid-column: 1 / -1; }
.yg-main .order-detail-label { font-size: 11.5px; color: var(--yg-subtle); font-weight: 500; }
.yg-main .order-detail-value { font-size: 13.5px; color: var(--yg-fg); overflow-wrap: anywhere; }
.yg-main .order-detail-value a { color: var(--yg-fg); font-weight: 600; text-underline-offset: 2px; }
.yg-main .order-payment { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.yg-main .order-items { list-style: none; margin: 14px 0; padding: 0; border: 1px solid var(--yg-border-soft); border-radius: 10px; }
.yg-main .order-items > li { position: relative; padding: 10px 110px 10px 14px; border-bottom: 1px solid var(--yg-border-soft); font-size: 13.5px; }
.yg-main .order-items > li:last-child { border-bottom: 0; }
.yg-main .order-item-price { position: absolute; right: 14px; top: 10px; font-weight: 600; }
.yg-main .order-item-detalle { margin: 4px 0 0; padding-left: 16px; color: var(--yg-muted); font-size: 12.5px; }
.yg-main .order-item-opciones, .yg-main .order-item-notes { color: var(--yg-muted); font-size: 12.5px; margin-top: 2px; }
.yg-main .order-totals { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 13px; color: var(--yg-muted); margin: 10px 0 16px; }
.yg-main .order-totals strong { color: var(--yg-fg); font-size: 16px; font-weight: 700; margin-top: 4px; }
.yg-main .order-status-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--yg-border-soft); }
.yg-main .order-status-form label { min-width: 200px; }
.yg-main .order-detail-receipt-block { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.yg-main .order-detail-receipt-img { max-width: 260px; width: 100%; border-radius: 10px; border: 1px solid var(--yg-border); }

/* ---------- Catálogo / contenido ---------- */
.yg-main .product-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.yg-main .product-admin-card, .yg-main .banner-admin-card, .yg-main .review-admin-card, .yg-main .page-image-card {
  background: var(--yg-card); border: 1px solid var(--yg-border); border-radius: var(--yg-r); overflow: hidden;
  transition: box-shadow .15s var(--yg-ease), transform .15s var(--yg-ease), border-color .15s;
}
.yg-main .product-admin-card:hover, .yg-main .banner-admin-card:hover { box-shadow: var(--yg-shadow-2); border-color: #DAD8D3; }
.yg-main .product-admin-thumb, .yg-main .product-admin-thumb-empty { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--yg-surface); }
.yg-main .product-admin-thumb-empty { display: grid; place-items: center; color: #B8B4AE; font-size: 0; }
.yg-main .product-admin-thumb-empty .yg-icon { width: 26px; height: 26px; }
.yg-main .product-admin-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.yg-main .product-admin-body strong { font-size: 14px; }
.yg-main .product-admin-meta { font-size: 12.5px; color: var(--yg-muted); }
.yg-main .product-admin-body .order-status-badge { align-self: flex-start; }
.yg-main .product-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.yg-main .banner-admin-list, .yg-main .review-admin-list { display: grid; gap: 10px; }
.yg-main .banner-admin-card { display: grid; grid-template-columns: 200px 1fr; }
.yg-main .banner-admin-thumb { width: 100%; height: 100%; min-height: 110px; object-fit: cover; background: var(--yg-surface); }
.yg-main .banner-admin-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.yg-main .banner-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.yg-main .review-admin-card { padding: 14px 16px; }
.yg-main .review-admin-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.yg-main .review-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.yg-main .page-image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.yg-main .page-image-card { position: relative; }
.yg-main .page-image-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.yg-main .page-image-card form { position: absolute; top: 6px; right: 6px; }
.yg-main .page-image-card .btn-icon-danger { background: rgba(255, 255, 255, .92); border-color: var(--yg-border); }
.yg-main .admin-add-form { margin-bottom: 14px; }
.yg-main .admin-danger-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* Cupones */
.yg-main .coupon-row { border-bottom: 1px solid var(--yg-border-soft); }
.yg-main .coupon-row-summary {
  display: grid; grid-template-columns: 1.1fr .9fr .7fr .8fr 1fr .6fr .8fr auto; gap: 10px; align-items: center;
  padding: 10px; cursor: pointer; list-style: none; font-size: 13px; transition: background-color .12s;
}
.yg-main .coupon-row-summary::-webkit-details-marker { display: none; }
.yg-main .coupon-row-summary:hover { background: #FAFAF8; }
.yg-main .coupon-code { font-weight: 700; letter-spacing: .02em; }
.yg-main .coupon-row-toggle { display: inline-flex; align-items: center; gap: 4px; color: var(--yg-fg-2); font-weight: 600; font-size: 12.5px; }
.yg-main .coupon-row[open] .coupon-row-toggle .yg-icon { transform: rotate(180deg); }
.yg-main .coupon-row-body { padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 12px; }
.yg-main .coupon-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Ajustes */
.yg-main .horario-grid { display: grid; gap: 8px; }
.yg-main .horario-day-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--yg-border-soft); border-radius: 10px; }
.yg-main .horario-day-toggle { min-width: 130px; }
.yg-main .horario-day-time { display: flex; align-items: center; gap: 8px; }
.yg-main .appearance-preview-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.yg-main .appearance-preview-thumb { max-height: 64px; border-radius: 8px; border: 1px solid var(--yg-border); background: var(--yg-surface); }
.yg-main .groups-editor { display: grid; gap: 12px; margin-bottom: 12px; grid-column: 1 / -1; }
.yg-main #groupsForm { display: block; }

/* ---------- Dashboard (dashboard.php) ---------- */
.yg-main .dash { font-family: var(--yg-font); }
.yg-main .dash .mono { font-family: inherit; font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.yg-main .dash-topbar { display: none; }
.yg-main .dash-card, .yg-main .dash-rail-card { box-shadow: var(--yg-shadow-1); }
.yg-main .dash-btn { transition: background-color .15s var(--yg-ease), border-color .15s var(--yg-ease), transform .1s; }
.yg-main .dash-btn:hover { border-color: #D6D4CF; }
.yg-main .dash-btn:active { transform: scale(.98); }
.yg-main .dash-periodo:focus { outline: none; border-color: var(--yg-accent); box-shadow: 0 0 0 3px var(--yg-accent-soft); }

/* ---------- Login ---------- */
body.yg-login { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.yg-login .admin-login-box { width: 100%; max-width: 380px; background: var(--yg-card); border: 1px solid var(--yg-border); border-radius: var(--yg-r-lg); padding: 28px; box-shadow: var(--yg-shadow-2); }
.yg-login .yg-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.yg-login .yg-login-brand .yg-brand-mark { background: var(--yg-fg); }
.yg-login .yg-login-brand .yg-brand-name { color: var(--yg-fg); }
.yg-login h1 { font-family: var(--yg-font-head); font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.yg-login .yg-login-sub { color: var(--yg-muted); font-size: 13px; margin: 0 0 18px; }
.yg-login .admin-form { display: grid; gap: 14px; }
.yg-login label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--yg-fg-2); }
.yg-login .error-text { background: var(--yg-error-bg); border: 1px solid var(--yg-error-bd); color: #991B1B; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0 0 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .yg-main .orders-split { grid-template-columns: minmax(230px, 290px) 1fr; }
}
@media (max-width: 1024px) {
  .yg-sidebar { transform: translateX(-100%); transition: transform .22s var(--yg-ease); box-shadow: var(--yg-shadow-2); }
  .yg-nav-open .yg-sidebar { transform: none; }
  .yg-brand .yg-sidebar-close { display: inline-grid; color: #D6D3D1; }
  .yg-content { margin-left: 0; }
  .yg-topbar .yg-menu-btn { display: inline-grid; margin-left: -6px; }
  .yg-topbar { padding: 0 18px; }
  .yg-main { padding: 20px 18px 56px; }
}
@media (max-width: 760px) {
  .yg-topbar-date { display: none; }
  .yg-main { padding: 16px 14px 48px; }
  .yg-main h1 { font-size: 21px; }
  .yg-main .admin-section { padding: 16px; }
  .yg-main .orders-split { grid-template-columns: 1fr; }
  .yg-main .orders-list-panel { position: static; max-height: 300px; }
  .yg-main .order-detail { padding: 16px; }
  .yg-main .order-detail-grid { grid-template-columns: 1fr; }
  .yg-main .order-items > li { padding-right: 14px; }
  .yg-main .order-item-price { position: static; display: block; margin-top: 2px; }
  .yg-main .banner-admin-card { grid-template-columns: 1fr; }
  .yg-main .coupon-row-summary { grid-template-columns: 1fr auto; }
  .yg-main .coupon-row-summary > span:nth-child(n+2):not(.order-status-badge):not(.coupon-row-toggle) { display: none; }
  .yg-body .btn, .yg-main .btn-icon-danger, .yg-main .filter-chip { min-height: 40px; }
  .yg-main .admin-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .yg-body *, .yg-body *::before, .yg-body *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .yg-sidebar, .yg-topbar, .yg-scrim { display: none !important; }
  .yg-content { margin: 0; }
  .yg-main { max-width: none; padding: 0; }
}

.yg-main .status-pendiente { background: var(--yg-warning-bg); color: var(--yg-warning); border-color: var(--yg-warning-bd); }
.yg-main .admin-form > table, .yg-main .admin-form > p, .yg-main .admin-form > div, .yg-main .admin-form > h3, .yg-main .admin-form > fieldset, .yg-main .admin-form > label:has(textarea) { grid-column: 1 / -1; }
.yg-main .admin-form:has(> table) { overflow-x: auto; }

/* Encabezado Figma y contenido con la barra lateral compartida (panel_sidebar.php) */
.yg-body .yg-main { padding:20px 24px 56px; max-width:1360px; }
.yg-main h1 { font-size:20px; }
@media (max-width: 1024px) { .yg-content { margin-left:0; } .yg-body .yg-main { padding:16px 16px 48px; } }
