/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Responsive Grid Classes */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 calc(20% - 0.75rem);
        width: calc(20% - 0.75rem);
    }
}

/* Action Tiles */
.action-tile {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.action-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.action-tile .display-4 {
    font-size: 2.5rem;
}

.action-tile .card-body {
    padding: 1.25rem 0.75rem;
}

/* PIN Input */
#pinInput {
    text-security: disc;
    -webkit-text-security: disc;
}

/* Tables Grid */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.table-card {
    padding: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.table-card.vacant {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.table-card.occupied {
    background-color: #fff3e0;
    color: #e65100;
}

.table-card.billing {
    background-color: #fce4ec;
    color: #c2185b;
}

.table-card.reserved {
    background-color: #f3e5f5;
    color: #512da8;
}

.table-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tablet responsive */
@media (min-width: 768px) {
    .table-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Item Grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.item-card {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.item-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.item-card .item-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.item-card .item-price {
    color: #28a745;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 350px;
    height: 100vh;
    background: white;
    border-left: 1px solid #ddd;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s;
    overflow-y: auto;
}

.cart-sidebar.active {
    transform: translateX(0);
}

/* KOT Cards */
.kot-card {
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background: #fff3f3;
}

.kot-card.cooking {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.kot-card.ready {
    border-left-color: #28a745;
    background: #f0fdf4;
}

/* Badges */
.badge-status {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Buttons */
.btn-sm-custom {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-block-custom {
    width: 100%;
    padding: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .item-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cart-sidebar {
        width: 100%;
    }
    
    .table-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Loading animation */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
button:focus, input:focus, select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}
