/* Enhanced Dashboard with Semantic Colors and Smart Layout */

/* Stats Cards with Semantic Colors */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--md-corner-radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--md-elevation-1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--neutral-color);
    transition: background-color 0.3s ease;
}

/* Semantic Colors for Stats */
.stat-card.reservations::before {
    background: var(--reservations-color);
}

.stat-card.occupation::before {
    background: var(--occupation-color);
}

.stat-card.covers::before {
    background: var(--covers-color);
}

.stat-card.revenue::before {
    background: var(--revenue-color);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-2);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
}

/* Dashboard Middle Section - 2 Cards */
.dashboard-middle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Alerts & Actions Card */
.alerts-card {
    background: var(--bg-card);
    border-radius: var(--md-corner-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
}

.alerts-card::before {
    display: none;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.alerts-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.alerts-content {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--md-corner-radius-small);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.alert-item:hover {
    background: var(--bg-hover);
}

.alert-item.urgent {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--alert-color);
}

.alert-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--occupation-color);
}

.alert-item.info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--reservations-color);
}

.alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-message {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.alert-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Performance Card */
.performance-card {
    background: var(--bg-card);
    border-radius: var(--md-corner-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
    position: relative;
}

.performance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--performance-color);
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.performance-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.performance-content {
    padding: 1.5rem;
}

.performance-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-change {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.metric-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: var(--covers-color);
}

.metric-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--alert-color);
}

.metric-change.neutral {
    background: rgba(107, 114, 128, 0.2);
    color: var(--neutral-color);
}

.performance-chart {
    height: 120px;
    background: var(--bg-primary);
    border-radius: var(--md-corner-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    position: relative;
}

.mini-chart {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Dashboard Bottom Section - Floor Plan + Tables */
.dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Mini Floor Plan Card */
.mini-floorplan-card {
    background: var(--bg-card);
    border-radius: var(--md-corner-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-floorplan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-2);
}

.mini-floorplan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.mini-floorplan-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.mini-floorplan-content {
    padding: 1.5rem;
    height: 250px;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

.mini-table {
    position: absolute;
    width: 30px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-table:hover {
    transform: scale(1.2);
    z-index: 10;
}

.mini-table.available {
    background: var(--covers-color);
}

.mini-table.reserved {
    background: var(--reservations-color);
}

.mini-table.occupied {
    background: var(--occupation-color);
}

.mini-table.cleaning {
    background: var(--revenue-color);
}

.mini-table.unavailable {
    background: var(--neutral-color);
}

/* Tables & Remarks Card */
.tables-remarks-card {
    background: var(--bg-card);
    border-radius: var(--md-corner-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
}

.tables-remarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.tables-remarks-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tables-remarks-content {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.table-remark-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--md-corner-radius-small);
    transition: background-color 0.2s ease;
}

.table-remark-item:hover {
    background: var(--bg-hover);
}

.table-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.table-status-dot.available {
    background: var(--covers-color);
}

.table-status-dot.reserved {
    background: var(--reservations-color);
}

.table-status-dot.occupied {
    background: var(--occupation-color);
}

.table-status-dot.cleaning {
    background: var(--revenue-color);
}

.table-remark-content {
    flex: 1;
}

.table-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.table-remark {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.table-time {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-middle,
    .dashboard-bottom {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-middle,
    .dashboard-bottom {
        gap: 1rem;
    }
    
    .mini-floorplan-content {
        height: 200px;
    }
    
    .alerts-content,
    .tables-remarks-content {
        max-height: 200px;
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}