.table-grid-container {
  background: var(--surface-2, #f0f0f0);
  padding: 32px;
  border-radius: 16px;
  margin: 0;
  margin: 0 auto;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  max-width: none;
  margin: 0;
  height: 100%;
}

.table-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  gap: 12px;
  position: relative;
}

.table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.table-card.selected {
  border-radius: 14px;
  border: 1px solid var(--border-strong, #7a7a7a);
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}

.table-card.idle {
  opacity: 0.6;
}

.table-card.bar-selectable {
  background: var(--surface);
}

.table-card.bar-selected {
  border: 1px solid var(--success, #10b981);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.table-card.bar-selected .table-status-btn {
  background: var(--success, #10b981);
  color: white;
  border: none;
}

.table-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: 1.2;
}

.table-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  line-height: 1.4;
}

.table-info-number {
  font-size: 16px;
  font-weight: 400;
}

.table-info-label {
  font-size: 14px;
  font-weight: 300;
}

.table-history-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
  line-height: 1.4;
  opacity: 0.7;
}

.table-history-btn:hover {
  color: var(--text);
  opacity: 1;
}

.table-status-btn {
  border: none;
  color: white;
  padding: 12px 40px;
  border-radius: 8px;
  font-weight: 400;
  cursor: pointer;
  font-size: 18px;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
  text-transform: none;
  line-height: 14px;
  width: 100%;
}

.table-status-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.table-status-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.table-status-btn.available {
  background: var(--success, #10b981);
  color: #fff;
}

.table-status-btn.picked {
  background: var(--surface-2, #e5e5e5);
  color: var(--text-muted);
}

.table-status-btn.unbooked {
  background: var(--surface-2, #e5e5e5);
  color: var(--text-muted);
  cursor: not-allowed;
}

.table-status-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 1400px) {
  .table-grid-container {
    margin: 0 40px 40px 40px;
  }
}

@media (max-width: 1200px) {
  .table-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .table-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .table-grid {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 15px;
  }
  
  .guest-info-section,
  .guest-info-main{
      flex-direction: column;
  }
  
  .table-grid-container {
    padding: 20px;
    margin: 0 20px 20px 20px;
  }
  
  .guest-info-main.notes {
      max-width: 100% !important;
      width: 100% !important;
  }
  
  .guest-info-main{
      padding: 20px !important;
  }
  
    .divider {
        display: none;
    }
}

/* Lock Functionality Styles */
.table-card.locked {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
}

.table-card.locked:hover {
  background: rgba(239, 68, 68, 0.10);
}

.table-card.reserved {
  opacity: 0.7;
}

.table-card.reserved.seated {
  opacity: 1;
  border-color: var(--success, #10b981);
  box-shadow: inset 0 0 0 1px var(--success, #10b981);
}
.table-card.reserved.seated .table-status-btn {
  background: var(--success, #10b981);
  color: #fff;
}

.table-card.pending-payment {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  opacity: 0.9;
}

.table-card.pending-payment:hover {
  background: rgba(245, 158, 11, 0.13);
}

.table-card.unbooked {
  opacity: 0.5;
}

.table-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-lock-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 56px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(44, 29, 20, 0.08);
}

/* Hide lock button by default for available tables */
.table-lock-btn.hover-only {
  opacity: 0;
  visibility: hidden;
}

/* Show lock button on table hover for available tables */
.table-card:hover .table-lock-btn.hover-only {
  opacity: 1;
  visibility: visible;
}

/* Always show unlock button for locked tables */
.table-lock-btn.visible {
  opacity: 1;
  visibility: visible;
}

/* Lock button styling */
.table-lock-btn.lock {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-muted);
}

.table-lock-btn.lock:hover {
  background: var(--surface-3, #5a6268);
  transform: translateY(-1px);
}

/* Unlock button styling */
.table-lock-btn.unlock {
  background: var(--success, #10b981);
  color: white;
}

.table-lock-btn.unlock:hover {
  background: var(--success, #059669);
  transform: scale(1.1);
}

.table-lock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Check-in button styling */
.table-checkin-btn {
  position: absolute;
  top: 12px;
  right: 76px;
  min-width: 76px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(44, 29, 20, 0.08);
  background: var(--success, #10b981);
  color: white;
  opacity: 1;
  visibility: visible;
}

.table-checkin-btn:hover {
  background: var(--success, #059669);
  transform: translateY(-1px);
}

.table-checkin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.table-status-btn.locked {
  background: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
  cursor: not-allowed;
}

.table-status-btn.locked:hover {
  background: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
  transform: none;
}

.table-grid-grouped {
  display: grid;
  gap: 18px;
}

.table-type-section {
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 203, 183, 0.76);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.table-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.table-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Minimal reset */
.table-grid-container {
  padding: 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.table-type-section {
  padding: 16px;
  background: transparent;
  border-radius: 14px;
  box-shadow: none;
}

.table-type-header {
  margin-bottom: 12px;
  font-size: 1.15rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.table-card {
  border-radius: 12px;
  box-shadow: none;
}

.table-card:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}
