/* Restaurant Dashboard Custom Styles */

/* Dashboard Tabs */
.dashboard-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.dashboard-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.dashboard-tabs .nav-link:hover {
    color: #2563eb;
    border-bottom-color: #93c5fd;
}

.dashboard-tabs .nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: none;
}

/* Menu Item Card */
.menu-item-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.menu-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    gap: 1rem;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.kpi-icon.revenue { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.kpi-icon.orders { background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); }
.kpi-icon.aov { background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%); }
.kpi-icon.status { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.kpi-icon.prep-time { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }
.kpi-icon.rating { background: linear-gradient(135deg, #eab308 0%, #facc15 100%); }

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.kpi-comparison {
    font-size: 0.75rem;
    line-height: 1.4;
}

.kpi-comparison i {
    font-size: 0.7rem;
}

/* Metric Icons */
.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

/* Kanban Board Styles */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1400px) {
    .kanban-board {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    background: #f8fafc;
    border-radius: 12px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.kanban-header {
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.kanban-header.new-orders { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.kanban-header.preparing { background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); }
.kanban-header.ready { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.kanban-header.completed { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.kanban-header.cancelled { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }

.kanban-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 350px);
}

.kanban-body::-webkit-scrollbar {
    width: 6px;
}

.kanban-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Order Cards */
.order-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #e2e8f0;
}

.order-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateX(4px);
}

.order-card.urgent {
    border-left-color: #ef4444;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); }
    50% { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.order-id {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.order-timer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.order-timer i {
    font-size: 0.8rem;
}

.order-customer {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.order-customer i {
    color: #94a3b8;
    margin-right: 0.25rem;
}

.order-items {
    margin-bottom: 0.75rem;
}

.order-items ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #64748b;
}

.order-items li {
    padding: 0.15rem 0;
}

.order-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.order-meta .badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.order-total {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.order-total strong {
    color: #059669;
    font-size: 1.1rem;
}

.order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.order-actions .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
}

/* Stat Cards for Orders */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-card.new-orders { border-top-color: #f59e0b; }
.stat-card.preparing { border-top-color: #3b82f6; }
.stat-card.ready { border-top-color: #10b981; }
.stat-card.completed { border-top-color: #059669; }
.stat-card.cancelled { border-top-color: #ef4444; }
.stat-card.total { border-top-color: #8b5cf6; }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alert Styles */
.alert-sm {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* Charts */
canvas {
    max-height: 400px;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

.table thead th {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

/* List Group Items */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.875rem 1.25rem;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Popular Items */
#popularItems .list-group-item {
    transition: background-color 0.2s ease;
}

#popularItems .list-group-item:hover {
    background-color: #f8fafc;
}

/* Toast Notifications */
.toast {
    min-width: 300px;
}

/* Modal Enhancements */
.modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Form Switch Enhancement */
.form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .kpi-card {
        padding: 1rem;
    }

    .kpi-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .kpi-value {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Badge Enhancements */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* Card Shadow */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Metric Box */
.metric-box {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
}

.metric-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.metric-trend {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Heatmap */
.heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heatmap-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.heatmap-label {
    width: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.heatmap-cell {
    flex: 1;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* Insight Item */
.insight-item {
    padding-bottom: 1rem;
}

/* Animation utilities */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Success/Error animations */
.alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
