/* ═══════════════════════════════════════
   SELLPOINT POS — MAIN STYLES v2.0
   ═══════════════════════════════════════ */

:root {
  --primary:           #FF6B35;
  --primary-dark:      #e05a26;
  --primary-light:     #fff4ef;
  --sidebar-bg:        #111827;
  --sidebar-text:      rgba(255,255,255,0.50);
  --sidebar-hover-bg:  rgba(255,255,255,0.05);
  --sidebar-active-bg: rgba(255,255,255,0.08);
  --sidebar-active-text: #ffffff;
  --sidebar-icon-size: 1.05rem;
  --bg:                #f5f6fa;
  --surface:           #ffffff;
  --border:            #e5e7eb;
  --border-light:      #f0f1f5;
  --text:              #111827;
  --text-muted:        #6b7280;
  --text-light:        #9ca3af;
  --green:             #10b981;
  --blue:              #3b82f6;
  --purple:            #8b5cf6;
  --teal:              #14b8a6;
  --red:               #ef4444;
  --orange:            #f97316;
  --yellow:            #f59e0b;
  /* Semantic aliases — deben estar definidas para usarlas con var() */
  --success:           #10b981;
  --danger:            #ef4444;
  --warning:           #f59e0b;
  --info:              #3b82f6;
  --shadow-xs:         0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:         0 1px 4px rgba(0,0,0,0.06);
  --shadow:            0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg:         0 8px 40px rgba(0,0,0,0.11);
  --radius:            12px;
  --radius-sm:         8px;
  --radius-lg:         16px;
  --radius-xl:         20px;
  --transition:        0.16s ease;
  --font:              'Segoe UI', Inter, system-ui, -apple-system, sans-serif;
  --sidebar-width:     228px;
  --topbar-height:     60px;
}

body.dark-mode {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --border:       #262c3a;
  --border-light: #1e2334;
  --text:         #f1f3f7;
  --text-muted:   #8a94a6;
  --sidebar-bg:   #0a0d14;
}

/* ── Dark mode combinado con temas no-default ── */
body.dark-mode.theme-minimal,
body.dark-mode.theme-paypen,
body.dark-mode.theme-skillset {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --border:       #2a3040;
  --border-light: #1e2334;
  --text:         #f1f3f7;
  --text-muted:   #8a94a6;
  --text-light:   #5a6478;
  --sidebar-bg:   #0a0d14;
  --sidebar-text:        rgba(255,255,255,0.50);
  --sidebar-hover-bg:    rgba(255,255,255,0.06);
  --sidebar-active-bg:   rgba(255,255,255,0.10);
  --sidebar-active-text: #ffffff;
}
/* Paypen dark: sidebar oscuro (normalmente es claro) */
body.dark-mode.theme-paypen {
  --sidebar-bg:          #0d1520;
  --sidebar-text:        rgba(255,255,255,0.50);
  --sidebar-hover-bg:    rgba(255,255,255,0.06);
  --sidebar-active-bg:   rgba(26,58,92,0.40);
  --sidebar-active-text: #7eb3e8;
}
body.dark-mode.theme-paypen .topbar { background: var(--surface) !important; }
/* Skillset dark: sidebar oscuro (normalmente blanco) */
body.dark-mode.theme-skillset {
  --sidebar-bg:          #111111;
  --sidebar-text:        rgba(255,255,255,0.45);
  --sidebar-hover-bg:    rgba(255,255,255,0.06);
  --sidebar-active-bg:   rgba(255,255,255,0.10);
  --sidebar-active-text: #ffffff;
}
body.dark-mode.theme-skillset .topbar { background: var(--surface) !important; }
body.dark-mode.theme-skillset .sidebar { border-right-color: var(--border) !important; }
body.dark-mode.theme-paypen   .sidebar { border-right-color: var(--border) !important; }

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  overflow: hidden; height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; outline: none; }
input, select, textarea { font-family: var(--font); outline: none; }
img { max-width: 100%; object-fit: cover; }
ul { list-style: none; }

/* ── LOGIN ── */
.login-screen {
  display: none; position: fixed; inset: 0;
  background: var(--bg); justify-content: center;
  align-items: center; z-index: 9999;
}
.login-screen.active { display: flex; }
.login-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-icon { font-size: 2.8rem; display: block; margin-bottom: 0.6rem; line-height: 1; }
.login-logo h1 { font-size: 1.65rem; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.login-logo p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.15rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block; font-size: 0.775rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.4px; text-transform: uppercase;
}
.form-group input, .form-group select, .form-group textarea,
.form-control {
  width: 100%; padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; background: var(--surface); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.form-control:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.10);
}
.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-right: 2.6rem; }
.eye-toggle {
  position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%);
  cursor: pointer; font-size: 1rem; opacity: 0.5; transition: opacity var(--transition);
}
.eye-toggle:hover { opacity: 0.9; }
.login-error { color: var(--red); font-size: 0.8rem; text-align: center; margin-top: 0.5rem; min-height: 1rem; }
.login-demo-accounts {
  margin-top: 1.5rem; text-align: center;
  padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted);
}
.login-demo-accounts p { margin-bottom: 0.5rem; }
.login-demo-accounts button {
  background: var(--bg); border: 1px solid var(--border);
  padding: 4px 14px; border-radius: 20px; font-size: 0.78rem;
  margin: 0 4px; color: var(--text-muted); transition: all var(--transition);
}
.login-demo-accounts button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── APP SHELL ── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.app-shell.hidden { display: none; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width); min-width: var(--sidebar-width);
  background: var(--sidebar-bg); display: flex; flex-direction: column;
  height: 100vh; transition: width var(--transition), min-width var(--transition);
  overflow: hidden; z-index: 100; border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar.collapsed { width: 64px; min-width: 64px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .seller-info { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 1.1rem 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0.65rem 0; }
.sidebar.collapsed .seller-profile { justify-content: center; padding: 0.65rem 0; }
.sidebar-header {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 1.35rem 1.1rem 1.1rem; flex-shrink: 0;
}
.sidebar-header .logo-icon { font-size: 1.5rem; flex-shrink: 0; }
.sidebar-header .logo-text { font-size: 1.05rem; font-weight: 800; color: #fff; white-space: nowrap; letter-spacing: -0.3px; }
.sidebar-nav { flex: 1; padding: 0.5rem 0.6rem; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.75rem; width: 100%; background: none;
  color: var(--sidebar-text); font-size: 0.855rem; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap; text-align: left; margin-bottom: 2px; position: relative;
}
.nav-item:hover { background: var(--sidebar-hover-bg); color: rgba(255,255,255,0.85); }
.nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-icon { font-size: var(--sidebar-icon-size); flex-shrink: 0; width: 22px; text-align: center; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }
.sidebar-footer { padding: 0.6rem; flex-shrink: 0; border-top: 1px solid rgba(255,255,255,0.05); }
.seller-profile {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.75rem; cursor: pointer;
  border-radius: var(--radius-sm); transition: background var(--transition);
}
.seller-profile:hover { background: var(--sidebar-hover-bg); }
.seller-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.875rem;
  flex-shrink: 0; overflow: hidden; border: 2px solid rgba(255,255,255,0.10);
}
.seller-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-info { overflow: hidden; }
.seller-name { display: block; font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-role { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.35); }
.logout-btn { color: rgba(239,68,68,0.75) !important; margin-top: 2px; }
.logout-btn:hover { background: rgba(239,68,68,0.10) !important; color: #ef4444 !important; }

/* ── MAIN CONTENT ── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); min-width: 0; }

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-height); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; gap: 1rem; flex-shrink: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 0.85rem; flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.sidebar-toggle {
  background: none; border: none; font-size: 1.1rem; color: var(--text-muted);
  cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition); line-height: 1;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }
.search-bar {
  display: flex; align-items: center; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 24px;
  padding: 0 1rem; gap: 0.5rem; flex: 1; max-width: 380px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.08); }
.search-bar input { flex: 1; background: none; border: none; padding: 0.45rem 0; font-size: 0.875rem; color: var(--text); }
.search-bar input::placeholder { color: var(--text-light); }
.search-icon { color: var(--text-light); font-size: 0.85rem; flex-shrink: 0; }
.barcode-hint { font-size: 0.73rem; color: var(--text-light); white-space: nowrap; }
.topbar-date {
  font-size: 0.77rem; color: var(--text-muted); white-space: nowrap;
  background: var(--bg); border: 1px solid var(--border);
  padding: 0.3rem 0.75rem; border-radius: 20px;
}
.icon-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.9rem;
  color: var(--text-muted); transition: all var(--transition);
  display: inline-flex; align-items: center;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── SECTIONS ── */
.section { display: none; flex: 1; overflow-y: auto; padding: 1.75rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.section.active { display: flex; flex-direction: column; }
.section::-webkit-scrollbar { width: 5px; }
.section::-webkit-scrollbar-track { background: transparent; }
.section::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem; flex-shrink: 0; }
.section-header h2 { font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: -0.4px; }
.section-header-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ── PERIOD TABS ── */
.period-tabs { display: flex; background: var(--bg); border-radius: 24px; padding: 3px; border: 1px solid var(--border); gap: 2px; }
.period-btn { padding: 5px 18px; border: none; border-radius: 20px; font-size: 0.8rem; font-weight: 600; background: none; color: var(--text-muted); transition: all var(--transition); }
.period-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(255,107,53,0.30); }
.period-btn:hover:not(.active) { background: rgba(0,0,0,0.04); color: var(--text); }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 0.55rem 1.15rem;
  font-size: 0.855rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,53,0.30); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled,
.btn-primary[disabled] { background: var(--border); color: var(--text-muted); cursor: not-allowed; transform: none; box-shadow: none; pointer-events: none; opacity: 0.6; }
.btn-primary.wide { width: 100%; justify-content: center; padding: 0.65rem; }
.btn-primary.full-width { width: 100%; justify-content: center; padding: 0.75rem; font-size: 0.95rem; }
.btn-secondary {
  background: var(--surface); color: var(--text); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 1rem; font-size: 0.855rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem; transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-clear {
  background: none; color: var(--red); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 1rem; font-size: 0.855rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem; transition: all var(--transition);
}
.btn-clear:hover { background: rgba(239,68,68,0.06); border-color: var(--red); }
.btn-danger { background: none; color: var(--red); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 4px 8px; font-size: 0.8rem; transition: all var(--transition); }
.btn-danger:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); }
.btn-edit { background: none; color: var(--blue); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 4px 8px; font-size: 0.8rem; transition: all var(--transition); }
.btn-edit:hover { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.3); }

/* ── DATA TABLE ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { background: var(--bg); color: var(--text-muted); font-weight: 600; text-align: left; padding: 0.7rem 1rem; font-size: 0.755rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1.5px solid var(--border); white-space: nowrap; }
.data-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-light); color: var(--text); vertical-align: middle; max-width: 200px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg); }

/* ── CATEGORY TABS ── */
.category-tabs, .inv-category-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; flex-shrink: 0; }
.cat-tab { padding: 0.35rem 1rem; border: 1.5px solid var(--border); border-radius: 20px; font-size: 0.8rem; font-weight: 600; background: var(--surface); color: var(--text-muted); transition: all var(--transition); }
.cat-tab:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── MODALS ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(10,10,20,0.50); z-index: 1000; backdrop-filter: blur(3px); }
.modal-overlay.active { display: block; }
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 1001;
  width: 90%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none; border: 1px solid var(--border);
}
.modal.small { max-width: 360px; }
.modal.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: all; }
.modal.hidden { display: none; }
/* Wrappers used by newer modals (.modal-content / .modal-box) */
.modal-content, .modal-box { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-header h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.2px; }
.modal-close { background: var(--bg); border: none; padding: 5px 10px; border-radius: 6px; font-size: 0.9rem; cursor: pointer; color: var(--text-muted); transition: all var(--transition); line-height: 1; }
.modal-close:hover { background: rgba(239,68,68,0.10); color: var(--red); }
.modal-body { padding: 1.35rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.modal-body.center { text-align: center; }
.modal-footer { padding: 1rem 1.35rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; flex-shrink: 0; background: var(--bg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .center { display: flex; justify-content: center; }
.form-group.column { display: flex; flex-direction: column; }
.form-group textarea { width: 100%; padding: 0.55rem 0.85rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); resize: vertical; font-size: 0.875rem; background: var(--surface); color: var(--text); transition: border-color var(--transition); }
.form-group textarea:focus { border-color: var(--primary); }

/* ── IMAGE UPLOAD ── */
.image-upload-area { width: 100%; height: 130px; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color var(--transition), background var(--transition); background: var(--bg); overflow: hidden; position: relative; }
.image-upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.image-upload-area img { width: 100%; height: 100%; object-fit: cover; }
#pm-image-placeholder, #um-image-placeholder, #profile-image-placeholder { text-align: center; color: var(--text-muted); pointer-events: none; }
#pm-image-placeholder span { font-size: 1.8rem; display: block; }
#pm-image-placeholder p { font-size: 0.8rem; margin-top: 0.25rem; }
.avatar-upload { width: 100px; height: 100px; border-radius: 50%; border: 2px dashed var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg); position: relative; margin: 0 auto; transition: border-color var(--transition); }
.avatar-upload.large { width: 120px; height: 120px; }
.avatar-upload:hover { border-color: var(--primary); }
.avatar-upload img { width: 100%; height: 100%; object-fit: cover; }
#um-image-placeholder, #profile-image-placeholder { text-align: center; color: var(--text-muted); font-size: 0.75rem; pointer-events: none; }
#um-image-placeholder span, #profile-image-placeholder span { font-size: 1.8rem; display: block; }

/* ── TOGGLE ── */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: 0.25s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
input:checked + .toggle-slider { background: var(--primary); }
input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── SWATCHES ── */
.color-swatches { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all var(--transition); flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--text); }
.color-swatches input[type="color"] { width: 26px; height: 26px; border: 1px solid var(--border); padding: 0; border-radius: 50%; cursor: pointer; background: none; }

/* ── SYNC SPIN ── */
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn.syncing { animation: spin 0.7s linear infinite; pointer-events: none; opacity: 0.6; }

/* ── NOTIFICATIONS ── */
.notif-wrap { position: relative; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 0.62rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; pointer-events: none;
  border: 2px solid var(--surface);
}
.notif-panel {
  position: fixed; top: calc(var(--topbar-height) + 6px); right: 1rem;
  width: 300px; max-height: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 600; display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.18s ease;
}
.notif-panel.hidden { display: none; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.notif-header-actions { display: flex; align-items: center; gap: 0.35rem; }
.notif-panel-header button {
  background: none; border: none; font-size: 0.85rem;
  color: var(--text-muted); cursor: pointer; padding: 2px 6px;
  border-radius: 4px; transition: background var(--transition);
}
.notif-panel-header button:hover { background: var(--bg); color: var(--text); }
.notif-clear-btn { font-size: 0.75rem !important; color: var(--text-muted) !important; }
.notif-clear-btn:hover { color: var(--red) !important; background: rgba(239,68,68,0.07) !important; }
.notif-panel-body { overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.notif-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
}
.notif-item:last-child { border-bottom: none; }
.notif-item-icon { font-size: 1.1rem; flex-shrink: 0; }
.notif-item-text { flex: 1; }
.notif-item-text strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 1px; }
.notif-item-text span { color: var(--text-muted); font-size: 0.77rem; }
.notif-empty { text-align: center; padding: 2rem 1rem; color: var(--text-muted); font-size: 0.85rem; }
.notif-empty .notif-empty-icon { font-size: 1.8rem; display: block; margin-bottom: 0.4rem; }

/* ── CATEGORY CONTEXT MENU ── */
.cat-context-menu {
  position: fixed; z-index: 700;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 4px; min-width: 150px;
  animation: slideInRight 0.12s ease;
}
.cat-context-menu.hidden { display: none; }
.cat-ctx-item {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.5rem 0.75rem; background: none;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.85rem; color: var(--text); text-align: left;
  cursor: pointer; transition: background var(--transition);
}
.cat-ctx-item:hover { background: var(--bg); }
.cat-ctx-danger { color: var(--red) !important; }
.cat-ctx-danger:hover { background: rgba(239,68,68,0.07) !important; }

/* ── TOASTS ── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: var(--text); color: #fff; padding: 0.75rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.855rem; box-shadow: var(--shadow); display: flex; align-items: center; gap: 0.5rem; animation: slideInRight 0.2s ease, fadeOut 0.3s ease 2.7s forwards; max-width: 290px; min-width: 200px; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--yellow); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(8px); } }

/* ── UTILITY ── */
.hidden  { display: none !important; }
.visible { opacity: 1 !important; }
.panel-toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.inventory-table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.badge-green  { background: rgba(16,185,129,0.10); color: #059669; }
.badge-red    { background: rgba(239,68,68,0.10);  color: #dc2626; }
.badge-orange { background: rgba(249,115,22,0.10); color: #ea580c; }
.badge-blue   { background: rgba(59,130,246,0.10); color: #2563eb; }
.badge-gray   { background: var(--bg);             color: var(--text-muted); }
.product-thumb { width: 38px; height: 38px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; border: 1px solid var(--border); }
.product-thumb-img { width: 38px; height: 38px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border); }

/* ════════════════════════════════════════
   UI THEMES
   ════════════════════════════════════════ */

/* ── Minimal (F. style) — pure black, very round, shadow-only cards ── */
body.theme-minimal {
  --primary:             #0d0d0d;
  --primary-dark:        #000000;
  --primary-light:       rgba(0,0,0,0.05);
  --sidebar-bg:          #000000;
  --sidebar-text:        rgba(255,255,255,0.45);
  --sidebar-hover-bg:    rgba(255,255,255,0.07);
  --sidebar-active-bg:   rgba(255,255,255,0.12);
  --sidebar-active-text: #ffffff;
  --bg:                  #f2f2f4;
  --surface:             #ffffff;
  --border:              transparent;
  --border-light:        #f0f0f2;
  --shadow-xs:           0 1px 4px rgba(0,0,0,0.05);
  --shadow-sm:           0 2px 14px rgba(0,0,0,0.07);
  --shadow:              0 6px 28px rgba(0,0,0,0.10);
  --shadow-lg:           0 16px 56px rgba(0,0,0,0.14);
  --radius:              20px;
  --radius-sm:           14px;
  --radius-lg:           26px;
  --radius-xl:           32px;
}
/* minimal: no colored accent bar on active nav */
body.theme-minimal .nav-item.active::before { display: none; }
body.theme-minimal .nav-item.active { background: rgba(255,255,255,0.14); border-radius: 12px; }
/* minimal: cards have shadow only, no border */
body.theme-minimal .stat-card,
body.theme-minimal .chart-card,
body.theme-minimal .settings-group,
body.theme-minimal .pos-products-panel,
body.theme-minimal .inventory-table-wrap { border-color: transparent; }
/* minimal: remove 3px accent strip on stat cards — use circle icon bg instead */
body.theme-minimal .stat-card::before { display: none; }
/* minimal: topbar shadow instead of border */
body.theme-minimal .topbar { border-bottom-color: transparent; box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
body.theme-minimal .search-bar { border-radius: 12px; }
/* minimal: buttons very round */
body.theme-minimal .btn-primary { border-radius: 14px; }
body.theme-minimal .btn-secondary { border-radius: 14px; }
body.theme-minimal .period-btn.active { box-shadow: 0 2px 10px rgba(0,0,0,0.20); }

/* ── PayPen — light sidebar, navy accent, conservative borders ── */
body.theme-paypen {
  --primary:             #1a3a5c;
  --primary-dark:        #102540;
  --primary-light:       rgba(26,58,92,0.07);
  --sidebar-bg:          #f8fafc;
  --sidebar-text:        #64748b;
  --sidebar-hover-bg:    #f1f5f9;
  --sidebar-active-bg:   #dbeafe;
  --sidebar-active-text: #1a3a5c;
  --bg:                  #edf2f7;
  --surface:             #ffffff;
  --border:              #c9d7e3;
  --border-light:        #dde6ef;
  --shadow-xs:           0 1px 2px rgba(26,58,92,0.04);
  --shadow-sm:           0 1px 4px rgba(26,58,92,0.06);
  --shadow:              0 3px 14px rgba(26,58,92,0.08);
  --shadow-lg:           0 8px 32px rgba(26,58,92,0.11);
  --radius:              8px;
  --radius-sm:           6px;
  --radius-lg:           10px;
  --radius-xl:           14px;
  --topbar-height:       58px;
}
body.theme-paypen .sidebar { border-right: 1px solid var(--border); }
body.theme-paypen .sidebar-footer { border-top-color: var(--border); }
body.theme-paypen .sidebar-header .logo-text { color: var(--text) !important; }
body.theme-paypen .seller-name  { color: var(--text) !important; }
body.theme-paypen .seller-role  { color: var(--text-muted) !important; }
body.theme-paypen .nav-item:hover { color: var(--text); }
body.theme-paypen .logout-btn   { color: var(--red) !important; }
body.theme-paypen .logout-btn:hover { background: rgba(239,68,68,0.08) !important; }
/* paypen: left sidebar accent bar in navy */
body.theme-paypen .nav-item.active::before { background: var(--primary); }
/* paypen: topbar white, strong bottom line */
body.theme-paypen .topbar { background: #ffffff; border-bottom: 2px solid var(--border); }
body.theme-paypen .search-bar { border-radius: 4px; }
/* paypen: tables with full cell borders (spreadsheet-like) */
body.theme-paypen .data-table td,
body.theme-paypen .data-table th { border: 1px solid var(--border-light); }
body.theme-paypen .data-table th { border-bottom: 2px solid var(--border); }
/* paypen: stat card no top strip, just left 4px border */
body.theme-paypen .stat-card::before { top: 0; left: 0; right: auto; bottom: 0; width: 4px; height: auto; border-radius: var(--radius) 0 0 var(--radius); }
body.theme-paypen .btn-primary { border-radius: 4px; letter-spacing: 0.2px; }
body.theme-paypen .btn-secondary { border-radius: 4px; }
body.theme-paypen .period-btn.active { border-radius: 4px; }

/* ── Skillset — monochrome, white cards on gray, one dark hero card ── */
body.theme-skillset {
  --primary:             #111111;
  --primary-dark:        #000000;
  --primary-light:       rgba(0,0,0,0.05);
  --sidebar-bg:          #fafafa;
  --sidebar-text:        rgba(0,0,0,0.38);
  --sidebar-hover-bg:    rgba(0,0,0,0.04);
  --sidebar-active-bg:   rgba(0,0,0,0.07);
  --sidebar-active-text: #111111;
  --bg:                  #f4f4f5;
  --surface:             #ffffff;
  --border:              #e0e0e2;
  --border-light:        #ececed;
  --shadow-xs:           0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm:           0 1px 4px rgba(0,0,0,0.05);
  --shadow:              0 3px 12px rgba(0,0,0,0.07);
  --shadow-lg:           0 8px 24px rgba(0,0,0,0.10);
  --radius:              10px;
  --radius-sm:           7px;
  --radius-lg:           14px;
  --radius-xl:           18px;
}
body.theme-skillset .sidebar { border-right: 1px solid var(--border); }
body.theme-skillset .sidebar-footer { border-top-color: var(--border); }
body.theme-skillset .sidebar-header .logo-text { color: var(--text) !important; font-size: 1.2rem; font-weight: 900; }
body.theme-skillset .seller-name  { color: var(--text) !important; }
body.theme-skillset .seller-role  { color: var(--text-muted) !important; }
body.theme-skillset .nav-item:hover { color: var(--text); }
body.theme-skillset .logout-btn   { color: var(--red) !important; }
body.theme-skillset .logout-btn:hover { background: rgba(239,68,68,0.08) !important; }
/* skillset: no accent bar — circular dot instead */
body.theme-skillset .nav-item.active::before { display: none; }
body.theme-skillset .nav-item.active { background: rgba(0,0,0,0.08); font-weight: 700; }
/* skillset: topbar white, minimal */

/* ════════════════════════════════════════
   TICKET TABS (multi-sale)
   ════════════════════════════════════════ */
.ticket-tabs-wrap {
  display: flex; align-items: center;
  background: var(--surface); border-bottom: 1px solid var(--border);
  flex-shrink: 0; overflow: hidden;
}
.tabs-nav-btn {
  flex-shrink: 0; background: none; border: none;
  font-size: 1.25rem; line-height: 1; color: var(--text-muted);
  cursor: pointer; padding: 4px 7px;
  transition: color var(--transition);
}
.tabs-nav-btn:hover { color: var(--primary); }
.ticket-tabs-bar {
  flex: 1; display: flex; align-items: center; gap: 4px;
  padding: 6px 4px 0; overflow-x: auto;
  scrollbar-width: none; min-width: 0;
}
.ticket-tabs-bar::-webkit-scrollbar { display: none; }
.ticket-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg); border: 1px solid var(--border); border-bottom: none;
  font-size: 0.78rem; color: var(--text-muted); cursor: pointer;
  white-space: nowrap; transition: background var(--transition), color var(--transition);
  position: relative; top: 1px;
}
.ticket-tab:hover { background: var(--surface-hover, var(--border-light)); color: var(--text); }
.ticket-tab.active {
  background: var(--surface); color: var(--text); font-weight: 600;
  border-color: var(--border); border-bottom-color: var(--surface);
}
.tab-close {
  font-size: 0.65rem; color: var(--text-muted); background: none; border: none;
  cursor: pointer; padding: 0 2px; line-height: 1; border-radius: 3px;
  transition: background var(--transition);
}
.tab-close:hover { background: rgba(239,68,68,0.12); color: var(--red); }
.tab-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--primary); border-radius: 50%; margin-left: 2px; vertical-align: middle;
}
.ticket-tab-new {
  padding: 4px 9px; border-radius: var(--radius-sm);
  background: none; border: 1px dashed var(--border);
  font-size: 1rem; color: var(--text-muted); cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.ticket-tab-new:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }

/* ════════════════════════════════════════
   MESAS CONFIG PANEL (Settings)
   ════════════════════════════════════════ */
.mesas-config-panel {
  margin-top: 0.5rem; padding: 0.85rem 1rem;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.mesas-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.btn-sm {
  padding: 4px 10px; font-size: 0.78rem; border-radius: var(--radius-sm);
  cursor: pointer; border: none; transition: background var(--transition);
}
.btn-sm.btn-primary { background: var(--primary); color: #fff; }
.btn-sm.btn-primary:hover { background: var(--primary-dark); }
.mesas-list { display: flex; flex-direction: column; gap: 5px; }
.mesa-settings-row {
  display: flex; align-items: center; gap: 0.5rem; padding: 6px 8px;
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.mesa-num { font-size: 0.85rem; font-weight: 600; color: var(--text); flex: 1; }
.mesas-empty { font-size: 0.8rem; color: var(--text-muted); text-align: center; padding: 0.5rem 0; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 2px 4px; border-radius: 4px; transition: background var(--transition); }
.btn-icon-danger:hover { background: rgba(239,68,68,0.1); }
body.theme-skillset .topbar { background: #ffffff; border-bottom: 1px solid var(--border); }
/* skillset: first stat card = dark hero card */
body.theme-skillset .stats-grid .stat-card:first-child {
  background: #111111;
  border-color: #111111;
}
body.theme-skillset .stats-grid .stat-card:first-child .stat-label,
body.theme-skillset .stats-grid .stat-card:first-child .stat-value,
body.theme-skillset .stats-grid .stat-card:first-child .stat-sub { color: #ffffff !important; }
body.theme-skillset .stats-grid .stat-card:first-child .stat-change.positive { color: #6ee7b7 !important; }
body.theme-skillset .stats-grid .stat-card:first-child .stat-change.negative { color: #fca5a5 !important; }
body.theme-skillset .stats-grid .stat-card:first-child::before { background: rgba(255,255,255,0.12); }
/* skillset: no top strip on other cards */
body.theme-skillset .stat-card::before { height: 0; }
body.theme-skillset .stats-grid .stat-card:first-child::before { height: 3px; }
/* skillset: period tabs without round pill */
body.theme-skillset .period-tabs { border-radius: 8px; }
body.theme-skillset .period-btn.active { border-radius: 6px; box-shadow: none; }
body.theme-skillset .btn-primary { font-weight: 700; letter-spacing: 0.1px; }

/* ════════════════════════════════════════
   RESERVAS DE MESAS
   ════════════════════════════════════════ */

/* Date nav bar */
.res-date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.btn-icon-sm {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.btn-icon-sm:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Week strip */
.res-week-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex-shrink: 0;
}
.res-day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  min-width: 52px;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}
.res-day-chip:hover { background: var(--primary-light); border-color: var(--primary); }
.res-day-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.res-day-chip.today .res-day-name { font-weight: 800; }
.res-day-name { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.res-day-chip.active .res-day-name { color: rgba(255,255,255,0.8); }
.res-day-num { font-size: 1rem; font-weight: 700; color: var(--text); }
.res-day-chip.active .res-day-num { color: #fff; }
.res-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.res-dot.empty { background: transparent; }
.res-day-chip.active .res-dot { background: rgba(255,255,255,0.7); }

/* Date label */
.res-date-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: capitalize;
  flex-shrink: 0;
}

/* Summary bar */
.res-summary-bar {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.res-summary-bar b { color: var(--text); }

/* Day grid */
.res-grid-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.res-grid-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.res-grid-table thead th {
  background: var(--bg);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.res-hour-col { width: 72px; text-align: left !important; padding-left: 14px !important; }
.res-mesa-col { min-width: 120px; }
.res-hour-cell {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 14px;
  white-space: nowrap;
  border-right: 1px solid var(--border-light);
  background: var(--bg);
}
.res-cell {
  padding: 4px 6px;
  border: 1px solid var(--border-light);
  vertical-align: top;
  transition: background var(--transition);
  cursor: pointer;
}
.res-cell.free:hover { background: var(--primary-light); }
.res-add-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  color: var(--text-light);
  font-size: 1.25rem;
  font-weight: 300;
  transition: color var(--transition);
}
.res-cell.free:hover .res-add-hint { color: var(--primary); font-weight: 700; }
.res-cell.occupied { background: #fff4ef; cursor: pointer; }
.res-cell.occupied:hover { background: #ffe8db; }

/* Reservation chip inside cell */
.res-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  position: relative;
  min-height: 42px;
}
.res-name { font-weight: 700; line-height: 1.2; }
.res-pax  { font-size: 0.7rem; opacity: 0.85; }
.res-nota { font-size: 0.67rem; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.res-del-btn {
  position: absolute;
  top: 3px; right: 3px;
  background: rgba(0,0,0,0.2);
  border: none;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 0.65rem;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.res-del-btn:hover { background: rgba(0,0,0,0.5); }

/* Modal form label */
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Salarios: falta badge & detail calendar ── */
.sal-falta-badge {
  display: inline-block;
  background: #ffedd5;
  color: #7c2d12;
  border: 1px solid #ea580c;
  border-radius: 12px;
  padding: 1px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}
.sal-parcial-badge {
  display: inline-block;
  background: #ede9fe;
  color: #4c1d95;
  border: 1px solid #8b5cf6;
  border-radius: 12px;
  padding: 1px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}
.sal-cal-cell.is-parcial {
  border: 2px solid #8b5cf6 !important;
}
.sal-detail-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mini-calendario de detalle de salario */
.sal-cal-wrap {
  padding: 20px 24px 16px;
  background: var(--bg);
  width: max-content;
  min-width: 100%;
}
.sal-cal-months {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}
.sal-cal-month {
  width: 294px;
  flex-shrink: 0;
}
.sal-cal-month-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}
.sal-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 38px);
  gap: 4px;
}
.sal-cal-dow {
  width: 38px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 0 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sal-cal-cell {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
  box-sizing: border-box;
}
.sal-cal-cell:not(.sal-cal-empty):hover {
  transform: scale(1.15);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.sal-cal-cell.sal-cal-empty { background: transparent !important; border: none !important; }
.sal-cal-cell.sal-cal-today { box-shadow: 0 0 0 2.5px #7c3aed !important; }
.sal-cal-num {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}
.sal-cal-icon {
  font-size: 0.68rem;
  line-height: 1;
}
/* Falta cell: pulsing border */
.sal-cal-cell.is-falta {
  box-shadow: 0 0 0 1.5px #ea580c;
  animation: sal-falta-pulse 2s infinite;
}
@keyframes sal-falta-pulse {
  0%,100% { box-shadow: 0 0 0 1.5px #ea580c; }
  50%      { box-shadow: 0 0 0 3px #ea580c66; }
}
.sal-cal-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sal-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sal-cal-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
}
.sal-cal-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  margin-left: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
}

/* Dark mode adjustments */
body.dark-mode .res-cell.occupied { background: rgba(255,107,53,0.12); }
body.dark-mode .res-cell.occupied:hover { background: rgba(255,107,53,0.2); }
body.dark-mode .res-hour-cell { background: var(--bg); }
body.dark-mode .res-grid-table thead th { background: var(--bg); }

/* ══════════════════════════════════════
   CALENDARIO LABORAL
══════════════════════════════════════ */
.cal-view-toggle {
  display: flex;
  background: var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.cal-view-btn {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.cal-view-btn.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.cal-period-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 180px;
  text-align: center;
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}
.cal-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.cal-overflow-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cal-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.83rem;
}
.cal-table thead tr {
  background: var(--bg);
}
.cal-name-col {
  min-width: 150px;
  max-width: 170px;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  background: var(--bg);
  z-index: 2;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cal-day-th {
  min-width: 54px;
  padding: 6px 4px;
  text-align: center;
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border);
}
.cal-th-day-name {
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cal-th-day-num {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.cal-today-col .cal-th-day-num,
.cal-today-col.cal-day-th { color: var(--primary); }
.cal-today-col { border-top: 2px solid var(--primary) !important; }

.cal-name-cell {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  background: var(--card);
  z-index: 1;
}
.cal-worker-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.cal-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cal-day-cell {
  min-width: 54px;
  height: 44px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-right: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
  transition: filter 0.12s;
}
.cal-day-cell.cal-editable {
  cursor: pointer;
}
.cal-day-cell.cal-editable:hover {
  filter: brightness(0.92);
}
.cal-estado-label {
  font-size: 1rem;
  line-height: 1;
}
.cal-subtotal-row td {
  background: var(--bg);
  padding: 6px 4px;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   MENÚ DEL DÍA
══════════════════════════════════════════════════ */
/* List */
.md-empty { text-align:center; padding:48px 24px; color:var(--text-muted); }
.md-empty span { font-size:3rem; }
.md-empty p { font-size:1.1rem; margin:12px 0 4px; }

.md-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.md-card:hover { box-shadow: 0 4px 16px var(--shadow); }
.md-card-inactive { opacity:.6; }
.md-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.md-card-nombre { font-weight:700; font-size:1rem; }
.md-card-status { margin-left:10px; font-size:.78rem; border-radius:20px; padding:2px 10px; }
.md-activo   { background:#d1fae5; color:#065f46; }
.md-inactivo { background:#fee2e2; color:#7f1d1d; }
.md-card-actions { display:flex; gap:6px; }
.md-card-body { padding:12px 18px; display:flex; flex-direction:column; gap:6px; }
.md-card-info-row { display:flex; gap:12px; font-size:.85rem; color:var(--text-muted); }
.md-card-info-row span:first-child { font-weight:600; min-width:70px; }

/* Editor modal */
.md-editor-form { display:flex; flex-direction:column; gap:16px; }
.md-field-row { display:flex; gap:16px; flex-wrap:wrap; }
.md-field { display:flex; flex-direction:column; gap:4px; flex:1; min-width:200px; }
.md-field label { font-size:.82rem; font-weight:600; color:var(--text-muted); }
.md-field input[type=text], .md-field textarea {
  padding:8px 12px; border:1px solid var(--border); border-radius:8px;
  background:var(--bg); color:var(--text); font-size:.9rem;
}
.md-activo-row { display:flex; align-items:center; gap:8px; font-size:.9rem; }

/* Calendar for date selection */
.md-cal-wrap { border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.md-cal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.md-cal-label { font-weight:700; font-size:.95rem; }
.md-cal-btn { background:none; border:1px solid var(--border); border-radius:6px; padding:2px 10px; cursor:pointer; font-size:1rem; color:var(--text); }
.md-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.md-cal-dow  { text-align:center; font-size:.72rem; font-weight:700; color:var(--text-muted); padding:2px 0; }
.md-cal-cell {
  aspect-ratio:1; border-radius:6px; display:flex; align-items:center; justify-content:center;
  font-size:.8rem; cursor:pointer; border:1px solid transparent;
  transition: background .15s;
  background: var(--bg);
}
.md-cal-cell:hover:not(.md-cal-empty) { background:var(--border); }
.md-cal-cell.md-cal-sel  { background:var(--primary); color:#fff; font-weight:700; }
.md-cal-cell.md-cal-today { box-shadow:0 0 0 2px var(--primary); }
.md-cal-empty { cursor:default; }
.md-cal-hint { font-size:.75rem; color:var(--text-muted); margin-top:6px; }

/* Tabs */
.md-tabs { display:flex; gap:6px; flex-wrap:wrap; border-bottom:1px solid var(--border); padding-bottom:8px; }
.md-tab {
  padding:6px 14px; border-radius:8px 8px 0 0; border:1px solid var(--border);
  background:var(--bg); cursor:pointer; font-size:.82rem; color:var(--text);
  display:flex; align-items:center; gap:4px; position:relative;
  transition: background .15s;
}
.md-tab:hover { background:var(--border); }
.md-tab-active { background:var(--primary); color:#fff; border-color:var(--primary); }
.md-tab-badge {
  position:absolute; top:-6px; right:-6px;
  background:#ef4444; color:#fff; border-radius:50%; width:16px; height:16px;
  font-size:.65rem; display:flex; align-items:center; justify-content:center;
}

/* Curso editor */
.md-curso-editor { padding:12px 0; }
.md-curso-header {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap; margin-bottom:14px;
}
.md-curso-nombre-input {
  padding:5px 10px; border:1px solid var(--border); border-radius:7px;
  background:var(--bg); color:var(--text); font-size:.85rem;
}
.md-opciones-empty { color:var(--text-muted); font-size:.85rem; padding:8px 0; font-style:italic; }
.md-opciones-list { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.md-opcion-row {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 12px; background:var(--bg); border:1px solid var(--border); border-radius:8px;
}
.md-op-producto, .md-op-nombre {
  flex:1; min-width:120px; padding:6px 10px; border:1px solid var(--border); border-radius:7px;
  background:var(--card); color:var(--text); font-size:.83rem;
}
.md-op-precio-wrap, .md-op-qty-wrap {
  display:flex; align-items:center; gap:4px; font-size:.82rem; color:var(--text-muted);
}
.md-op-precio { width:80px; padding:5px 8px; border:1px solid var(--border); border-radius:7px; background:var(--bg); color:var(--text); }
.md-op-qty    { width:60px; padding:5px 8px; border:1px solid var(--border); border-radius:7px; background:var(--bg); color:var(--text); }
.md-btn-add-op { margin-top:4px; }

/* POS modal */
.md-pos-curso { margin-bottom:20px; }
.md-pos-curso-title { font-weight:700; font-size:.93rem; margin-bottom:8px; padding-bottom:5px; border-bottom:1px solid var(--border); }
.md-pos-opciones { display:flex; flex-direction:column; gap:6px; }
.md-pos-opcion {
  display:flex; align-items:center; gap:10px; padding:9px 14px;
  border:1px solid var(--border); border-radius:8px; cursor:pointer;
  transition: background .15s;
}
.md-pos-opcion:hover { background: var(--bg); }
.md-pos-opcion input[type=radio] { accent-color:var(--primary); width:16px; height:16px; }
.md-pos-opcion-platillo { padding-right:8px; }
.md-pos-op-name { flex:1; font-size:.9rem; }
.md-pos-op-precio { font-weight:700; color:var(--primary); font-size:.95rem; }
.md-pos-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0 0; border-top:1px solid var(--border); margin-top:8px;
}
.md-pos-total-label { font-size:.85rem; color:var(--text-muted); }
.md-pos-total-val   { font-size:1.3rem; font-weight:700; color:var(--primary); }

/* Ticket item detail for menu */
.ticket-item-menudetail {
  font-size:.72rem; color:var(--text-muted); margin-top:2px; padding-left:4px; font-style:italic;
}

/* Button in ticket actions */
.btn-menu-dia {
  background: linear-gradient(135deg,#f59e0b,#d97706);
  color:#fff; border:none; border-radius:8px; padding:7px 14px;
  font-size:.82rem; font-weight:700; cursor:pointer;
  transition:opacity .15s;
  display:flex; align-items:center; gap:5px;
}
.btn-menu-dia:hover { opacity:.9; }

  border-top: 2px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 0.88rem;
}
.cal-subtotal-cell b { font-size: 1rem; color: var(--text); }
.cal-subtotal-cell span { font-size: 0.75rem; color: var(--text-muted); }
.cal-pct-row td {
  background: var(--bg);
  padding: 5px 4px;
  text-align: center;
  border-right: 1px solid var(--border);
  font-size: 0.83rem;
  font-weight: 700;
}
.pct-green  { color: #059669; }
.pct-yellow { color: #b45309; }
.pct-red    { color: #dc2626; }

/* Edit estado modal options */
.cal-estado-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cal-estado-btn {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.15s, transform 0.12s;
  opacity: 0.6;
}
.cal-estado-btn.active {
  opacity: 1;
  transform: scale(1.02);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

/* Dark mode */
body.dark-mode .cal-name-col,
body.dark-mode .cal-name-cell { background: var(--bg); }
body.dark-mode .cal-day-cell { border-color: rgba(255,255,255,0.06); }

