/* RUWA Restaurant Owner Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background: #ffffff;
    color: #212121;
    line-height: 1.6;
}

.header {
    background: #ffffff;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    color: #212121;
    font-size: 2rem;
    font-weight: 600;
}

.sync-info {
    color: #757575;
    font-size: 0.9rem;
}

.nav-container {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.mobile-menu-btn {
    display: none;
    background: #F4B400;
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-tabs {
    display: flex;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    background: none;
    border: none;
    padding: 16px 20px;
    cursor: pointer;
    color: #757575;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: #212121;
    background: rgba(244, 180, 0, 0.1);
}

.nav-tab.active {
    color: #F4B400;
    border-bottom-color: #F4B400;
    background: rgba(244, 180, 0, 0.1);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #F4B400;
}

.kpi-card h3 {
    color: #757575;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    color: #212121;
    font-size: 2rem;
    font-weight: 700;
}

.kpi-value.error {
    color: #d32f2f;
}

.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 300px;
    position: relative;
    overflow: hidden;
}

.chart-container canvas {
    max-width: 100% !important;
    max-height: 250px !important;
    width: 100% !important;
    height: 250px !important;
}

.chart-container h3 {
    color: #212121;
    margin-bottom: 16px;
    font-weight: 600;
}

.tables-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.table-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table-container h3 {
    color: #212121;
    margin-bottom: 16px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f5f5f5;
    color: #212121;
    font-weight: 600;
    font-size: 0.9rem;
}

.filters {
    background: #f5f5f5;
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filters select, .filters input {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #ffffff;
    color: #212121;
}

.branch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.branch-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #F4B400;
}

.branch-card h4 {
    color: #212121;
    margin-bottom: 16px;
    font-weight: 600;
}

.branch-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metric {
    text-align: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212121;
}

.metric-label {
    font-size: 0.8rem;
    color: #757575;
    text-transform: uppercase;
}

.search-bar {
    margin-bottom: 24px;
}

.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.alerts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.alert-card {
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.alert-card.critical {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
}

.alert-card.warning {
    background: #fff3e0;
    border-left: 4px solid #f57c00;
}

.alert-card h4 {
    color: #212121;
    margin-bottom: 8px;
}

.supplier-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.summary-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.summary-card h4 {
    color: #757575;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.notification-center {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.notification-item {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.notification-item.critical {
    border-left: 4px solid #d32f2f;
    background: #ffebee;
}

.notification-item.warning {
    border-left: 4px solid #f57c00;
    background: #fff3e0;
}

.notification-content h4 {
    color: #212121;
    margin-bottom: 4px;
}

.notification-content p {
    color: #757575;
    font-size: 0.9rem;
}

.notification-action {
    background: #F4B400;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

/* Tablet View */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .kpi-section {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .tables-section {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        padding: 0 16px;
    }
    
    .nav-tab {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .header {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-tabs {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 0;
    }
    
    .nav-tabs.show {
        display: flex;
    }
    
    .nav-tab {
        padding: 16px 24px;
        border-bottom: 1px solid #e0e0e0;
        text-align: left;
        width: 100%;
    }
    
    .nav-tab:last-child {
        border-bottom: none;
    }
    
    .main-content {
        padding: 16px 8px;
    }
    
    .kpi-section {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .kpi-card {
        padding: 16px;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-container {
        padding: 16px;
        height: 250px;
    }
    
    .chart-container canvas {
        max-height: 200px !important;
        height: 200px !important;
    }
    
    .tables-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .table-container {
        padding: 16px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .filters {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .filters select, .filters input {
        width: 100%;
    }
}

/* Small Mobile View */
@media (max-width: 480px) {
    .kpi-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .kpi-card {
        padding: 12px;
    }
    
    .kpi-value {
        font-size: 1.3rem;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .chart-container canvas {
        max-height: 170px !important;
        height: 170px !important;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 6px 4px;
    }
}