/* MamaMIAA · Owner Panel Stylesheet */
:root {
  --bg-deep: #11080a;
  --bg-card: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.12);
  --txt: #ffffff;
  --mut: rgba(255, 255, 255, 0.55);
  --red: #e63946;
  --cheese: #f59e0b;
  --cheese-light: #fbbf24;
  --basil: #10b981;
  --basil-light: #34d399;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
}

[hidden] { display: none !important; }

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background-color: var(--bg-deep);
  color: var(--txt);
  min-height: 100vh;
  padding-bottom: 40px;
}

/* Header */
.owner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(26, 12, 16, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ot-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--cheese);
}
.ot-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ot-title-row b {
  font-size: 18px;
  font-weight: 900;
}
.badge-role {
  background: rgba(230, 57, 70, 0.2);
  color: #fca5a5;
  border: 1px solid var(--red);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.ot-brand small {
  color: var(--mut);
  font-size: 11.5px;
}

.ot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-ot-link {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.btn-ot-sound {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid var(--basil);
  color: var(--basil-light);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* Container */
.owner-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
}

/* Stats Cards */
.owner-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.stat-card.highlight {
  border-color: var(--cheese);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(230, 57, 70, 0.08));
}
.stat-card small {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--mut);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}
.stat-card b {
  font-size: 24px;
  font-weight: 900;
  display: block;
  line-height: 1.1;
  color: #fff;
}
.stat-sub {
  font-size: 12px;
  color: var(--cheese-light);
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

.stat-rate-edit {
  display: flex;
  gap: 6px;
  margin: 4px 0;
}
.stat-rate-edit input {
  width: 90px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.stat-rate-edit button {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.oven-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

/* Switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--basil); }
input:checked + .slider:before { transform: translateX(20px); }

/* Pestañas */
.owner-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.o-tab {
  background: none;
  border: none;
  color: var(--mut);
  font-size: 14px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}
.o-tab.active {
  background: var(--red);
  color: #fff;
}

/* Toolbar de Comandas */
.orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filters-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.f-pill {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--mut);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.f-pill.active {
  background: var(--cheese);
  color: #1a080c;
  border-color: var(--cheese);
}
.btn-refresh-orders {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* Lista de Comandas */
.orders-kanban-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kanban-card {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}
.kanban-card.status-nuevo { border-color: var(--red); background: rgba(230, 57, 70, 0.08); }
.kanban-card.status-horno { border-color: var(--cheese); background: rgba(245, 158, 11, 0.08); }
.kanban-card.status-empaque { border-color: #38bdf8; background: rgba(56, 189, 248, 0.08); }
.kanban-card.status-delivery { border-color: #a855f7; background: rgba(168, 85, 247, 0.08); }
.kanban-card.status-entregado { border-color: var(--basil); opacity: 0.6; }

.kc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.kc-head-code b { font-size: 18px; font-weight: 900; }
.kc-head-code small { font-size: 12px; color: var(--mut); display: block; }
.kc-head-right { text-align: right; }
.kc-total-usd { font-size: 18px; font-weight: 900; color: var(--cheese-light); }
.kc-total-bs { font-size: 11.5px; color: var(--mut); display: block; }

.kc-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
}
.kc-details-grid div small { color: var(--mut); display: block; font-size: 10.5px; }

.kc-items-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.kc-item-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.kc-item-line b { font-weight: 800; }
.kc-item-desc { font-size: 11px; color: var(--cheese-light); padding-left: 20px; }

.kc-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  flex-wrap: wrap;
}
.kc-status-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.kc-status-pill.nuevo { background: var(--red); color: #fff; }
.kc-status-pill.horno { background: var(--cheese); color: #1a080c; }
.kc-status-pill.empaque { background: #38bdf8; color: #082f49; }
.kc-status-pill.delivery { background: #a855f7; color: #fff; }
.kc-status-pill.entregado { background: var(--basil); color: #064e3b; }

.kc-step-buttons {
  display: flex;
  gap: 6px;
}
.btn-kc-step {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-kc-step:hover {
  background: var(--red);
  border-color: var(--red);
}

/* Tabla de Productos */
.products-table-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.ptc-head { margin-bottom: 16px; }
.ptc-head b { font-size: 17px; font-weight: 900; display: block; }
.ptc-head small { font-size: 12px; color: var(--mut); }

.products-list-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.pt-row-info b { font-size: 14px; font-weight: 800; display: block; }
.pt-row-info small { font-size: 11.5px; color: var(--mut); }
.pt-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pt-price-input {
  width: 70px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  color: var(--cheese-light);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 6px;
}

/* Formulario de Configuración */
.settings-form-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 600px;
}
.settings-form-card h3 { font-size: 18px; font-weight: 900; margin-bottom: 16px; }
.s-field { margin-bottom: 12px; }
.s-field label, .s-field-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt-dim);
  display: block;
}
.s-field input, .s-field-row input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  margin-top: 4px;
}
.s-field-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.btn-save-settings {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 12px;
}
