:root {
    --bg: #f6faf7;
    --surface: #ffffff;
    --surface-soft: #f2f8f4;
    --text: #162b23;
    --muted: #5c7268;
    --primary: #1f8f55;
    --primary-dark: #15693e;
    --primary-soft: #e8f4ed;
    --border: #d7e7dc;
    --shadow: 0 14px 34px rgba(20, 44, 35, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 18% -12%, #eef8f2, #f6faf7 48%) fixed;
    line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.site-main { padding: 1.5rem 0 3rem; min-height: calc(100vh - 150px); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 0;
}
.brand { font-weight: 800; font-size: 1.24rem; color: #125f3a; letter-spacing: .1px; }
.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: .5rem .75rem;
    color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: .9rem; }
.nav-links a { color: #315347; font-weight: 500; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .7rem 1.08rem;
    font-weight: 700;
    font-size: .92rem;
    transition: all .2s ease;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff !important; box-shadow: 0 10px 18px rgba(31, 143, 85, .24); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: #fff; border-color: #b8d9c7; color: #186646 !important; }
.btn-outline:hover { border-color: #7bc39f; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text) !important; }

.section { margin: 2.4rem 0; }
.section-title { font-size: clamp(1.45rem, 2.8vw, 2rem); margin: 0 0 .45rem; }
.section-subtitle { margin: 0 0 1.1rem; color: var(--muted); }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card, .panel, .form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card { padding: 1.1rem; }
.panel { padding: 1.25rem; }
.form-card { padding: 1.25rem; max-width: 760px; }
.hover-lift { transition: transform .22s ease, box-shadow .22s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(18, 42, 34, .12); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .32rem .68rem;
    background: var(--primary-soft);
    color: #0f6e43;
    font-size: .78rem;
    font-weight: 700;
}
.kpi { font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.1; font-weight: 800; color: #0f6f42; margin: .2rem 0; }
.muted { color: var(--muted); }

label { display: block; margin-bottom: .85rem; font-weight: 600; color: #27473c; }
input, select, textarea {
    width: 100%;
    margin-top: .4rem;
    border: 1px solid #c7dacf;
    border-radius: 11px;
    background: #fff;
    padding: .72rem .84rem;
    font: inherit;
    color: #1c3d32;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #67bf93;
    box-shadow: 0 0 0 3px rgba(72, 180, 124, .18);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
th, td { padding: .76rem .75rem; border-bottom: 1px solid #ebf3ef; text-align: left; font-size: .93rem; }
th { background: #f2f8f5; color: #2f5547; font-weight: 700; }

.flash { border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; font-weight: 600; }
.flash-success { background: #e8f8ef; border-color: #bce9cd; color: #0f6f42; }
.flash-error { background: #fdecef; border-color: #f6c5cd; color: #9b3345; }

.hero-premium { display: none; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .9fr; gap: 1.25rem; align-items: center; }
.hero-title { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.15; margin: .35rem 0 .8rem; }
.hero-sub { color: var(--muted); font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }

.hero-showcase {
    background: linear-gradient(140deg, #ffffff 0%, #f5faf7 55%, #eef7f1 100%);
    border: 1px solid #dbe9df;
    border-radius: 28px;
    box-shadow: 0 18px 36px rgba(25, 51, 41, 0.08);
    padding: clamp(1.3rem, 3vw, 2.6rem);
}
.hero-copy { padding-right: .4rem; }
.hero-media {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    min-height: 360px;
    box-shadow: 0 14px 30px rgba(16, 44, 33, 0.14);
}
.hero-media img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}
.hero-floating-card {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid #d5e7da;
    border-radius: 14px;
    padding: .75rem .85rem;
    min-width: 210px;
}
.hero-floating-card p { margin: .2rem 0 0; }
.stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.feature-tile {
    background: #f7fbf8;
    border: 1px solid #dbeae0;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(18, 42, 34, 0.05);
}
.feature-tile h3 {
    margin: 0 0 .45rem;
    font-size: 1rem;
}

.dish-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.dish-card {
    background: #fff;
    border: 1px solid #deebe3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(20, 42, 35, 0.08);
}
.dish-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}
.dish-body { padding: .9rem; }
.dish-body h3 { margin: 0 0 .35rem; }

.split-highlight {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 1rem;
    background: #f5faf7;
    border: 1px solid #d9e9de;
    border-radius: 22px;
    padding: 1.15rem;
}
.split-highlight img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 16px;
}

.cta-band {
    text-align: center;
    background: linear-gradient(135deg, #e7f5ec, #f2faf6);
    border: 1px solid #d6e8dd;
    border-radius: 22px;
    padding: 1.35rem;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(120deg, #ffffff, #edf8f1);
    border: 1px solid #d5e7db;
    border-radius: 18px;
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow);
}
.admin-hero h1 {
    margin: 0 0 .3rem;
}
.admin-hero-right {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

.mini-chart {
    display: grid;
    gap: .5rem;
}
.mini-chart-row {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: .55rem;
}
.mini-chart-date {
    font-size: .8rem;
    color: #597065;
}
.mini-chart-bars {
    display: grid;
    gap: .35rem;
}
.mini-bar {
    border-radius: 999px;
    padding: .22rem .55rem;
    color: #fff;
    font-size: .78rem;
    white-space: nowrap;
    min-width: 70px;
}
.mini-bar-weight {
    background: linear-gradient(90deg, #1f9d63, #41bf82);
}
.mini-bar-waist {
    background: linear-gradient(90deg, #1d3d86, #3f65b7);
}

.empty-state {
    background: #fff;
    border: 1px dashed #b8d9c7;
    border-radius: 16px;
    padding: 1.1rem;
    color: #5f7168;
}

.dashboard-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; }
.sidebar {
    position: sticky;
    top: 82px;
    align-self: start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.sidebar h3 { margin: .2rem 0 .7rem; }
.sidebar .menu-group { margin-bottom: .95rem; }
.sidebar .menu-title { color: #6d877d; font-size: .77rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; margin: .45rem 0; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: .58rem;
    color: #29463b;
    padding: .48rem .55rem;
    border-radius: 10px;
    font-weight: 600;
}
.sidebar a:hover { background: #f3faf6; }
.menu-highlight { background: #edfaf3; border: 1px solid #cde8d8; }
.menu-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6e8a7f;
    flex-shrink: 0;
}
.menu-icon svg {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    display: block;
}
.menu-icon svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.menu-icon svg * {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .8rem 1rem;
}
.topbar .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.panel-stack > * + * { margin-top: 1rem; }

.onboarding-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.step-pill { border: 1px solid #d5e9dd; border-radius: 999px; padding: .4rem .6rem; font-size: .8rem; font-weight: 700; text-align: center; background: #fff; }
.step-pill.active { background: var(--primary-soft); border-color: #b8dfc9; color: #0f6e43; }
.progress-line { height: 8px; border-radius: 999px; background: #e8f3ed; overflow: hidden; margin-bottom: 1rem; }
.progress-line > div { height: 100%; width: 100%; background: linear-gradient(90deg, #1f9d63, #3ec681); }

.faq-item { border: 1px solid var(--border); border-radius: 14px; margin-bottom: .7rem; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.faq-q {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 0;
    padding: .95rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: #25463b;
}
.faq-a { padding: 0 1rem 1rem; color: #577167; display: none; }
.faq-item.open .faq-a { display: block; }

.site-footer {
    border-top: 1px solid var(--border);
    background: #1d7448;
    padding: 1.1rem 0 1.4rem;
    color: #edf6f0;
}
.site-footer a { color: #ffffff; }
.site-footer .muted { color: #d7eadf; }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 1020px) {
    .hero-grid { grid-template-columns: 1fr; }
    .dish-grid { grid-template-columns: 1fr 1fr; }
    .split-highlight { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (max-width: 760px) {
    .container { width: min(1180px, 95%); }
    .menu-toggle { display: inline-block; }
    .nav-links { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
    .nav-links.open { display: flex; }
    .navbar { flex-wrap: wrap; }
    .btn { width: 100%; }
    .grid-2, .grid-3, .grid-4, .dish-grid { grid-template-columns: 1fr; }
    .onboarding-steps { grid-template-columns: 1fr 1fr; }
    .topbar { flex-direction: column; align-items: flex-start; }
    .hero-media img { min-height: 250px; }
    .admin-hero { flex-direction: column; align-items: flex-start; }
}

