:root {
    --primary-color: #d94a38;
    --primary-hover: #c0392b;
    --bg-color: #fcfbf9;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #ecf0f1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

/* ==================================
   THEMES
   ================================== */
.theme-blu {
    --primary-color: #2980b9;
    --primary-hover: #2471a3;
}

.theme-verde {
    --primary-color: #27ae60;
    --primary-hover: #219a52;
}

.theme-rosa {
    --primary-color: #e84393;
    --primary-hover: #d63384;
}

.theme-scuro {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0b0;
    --border-color: #2a2a4a;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    margin: 0;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    margin: 0;
}

/* ==================================
   PUBLIC MENU PAGE
   ================================== */
.hero {
    background-color: #f3f2f0;
    background-image: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&q=80&w=1920');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 160px;
    height: 22vh;
    max-height: 260px;
}

.hero-heading {
    max-width: 800px;
    margin: 2.5rem auto 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.hero-heading h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.hero-heading p {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.hero-date {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.85;
    margin-top: 0.5rem;
}

.menu-container {
    max-width: 800px;
    margin: 2rem auto 3rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.category-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.category-title {
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 0;
    border-bottom: 1px dotted var(--border-color);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-item:hover {
    transform: translateX(5px);
}

.menu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-info {
    flex: 1;
    padding-right: 2rem;
}

.item-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.item-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
    white-space: nowrap;
}

.menu-allergens-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.allergens-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px dotted var(--text-muted);
    transition: color 0.3s;
}

.allergens-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.menu-notes-container {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border-color);
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--text-main);
    color: rgba(255, 255, 255, 0.7);
}

.admin-link {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s;
}

.admin-link:hover {
    color: white;
}

.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ==================================
   ADMIN PANEL
   ================================== */
.admin-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

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

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-color);
    padding: 0.75rem 0;
}

.tab-btn {
    flex: 1;
    min-height: 48px;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-secondary {
    background: #ecf0f1;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #bdc3c7;
}

.btn-danger {
    background: #e74c3c;
}

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

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

.admin-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.admin-list h3 {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.admin-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.admin-item-row.off {
    opacity: 0.55;
}

.admin-item-row .item-info-admin {
    flex: 1;
    min-width: 0;
}

.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.25rem 0.4rem;
    user-select: none;
    touch-action: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.items-sortable .drag-ghost {
    opacity: 0.5;
    box-shadow: var(--shadow-hover);
    background: var(--card-bg);
}

.avail-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    cursor: pointer;
}

.avail-toggle input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

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

/* Modal styles for simple editing */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-hover);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .hero {
        height: 140px;
        min-height: 120px;
        max-height: 160px;
    }

    .hero-heading h1 {
        font-size: 2.1rem;
    }

    .hero-heading p {
        font-size: 1rem;
    }

    .menu-item {
        flex-direction: column;
    }

    .item-info {
        padding-right: 0;
        margin-bottom: 0.5rem;
    }

    .category-section {
        padding: 1.5rem;
    }

    .admin-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}