/* SALON VIEW */
.salon-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.salon-stats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.stat-pill {
  font-size: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.stat-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.stat-pill.free .dot { background: var(--accent-green); }
.stat-pill.busy .dot { background: var(--accent-orange); }
.stat-pill.kitchen .dot { background: var(--accent-purple); }

.takeaway-btn {
  background: var(--bg-card);
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  overflow-y: auto;
}

.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
  position: relative;
}

.table-card:active {
  transform: scale(0.97);
}

.table-card.free {
  border-top: 4px solid var(--accent-green);
}

.table-card.busy {
  border-top: 4px solid var(--accent-orange);
  background: #191c28;
}

.table-card.kitchen {
  border-top: 4px solid var(--accent-purple);
  background: #1a162b;
}

.table-card.pay {
  border-top: 4px solid var(--accent-yellow);
  background: #1f1b13;
}

.table-number {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.table-status-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
}

.table-card.free .table-status-label { color: var(--accent-green); }
.table-card.busy .table-status-label { color: var(--accent-orange); }
.table-card.kitchen .table-status-label { color: var(--accent-purple); }
.table-card.pay .table-status-label { color: var(--accent-yellow); }

.table-total {
  font-size: clamp(0.72rem, 3.2vw, 0.9rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-weight: 800;
  color: var(--accent-orange);
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.table-seats {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* KITCHEN VIEW */
.kitchen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.kitchen-orders-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  overflow-y: auto;
}

.kitchen-card {
  background: var(--bg-surface);
  border: 1px solid var(--accent-purple);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.kitchen-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.kitchen-card-table {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.kitchen-card-time {
  font-size: 11px;
  color: var(--accent-purple);
  font-weight: bold;
}

.kitchen-card-items {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  flex: 1;
}

.kitchen-item-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.kitchen-item-qty {
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: bold;
  color: var(--accent-orange);
}

.kitchen-item-note {
  display: block;
  font-size: 11px;
  color: var(--accent-yellow);
  font-style: italic;
}

.kitchen-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.kitchen-print-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #38bdf8;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.kitchen-print-btn:active {
  background: rgba(56, 189, 248, 0.2);
}

.kitchen-ready-btn {
  background: var(--accent-green);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}

/* CAJA VIEW */
.cash-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.cash-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
}
@media (max-width: 580px) {
  .cash-kpis {
    grid-template-columns: 1fr 1fr !important;
  }
  .cash-kpis .kpi-box:first-child {
    grid-column: 1 / -1 !important;
    border-left: 3px solid var(--accent-orange, #f97316) !important;
  }
}

.kpi-box {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.kpi-box span {
  font-size: 11px;
  color: var(--text-muted);
}

.kpi-box strong {
  font-size: 18px;
  color: #fff;
  margin-top: 4px;
}

.cash-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sales-history-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.sale-history-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* KDS COMPREHENSIVE RESPONSIVENESS */
.kitchen-card-items,
.kitchen-item-note,
.kitchen-card-notes {
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

@media (min-width: 768px) {
  .kitchen-card-items {
    max-height: 55dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}
