/* Mobile First CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 10px;
    font-size: 14px;
    line-height: 1.4;
}

h3 {
    color: white;
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Sticky Header - Mobile First */

.cart-summary {
    background: white;
    color: #2c3e50;
    padding: 8px 18px;
    border-radius: 16px;
    font-weight: bold;
    font-size: 0.8rem;
}

.view-cart-btn, .rating-btn, .admin-btn {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    width: 100%;
    max-width: 200px;
}

.rating-btn {
    background: #f39c12;
}

.admin-btn {
    background: #9b59b6;
}

.view-cart-btn:hover, .rating-btn:hover, .admin-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.restlogo {
    width: 25px;
    margin-left: 8px;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-section, .cart-section, .rating-section, .admin-section {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

/* Categories */
.category {
    margin-bottom: 16px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.category-title {
    font-size: 1.1rem;
    color: #e74c3c;
    display: flex;
    align-items: center;
}

.category-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #e74c3c;
    border-radius: 50%;
    margin-right: 6px;
}

.category-subtitle {
    font-size: 0.7rem;
    color: #7f8c8d;
    margin-left: 6px;
}

.toggle-icon {
    font-size: 1rem;
    color: #7f8c8d;
}

/* Menu Grid - Mobile First */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
}

.menu-item {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.item-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.item-details {
    padding: 10px;
}

.item-name {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.item-description {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-bottom: 6px;
    min-height: 20px;
    line-height: 1.3;
}

.item-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.add-to-cart {
    width: 100%;
    padding: 8px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.add-to-cart.added {
    background: #2ecc71;
}

.add-to-cart:hover {
    background: #2980b9;
}

.add-to-cart.added:hover {
    background: #27ae60;
}

/* Cart Styles */
.cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 3px;
}

.quantity-btn {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 2px;
    font-size: 0.7rem;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 2px 5px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.7rem;
}

.cart-total {
    font-size: 1rem;
    font-weight: bold;
    text-align: right;
    margin: 10px 0;
    color: #2c3e50;
}

.checkout-btn, .back-to-menu-btn, .submit-order-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    margin: 8px 0;
    transition: background 0.2s;
}

.checkout-btn {
    background: #2ecc71;
    color: white;
}

.checkout-btn:hover {
    background: #27ae60;
}

.back-to-menu-btn {
    background: #3498db;
    color: white;
}

.back-to-menu-btn:hover {
    background: #2980b9;
}

.submit-order-btn {
    background: #e74c3c;
    color: white;
}

.submit-order-btn:hover {
    background: #c0392b;
}

.empty-cart {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 12px 0;
}

/* Forms */
.checkout-form, .rating-form {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-group textarea {
    height: 70px;
    resize: vertical;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.error-message {
    color: #e74c3c;
    font-size: 0.7rem;
    margin-top: 4px;
    display: none;
}

/* Order Confirmation */
.order-confirmation, .rating-confirmation {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
    text-align: left;
    display: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.order-items-list {
    margin: 8px 0;
    padding-left: 16px;
}

.order-items-list li {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* Rating Section */
.star-rating {
    display: flex;
    gap: 4px;
    margin: 8px 0;
    justify-content: center;
}

.star {
    font-size: 1.8rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.star:hover, .star.active {
    color: #f39c12;
}

.rating-text {
    margin-top: 4px;
    font-weight: bold;
    color: #2c3e50;
    min-height: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.submit-rating-btn {
    width: 100%;
    padding: 10px;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 8px;
}

.submit-rating-btn:hover {
    background: #e67e22;
}

/* Confirmation Buttons */
.confirmation-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.return-to-menu-btn, .submit-another-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.return-to-menu-btn {
    background: #3498db;
    color: white;
}

.return-to-menu-btn:hover {
    background: #2980b9;
}

.submit-another-btn {
    background: #f39c12;
    color: white;
}

.submit-another-btn:hover {
    background: #e67e22;
}

/* Admin Section */
.admin-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 16px 0;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    padding: 10px 16px;
    background: #f8f9fa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #7f8c8d;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Orders List */
.orders-list {
    max-height: 400px;
    overflow-y: auto;
}

.order-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.order-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
}

.order-time {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.order-details {
    margin-bottom: 8px;
}

.order-table {
    font-weight: bold;
    color: #e74c3c;
}

.order-items {
    margin: 8px 0;
    padding-left: 16px;
}

.order-item {
    margin-bottom: 4px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.order-total {
    font-weight: bold;
    text-align: right;
    color: #27ae60;
    font-size: 1rem;
    margin-top: 8px;
}

.complete-order-btn {
    width: 100%;
    padding: 8px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 8px;
    font-size: 0.9rem;
}

.complete-order-btn:hover {
    background: #219a52;
}

.order-completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

/* Ratings List */
.ratings-list {
    max-height: 400px;
    overflow-y: auto;
}

.rating-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rating-dish {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
}

.rating-stars {
    color: #f39c12;
    font-size: 1.1rem;
}

.rating-feedback {
    color: #7f8c8d;
    font-style: italic;
    margin: 8px 0;
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
}

.rating-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Popular Items */
.popular-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.popular-category {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    border-left: 4px solid #3498db;
}

.popular-category h5 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.popular-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    background: white;
    border-radius: 4px;
    margin-bottom: 4px;
}

.popular-item-name {
    flex: 1;
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9rem;
}

.popular-item-count {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.no-popular {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
}

.recent-activity {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
}

.activity-item {
    padding: 6px 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.activity-item:last-child {
    border-bottom: none;
}

.empty-orders, .empty-ratings {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 30px 16px;
    font-size: 0.9rem;
}

/* Login Section */
.login-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
}

.login-container {
    width: 100%;
    max-width: 320px;
}

.login-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-card h2 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.login-card p {
    color: #7f8c8d;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    margin: 8px 0;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #2980b9;
}

.back-to-main-btn {
    width: 100%;
    padding: 8px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 8px;
    font-size: 0.9rem;
}

.back-to-main-btn:hover {
    background: #7f8c8d;
}

.login-note {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.login-note p {
    margin: 4px 0;
}

/* Modern Notification Styles */
.notification {
    position: fixed;
    top: 16px;
    right: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    max-width: 280px;
    font-size: 0.9rem;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-left: 4px solid #219a52;
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-left: 4px solid #a93226;
}

.notification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-left: 4px solid #2471a3;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-icon {
    font-size: 1.1rem;
}

/* Refresh Button Styles */
.refresh-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 8px;
    transition: background 0.2s;
    font-size: 0.8rem;
}

.refresh-btn:hover {
    background: #2980b9;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.admin-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Auto-refresh indicator */
.refresh-indicator {
    display: inline-block;
    margin-left: 8px;
    color: #7f8c8d;
    font-size: 0.7rem;
}

.refresh-indicator.loading {
    color: #3498db;
}

.refresh-indicator.success {
    color: #27ae60;
}

/* Collapsed Categories */
.collapsed .menu-grid {
    display: none;
}

.collapsed .category-subtitle::after {
    content: " (tap to view items)";
}

.category-subtitle::after {
    content: " (tap to hide items)";
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    body {
        font-size: 16px;
        padding: 15px;
    }

    .sticky-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 15px;
        gap: 15px;
    }

    .sticky-header h1 {
        font-size: 1.6rem;
        margin-bottom: 0;
    }

    .view-cart-btn, .rating-btn, .admin-btn {
        width: auto;
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .header-buttons {
        display: flex;
        gap: 8px;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }

    .item-image {
        height: 160px;
    }

    .form-row {
        flex-direction: row;
    }

    .admin-tabs {
        flex-direction: row;
        gap: 8px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .popular-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .confirmation-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .return-to-menu-btn, .submit-another-btn {
        flex: 1;
        max-width: 180px;
    }

    .restlogo {
        width: 30px;
        margin-left: 10px;
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .item-image {
        height: 180px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .popular-items-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .notification {
        max-width: 320px;
    }
}
/* Admin Section Full Height When Header Hidden */
.admin-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-top: 0; /* Remove top margin when header is hidden */
    min-height: calc(100vh - 30px); /* Take full viewport height */
}

/* When header is hidden, adjust main content spacing */
.sticky-header[style*="display: none"] + .main-content .admin-section {
    margin-top: 0;
}

/* Ensure admin content is properly spaced without header */
.sticky-header[style*="display: none"] + .main-content {
    margin-top: 0;
}

/* Tablet and desktop adjustments */
@media (min-width: 768px) {
    .admin-section {
        min-height: calc(100vh - 40px);
        padding: 20px;
    }
}
/* Footer Styles */
.restaurant-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 30px;
    padding: 40px 0 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-section h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.footer-section h4 {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section h5 {
    color: #3498db;
    margin-bottom: 8px;
    font-size: 1rem;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    color: #3498db;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #3498db;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-link:hover {
    background: #3498db;
    color: white;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-icon {
    font-size: 1.1rem;
    margin-top: 2px;
}

.contact-item a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.contact-item a:hover {
    color: #3498db;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-item p {
    margin: 5px 0;
    color: #bdc3c7;
}

.map-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 8px;
    transition: color 0.3s ease;
}

.map-link:hover {
    color: #c0392b;
}

.opening-hours {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #4a5f7a;
}

.hours-item span:first-child {
    color: #bdc3c7;
}

.hours-item span:last-child {
    color: #f39c12;
    font-weight: bold;
}

.footer-bottom {
    background: #1a252f;
    margin-top: 40px;
    padding: 20px 0;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #3498db;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .social-links {
        justify-content: flex-start;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .restaurant-footer {
        padding: 50px 0 0 0;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    .restaurant-footer {
        padding: 30px 0 0 0;
    }
    
    .footer-container {
        gap: 25px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .hours-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}