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

:root {
  --bg: #050505;
  --panel: rgba(10, 10, 10, .84);
  --card: rgba(255, 255, 255, .055);
  --card-hover: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --red: #c41224;
  --red-dark: #8f0d18;
  --green: #10b981;
  --blue: #38bdf8;
  --amber: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button, input, select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.zyra-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 8%, rgba(196, 18, 36, .28), transparent 34%),
    radial-gradient(circle at 82% 90%, rgba(196, 18, 36, .2), transparent 34%),
    linear-gradient(135deg, #020202, #111 52%, #050505);
}

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45);
  backdrop-filter: blur(22px);
}

.glass-card {
  background: var(--card);
  border: 1px solid var(--line);
  transition: .18s ease;
}

.glass-card:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.zyra-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 92px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(0, 0, 0, .62);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-block {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.brand-block img {
  width: 60px;
  height: 60px;
}

.zyra-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zyra-sidebar a {
  color: var(--muted);
  text-decoration: none;
}

.zyra-sidebar nav a, .logout-link {
  width: 68px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid transparent;
}

.zyra-sidebar nav a.active {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 34px rgba(196, 18, 36, .28);
}

.zyra-sidebar span {
  font-size: 10px;
  font-weight: 800;
}

.logout-link {
  margin-top: auto;
}

.zyra-header {
  position: fixed;
  top: 0;
  left: 92px;
  right: 0;
  height: 88px;
  z-index: 15;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, .28);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.zyra-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.02em;
}

.header-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(196, 18, 36, .14);
  border: 1px solid rgba(196, 18, 36, .34);
  color: #fecdd3;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page {
  margin-left: 92px;
  padding: 104px 18px 18px;
  height: 100vh;
  overflow: hidden;
}

.grid-pos {
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 16px;
  height: 100%;
}

.panel {
  border-radius: 28px;
  padding: 22px;
  min-height: 0;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.select, .input {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: white;
  padding: 0 14px;
  outline: none;
}

.select option {
  background: #111827;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--line);
  font-weight: 900;
  white-space: nowrap;
}

.tab.active {
  background: white;
  color: #050505;
}

.products-grid, .tables-grid, .kds-grid, .cards-grid {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.products-grid {
  height: calc(100% - 112px);
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-content: start;
  grid-auto-rows: 134px;
}

.product-card {
  min-height: 134px;
  padding: 16px;
  border-radius: 22px;
  color: white;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.product-card strong {
  font-size: 17px;
  line-height: 1.18;
}

.product-card b {
  font-size: 26px;
}

.product-card small {
  color: var(--muted);
  font-weight: 800;
}

.ticket {
  display: flex;
  flex-direction: column;
}

.ticket-list {
  flex: 1;
  overflow-y: auto;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.row small, .empty {
  color: var(--muted);
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty button, .icon-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: white;
  font-weight: 900;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 18px 0;
}

.total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.total strong {
  font-size: 44px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  min-height: 54px;
  border-radius: 18px;
  padding: 0 16px;
  font-weight: 900;
  color: white;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
}

.btn.primary {
  background: linear-gradient(135deg, #fff, #cbd5e1);
  color: #050505;
}

.btn.red {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.btn.green {
  background: linear-gradient(135deg, #10b981, #047857);
}

.btn.full {
  grid-column: 1 / -1;
}

.tables-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.table-card {
  min-height: 142px;
  border-radius: 24px;
  padding: 18px;
  text-align: left;
  color: white;
}

.table-card.free { border-color: rgba(16, 185, 129, .35); }
.table-card.occupied { border-color: rgba(245, 158, 11, .45); }
.table-card.pending_payment { border-color: rgba(56, 189, 248, .45); }
.table-card.selected { outline: 2px solid white; }

.status-dot {
  display: inline-flex;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  background: var(--green);
}

.occupied .status-dot { background: var(--amber); }
.pending_payment .status-dot { background: var(--blue); }

.kds-grid {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.kds-card {
  border-radius: 26px;
  padding: 18px;
  border-left: 7px solid var(--amber);
}

.kds-card.preparing { border-left-color: var(--blue); }
.kds-card.ready { border-left-color: var(--green); }

.kds-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric {
  border-radius: 24px;
  padding: 22px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 16px;
  height: 100%;
}

.menu-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  border-radius: 34px;
  padding: 34px;
  text-align: center;
}

.login-card img {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: white;
  margin-bottom: 18px;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #334155;
}

.pin-dot.active { background: white; box-shadow: 0 0 12px white; }
.pin-dot.error { background: var(--red); box-shadow: 0 0 12px var(--red); }

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.numpad button {
  height: 66px;
  border-radius: 18px;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
}

.menu-view {
  width: min(1120px, 100%);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.menu-card {
  min-height: 210px;
  border-radius: 30px;
  padding: 24px;
  color: white;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-card i {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(196, 18, 36, .18);
  color: #fda4af;
  font-size: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translateX(-50%);
  background: rgba(16, 185, 129, .18);
  border: 1px solid rgba(16, 185, 129, .38);
  color: #bbf7d0;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(10px);
}

.receipt-modal {
  width: min(430px, 100%);
  border-radius: 28px;
  padding: 22px;
}

.receipt-paper {
  margin: 10px 0 18px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  font-family: "Courier New", monospace;
}

.receipt-paper h3 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 22px;
}

.receipt-paper p {
  margin: 6px 0 14px;
  text-align: center;
  color: #4b5563;
}

.receipt-row, .receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #d1d5db;
}

.receipt-total {
  margin-top: 12px;
  border-bottom: 0;
  font-size: 20px;
  font-weight: 900;
}

@media print {
  body > *:not(.modal-backdrop) {
    display: none !important;
  }
  .modal-backdrop {
    position: static;
    display: block;
    padding: 0;
    background: white;
  }
  .receipt-modal {
    width: 76mm;
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  .receipt-modal .section-head,
  .receipt-modal .actions {
    display: none;
  }
  .receipt-paper {
    border-radius: 0;
    margin: 0;
  }
}

/* Monitor estilo POS-PC */
.monitor-body {
  overflow: auto;
}

.btn-home {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 80;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.btn-home:hover {
  color: #050505;
  background: #fff;
}

.monitor-wrap {
  min-height: 100vh;
  padding: 32px;
}

.monitor-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.monitor-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.monitor-title-row img {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  object-fit: cover;
  background: white;
  border: 4px solid white;
}

.monitor-title-row h1 {
  margin: 0;
  font-size: 52px;
  letter-spacing: -.04em;
}

.monitor-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab-btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
}

.tab-active {
  color: #050505;
  background: white;
  box-shadow: 0 14px 34px rgba(255, 255, 255, .14);
}

.tab-inactive {
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border-color: var(--line);
}

.tab-badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--red);
  font-size: 11px;
}

.monitor-right {
  text-align: right;
}

.monitor-clock {
  font-family: "Courier New", monospace;
  font-weight: 900;
  font-size: 64px;
  letter-spacing: .04em;
}

.monitor-report-btn {
  margin-top: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  font-weight: 900;
}

.monitor-section {
  margin-bottom: 36px;
}

.monitor-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
  font-size: 20px;
  text-transform: uppercase;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 13px;
}

.stock-monitor-card {
  min-height: 150px;
  padding: 16px;
  border-radius: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.stock-monitor-card strong {
  display: block;
  line-height: 1.16;
}

.stock-monitor-card small {
  color: var(--muted);
  font-weight: 800;
}

.stock-monitor-number {
  align-self: end;
  text-align: right;
  font-family: "Courier New", monospace;
  font-size: 38px;
  font-weight: 900;
}

.stock-monitor-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-alert {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .34);
  animation: pulse-red 2s infinite;
}

.card-warning {
  background: rgba(245, 158, 11, .11);
  border-color: rgba(245, 158, 11, .32);
}

.card-success {
  background: rgba(16, 185, 129, .07);
  border-color: rgba(16, 185, 129, .22);
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .28); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.bg-red-500 { background: #ef4444; }
.bg-yellow-500 { background: #eab308; }
.bg-emerald-400 { background: #34d399; }
.text-red-400 { color: #f87171; }
.text-yellow-400 { color: #facc15; }
.text-emerald-400 { color: #34d399; }

/* ERP demo charts */
.erp-page {
  overflow: auto;
}

.erp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .75fr);
  gap: 16px;
  margin-top: 18px;
}

.erp-card {
  padding: 20px;
  border-radius: 24px;
  min-height: 280px;
}

.bar-chart {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 12px;
}

.bar-item {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  text-align: center;
}

.bar-value {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.bar-track {
  position: relative;
  border-radius: 999px 999px 10px 10px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #fb7185, var(--red));
}

.bar-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 190px;
}

.donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 36px;
  border-radius: 50%;
  background: #090909;
  border: 1px solid var(--line);
}

.category-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.category-row strong,
.category-row span {
  display: block;
}

.category-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-track {
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}

.category-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #fb7185);
}

@media (max-width: 980px) {
  .monitor-wrap {
    padding: 18px;
  }
  .monitor-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .monitor-title-row h1,
  .monitor-clock {
    font-size: 36px;
  }
  .erp-grid,
  .donut-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body { overflow: auto; }
  .zyra-sidebar { width: 76px; }
  .zyra-header { left: 76px; }
  .page { margin-left: 76px; height: auto; min-height: 100vh; }
  .grid-pos, .split { grid-template-columns: 1fr; }
  .metric-grid, .menu-grid { grid-template-columns: repeat(2, 1fr); }
}
