/* CreaMenu - Stile Principale per Landing Page e Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --accent: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

.btn-secondary {
    background-color: white;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* Alert notifications */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

/* Landing Page Header & Hero */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero {
    padding: 60px 0;
    text-align: center;
    background: radial-gradient(circle at top, var(--primary-light) 0%, transparent 70%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.feature-card {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Auth Cards */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
    padding: 40px 20px;
}

.auth-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 10px;
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Dashboard Layout */
.dash-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.dash-sidebar {
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.dash-menu {
    list-style: none;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dash-menu-link:hover, .dash-menu-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.dash-content {
    padding: 40px;
    overflow-y: auto;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Cards & Sections */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 30px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Category Grid & Dishes styling */
.category-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dish-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.dish-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dish-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.dish-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.dish-price {
    font-weight: 700;
    color: var(--primary);
}

.dish-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    flex-grow: 1;
}

.dish-allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 15px;
}

.allergen-badge {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Allergen grid selector (in form) */
.allergen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.allergen-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.allergen-checkbox:hover {
    background: var(--primary-light);
}

.allergen-checkbox input {
    cursor: pointer;
}

/* Themes Grid in Dashboard */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.theme-selector-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.theme-selector-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.theme-selector-card.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.theme-preview-box {
    height: 120px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.theme-info-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.theme-info-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Admin lists */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background-color: #f1f5f9;
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-active {
    background-color: #d1fae5;
    color: #059669;
}

.badge-expired {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Modal simple style */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

/* QR Code Section style */
.qr-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

#qrcode {
    padding: 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Responsive constraints */
@media(max-width: 768px) {
    .dash-layout {
        grid-template-columns: 1fr;
    }
    .dash-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }
    .dash-content {
        padding: 20px;
    }
}
