/* Basic shared styles for the app */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background:#000000; color:#e5e5e5; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; display: flex; flex-direction: column; }
a { color: #a0a0a0; }

/* Header */
.site-header { background:#1a1a1a; border-bottom:1px solid #333333; }
.site-header__top { display:flex; justify-content:space-between; align-items:center; padding:12px 18px; }
.site-header__brand { display:flex; align-items:center; gap:10px; font-weight:700; color:#e5e5e5; }
.site-header__logo { width:36px; height:36px; object-fit:cover; border-radius:6px; }
.site-header__title { font-size:16px; letter-spacing:0.3px; }
.site-header__actions { display:flex; gap:12px; align-items:center; }
.site-header__user { color:#a0a0a0; font-size:14px; }
.site-header__logout, .site-header__login { background:#404040; color:#fff; padding:8px 12px; border-radius:8px; text-decoration:none; font-size:14px; }

/* Footer */
.site-footer { 
    border-top:1px solid #333333; 
    background:#1a1a1a; 
    margin-top: auto; 
}
.site-footer__inner { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 12px 16px; 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
    color:#a0a0a0; 
    font-size:14px; 
}

/* Containers & common */
.container { color:#e5e5e5; }
.topbar { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 32px;
}
.button { background:#404040; color:#fff; }

/* Forms */
label { color:#a0a0a0; }
input, select, textarea { background:#1a1a1a; color:#e5e5e5; border:1px solid #333333; border-radius:8px; }
button { background:#404040; color:#fff; border:none; border-radius:8px; }
.error { background:#2a2a2a; color:#ff6b6b; border:1px solid #ff4444; }
.hint { color:#a0a0a0; }

/* Admin Dashboard */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 20px;
}

.admin-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.admin-card h3 {
    color: #e5e5e5;
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.admin-card p {
    color: #888;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.admin-card .button {
    display: inline-block;
    background: #333;
    color: #e5e5e5;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.admin-card .button:hover {
    background: #444;
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}
.admin-card { background:#1a1a1a; border: 1px solid #333333; border-radius: 12px; padding: 20px; }
.admin-card h3 { margin: 0 0 10px 0; color:#e5e5e5; }
.admin-card p { margin: 0 0 15px 0; color:#a0a0a0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #333333; }
th { background:#1a1a1a; color:#e5e5e5; font-weight: 600; }
td { color:#a0a0a0; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color:#a0a0a0; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; background:#1a1a1a; color:#e5e5e5; border: 1px solid #333333; border-radius: 8px; }
.form-group textarea { height: 80px; resize: vertical; }
.form-group select option {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: 8px;
}
.form-group select {
    width: 100%;
    padding: 8px;
    background: #333;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

/* Buttons */
.btn { display: inline-block; padding: 8px 16px; background:#404040; color:#fff; text-decoration: none; border-radius: 6px; border: none; cursor: pointer; }
.btn:hover { background:#505050; }
.btn-primary { background:#3b82f6; }
.btn-danger { background:#ef4444; }
.btn-success { background:#10b981; }

/* Waiter Dashboard Styles */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.table-card {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.table-card.available {
    border-left: 4px solid #4CAF50;
}

.table-card.occupied {
    border-left: 4px solid #f44336;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.order-card {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.menu-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
}

.menu-item {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.menu-item input[type="number"] {
    width: 60px;
    margin-right: 1rem;
}

.dashboard-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 50px 0;
}

.dashboard-buttons .btn {
    padding: 20px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.dashboard-buttons .btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: black;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    -webkit-text-size-adjust: 100%;
    max-width: 600px;
    margin: 2rem auto;
    gap: 3rem; /* Increased gap between cards */
    padding: 2rem;
}

    /* Global responsive styles */
    @media (max-width: 768px) {
        body {
            font-size: 16px;
        }

        .container {
            padding: 10px;
            width: 100%;
            box-sizing: border-box;
        }

        button, input, select, textarea {
            font-size: 16px; /* Prevents iOS zoom on focus */
        }

        .btn {
            padding: 10px 15px;
            min-height: 44px; /* Minimum touch target size */
        }
    }

    @media (max-width: 480px) {
        h1 { font-size: 1.5rem; }
        h2 { font-size: 1.3rem; }
        h3 { font-size: 1.1rem; }
    }

.dashboard-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    width: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.dashboard-card p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

.dashboard-card .btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #333;  /* Changed from #007bff to dark gray */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.dashboard-card .btn:hover {
    background: #444;  /* Changed from #0056b3 to lighter gray */
}

.container h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.container p {
    color: #ccc;
    margin-bottom: 2rem;
}

.content-section {
    padding: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.data-table td small {
    display: block;
    color: #888;
    font-size: 0.85em;
    margin-top: 2px;
}

.menu-categories {
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 10px 0;
}

.category-section {
    margin-bottom: 20px;
}

.category-section h4 {
    color: #fff;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 0 0 10px 0;
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

select option:disabled {
    color: #666;
    font-style: italic;
}

/* Modal Styles */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    margin-top: 0;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.order-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-items {
    margin-top: 20px;
}

.order-items table {
    width: 100%;
    margin-top: 10px;
}

#orderDetails .status-badge {
    display: inline-block;
    margin: 0 5px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 32px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.topbar-left h1 {
    margin: 0;
    margin-left: 1rem;
}

.btn {
    text-decoration: none;
    display: inline-block;
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-right: 20px;
    min-width: 280px;
    justify-content: flex-end;
}

.btn {
    background: #333;
    color: white;
    border: 1px solid #444;
    padding: 6px 17px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-serve {
    background: #22c55e;
    margin-left: 24px;
    padding: 6px 16px;
    font-weight: 500;
}

.btn-serve:hover {
    background: #16a34a;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #dc2626;
    color: white;
}

.status-ready {
    background: #22c55e;
    color: white;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.stat-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
}

.stat-value {
    font-size: 2em;
    color: #22c55e;
    margin: 10px 0;
}

.best-selling-list {
    list-style: none;
    padding: 0;
}

.best-selling-list li {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.best-selling-list li:last-child {
    border-bottom: none;
}

.best-selling-list span {
    color: #888;
    font-size: 0.9em;
}

.filter-section {
    padding: 0 20px;
    margin-bottom: 20px;
}

.filter-form select {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e5e5e5;
    padding: 8px;
    border-radius: 4px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 32px;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-select {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e5e5e5;
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 120px;
    cursor: pointer;
}

.filter-select:hover {
    border-color: #444;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 0 20px;
    border: 1px solid #333;
    border-radius: 8px;
}

.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.table-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.data-table {
    width: 100%;
}

.data-table thead {
    position: sticky;
    top: 0;
    background: #111;
    z-index: 1;
}

/* Stats Cards Styling */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
    margin: 20px 0;
    padding: 0 32px;
}

.stats-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px 32px;
    height: 300px;
    display: flex;
    width: 580px;
    flex-direction: column;
}

.stats-card:last-child {
    margin-right: 0;
}

.stats-card h3 {
    margin: 0 0 16px 0;
    color: #e5e5e5;
    font-size: 1.1rem;
    text-align: center;
}

.stats-value {
    font-size: 2.2rem;
    color: #22c55e;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.best-selling {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.best-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #333;
}

.best-item:last-child {
    border-bottom: none;
}

.btn-generate {
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: -0px;
}

.btn-generate12 {
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: -18px;
    width: 300px;
}

.btn-generate:hover {
    background: #16a34a;
}


