/* ═══════════════════════════════════════════════ */
/* FOODSOLOPRENEUR — PREMIUM DESIGN SYSTEM         */
/* ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0d9488;
    --primary-light: #2dd4bf;
    --primary-dark: #134e4a;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #fbbf24;
    --red: #ef4444;
    --green: #22c55e;
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.1) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(20, 184, 166, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--slate-700); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── LANDING PAGE ─── */
#landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-header .logo-img {
    max-width: 220px;
    height: auto;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 15px rgba(13, 148, 136, 0.3));
    animation: fadeInDown 1s ease-out;
}

.hero-title {
    font-size: clamp(2.2rem, 8vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-muted);
    max-width: 750px;
    margin-bottom: 3.5rem;
    font-weight: 400;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    transition: var(--transition);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-card:hover { transform: translateY(-5px); border-color: rgba(13, 148, 136, 0.3); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }

.feature-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.feature-card h3 { font-size: 1.25rem; font-weight: 700; color: #fff; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ─── APP WIZARD ─── */
#app {
    max-width: 900px;
    margin: 2rem auto 8rem;
    padding: 0 1.5rem;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    position: relative;
    padding: 0 0.5rem;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255,255,255,0.05);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition);
    color: var(--text-muted);
}

.step.active .step-circle {
    background: var(--primary);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 0 20px rgba(13, 148, 136, 0.4);
    transform: scale(1.1);
}

.step.completed .step-circle {
    background: var(--primary-dark);
    border-color: var(--primary);
    color: var(--primary-light);
}

.step-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); transition: var(--transition); }
.step.active .step-label { color: var(--primary-light); }

/* ─── SECTION TRANSITIONS ─── */
.step-content {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}
.step-content.active { display: block; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── CARDS ─── */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; display: flex; align-items: center; gap: 0.75rem; }

/* ─── FORM ELEMENTS ─── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.6rem; }
label { font-size: 0.9rem; color: #cbd5e1; font-weight: 500; }

input, select, textarea {
    padding: 0.9rem 1.2rem;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.85rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus { border-color: var(--primary); background: #1e293b; box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15); }

/* ─── DYNAMIC TABLES (DISHES) ─── */
.dish-card {
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.dish-header { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; margin-bottom: 1.5rem; }
.dish-foodcost {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: auto;
}
.foodcost-green { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.foodcost-yellow { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.foodcost-red { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

.ingredients-table-wrapper { overflow-x: auto; margin-bottom: 1rem; }
.ingredients-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.ingredients-table th { text-align: left; padding: 0.75rem; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.ingredients-table td { padding: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.ingredients-table input { padding: 0.5rem 0.75rem; font-size: 0.9rem; }

/* ─── BUTTONS ─── */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 1.1rem 2.5rem;
    border-radius: 1rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 15px 30px -10px rgba(13, 148, 136, 0.5);
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -10px rgba(13, 148, 136, 0.6); filter: brightness(1.1); }
.btn-primary:active { transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: #e2e8f0;
    padding: 0.9rem 2rem;
    border-radius: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

.btn-add-sm {
    background: transparent;
    border: 1px dashed var(--primary);
    color: var(--primary-light);
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-add-sm:hover { background: rgba(13, 148, 136, 0.1); border-style: solid; }

/* ─── DASHBOARD RESULTS ─── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    text-align: left;
}

.metric-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.metric-value { font-size: 1.75rem; font-weight: 800; color: var(--primary-light); margin-top: 0.5rem; }

.chart-container {
    background: rgba(15, 23, 42, 0.5);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

/* ─── ANIMATIONS ─── */
.pulse { animation: pulseAnim 2s infinite; }
@keyframes pulseAnim {
    0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(13, 148, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    #landing { padding: 1.5rem; }
    .hero-features { grid-template-columns: 1fr; }
    .step-label { display: none; }
    .dish-header { flex-direction: column; align-items: stretch; gap: 1rem; }
    .dish-foodcost { margin-left: 0; text-align: center; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .card { padding: 1.5rem; }
}

@media (max-width: 480px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .btn-primary { width: 100%; padding: 1.1rem 1rem; }
}

/* ─── STEP HEADER ─── */
.step-header { margin-bottom: 2rem; }
.step-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ─── FORM SECTIONS ─── */
.form-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--border); margin-bottom: 2rem; backdrop-filter: blur(20px); }
.form-section { margin-bottom: 2rem; }
.form-section h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 1.25rem; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 2rem; flex-wrap: wrap; }
.required { color: #f87171; }

/* ─── COST GRID ─── */
.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.cost-item { display: flex; align-items: center; gap: 1rem; background: rgba(15,23,42,0.4); padding: 1rem 1.25rem; border-radius: var(--radius-md); border: 1px solid var(--border); }
.cost-icon { font-size: 1.5rem; flex-shrink: 0; }
.cost-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.cost-info label { font-size: 0.9rem; color: #e2e8f0; font-weight: 500; }
.cost-unit { font-size: 0.75rem; color: var(--text-muted); }
.cost-item input { width: 130px; flex-shrink: 0; }
.cost-summary { background: rgba(13,148,136,0.1); border: 1px solid rgba(13,148,136,0.2); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; }
.cost-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; }
.cost-total strong { color: var(--primary-light); font-size: 1.25rem; }

/* ─── CHECKBOXES & RADIOS ─── */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; background: rgba(15,23,42,0.4); padding: 0.6rem 1rem; border-radius: 0.75rem; border: 1px solid var(--border); cursor: pointer; font-size: 0.9rem; transition: var(--transition); }
.checkbox-label:hover { border-color: var(--primary); background: rgba(13,148,136,0.05); }
.checkbox-label input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }
.rating-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.rating-label { display: flex; align-items: center; gap: 0.4rem; background: rgba(15,23,42,0.4); padding: 0.5rem 0.8rem; border-radius: 0.6rem; border: 1px solid var(--border); cursor: pointer; font-size: 0.8rem; transition: var(--transition); }
.rating-label span { color: var(--text-muted); }
.rating-label:has(input:checked) { border-color: var(--primary); background: rgba(13,148,136,0.15); }
.rating-label:has(input:checked) span { color: var(--primary-light); }
.rating-label input[type="radio"] { accent-color: var(--primary); }

/* ─── BUTTONS: ADD / REMOVE ─── */
.btn-add { display: block; width: 100%; background: transparent; border: 2px dashed rgba(13,148,136,0.4); color: var(--primary-light); padding: 1rem; border-radius: var(--radius-md); font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); margin-bottom: 1.5rem; }
.btn-add:hover { background: rgba(13,148,136,0.05); border-color: var(--primary); }
.btn-remove { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); padding: 0.4rem 0.8rem; border-radius: 0.5rem; cursor: pointer; font-size: 0.8rem; transition: var(--transition); }
.btn-remove:hover { background: rgba(239,68,68,0.2); }
.btn-lg { padding: 1.2rem 3rem; font-size: 1.15rem; }

/* ─── DASHBOARD CARDS ─── */
.dashboard-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--border); margin-bottom: 2rem; backdrop-filter: blur(20px); }
.dashboard-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.dashboard-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.chart-container { position: relative; height: 300px; }
.chart-doughnut { max-width: 400px; margin: 0 auto; }
.metric-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.metric-teal { border-left: 4px solid var(--primary); }
.metric-blue { border-left: 4px solid #3b82f6; }
.metric-amber { border-left: 4px solid #fbbf24; }
.metric-green { border-left: 4px solid #22c55e; }

/* ─── SCENARIOS ─── */
.scenarios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.scenario-card { background: rgba(15,23,42,0.5); padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--border); text-align: center; }
.scenario-label { font-weight: 600; margin-bottom: 0.75rem; font-size: 0.95rem; }
.scenario-revenue { font-size: 0.85rem; color: var(--text-muted); }
.scenario-profit { font-size: 1.5rem; font-weight: 800; margin: 0.5rem 0; }
.scenario-card.pessimistic .scenario-profit { color: #f87171; }
.scenario-card.moderate .scenario-profit { color: var(--primary-light); }
.scenario-card.optimistic .scenario-profit { color: #22c55e; }

/* ─── HEALTH CHECK ─── */
.health-check-card .health-q { margin-bottom: 1.5rem; }
.health-check-card .health-q label { font-weight: 500; display: block; margin-bottom: 0.5rem; color: #e2e8f0; }
.health-check-intro { color: var(--text-muted); margin-bottom: 1.5rem; }
.health-score { font-size: 3rem; font-weight: 800; text-align: center; }
.health-grade { font-size: 1.25rem; font-weight: 700; text-align: center; margin-bottom: 1rem; }
.health-advice { color: var(--text-muted); text-align: center; line-height: 1.6; }

/* ─── COMPETITOR CARDS ─── */
.competitor-card { background: rgba(15,23,42,0.4); border-radius: var(--radius-md); padding: 1.5rem; border: 1px solid var(--border); margin-bottom: 1.5rem; }
.competitor-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }

/* ─── TOAST ─── */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--card-bg); color: white; padding: 1rem 2rem; border-radius: 1rem; border: 1px solid var(--border); backdrop-filter: blur(20px); z-index: 9999; opacity: 0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 500; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── LOADING OVERLAY ─── */
#loading-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9998; gap: 1rem; color: var(--primary-light); font-weight: 600; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-top: 3px solid var(--primary-light); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── FOOTER ─── */
#footer { background: rgba(15,23,42,0.8); border-top: 1px solid var(--border); padding: 3rem 2rem; margin-top: 4rem; }
.footer-content { max-width: 900px; margin: 0 auto; text-align: center; }
.footer-logo { max-width: 120px; height: auto; margin-bottom: 1rem; filter: drop-shadow(0 0 10px rgba(13,148,136,0.2)); }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; }
.footer-links a { color: var(--primary-light); text-decoration: none; font-weight: 500; transition: var(--transition); }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 0.8rem; color: #475569; }

/* ═══════════════════════════════════════════════ */
/* PDF REPORT — Print-friendly white background    */
/* ═══════════════════════════════════════════════ */
.pdf-report {
    background: #ffffff;
    color: #1e293b;
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    max-width: 210mm;
    margin: 0 auto;
    padding: 20px 30px;
    font-size: 12px;
    line-height: 1.5;
}

.pdf-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 3px solid #0d9488;
    margin-bottom: 25px;
}

.pdf-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
}

.pdf-header h1 {
    color: #0d9488;
    font-size: 22px;
    margin: 10px 0 5px;
}

.pdf-header p {
    color: #64748b;
    font-size: 12px;
}

.pdf-section {
    margin-bottom: 25px;
    page-break-inside: avoid;
}

.pdf-section h2 {
    color: #0d9488;
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-metric {
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.pdf-metric .value {
    font-size: 20px;
    font-weight: 800;
    color: #0d9488;
}

.pdf-metric .label {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.pdf-table th {
    background: #f0fdfa;
    color: #0d9488;
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.pdf-table td {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    color: #334155;
}

.pdf-table tr:nth-child(even) { background: #f8fafc; }

.pdf-footer {
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid #e2e8f0;
    margin-top: 30px;
    color: #64748b;
    font-size: 11px;
}

.pdf-footer p { margin: 4px 0; }

/* ─── RESPONSIVE ADDITIONS ─── */
@media (max-width: 768px) {
    .cost-grid { grid-template-columns: 1fr; }
    .cost-item { flex-wrap: wrap; }
    .cost-item input { width: 100%; }
    .form-actions { flex-direction: column; }
    .form-actions button { width: 100%; }
    .scenarios-grid { grid-template-columns: 1fr; }
    .dashboard-actions { flex-direction: column; align-items: stretch; }
}
