/* Restaurant Menu CMS - Main Stylesheet */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Public Site Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Restaurant Header */
.restaurant-header {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: white;
    padding: 2rem 0;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 1;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.restaurant-meta {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.restaurant-meta span {
    opacity: 0.9;
}

/* Restaurant Grid */
.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.restaurant-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.restaurant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.restaurant-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.restaurant-placeholder {
    width: 100%;
    height: 200px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.restaurant-info {
    padding: 1.5rem;
}

.restaurant-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.description {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.address, .phone {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* Menu Images Grid */
.menu-notice {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notice-icon {
    font-size: 1.5rem;
}

.menu-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.menu-image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.menu-image-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.menu-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s;
}

.menu-image-wrapper:hover .menu-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.menu-image-wrapper:hover .image-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.zoom-icon {
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-image-wrapper:hover .zoom-icon {
    opacity: 1;
}

.menu-image-title {
    padding: 1.5rem;
    font-size: 1.25rem;
    color: var(--gray-900);
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--gray-400);
}

.lightbox-content {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    text-align: center;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-primary {
    background: var(--primary);
}

.btn-secondary {
    background: var(--gray-600);
}

.btn-secondary:hover {
    background: var(--gray-700);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    text-decoration: none;
    color: white;
    background: var(--primary);
    border-radius: 4px;
    display: inline-block;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-sm:hover {
    background: var(--primary-dark);
}

.btn-sm.btn-danger {
    background: var(--danger);
}

.btn-block {
    width: 100%;
}

/* Footer */
footer {
    background: var(--gray-900);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.no-results {
    text-align: center;
    color: var(--gray-600);
    padding: 2rem;
}
/* Admin Styles */
.admin-body {
    background: var(--gray-100);
}

.admin-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-icon {
    font-size: 2rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--gray-700);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: var(--danger);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #b91c1c;
}

.admin-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 2rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-right: 3px solid var(--primary-dark);
}

.nav-icon {
    font-size: 1.25rem;
}

.admin-main {
    flex: 1;
    padding: 2rem;
}

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

.page-header h1 {
    font-size: 2rem;
    color: var(--gray-900);
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.text-center {
    text-align: center;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active, .badge-available {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive, .badge-unavailable {
    background: #fee2e2;
    color: #991b1b;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-sm {
    max-width: 400px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--gray-900);
}

.modal-content form {
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.login-box .subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.login-footer a {
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--primary);
}

.demo-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 6px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.demo-info strong {
    color: var(--gray-900);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

/* Dashboard Section */
.dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    margin-bottom: 1rem;
    color: var(--gray-900);
}

/* Admin Menu Images */
.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 6px;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
}

.menu-images-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-image-admin-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.menu-image-preview {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--gray-100);
}

.menu-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-image-info {
    padding: 1rem;
}

.menu-image-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.image-date {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 8px;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--gray-600);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Upload Modal */
.upload-instructions {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.upload-instructions ul {
    margin: 0.5rem 0 0 1.5rem;
    color: var(--gray-700);
}

.upload-instructions li {
    margin: 0.25rem 0;
}

.image-form-container {
    padding: 0;
}

.file-upload-area {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.file-upload-area.drag-over {
    border-color: var(--primary);
    background: var(--gray-50);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 3rem;
}

.upload-placeholder p {
    font-weight: 500;
    color: var(--gray-700);
}

.upload-placeholder small {
    color: var(--gray-600);
}

.image-preview-container {
    position: relative;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-preview {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-preview:hover {
    background: #b91c1c;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .restaurants-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-images-grid {
        grid-template-columns: 1fr;
    }
    
    .restaurant-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .actions {
        flex-wrap: wrap;
    }
}