/* ==========================================
   TABLE MANAGEMENT & FLOOR PLAN VIEW
   ========================================== */
.tables-view {
    flex: 1;
    padding: 22px 32px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #f8fafc;
}

.tables-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: #ffffff;
    padding: 16px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tables-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.area-filter-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.area-tab-btn {
    background: transparent;
    border: none;
    color: var(--brand-navy);
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.area-tab-btn:hover {
    color: var(--brand-red);
    background: rgba(255, 255, 255, 0.8);
}

.area-tab-btn.active {
    background: var(--brand-navy);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.table-legend-pills {
    display: flex;
    gap: 8px;
    align-items: center;
}

.legend-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-pill.avail {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.legend-pill.occ {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.legend-pill.draft {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Floor Grid */
.floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 20px;
}

.table-card {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(36, 38, 93, 0.1);
}

.table-card.available {
    border-color: #a7f3d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.table-card.available:hover {
    border-color: #10b981;
}

.table-card.occupied {
    background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
    border-color: #fca5a5;
}

.table-card.holding {
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
    border: 1.5px dashed #f59e0b;
}

.table-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.table-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--brand-navy);
    line-height: 1.2;
}

.table-area-tag {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.table-top-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.table-timer-badge {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Middle Preview */
.table-order-preview {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.table-order-preview.available-box {
    background: rgba(16, 185, 129, 0.04);
    border: 1px dashed #6ee7b7;
    align-items: center;
    justify-content: center;
    color: #059669;
    font-size: 12.5px;
    font-weight: 700;
    padding: 18px 12px;
}

.table-order-preview.draft-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1px dashed #fcd34d;
}

.ro-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ro-items-snippet {
    font-size: 11.5px;
    color: var(--brand-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.85;
}

.table-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    margin-top: auto;
    margin-bottom: 12px;
}

.table-guests {
    font-weight: 700;
    color: var(--brand-navy);
}

/* ==========================================
   STRUCTURED TABLE ACTION BUTTONS
   ========================================== */
.table-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.table-btn {
    border: none;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.table-btn.primary {
    background: var(--brand-navy);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(36, 38, 93, 0.2);
}
.table-btn.primary:hover {
    background: #181a42;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(36, 38, 93, 0.3);
}

.table-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}
.table-btn.success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.table-btn.secondary {
    background: #f1f5f9;
    color: var(--brand-navy);
    border: 1px solid var(--border-color);
}
.table-btn.secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: var(--brand-navy);
}

.table-btn.amber {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}
.table-btn.amber:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.table-btn.full-width {
    grid-column: 1 / -1;
    padding: 10px 14px;
    font-size: 13px;
}
