/* ================================================================
   dashboard.css — Jama App · Panel de Restaurantes
   Estilos del dashboard usando los mismos tokens de styles.css
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ================================================================
   TOKENS (duplicados para que dashboard.html sea independiente)
   ================================================================ */
:root {
  --color-red:        #FF3D2E;
  --color-red-dark:   #DB2A1C;
  --color-red-light:  #FF6B5E;
  --color-red-soft:   #FFF1EF;
  --color-yellow:     #FFC857;
  --color-yellow-dark:#E6A800;
  --color-dark:       #19130F;
  --color-dark-2:     #2A211B;
  --color-gray-1:     #4A413B;
  --color-gray-2:     #7A7068;
  --color-gray-3:     #ABA29A;
  --color-gray-4:     #EAE6E1;
  --color-line:       #F0ECE7;
  --color-bg:         #FAF8F5;
  --color-bg-2:       #F3EFEA;
  --color-white:      #FFFFFF;
  --color-success:    #1F9D57;
  --color-warning:    #E0890B;
  --color-danger:     #E0463A;

  --font-display:     'Bebas Neue', 'Arial Black', sans-serif;
  --font-body:        'Plus Jakarta Sans', 'Segoe UI', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  --shadow-xs:  0 1px 2px rgba(25,19,15,.05);
  --shadow-sm:  0 1px 2px rgba(25,19,15,.04), 0 2px 6px rgba(25,19,15,.06);
  --shadow-md:  0 2px 4px rgba(25,19,15,.04), 0 8px 20px rgba(25,19,15,.08);
  --shadow-lg:  0 4px 8px rgba(25,19,15,.05), 0 16px 36px rgba(25,19,15,.10);
  --shadow-xl:  0 8px 16px rgba(25,19,15,.06), 0 28px 60px rgba(25,19,15,.16);
  --shadow-red: 0 2px 6px rgba(255,61,46,.20), 0 8px 22px rgba(255,61,46,.30);
  --ring-red:   0 0 0 4px rgba(255,61,46,.12);

  --gradient-brand:   linear-gradient(135deg, var(--color-red) 0%, #FF7A3D 100%);
  --gradient-dark:    linear-gradient(160deg, #2B1E17 0%, #19130F 75%);
  --gradient-surface: radial-gradient(130% 130% at 25% 15%, #FFFFFF 0%, var(--color-bg-2) 100%);

  --glass-bg:        rgba(255,255,255,.70);
  --glass-bg-strong: rgba(255,255,255,.85);
  --glass-border:    rgba(255,255,255,.5);
  --glass-blur:      saturate(180%) blur(20px);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:    cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.24s cubic-bezier(0.4, 0, 0.2, 1);

  --sidebar-w: 260px;
}

/* ================================================================
   RESET
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(42% 32% at 92% 6%, rgba(255,61,46,.06) 0%, transparent 100%),
    radial-gradient(48% 38% at 6% 88%, rgba(255,200,87,.10) 0%, transparent 100%),
    radial-gradient(140% 100% at 15% 0%, #FFF6EE 0%, var(--color-bg) 45%);
  background-attachment: fixed;
  color: var(--color-dark);
  line-height: 1.6;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
}
img { max-width: 100%; display: block; }
.is-hidden { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.auth-client-link { text-align: center; margin-top: 1.5rem; font-size: 0.75rem; color: var(--color-gray-3); }
.auth-client-link a { color: var(--color-red); font-weight: 600; }

/* ================================================================
   AUTH SCREEN
   ================================================================ */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-dark);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

#auth-screen::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--gradient-brand);
  border-radius: 50%;
  top: -250px;
  right: -200px;
  opacity: 0.10;
  filter: blur(80px);
  pointer-events: none;
}
#auth-screen::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--color-yellow);
  border-radius: 50%;
  bottom: -150px;
  left: -100px;
  opacity: 0.08;
  filter: blur(60px);
  pointer-events: none;
}

.auth-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-12);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  animation: authSlideUp 0.4s ease;
}

@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.auth-logo-mark {
  width: 44px;
  height: 44px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-red);
  font-size: 22px;
}
.auth-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-dark);
  letter-spacing: 2px;
}
.auth-logo-badge {
  background: var(--color-bg-2);
  color: var(--color-gray-2);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  align-self: flex-end;
  margin-bottom: 4px;
}

.auth-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-1);
}
.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-gray-2);
  margin-bottom: var(--space-8);
}

/* Tabs login/register */
.auth-forgot-link {
  align-self: flex-end;
  min-height: 44px;
  margin-top: -.5rem;
  padding: .5rem 0 .5rem .75rem;
  border: 0;
  background: transparent;
  color: var(--color-red, #FF3D2E);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.auth-forgot-link:disabled { opacity: .65; cursor: wait; }
.auth-error-msg.success { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.auth-tabs {
  display: flex;
  background: var(--color-bg-2);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-6);
}
.auth-tab {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-2);
  transition: all var(--transition-base);
  text-align: center;
}
.auth-tab.active {
  background: var(--color-white);
  color: var(--color-dark);
  box-shadow: var(--shadow-sm);
}
.auth-form { display: none; }
.auth-form.active { display: block; }

/* Form fields */
.form-group {
  margin-bottom: var(--space-4);
}
.dash-map {
  height: 240px;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background: var(--color-bg-2, #f3efea);
  margin-bottom: var(--space-2);
}
.dash-map-caption {
  font-size: var(--text-xs);
  color: var(--color-gray-3, #aba29a);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}
.form-label span {
  color: var(--color-gray-3);
  font-weight: 400;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-gray-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-dark);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px rgba(255,61,46,0.10);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-gray-3); }
.form-textarea { resize: vertical; min-height: 90px; }

.form-input.error { border-color: var(--color-danger); }
.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
  display: none;
}
.form-error.visible { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* Auth submit button */
.btn-auth {
  width: 100%;
  padding: var(--space-4);
  background: var(--gradient-brand);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  transition: all var(--transition-fast);
  margin-top: var(--space-2);
  position: relative;
  overflow: hidden;
}
.btn-auth:hover { background: var(--color-red-dark); box-shadow: var(--shadow-red); }
.btn-auth:active { transform: scale(0.98); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-auth.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  animation: shimmer 1s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.auth-divider {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-gray-3);
  margin-block: var(--space-5);
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--color-gray-4);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-error-msg {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: var(--color-danger);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-4);
  display: none;
}
.auth-error-msg.visible { display: block; }

/* ================================================================
   DASHBOARD LAYOUT
   ================================================================ */
#dashboard-app {
  display: none;
  min-height: 100vh;
}
#dashboard-app.visible {
  display: flex;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, #221A14 0%, var(--color-dark) 60%);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: var(--space-6) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sidebar-logo-mark {
  width: 38px;
  height: 38px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-red);
  flex-shrink: 0;
}
.sidebar-logo-mark span[data-icon], .auth-logo-mark span[data-icon] { width: 22px; height: 22px; display: flex; color: #fff; }
.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: white;
  letter-spacing: 2px;
}
.sidebar-logo-sub {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: -2px;
}

/* Restaurant info in sidebar */
.sidebar-restaurant {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sidebar-rest-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.1);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
}
.sidebar-rest-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.sidebar-rest-avatar span[data-icon] { width: 22px; height: 22px; display: flex; color: rgba(255,255,255,.75); }
.sidebar-rest-copy { min-width: 0; }
.sidebar-rest-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-rest-status {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gray-3);
}
.status-dot.open { background: var(--color-success); }

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: var(--space-4) var(--space-3) var(--space-2);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.55);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
  width: 100%; border: 0; background: transparent; font-family: inherit; text-align: left;
}
.nav-section-label--spaced { margin-top: 1rem; }
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.95);
}
.nav-item.active {
  background: linear-gradient(180deg, var(--color-red-light) -30%, var(--color-red) 70%, var(--color-red-dark));
  color: white;
  box-shadow: var(--shadow-red);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-3) - 2px);
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 99px;
  background: var(--color-yellow);
}
.nav-item-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item-icon[data-icon] { height: 22px; display: inline-flex; }
.nav-item-icon svg { width: 100%; height: 100%; }

.sidebar-footer {
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid rgba(255,255,255,.08);
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.4);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
}
.btn-logout:hover {
  background: rgba(239,68,68,.15);
  color: #FF8080;
}

/* ---- MAIN CONTENT ---- */
.dashboard-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-topbar {
  height: 68px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-leading { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.topbar-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-dark);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile sidebar toggle */
.btn-sidebar-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-bg-2);
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.btn-sidebar-toggle span[data-icon] { width: 20px; height: 20px; display: flex; }

.dashboard-content {
  flex: 1;
  min-width: 0;
  padding: var(--space-8);
}
.dashboard-section { display: none; }
.dashboard-section.active { display: block; }

/* ================================================================
   SECCIÓN: INICIO (stats)
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-line);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  transition: box-shadow .28s var(--ease-out), transform .28s var(--ease-out);
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.red    { background: rgba(255,61,46,.10); }
.stat-icon.yellow { background: rgba(255,200,87,.15); }
.stat-icon.green  { background: rgba(34,197,94,.10); }
.stat-icon.blue   { background: rgba(99,102,241,.10); }

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.stat-value--status { font-size: 1.5rem; }
.stat-icon[data-icon] { color: currentColor; }
.stat-icon[data-icon] svg { width: 26px; height: 26px; }
.stat-label {
  font-size: var(--text-sm);
  color: var(--color-gray-2);
  font-weight: 500;
}

/* Quick actions */
.quick-actions {
  background: var(--color-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.quick-actions-text h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: white;
  letter-spacing: 1px;
}
.quick-actions-text p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  margin-top: var(--space-1);
}
.quick-actions-btns {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ================================================================
   BOTONES GENERALES
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  min-height: 44px;
}
.btn span[data-icon] { width: 17px; height: 17px; display: inline-flex; }
.btn--icon { width: 44px; padding: 0; justify-content: center; }
.btn--primary {
  background: var(--gradient-brand);
  color: white;
}
.btn--primary:hover { background: var(--color-red-dark); box-shadow: var(--shadow-red); transform: translateY(-1px); }
.btn--secondary {
  background: var(--color-dark);
  color: white;
}
.btn--secondary:hover { background: var(--color-dark-2); }
.btn--outline {
  background: transparent;
  color: var(--color-dark);
  border: 2px solid var(--color-gray-4);
}
.btn--outline:hover { border-color: var(--color-dark); }
.btn--ghost {
  background: rgba(255,255,255,.1);
  color: white;
}
.btn--ghost:hover { background: rgba(255,255,255,.18); }
.btn--danger {
  background: rgba(239,68,68,.10);
  color: var(--color-danger);
}
.btn--danger:hover { background: rgba(239,68,68,.2); }
.btn--success {
  background: rgba(34,197,94,.10);
  color: var(--color-success);
}
.btn--success:hover { background: rgba(34,197,94,.2); }
.btn--sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ================================================================
   SECTION HEADER
   ================================================================ */
.section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-1);
}
.section-desc {
  font-size: var(--text-sm);
  color: var(--color-gray-2);
  margin-bottom: var(--space-6);
}
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.section-toolbar-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.orders-section-head { margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.orders-section-title { font-family: var(--font-display, sans-serif); font-size: 1.5rem; color: #1a1a1a; letter-spacing: 0.5px; }
.orders-section-desc { font-size: 0.875rem; color: #717171; margin-top: 2px; }

/* ================================================================
   PERFIL DEL RESTAURANTE
   ================================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.profile-sidebar-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-4);
  text-align: center;
  position: sticky;
  top: 90px;
}
.logo-upload-area {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  background: var(--color-bg-2);
  border: 3px dashed var(--color-gray-4);
  margin: 0 auto var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
}
.logo-upload-area:hover {
  border-color: var(--color-red);
  background: rgba(255,61,46,.04);
}
.logo-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 3px);
}
.logo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-gray-3);
  pointer-events: none;
}
.logo-upload-placeholder span { font-size: 32px; }
.logo-upload-placeholder span[data-icon] { width: 32px; height: 32px; display: flex; }
.logo-upload-image { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-xl) - 3px); }
.profile-logo-help { font-size: 0.75rem; color: var(--color-gray-3); margin-top: 1rem; line-height: 1.5; }
.form-section-title { display: flex; align-items: center; gap: 0.5rem; }
.form-section-title span[data-icon] { width: 19px; height: 19px; display: inline-flex; }
.form-section-title--spaced { margin-top: 2rem; }
.form-row--spaced { margin-bottom: 1rem; }
.profile-save-row { margin-top: 2rem; display: flex; justify-content: flex-end; }
.btn--save-profile { padding: 0.875rem 2rem; font-size: 1rem; }
.logo-upload-placeholder p { font-size: var(--text-xs); font-weight: 600; }
#logo-file-input { display: none; }

.logo-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: calc(var(--radius-xl) - 3px);
}
.logo-upload-area:hover .logo-upload-overlay { opacity: 1; }
.logo-upload-overlay.hidden { display: none; }

.profile-preview-name {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-1);
}
.profile-preview-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(34,197,94,.1);
  color: var(--color-success);
}
.profile-preview-status.closed,
.profile-preview-status.is-closed {
  background: rgba(239,68,68,.1);
  color: var(--color-danger);
}

.upload-progress {
  display: none;
  margin-top: var(--space-3);
}
.upload-progress.visible { display: block; }
.progress-bar {
  height: 4px;
  background: var(--color-gray-4);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  width: 0%;
}
.progress-text {
  font-size: var(--text-xs);
  color: var(--color-gray-2);
  margin-top: 4px;
  text-align: center;
}

.profile-form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-4);
}
.form-section-title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-gray-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.day-checkbox {
  display: none;
}
.day-label {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gray-4);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-gray-2);
}
.day-checkbox:checked + .day-label {
  background: var(--gradient-brand);
  border-color: var(--color-red);
  color: white;
}

.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-4);
  margin-bottom: var(--space-3);
}
.toggle-info h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-dark);
}
.toggle-info p {
  font-size: var(--text-xs);
  color: var(--color-gray-2);
  margin-top: 2px;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-gray-4);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient-brand);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ================================================================
   CATÁLOGO DE PRODUCTOS
   ================================================================ */
.catalog-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.filter-chip {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gray-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-2);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-chip.active, .filter-chip:hover {
  border-color: var(--color-red);
  color: var(--color-red);
  background: rgba(255,61,46,.05);
}
.filter-chip.active {
  background: var(--gradient-brand);
  color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-4);
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card.unavailable {
  opacity: 0.6;
}
.product-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--color-bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-img-placeholder {
  width: 100%;
  height: 160px;
  background: var(--color-bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.product-img-placeholder span[data-icon] { width: 48px; height: 48px; color: var(--color-gray-3); }
.product-img--media { padding: 0; height: 160px; display: block; }
.product-img--media img { width: 100%; height: 160px; object-fit: cover; }
.product-unavailable-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: rgba(0,0,0,.7);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.product-body {
  padding: var(--space-4);
}
.product-category-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}
.product-name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-1);
}
.product-desc {
  font-size: var(--text-xs);
  color: var(--color-gray-2);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-dark);
}
.product-actions {
  display: flex;
  gap: var(--space-2);
}

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-gray-2);
  grid-column: 1/-1;
}
.empty-state-icon { width: 56px; height: 56px; margin: 0 auto var(--space-4); color: var(--color-gray-3); }
.empty-state-icon svg { width: 100%; height: 100%; }
.empty-state--wide { grid-column: 1 / -1; }
.promo-validity span[data-icon], .promo-footer span[data-icon] { width: 16px; height: 16px; display: inline-flex; }
.empty-state h3 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}
.empty-state p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

/* ================================================================
   OFERTAS / PROMOCIONES
   ================================================================ */
.promos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}

.promo-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-4);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.promo-card:hover { box-shadow: var(--shadow-md); }
.promo-header {
  padding: var(--space-5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.promo-discount-badge {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--color-red);
  letter-spacing: 1px;
}
.promo-discount-label {
  font-size: var(--text-xs);
  color: var(--color-gray-2);
  font-weight: 600;
  margin-top: 2px;
}
.promo-status-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-gray-2);
}
.promo-body {
  padding: 0 var(--space-5) var(--space-5);
}
.promo-title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-1);
}
.promo-desc {
  font-size: var(--text-sm);
  color: var(--color-gray-2);
  margin-bottom: var(--space-3);
}
.promo-validity {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-gray-3);
  font-weight: 500;
}
.promo-footer {
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg);
  border-top: 1px solid var(--color-gray-4);
  display: flex;
  gap: var(--space-2);
}

/* ================================================================
   MODALES
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(16px);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-xl);
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal--lg { max-width: 680px; }
.modal--bulk { max-width: 720px; }
.modal-subtitle { font-size: var(--text-sm); color: var(--color-gray-2); margin-top: 2px; }

.modal-header {
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-gray-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1;
}
.modal-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-dark);
}
.modal-close {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-gray-2);
  transition: all var(--transition-fast);
  line-height: 1;
}
.modal-close:hover { background: var(--color-gray-4); color: var(--color-dark); }

.modal-body {
  padding: var(--space-6) var(--space-8);
}
.modal-footer {
  padding: var(--space-5) var(--space-8);
  border-top: 1px solid var(--color-gray-4);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* Image upload in modal */
.img-upload-area {
  border: 2px dashed var(--color-gray-4);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.img-upload-area:hover {
  border-color: var(--color-red);
  background: rgba(255,61,46,.03);
}
.img-upload-area.has-image {
  padding: 0;
  border-style: solid;
  border-color: var(--color-gray-4);
}
.img-upload-area img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
}
.img-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-gray-2);
}
.img-upload-content span { font-size: 32px; }
.img-upload-content span[data-icon] { width: 32px; height: 32px; }
.img-upload-content p { font-size: var(--text-sm); font-weight: 600; }
.img-upload-content small { font-size: var(--text-xs); color: var(--color-gray-3); }

.img-upload-change-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--text-sm);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: calc(var(--radius-lg) - 2px);
}
.img-upload-area:hover .img-upload-change-overlay { opacity: 1; }

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}
.toast {
  background: var(--color-dark);
  color: white;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 240px;
  max-width: 360px;
  animation: toastIn 0.3s ease;
  pointer-events: all;
}
.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-danger); }
.toast.warning { background: var(--color-warning); color: var(--color-dark); }
.toast-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ================================================================
   LOADING SKELETON
   ================================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-4) 25%, var(--color-bg-2) 50%, var(--color-gray-4) 75%);
  background-size: 200% 100%;
  animation: skeletonWave 1.5s infinite;
  border-radius: var(--radius-md);
}
.form-group--wide { grid-column: 1 / -1; }
.form-textarea--compact { min-height: 70px; }
.bulk-menu-text { min-height: 220px; font-size: var(--text-sm); line-height: 1.7; }
.bulk-tip { background: rgba(99,102,241,.06); border: 1px solid rgba(99,102,241,.2); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--text-xs); color: var(--color-gray-1); line-height: 1.6; }
.bulk-results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); gap: var(--space-3); }
.bulk-found-label { font-weight: 700; color: var(--color-dark); }
.bulk-results-help { font-size: var(--text-xs); color: var(--color-gray-2); }
.bulk-results-actions { display: flex; gap: var(--space-2); }
.bulk-preview-table { max-height: 380px; overflow: auto; border: 1px solid var(--color-gray-4); border-radius: var(--radius-md); }
.bulk-loading { text-align: center; padding: var(--space-12) 0; }
.bulk-loading-icon { width: 44px; height: 44px; margin: 0 auto var(--space-4); color: var(--color-red); }
.bulk-loading-title { font-weight: 700; font-size: var(--text-lg); color: var(--color-dark); margin-bottom: var(--space-2); }
.bulk-loading-copy { font-size: var(--text-sm); color: var(--color-gray-2); }
.bulk-progress-track { margin-top: var(--space-6); height: 4px; background: var(--color-gray-4); border-radius: 99px; overflow: hidden; }
.bulk-progress-bar { height: 100%; background: var(--color-red); border-radius: 99px; width: 0; transition: width .4s ease; }
.bulk-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); border-radius: var(--radius-md); padding: var(--space-4); color: var(--color-danger); font-size: var(--text-sm); }
.bulk-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.bulk-table thead tr { background: var(--color-bg); border-bottom: 2px solid var(--color-gray-4); }
.bulk-table th { padding: .75rem .5rem; text-align: left; font-size: .75rem; font-weight: 700; color: var(--color-gray-2); }
.bulk-table td { padding: .75rem .5rem; }
.bulk-table .bulk-check-cell { width: 36px; padding-left: 1rem; }
.bulk-row { border-bottom: 1px solid var(--color-gray-4); transition: opacity .2s; }
.bulk-row-check { width: 18px; height: 18px; accent-color: var(--color-red); cursor: pointer; }
.bulk-editable { outline: none; border-bottom: 1px dashed transparent; padding: 2px 0; }
.bulk-editable:focus { border-bottom-color: var(--color-red); }
.bulk-name { font-weight: 700; font-size: .875rem; color: var(--color-dark); min-width: 120px; }
.bulk-desc-cell { max-width: 200px; }
.bulk-desc { font-size: .75rem; color: var(--color-gray-2); }
.bulk-price { font-weight: 800; font-size: .875rem; color: var(--color-dark); min-width: 50px; text-align: right; }
.bulk-empty-description { color: var(--color-gray-3); }
.bulk-cat-select { min-height: 44px; border: 1px solid var(--color-gray-4); border-radius: var(--radius-sm); padding: 4px 6px; font-size: .75rem; font-family: var(--font-body); color: var(--color-dark); background: white; cursor: pointer; }
@keyframes skeletonWave {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-sidebar-card {
    position: static;
    transform: none;
  }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
  }

  .dashboard-main {
    margin-left: 0;
    width: 100%;
  }
  .btn-sidebar-toggle {
    display: flex;
  }
  .dashboard-content {
    padding: var(--space-4);
    overflow-x: hidden;
  }
  .dashboard-topbar { min-height: 68px; height: auto; padding: 10px var(--space-4); gap: 8px; }
  .topbar-leading { gap: 8px; }
  .topbar-title { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn { min-height: 44px; padding: 8px 11px; font-size: 12px; }
  .btn-sidebar-toggle { width: 44px; height: 44px; flex: 0 0 auto; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .promos-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal { width: 100vw; max-width: 100vw; max-height: 92dvh; overflow-x: hidden; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-header, .modal-body, .modal-footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .modal-header { min-width: 0; gap: var(--space-3); }
  .modal-header > div, .modal-title { min-width: 0; }
  .modal-close { width: 44px; height: 44px; flex: 0 0 auto; }
  .toggle-switch { width: 48px; height: 44px; }
  .toggle-slider { top: 10px; bottom: 10px; }
  .day-label, .filter-chip { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .section-toolbar { align-items: stretch; }
  .section-toolbar-actions { width: 100%; }
  .section-toolbar-actions .btn { flex: 1 1 150px; min-width: 0; justify-content: center; }
  .profile-save-row .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
  .stat-card { padding: var(--space-4); min-width: 0; }
  .stat-icon { width: 42px; height: 42px; }
  .stat-value { font-size: 1.35rem; }
  .stat-label { font-size: 11px; }
  .auth-card {
    padding: var(--space-8) var(--space-6);
  }
  .dashboard-topbar {
    padding: 0 var(--space-4);
  }
  .topbar-actions { display: none; }
  .topbar-leading { width: 100%; }
  .topbar-title { flex: 1; }
  .section-title { font-size: 1.35rem; }
  .section-desc { margin-bottom: var(--space-4); }
  .section-toolbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .section-toolbar-actions .btn { width: 100%; padding: 10px 8px; font-size: .78rem; white-space: normal; line-height: 1.25; }
  .catalog-filters { flex-wrap: wrap; overflow: visible; }
  .filter-chip { flex: 0 0 auto; }
  .product-footer { align-items: flex-end; flex-wrap: wrap; gap: var(--space-3); }
  .product-actions { margin-left: auto; }
  .modal-title { font-size: 1.15rem; line-height: 1.25; }
  .modal-subtitle { line-height: 1.4; }
  .quick-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .quick-actions-btns, .quick-actions-btns .btn { width: 100%; }
  .quick-actions-btns .btn { justify-content: center; }
  .orders-section-head .btn { width: 100%; justify-content: center; }
  .orders-filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .orders-filter-btn { width: 100%; }
  .order-card-footer { align-items: flex-end; gap: 10px; }
  .order-card-actions { width: 100%; display: grid; grid-template-columns: 1fr 1.25fr; }
  .order-card-actions button { width: 100%; justify-content: center; }
  .bulk-results-head { align-items: stretch; flex-direction: column; }
  .bulk-results-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   FOODFEED DASHBOARD
   ================================================================ */
.foodfeed-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.ff-dash-card {
  background: white;
  border-radius: 6px;
  border: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.ff-dash-thumb {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  position: relative;
}

.ff-dash-thumb video,
.ff-dash-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ff-dash-thumb video { opacity: 0; }
.ff-dash-thumb video.ready { opacity: 1; }
.ff-dash-shade { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.ff-dash-fallback { width: 32px; height: 32px; color: rgba(255,255,255,.7); }
.ff-dash-fallback svg { width: 100%; height: 100%; }

.ff-dash-info {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 0;
  color: white;
}

.ff-dash-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: white;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ff-dash-meta {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.9);
  display: flex;
  gap: var(--space-3);
}

.ff-dash-delete {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: rgba(0,0,0,.55);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ff-dash-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: rgba(0,0,0,.6);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

@media (max-width: 600px) {
  .foodfeed-dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .ff-dash-title { font-size: 10px; -webkit-line-clamp: 1; }
  .ff-dash-meta { font-size: 9px; gap: 6px; }
  .ff-dash-badge { max-width: calc(100% - 46px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ff-dash-delete { width: 44px; height: 44px; }
}

/* Chips tipo de contenido */
.ff-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gray-4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-gray-2);
  cursor: pointer;
  transition: all .15s;
}
.ff-video-drop { border: 2px dashed var(--color-gray-4); border-radius: var(--radius-lg); padding: var(--space-10); text-align: center; cursor: pointer; transition: all .2s; margin-bottom: var(--space-5); }
.ff-video-drop:hover { border-color: var(--color-red); background: rgba(255,61,46,.03); }
.ff-upload-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--color-gray-2); }
.ff-upload-icon { width: 48px; height: 48px; }
.ff-upload-title { font-weight: 700; font-size: var(--text-sm); color: var(--color-dark); }
.ff-upload-copy { font-size: var(--text-xs); margin-top: 4px; }
.ff-upload-help { font-size: var(--text-xs); color: var(--color-gray-3); margin-top: 2px; }
.ff-select-video-btn { min-height: 44px; margin-top: var(--space-2); padding: var(--space-2) var(--space-5); border: 2px solid var(--color-red); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 700; color: var(--color-red); background: white; cursor: pointer; font-family: var(--font-body); }
.ff-upload-preview { position: relative; }
.ff-upload-preview video { max-height: 280px; max-width: 100%; margin: auto; border-radius: var(--radius-md); }
#ff-remove-video { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.65); color: white; border: 0; border-radius: var(--radius-full); width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#ff-remove-video span[data-icon] { width: 19px; height: 19px; display: flex; }
.ff-type-options { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ff-type-options label { cursor: pointer; }
.ff-upload-progress { margin-top: var(--space-4); }
.ff-progress-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ff-progress-label { font-size: var(--text-xs); font-weight: 700; color: var(--color-dark); }
.ff-progress-pct { font-size: var(--text-xs); color: var(--color-gray-2); }
.ff-progress-track { height: 6px; background: var(--color-gray-4); border-radius: 99px; overflow: hidden; }
.ff-progress-bar { height: 100%; background: var(--color-red); border-radius: 99px; width: 0; transition: width .3s; }
.dashboard-state-message { color: var(--color-gray-3); font-size: var(--text-sm); padding: 1rem; }
.dashboard-state-message.is-error { color: var(--color-danger); }
.ff-type-chip span[data-icon],
.ff-dash-badge span[data-icon],
.ff-dash-meta span[data-icon],
.ff-dash-delete span[data-icon],
#section-foodfeed .btn span[data-icon] {
  width: 16px;
  height: 16px;
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
}

.ff-type-chip.active,
input[type="radio"]:checked + .ff-type-chip {
  border-color: var(--color-red);
  background: var(--gradient-brand);
  color: white;
}

.ff-product-picker-group { border: 0; padding: 0; min-width: 0; }
.ff-product-picker-help {
  margin: -2px 0 10px;
  color: var(--color-gray-2);
  font-size: var(--text-xs);
}
.ff-product-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}
.ff-product-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid var(--color-gray-4);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
}
.ff-product-option:has(input:checked) {
  border-color: var(--color-red);
  background: rgba(255,61,46,.06);
}
.ff-product-option input { width: 18px; height: 18px; accent-color: var(--color-red); flex: 0 0 auto; }
.ff-product-option-copy { min-width: 0; display: grid; gap: 2px; }
.ff-product-option-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.ff-product-option-copy small { color: var(--color-gray-2); font-size: var(--text-xs); }
.ff-product-picker-status { margin: 9px 0 0; color: var(--color-gray-2); font-size: var(--text-xs); font-weight: 700; }
.ff-product-picker-empty { grid-column: 1 / -1; margin: 0; padding: 14px; border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-gray-2); font-size: var(--text-sm); }

@media (max-width: 600px) {
  .ff-product-picker { grid-template-columns: 1fr; }
  .ff-video-drop { padding: var(--space-6) var(--space-4); }
}

.orders-history-more {
  display: block;
  margin: 1rem auto;
}
.orders-board--history { grid-template-columns: 1fr; }
.orders-column-title, .order-status-pill, .btn-advance-status,
.order-card-address, .order-card-status-wrap { display: flex; align-items: center; gap: 6px; }
.orders-column-title span[data-icon], .order-status-pill span[data-icon],
.btn-advance-status span[data-icon], .order-card-address span[data-icon] {
  width: 17px; height: 17px; display: inline-flex; flex: 0 0 auto;
}
.order-card-final { font-size: 11px; color: #16803a; font-weight: 700; }
.order-card-final.is-cancelled { color: #6b7280; }
.claim-response { display:grid; gap:10px; margin-top:12px; }
.claim-response textarea { width:100%; min-height:100px; resize:vertical; box-sizing:border-box; border:1.5px solid #ddd5d0; border-radius:12px; padding:12px; font:inherit; }
.order-claim-card .order-dispatch-open { margin-top:12px; }
.order-assignment { display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:.45rem 0;padding:.7rem;border-radius:12px;background:#ecfdf3;color:#166534;font-size:.74rem; }
.order-assignment>div{min-width:0;display:flex;flex-direction:column;gap:2px}.order-assignment>div:last-child{align-items:flex-end;text-align:right}.order-assignment small{font-size:.62rem;text-transform:uppercase;letter-spacing:.05em;opacity:.75}.order-assignment strong{font-size:.82rem}.order-rider-vehicle,.order-rider-phone{font-size:.68rem;line-height:1.35}.order-rider-phone a{color:#12663d;font-weight:800;text-decoration:underline;text-underline-offset:2px}.order-assignment-status{padding:3px 6px;border-radius:99px;background:rgba(22,101,52,.1);font-size:.62rem;font-weight:800;text-transform:capitalize}
.btn-assign-rider { width:100%;min-height:44px;margin:.45rem 0;border:1px solid #ff493b;border-radius:10px;background:#fff;color:#e7372c;font-weight:750;cursor:pointer; }
.btn-assign-rider:disabled { opacity:.6;cursor:wait; }
.order-dispatch-open{display:flex;flex-direction:column;gap:3px;margin:.45rem 0;padding:.7rem;border-radius:12px;background:#fff3e8;color:#934b12}.order-dispatch-open strong{font-size:.78rem}.order-dispatch-open span{font-size:.68rem;line-height:1.4}
.order-reassign{margin:.45rem 0;border:1px solid #f0d0ca;border-radius:12px;background:#fff}.order-reassign summary{padding:.7rem;color:#a63a30;font-size:.72rem;font-weight:800;cursor:pointer}.order-reassign>div{padding:0 .7rem .7rem;display:grid;gap:.55rem}.order-reassign label{display:grid;gap:.3rem;color:#665b55;font-size:.65rem;font-weight:700}.order-reassign select,.order-reassign input{width:100%;min-height:40px;padding:.5rem;border:1px solid #ded6d1;border-radius:9px;background:#fff;color:#271f1b;font:inherit}.order-reassign button{min-height:42px;border:0;border-radius:9px;background:#171311;color:#fff;font-weight:800}.order-reassign button:disabled{opacity:.6}.order-reassign small{color:#857a74;font-size:.62rem;line-height:1.35}
.order-cancel-request-actions button, .btn-cancel-order, .btn-advance-status,
.orders-filter-btn, .orders-history-more { min-height: 44px; }

.orders-history-end {
  padding: 1rem;
  text-align: center;
  color: var(--color-gray-2);
  font-size: var(--text-xs);
}

.nav-item, .btn-logout, .auth-tab, .btn-auth, .auth-forgot-link,
.filter-chip, .day-label, .toggle-switch, .ff-type-chip,
.btn-sidebar-toggle, .modal-close, .ff-dash-delete {
  min-height: 44px;
}

button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid rgba(255, 61, 46, .35);
  outline-offset: 2px;
}

.modal-close span[data-icon] {
  width: 20px;
  height: 20px;
  display: inline-flex;
}
.modal-title span[data-icon] { width: 22px; height: 22px; display: inline-flex; vertical-align: -4px; }
.modal-title span[data-icon] svg { width: 100%; height: 100%; }
.orders-empty-icon[data-icon] {
  width: 44px;
  height: 44px;
  margin: 0 auto .5rem;
  color: var(--color-gray-3);
}
.orders-empty-icon[data-icon] svg { width: 100%; height: 100%; }
/* PN-06 — activación contextual de avisos para restaurantes. */
.restaurant-push-host { margin-top: 20px; }
.restaurant-push-host .pf-push-permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border, #e9e2dd);
  border-radius: 18px;
  background: #fff;
}
.restaurant-push-host .pf-push-permission-copy { display: grid; gap: 5px; }
.restaurant-push-host .pf-push-permission-title { font-weight: 800; color: #181311; }
.restaurant-push-host .pf-push-permission-desc { color: #756d68; line-height: 1.45; }
.restaurant-push-host .pf-push-permission-status { font-size: .78rem; color: #756d68; }
.restaurant-push-host .pf-push-permission-status span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ff4b3e;
}
.restaurant-push-host .pf-push-permission--granted .pf-push-permission-status span { background: #27a65b; }
.restaurant-push-host .pf-push-permission-btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #ff4b3e;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
@media (max-width: 640px) {
  .restaurant-push-host .pf-push-permission { align-items: stretch; flex-direction: column; }
  .restaurant-push-host .pf-push-permission-btn { width: 100%; }
}
