/**
 * Enterprise Cafeteria POS System
 * Tables & Floor Management CSS
 */

.tables-module-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg-app);
  overflow: hidden;
}

.tables-top-bar {
  padding: 10px 16px;
  background: var(--bg-header-gradient);
  border-bottom: 1px solid var(--border-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floor-tabs-group {
  display: flex;
  gap: 6px;
}

.tables-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.floor-plan-viewport {
  flex: 1;
  padding: 24px;
  overflow: auto;
  position: relative;
  background-color: #dce1e8;
  background-image: 
    linear-gradient(#cfd5de 1px, transparent 1px),
    linear-gradient(90deg, #cfd5de 1px, transparent 1px);
  background-size: 20px 20px;
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.table-token {
  height: 120px;
  background: #ffffff;
  border: 2px solid #8e97a4;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.table-token:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.table-token.round {
  border-radius: 50%;
  height: 125px;
  width: 125px;
  margin: auto;
  justify-content: center;
  text-align: center;
  gap: 4px;
}

.table-token.rectangle {
  grid-column: span 2;
  height: 120px;
}

/* Status Variations */
.table-token.status-available {
  border-color: #2e7d32;
  background: linear-gradient(180deg, #f1f8f3 0%, #e2f0e5 100%);
}

.table-token.status-occupied {
  border-color: #c62828;
  background: linear-gradient(180deg, #fff5f5 0%, #fde8e8 100%);
}

.table-token.status-reserved {
  border-color: #ef6c00;
  background: linear-gradient(180deg, #fffaf3 0%, #feede0 100%);
}

.table-token.status-cleaning {
  border-color: #0277bd;
  background: linear-gradient(180deg, #f1f9fe 0%, #e3f2fd 100%);
}

.table-token-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-token-name {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--text-heading);
}

.table-token-seats {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

.table-token-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.table-status-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-token-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  padding-top: 4px;
}
