/* ===== Admin Dashboard — El Capitán ===== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --sb-bg:      #111827;
  --sb-hover:   #1f2937;
  --sb-active:  #1f2937;
  --sb-border:  #1f2937;
  --sb-text:    #9ca3af;
  --sb-label:   #4b5563;
  --accent:     #ffcc33;
  --accent-d:   #e6b800;
  --danger:     #ef4444;
  --success:    #22c55e;
  --bg:         #f3f4f6;
  --card:       #ffffff;
  --border:     #e5e7eb;
  --text:       #111827;
  --text-muted: #6b7280;
  --radius:     10px;
  --sb-w:       240px;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); }

/* ===== LOGIN ===== */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 20px;
}

.login-card {
  background: var(--card);
  border-radius: 16px;
  padding: 44px 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
  text-align: center;
}

.login-logo {
  width: 120px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}

.login-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.login-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 28px; }

.login-card .form-group { text-align: left; margin-bottom: 16px; }
.login-card .form-group label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--text); }

.error-msg { color: var(--danger); font-size: .85rem; min-height: 20px; margin-bottom: 12px; }

.login-hint {
  margin-top: 16px;
  font-size: .78rem;
  color: var(--text-muted);
  background: #f9fafb;
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
}

/* ===== SHARED FORM ELEMENTS ===== */
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,204,51,.2); }

textarea { resize: vertical; line-height: 1.5; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 42px; }
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 4px;
  transition: color .2s;
}
.toggle-pass:hover { color: var(--text); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-d); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 22px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:hover { border-color: #9ca3af; color: var(--text); }

/* ===== DASHBOARD LAYOUT ===== */
#dashboard {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
#sidebar {
  width: var(--sb-w);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid #1f2937;
}
.sidebar-brand img { width: 44px; border-radius: 8px; }
.sidebar-brand strong { display: block; color: #fff; font-size: .95rem; line-height: 1.2; }
.sidebar-brand small { color: var(--sb-text); font-size: .75rem; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.nav-label {
  padding: 14px 18px 4px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sb-label);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  color: var(--sb-text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s, color .2s;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; }
.nav-item:hover { background: var(--sb-hover); color: #fff; }
.nav-item.active { background: var(--sb-active); color: var(--accent); border-left-color: var(--accent); }
.nav-item.logout:hover { color: var(--danger); }

.sidebar-footer {
  border-top: 1px solid #1f2937;
  padding: 8px 0;
}

/* ===== MAIN CONTENT ===== */
#main {
  margin-left: var(--sb-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== TOPBAR ===== */
#topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

#sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  padding: 6px;
}

#topbar h2 { font-size: 1.1rem; font-weight: 700; flex: 1; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 600;
}
.topbar-right i { font-size: 1.2rem; color: var(--accent); }

/* ===== PANELS ===== */
#panels { padding: 28px 28px 60px; }

.panel { display: none; animation: fadePanel .25s ease; }
.panel.active { display: block; }

@keyframes fadePanel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel-header {
  margin-bottom: 24px;
}
.panel-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-header h3 i { color: var(--accent); }
.panel-header p { color: var(--text-muted); font-size: .9rem; }

.panel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ===== FORM GRID ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.narrow { max-width: 480px; grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-group label i { color: var(--accent); width: 14px; text-align: center; }
.section-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-top: 8px; }

/* ===== SEDE TABS ===== */
.sede-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sede-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.sede-tab:hover { border-color: var(--accent); color: var(--accent); }
.sede-tab.active { background: var(--accent); border-color: var(--accent); color: #000; }
.sede-tab i { font-size: .8rem; }

/* ===== SEDE CARDS ===== */
.sede-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.sede-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.sede-card-header i { color: var(--accent); font-size: 1.1rem; }
.sede-card-header h4 { margin: 0; font-size: 1rem; color: var(--text); }
.field-hint { display: block; margin-top: 5px; font-size: .76rem; color: var(--text-muted); line-height: 1.4; }
.field-hint code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; font-family: monospace; }
.sede-map-preview { margin-top: 4px; }
.full-label { grid-column: 1 / -1; margin: 16px 0 4px; }

/* ===== SLIDE CARDS ===== */
.slide-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.slide-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.slide-thumb {
  width: 80px;
  height: 52px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #e5e7eb;
  flex-shrink: 0;
}
.slide-card-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.slide-card-header .slide-num {
  display: inline-block;
  background: var(--accent);
  color: #111;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: .8rem;
  font-weight: 800;
  margin-right: 6px;
}
.slide-card-header h4 { flex: 1; }
.btn-delete-slide {
  background: none;
  border: 1px solid #ef4444;
  color: #ef4444;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
}
.btn-delete-slide:hover {
  background: #ef4444;
  color: #fff;
}
.btn-add-slide {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-size: .9rem;
}

/* Upload row */
.img-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.img-path-input { flex: 1 1 200px; }
.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--accent);
  color: #111;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
  user-select: none;
}
.btn-upload:hover  { background: var(--accent-d); }
.btn-upload:active { transform: scale(.97); }
.upload-hint {
  display: block;
  margin-top: 5px;
  font-size: .78rem;
  color: var(--text-muted);
}
.upload-progress {
  margin-top: 6px;
  font-size: .82rem;
  color: var(--accent);
  font-weight: 600;
}
.upload-progress.hidden { display: none; }

/* Insert buttons (br / párrafo) */
.insert-btns {
  display: flex;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.insert-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: #f3f4f6;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.insert-btn:hover {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

/* Icon picker */
.icon-picker {
  margin-top: 8px;
  background: #f9fafb;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.icon-picker.hidden { display: none; }
.icon-picker-hint {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.icon-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.icon-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .7rem;
  color: var(--text-muted);
  min-width: 58px;
  transition: background .15s, border-color .15s, color .15s;
}
.icon-pick-btn i { font-size: 1.1rem; color: var(--text); }
.icon-pick-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}
.icon-pick-btn:hover i { color: #111; }

/* Size selects */
.size-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  outline: none;
}
.size-select:focus { border-color: var(--accent); }

/* ===== THEMES GRID ===== */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.theme-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  position: relative;
}
.theme-card:hover { border-color: #9ca3af; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,204,51,.25); }

.theme-preview {
  height: 90px;
  overflow: hidden;
}
.tp-bar {
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 5px;
}
.tp-dot { width: 8px; height: 8px; border-radius: 50%; }
.tp-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tp-accent { height: 12px; border-radius: 3px; width: 50%; }
.tp-text { height: 8px; border-radius: 3px; opacity: .5; }

.theme-info {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-icon { font-size: 1.5rem; }
.theme-info strong { display: block; font-size: .9rem; font-weight: 700; }
.theme-info p { font-size: .78rem; color: var(--text-muted); margin: 0; }

.theme-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: #111;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== MSG / TOAST ===== */
.msg-line {
  font-size: .88rem;
  font-weight: 600;
  min-height: 22px;
  margin-bottom: 4px;
}
.msg-line.error { color: var(--danger); }
.msg-line.success { color: var(--success); }

#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #111827;
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  pointer-events: none;
}
#toast i { color: var(--success); font-size: 1rem; }
#toast.show { transform: translateY(0); opacity: 1; }

/* ===== MENU MODULE ===== */

/* Tabs */
.menu-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.menu-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.menu-tab:hover { color: var(--text); }
.menu-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.menu-tab-content { display: none; }
.menu-tab-content.active { display: block; }

/* Toolbar */
.tab-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-select {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  outline: none;
  min-width: 200px;
}
.filter-select:focus { border-color: var(--accent); }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-size: .88rem;
}
.data-table thead th {
  background: #f9fafb;
  padding: 11px 14px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f9fafb; }

/* Item thumb */
.item-thumb {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: #e5e7eb;
  display: block;
}
.item-thumb-empty {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: .75rem;
}

/* Category icon preview */
.cat-icon-cell { font-size: 1.1rem; width: 36px; text-align: center; }

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-active   { background: #dcfce7; color: #16a34a; }
.badge-inactive { background: #fee2e2; color: #dc2626; }

/* Row action buttons */
.row-actions { display: flex; gap: 6px; }
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-muted);
  transition: all .2s;
}
.action-btn:hover { border-color: #9ca3af; color: var(--text); }
.action-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: #fff5f5; }

/* Inline form card */
.form-wrap {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  animation: fadePanel .2s ease;
}
.form-wrap .form-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-wrap .form-title i { color: #0284c7; }
.form-wrap-actions { display: flex; gap: 10px; margin-top: 14px; }

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.toggle-wrap label { font-size: .88rem; font-weight: 600; color: var(--text); cursor: pointer; }
.toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
}
.empty-state i { font-size: 2rem; margin-bottom: 10px; opacity: .4; display: block; }
.empty-state p { font-size: .9rem; }

/* Price tag */
.price-tag { font-weight: 700; color: #059669; font-size: .9rem; }

/* Responsive table */
@media (max-width: 640px) {
  .data-table .hide-mobile { display: none; }
}

/* ===== HIDDEN ===== */
/* ===== SECTION ITEM CARDS ===== */
.sec-item-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.sec-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.sec-item-num {
  background: var(--accent);
  color: #000;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.icon-select-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-preview {
  color: var(--accent);
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}
.gal-thumb {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

/* ===== LOGOS PANEL ===== */
.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.logo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.logo-card-head strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}
.logo-card-head small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
  line-height: 1.35;
}
.logo-preview {
  height: 110px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%) 0 0/16px 16px,
    linear-gradient(45deg, #f0f0f0 25%, #fff 25%, #fff 75%, #f0f0f0 75%) 8px 8px/16px 16px;
  overflow: hidden;
}
.logo-preview.dark {
  background: #1a1a1a;
}
.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-preview.empty {
  background: #f9fafb;
  border: 1px dashed var(--border);
}
.logo-empty-txt {
  color: #9ca3af;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== SWITCH / CHECKBOX ROW ===== */
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
}
.switch-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== CUSTOM THEME PANEL ===== */
.custom-theme-panel {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0 4px;
}
.custom-theme-panel h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-pick-row input[type="color"] {
  width: 44px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}
.color-pick-row input[type="text"] {
  flex: 1;
  font-family: monospace;
  font-size: 0.9rem;
}
.custom-theme-preview {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.hidden { display: none !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  #main { margin-left: 0; }
  #sidebar-toggle { display: block; }
  #panels { padding: 20px 16px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .themes-grid { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 32px 24px 28px; }
}

@media (max-width: 480px) {
  .themes-grid { grid-template-columns: 1fr; }
  .panel-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
