* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #2c3e50;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    padding: 0 20px 30px;
    border-bottom: 1px solid #3d5166;
    margin-bottom: 20px;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: #34495e;
    color: #fff;
    border-left: 3px solid #3498db;
}

.main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
}

.header {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 20px;
    color: #333;
}

.content {
    padding: 30px;
    flex: 1;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #999;
}

.chart-section,
.recent-orders {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chart-section h3,
.recent-orders h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.chart-container {
    height: 200px;
}

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

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table td {
    color: #333;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.action-bar,
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn.primary {
    background: #3498db;
    color: #fff;
}

.btn.primary:hover {
    background: #2980b9;
}

.btn.success {
    background: #27ae60;
    color: #fff;
}

.btn.danger {
    background: #e74c3c;
    color: #fff;
}

.btn.warning {
    background: #f39c12;
    color: #fff;
}

select,
input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

select:focus,
input:focus {
    outline: none;
    border-color: #3498db;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.table-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.table-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.table-card.available {
    border-top: 3px solid #27ae60;
}

.table-card.occupied {
    border-top: 3px solid #e74c3c;
}

.table-card.ordered {
    border-top: 3px solid #f39c12;
}

.table-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.table-status {
    font-size: 12px;
    color: #999;
}

.settings-form {
    max-width: 500px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
}

.settings-form h3 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
}

.form-group input {
    width: 100%;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.processing {
    background: #cce5ff;
    color: #004085;
}

.status-badge.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.action-btns {
    display: flex;
    gap: 5px;
}

.action-btns .btn {
    padding: 5px 10px;
    font-size: 12px;
}

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

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .logo {
        font-size: 14px;
        padding: 0 10px 20px;
    }
    
    .nav-item {
        padding: 12px 10px;
        text-align: center;
    }
    
    .main {
        margin-left: 60px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
