/* ============================================================
   CONTROL DE GESTION PSF — Warm Minimal
   Pesquera San Fernando — Puerto Varas, Chile
   ============================================================ */

@font-face {
  font-family: 'Shorai Sans';
  src: url('../assets/fonts/ShoraiSansStdNVar.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Warm palette */
  --bg-primary: #2b2a27;
  --bg-secondary: #302f2c;
  --bg-tertiary: #3a3935;
  --bg-elevated: #44433e;
  --bg-hover: #3a3935;
  --bg-input: #25241f;

  --border: rgba(255,255,255,0.07);
  --border-subtle: rgba(255,255,255,0.04);

  /* Text */
  --text-primary: #e8e6e1;
  --text-secondary: #a8a29e;
  --text-muted: #6b6560;

  /* Accent — warm terracotta */
  --accent: #c97e4a;
  --accent-hover: #b5703f;
  --accent-muted: rgba(201,126,74,0.12);

  /* Functional (muted) */
  --green: #6fad7b;
  --green-muted: rgba(111,173,123,0.10);
  --red: #c76a6a;
  --red-muted: rgba(199,106,106,0.10);
  --yellow: #c4a24e;
  --yellow-muted: rgba(196,162,78,0.10);
  --blue: #7a9ec7;
  --blue-muted: rgba(122,158,199,0.10);

  /* Product types */
  --moldeado-color: #7a9ec7;
  --volcado-color: #a88ec7;
  --huevito-color: #c4a24e;
}

html { font-size: 15px; }

body {
  font-family: 'Shorai Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ===== BUTTONS ===== */
button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all .12s ease;
  font-size: 0.85rem;
}
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn { padding: 7px 14px; border-radius: 6px; font-size: 0.82rem; font-weight: 500; }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.btn-lg { padding: 9px 18px; font-size: 0.88rem; min-height: 38px; }
.btn-xl { padding: 14px 28px; font-size: 1.05rem; min-height: 48px; border-radius: 8px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-warning { background: var(--yellow); color: var(--bg-primary); }
.btn-warning:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-accent { background: var(--red); color: #fff; }
.btn-accent:hover { opacity: 0.9; }

/* ===== INPUTS ===== */
input, select, textarea {
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s;
  font-size: 0.85rem;
  padding: 7px 10px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(255,255,255,0.18);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select { cursor: pointer; }

.input-lg, #recepcionForm input, #recepcionForm select, #recepcionForm textarea { font-size: 0.92rem; padding: 9px 12px; }

.input-xl { font-size: 1.05rem; padding: 11px 14px; }

/* ===== DATE / TIME INPUTS ===== */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity .2s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 0.8; }
::-webkit-datetime-edit { color: var(--text-primary); }
::-webkit-datetime-edit-fields-wrapper { padding: 0; }
::-webkit-datetime-edit-text { color: var(--text-muted); padding: 0 2px; }
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-year-field { color: var(--text-primary); }
::-webkit-datetime-edit-month-field:focus,
::-webkit-datetime-edit-day-field:focus,
::-webkit-datetime-edit-year-field:focus {
  background: var(--accent);
  color: #fff;
  border-radius: 2px;
}

/* ===== FORM GROUP ===== */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 450;
}

/* ===== LAYOUT ===== */
.screen { display: none; min-height: 100vh; flex-direction: column; }
.screen.active { display: flex; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-4 { grid-template-columns: 1fr; } }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }
.gap-lg { gap: 20px; }

/* ===== LOGIN SCREEN ===== */
#loginScreen {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}
#loginScreen.active { display: flex; }

.login-card {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 36px 32px;
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--border);
}
.login-logo {
  display: block;
  max-width: 160px;
  margin: 0 auto 16px;
  filter: invert(1) brightness(0.85);
}
.login-title {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 24px;
  font-weight: 400;
}
.login-card .form-group { margin-bottom: 12px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.login-error {
  background: var(--red-muted);
  color: var(--red);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  text-align: center;
  margin-bottom: 12px;
  display: none;
}

/* ===== TOP NAV ===== */
.top-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-nav-brand img {
  height: 22px;
  filter: invert(1) brightness(0.7);
  opacity: 0.8;
}
.top-nav-brand span {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  font-weight: 400;
}
.top-nav-actions { display: flex; align-items: center; gap: 6px; }
.top-nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.top-nav-user .user-role {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== SIDEBAR NAV ===== */
.app-layout { display: flex; flex: 1; }
.sidebar {
  width: 190px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 14px 0;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-title {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 450;
  padding: 0 14px;
  margin-bottom: 2px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  cursor: pointer;
  transition: all .1s;
  border-left: 2px solid transparent;
  margin: 0 0 1px;
}
.sidebar-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.sidebar-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--accent);
  font-weight: 500;
}
.sidebar-link .icon { font-size: 0.75rem; width: 16px; text-align: center; color: var(--text-muted); }

.main-content { flex: 1; overflow-y: auto; padding: 20px 24px; max-height: calc(100vh - 48px); }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.page-header h1 { font-size: 1.05rem; font-weight: 550; }
.page-header h1 .subtitle { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; margin-left: 6px; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 14px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-header h3 { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 18px; }
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
}
.stat-card .stat-value { font-size: 1.35rem; font-weight: 600; line-height: 1.2; color: var(--text-primary); }
.stat-card .stat-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; font-weight: 400; }
.stat-card.stat-green .stat-value { color: var(--green); }
.stat-card.stat-red .stat-value { color: var(--red); }
.stat-card.stat-blue .stat-value { color: var(--blue); }
.stat-card.stat-yellow .stat-value { color: var(--yellow); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
thead th {
  padding: 6px 10px;
  text-align: left;
  font-weight: 450;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-secondary);
}
tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
tbody td strong { color: var(--text-primary); font-weight: 500; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.estado-ok { color: var(--green); font-weight: 500; }
.estado-rej { color: var(--red); font-weight: 500; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 450;
  letter-spacing: 0.01em;
}
.badge-moldeado { background: rgba(122,158,199,0.10); color: var(--moldeado-color); }
.badge-volcado { background: rgba(168,142,199,0.10); color: var(--volcado-color); }
.badge-huevito { background: var(--yellow-muted); color: var(--yellow); }
.badge-recepcion { background: var(--yellow-muted); color: var(--yellow); }
.badge-en_proceso { background: var(--blue-muted); color: var(--blue); }
.badge-cerrado { background: var(--green-muted); color: var(--green); }
.badge-anulado { background: rgba(107,101,96,0.12); color: var(--text-muted); }
.badge-blue { background: var(--blue-muted); color: var(--blue); }
.badge-green { background: var(--green-muted); color: var(--green); }
.badge-red { background: var(--red-muted); color: var(--red); }

/* ===== PRODUCT BUTTONS ===== */
.product-selector { display: flex; gap: 6px; }
.product-btn {
  flex: 1;
  padding: 10px;
  font-size: 0.9rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 500;
}
.product-btn.sel-moldeado { background: rgba(122,158,199,0.12); color: var(--moldeado-color); border-color: rgba(122,158,199,0.3); }
.product-btn.sel-volcado { background: rgba(168,142,199,0.12); color: var(--volcado-color); border-color: rgba(168,142,199,0.3); }
.product-btn.sel-huevito { background: rgba(196,162,78,0.12); color: var(--huevito-color); border-color: rgba(196,162,78,0.3); }

/* ===== MOLDEO OPERATION (stays large for plant floor) ===== */
.moldeo-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0; flex: 1; overflow: hidden; font-size: 0.95rem; }
.moldeo-left { padding: 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.moldeo-right { padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }

.moldeo-layout input,
.moldeo-layout select {
  font-size: 1rem;
  padding: 10px 13px;
}
.moldeo-layout .btn { padding: 10px 18px; font-size: 0.92rem; }
.moldeo-layout .btn-lg { padding: 13px 24px; font-size: 1rem; min-height: 48px; }

.moldeador-display {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
}
.moldeador-display .name { font-size: 1.2rem; font-weight: 600; color: var(--text-primary); }
.moldeador-display .tanda-info { font-size: 0.85rem; color: var(--text-muted); margin-top: 3px; }

.pote-progress { display: flex; gap: 4px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }
.pote-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-elevated); display: flex; align-items: center;
  justify-content: center; font-size: 0.62rem; font-weight: 500;
  color: var(--text-muted);
}
.pote-dot.filled { background: var(--green); color: #fff; }
.pote-dot.current { border: 2px solid var(--accent); }

.weight-display {
  font-size: 2.2rem; font-weight: 600; text-align: center; padding: 14px;
  border-radius: 8px; background: var(--bg-tertiary); min-height: 72px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; border: 1px solid var(--border);
}
.weight-ok { color: var(--green); border-color: rgba(111,173,123,0.4); background: var(--green-muted); }
.weight-bad { color: var(--red); border-color: rgba(199,106,106,0.4); background: var(--red-muted); animation: pulse-red .6s ease-in-out infinite alternate; }
.weight-neutral { color: var(--text-muted); }
@keyframes pulse-red { from { border-color: rgba(199,106,106,0.4); } to { border-color: rgba(199,106,106,0.15); } }

.action-btns { display: flex; gap: 8px; }
.action-btns .btn { flex: 1; min-height: 52px; font-size: 1.05rem; }

/* ===== ALERTS ===== */
.alert {
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 450;
  font-size: 0.82rem;
}
.alert-danger { background: var(--red-muted); color: var(--red); }
.alert-success { background: var(--green-muted); color: var(--green); }
.alert-warning { background: var(--yellow-muted); color: var(--yellow); }
.alert-info { background: var(--blue-muted); color: var(--blue); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 200; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 24px;
  max-width: 480px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.modal h2 { font-size: 1rem; font-weight: 550; margin-bottom: 16px; }
.modal .form-group { margin-bottom: 10px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* ===== SYNC INDICATOR ===== */
.sync-indicator {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.7rem; color: var(--text-muted);
}
.sync-dot { width: 6px; height: 6px; border-radius: 50%; }
.sync-online { background: var(--green); }
.sync-pending { background: var(--yellow); animation: pulse-sync 1.5s infinite; }
.sync-offline { background: var(--red); }
.sync-error { background: var(--red); }
@keyframes pulse-sync { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ===== FLASH OVERLAY ===== */
.flash-overlay {
  position: fixed; inset: 0; z-index: 300;
  pointer-events: none; opacity: 0; transition: opacity .15s;
}
.flash-overlay.flash-green { background: rgba(111,173,123,.1); opacity: 1; }
.flash-overlay.flash-red { background: rgba(199,106,106,.1); opacity: 1; }

/* ===== TEMP BUTTON ===== */
.btn-temp-float {
  position: fixed; bottom: 18px; right: 18px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--bg-tertiary); color: var(--text-secondary);
  font-size: 1.3rem; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.btn-temp-float:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 450; margin-bottom: 5px;
}

/* ===== TAGS ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  background: var(--bg-tertiary);
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.78rem;
  display: flex; align-items: center; gap: 5px;
  color: var(--text-secondary);
}
.tag .tag-remove {
  background: var(--red-muted); color: var(--red); width: 16px; height: 16px;
  border-radius: 3px; font-size: 0.6rem; display: flex;
  align-items: center; justify-content: center; padding: 0;
}

/* ===== LOT STATUS BAR ===== */
.lot-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.lot-bar-item { color: var(--text-muted); }
.lot-bar-item strong { color: var(--text-primary); font-weight: 500; }

/* ===== EDIT MODAL ===== */
.edit-field-current {
  background: var(--bg-tertiary);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 1.8rem; margin-bottom: 8px; opacity: 0.4; }
.empty-state p { font-size: 0.85rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { width: 50px; }
  .sidebar-link span:not(.icon) { display: none; }
  .sidebar-section-title { display: none; }
  .sidebar-link { justify-content: center; padding: 9px; }
  .sidebar-link .icon { margin: 0; }
  .moldeo-layout { grid-template-columns: 1fr; }
  .moldeo-left { border-right: none; border-bottom: 1px solid var(--border); }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .sidebar { display: none; }
  .top-nav-brand span { display: none; }
  html { font-size: 14px; }
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --bg-primary: #f5f1eb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #ebe7e0;
  --bg-elevated: #e0dbd3;
  --bg-hover: #f0ece5;
  --bg-input: #ffffff;

  --border: rgba(0,0,0,0.08);
  --border-subtle: rgba(0,0,0,0.04);

  --text-primary: #1a1815;
  --text-secondary: #6b6560;
  --text-muted: #9a938c;

  --accent: #b5703f;
  --accent-hover: #a06235;
  --accent-muted: rgba(181,112,63,0.08);

  --green: #4a8f56;
  --green-muted: rgba(74,143,86,0.08);
  --red: #b55454;
  --red-muted: rgba(181,84,84,0.08);
  --yellow: #a68632;
  --yellow-muted: rgba(166,134,50,0.08);
  --blue: #5a82a8;
  --blue-muted: rgba(90,130,168,0.08);

  --moldeado-color: #5a82a8;
  --volcado-color: #8a6ea8;
  --huevito-color: #a68632;
}

[data-theme="light"] body { background: var(--bg-primary); color: var(--text-primary); }

[data-theme="light"] .login-logo { filter: none; }
[data-theme="light"] .top-nav-brand img { filter: none; opacity: 0.85; }

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  border-color: rgba(0,0,0,0.12);
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: rgba(0,0,0,0.25);
}

[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="time"],
[data-theme="light"] input[type="datetime-local"] {
  color-scheme: light;
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.6;
}

[data-theme="light"] .product-btn.sel-moldeado { background: rgba(90,130,168,0.10); color: var(--moldeado-color); border-color: rgba(90,130,168,0.25); }
[data-theme="light"] .product-btn.sel-volcado { background: rgba(138,110,168,0.10); color: var(--volcado-color); border-color: rgba(138,110,168,0.25); }
[data-theme="light"] .product-btn.sel-huevito { background: rgba(166,134,50,0.10); color: var(--huevito-color); border-color: rgba(166,134,50,0.25); }

[data-theme="light"] .weight-ok { background: var(--green-muted); border-color: rgba(74,143,86,0.3); }
[data-theme="light"] .weight-bad { background: var(--red-muted); border-color: rgba(181,84,84,0.3); }

[data-theme="light"] .pote-dot.filled { background: var(--green); }
[data-theme="light"] .pote-dot.current { border-color: var(--accent); }

[data-theme="light"] .btn-ghost { color: var(--text-secondary); }
[data-theme="light"] .btn-ghost:hover { background: var(--bg-tertiary); }

[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.18); }

/* Theme toggle button */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: color .12s;
  display: flex;
  align-items: center;
}
.theme-toggle:hover { color: var(--text-primary); }
