:root {
    --bg: #f7f7f3;
    --bg-soft: #fffdf8;
    --card: rgba(255, 255, 255, 0.96);
    --text: #2f3a40;
    --muted: #68737b;
    --line: rgba(47, 58, 64, 0.10);
    --line-strong: rgba(47, 58, 64, 0.16);
    --primary: #ea8120;
    --primary-2: #52ab54;
    --primary-soft: rgba(234, 129, 32, 0.10);
    --secondary-soft: rgba(82, 171, 84, 0.12);
    --shadow: 0 18px 44px rgba(47, 58, 64, 0.10);
    --shadow-soft: 0 12px 30px rgba(47, 58, 64, 0.06);
    --radius: 22px;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(234, 129, 32, 0.10), transparent 26%),
        radial-gradient(circle at top right, rgba(82, 171, 84, 0.10), transparent 28%),
        linear-gradient(180deg, #fffdf9 0%, #f7f7f3 45%, #f2f3ee 100%);
    color: var(--text);
}

a { color: #34885a; text-decoration: none; }
a:hover { color: #d96e16; text-decoration: none; }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(255, 253, 249, 0.88);
    border-bottom: 1px solid rgba(47, 58, 64, 0.08);
    box-shadow: 0 8px 24px rgba(47, 58, 64, 0.04);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    font-weight: 800;
}

.brand:hover { color: var(--text); }

.logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: hidden;
    flex: 0 0 auto;
}

.logo-wrap img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-text {
    display: grid;
    gap: 2px;
    line-height: 1.1;
}

.brand-name { font-size: 1.18rem; }
.brand-tagline { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a,
.btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
    box-shadow: var(--shadow-soft);
}

.btn:hover,
.nav-links a:hover {
    transform: translateY(-1px);
    border-color: rgba(234, 129, 32, 0.25);
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
}

.btn-primary:hover,
.nav-links a.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(234, 129, 32, 0.18);
}


.nav-links a.is-active {
    background: linear-gradient(135deg, rgba(234, 129, 32, 0.12), rgba(82, 171, 84, 0.14));
    border-color: rgba(82, 171, 84, 0.22);
    color: #244533;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: white;
}

.btn-primary:hover {
    color: white;
    box-shadow: 0 14px 28px rgba(234, 129, 32, 0.18);
}

.hero {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 24px;
    align-items: stretch;
    padding: 34px 0 28px;
}

.panel,
.card {
    background: var(--card);
    border: 1px solid rgba(47, 58, 64, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel { padding: 32px; }
.hero-copy { max-width: 720px; }
.hero h1 { font-size: clamp(0.85rem, 4.5vw, 3.5rem); line-height: 1.02; margin: 0 0 14px; }
.hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

.hero-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.hero-brand img {
    width: min(100%, 320px);
    height: auto;
    display: block;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 22px;
}

.stat {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,247,243,.92));
    border: 1px solid var(--line);
}

.stat strong { display: block; font-size: 1.4rem; margin-bottom: 6px; color: #2d353a; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section { margin: 22px 0 34px; }
.section h2 { margin: 0 0 14px; font-size: 1.4rem; }
.card { padding: 22px; overflow: hidden; }
.flash { margin: 18px 0 0; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line); }
.flash.success { background: rgba(82, 171, 84, 0.14); border-color: rgba(82, 171, 84, 0.22); }
.flash.error { background: rgba(220, 38, 38, 0.10); border-color: rgba(220, 38, 38, 0.18); }
.flash.info { background: rgba(234, 129, 32, 0.12); border-color: rgba(234, 129, 32, 0.20); }
form { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-weight: 700; }

input, textarea, select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    padding: 14px 15px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(234, 129, 32, 0.45);
    box-shadow: 0 0 0 4px rgba(234, 129, 32, 0.10);
}

input[type=file] { padding: 10px 12px; }
textarea { min-height: 140px; resize: vertical; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

.recipes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.recipe-card {
    display: grid;
    gap: 14px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,249,245,.96));
    border: 1px solid rgba(47,58,64,.08);
    box-shadow: var(--shadow-soft);
}

.recipe-image-link { display: block; line-height: 0; }
.recipe-image-link:hover { text-decoration: none; }
.recipe-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #ecefe6;
    transition: transform .25s ease;
}
.recipe-image-link:hover img { transform: scale(1.03); }
.recipe-image-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(234,129,32,.12), rgba(82,171,84,.14));
}
.recipe-body { padding: 18px; display: grid; gap: 10px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .82rem;
    border: 1px solid rgba(234, 129, 32, 0.20);
    color: #b85d12;
    background: rgba(234, 129, 32, 0.10);
    font-weight: 700;
}

.rating-display { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; line-height: 1; }
.star { font-size: 1rem; color: rgba(47,58,64,.20); }
.star.filled { color: #f3b321; }
.rating-text { font-size: .9rem; color: var(--muted); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    background: rgba(82, 171, 84, 0.12);
    border-color: rgba(82, 171, 84, 0.22);
    color: #2d8750;
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #546069; font-size: .92rem; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer { padding: 28px 0 50px; color: var(--muted); }
.empty {
    padding: 26px;
    border: 1px dashed rgba(47,58,64,.18);
    border-radius: 20px;
    color: var(--muted);
    background: rgba(255,255,255,.62);
}
.recipe-detail img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
ul.clean { margin: 0; padding-left: 20px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.footer-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.footer-note { max-width: 640px; }

@media (max-width: 980px) {
    .hero, .grid-2, .auth-grid { grid-template-columns: 1fr; }
    .nav-inner { align-items: flex-start; }
    .brand-name { font-size: 1.05rem; }
}

@media (max-width: 640px) {
    .nav-links { width: 100%; }
    .nav-links a, .btn { width: 100%; }
    .panel, .card { padding: 20px; }
    .logo-wrap { width: 50px; height: 50px; }
    .hero-brand img { width: min(100%, 260px); }
}


@media (max-width: 860px) {
    .nav-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        justify-content: center;
    }

    .nav-links {
        justify-content: center;
    }

    .hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nav-links a,
    .btn {
        width: 100%;
    }

    .nav-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .brand-text {
        display: none;
    }
}


body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(47, 58, 64, 0.50);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 120;
    backdrop-filter: blur(4px);
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-card {
    width: min(560px, 100%);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(47, 58, 64, 0.10);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(47, 58, 64, 0.24);
    padding: 24px;
}

.modal-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.modal-head h3 {
    margin: 0;
    font-size: 1.35rem;
}

.modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.9);
    color: var(--text);
    border-radius: 14px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.modal-close:hover {
    border-color: rgba(234, 129, 32, 0.25);
    background: #ffffff;
}

.modal-url {
    padding: 12px 14px;
    margin: 14px 0 18px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    word-break: break-all;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 560px) {
    .modal-card {
        padding: 20px;
        border-radius: 20px;
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .modal-actions .btn,
    .modal-actions form,
    .modal-actions form .btn {
        width: 100%;
    }
}


.friend-link-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.friend-link-card:hover {
    border-color: rgba(82, 171, 84, 0.28);
    color: var(--text);
}

.friend-link-card.is-selected {
    background: linear-gradient(135deg, rgba(234,129,32,.10), rgba(82,171,84,.12));
    border-color: rgba(82, 171, 84, 0.28);
}


.hero-home {
    align-items: stretch;
}

.hero-main-panel {
    background:
        radial-gradient(circle at top left, rgba(234, 129, 32, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,249,245,.95));
}

.hero-side-panel {
    display: grid;
    align-content: start;
    gap: 20px;
    background:
        radial-gradient(circle at top right, rgba(82, 171, 84, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,243,.95));
}

.hero-side-intro h2,
.section-head h2,
.feature-card h3 {
    margin: 0;
}

.hero-stats-grid {
    margin-top: 26px;
}

.stat-highlight {
    background: linear-gradient(135deg, rgba(234,129,32,.14), rgba(82,171,84,.12));
}

.feature-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-stack {
    display: grid;
    gap: 14px;
}

.feature-card {
    display: grid;
    gap: 12px;
}

.feature-card.compact {
    grid-template-columns: auto 1fr;
    align-items: start;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.feature-card.compact p,
.feature-card p,
.step-item p {
    margin: 0;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(234,129,32,.14), rgba(82,171,84,.14));
    border: 1px solid rgba(234, 129, 32, 0.16);
}

.badge-success {
    background: rgba(82, 171, 84, 0.12);
    border-color: rgba(82, 171, 84, 0.22);
    color: #2d8750;
}

.steps-card {
    background:
        radial-gradient(circle at top right, rgba(234,129,32,.10), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,248,244,.96));
}

.step-item {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.78);
}

.step-number {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 800;
}

.filter-card form {
    gap: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

.filter-actions {
    justify-content: flex-end;
}

.friend-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-chip {
    display: grid;
    gap: 4px;
    min-width: 170px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.88);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.friend-chip span {
    font-size: .88rem;
    color: var(--muted);
}

.friend-chip.is-selected,
.friend-chip:hover {
    border-color: rgba(82, 171, 84, 0.28);
    background: linear-gradient(135deg, rgba(234,129,32,.10), rgba(82,171,84,.12));
    color: var(--text);
}

@media (max-width: 980px) {
    .feature-grid,
    .steps-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }
}


.footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.footer-link-button {
    border: 0;
    background: transparent;
    color: #34885a;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.footer-link-button:hover {
    color: #d96e16;
}

.cookie-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(47, 58, 64, 0.36);
    backdrop-filter: blur(5px);
    display: none;
    align-items: end;
    justify-content: center;
    padding: 24px;
    z-index: 160;
}

.cookie-backdrop.is-visible {
    display: flex;
}

.cookie-banner {
    width: min(960px, 100%);
    display: grid;
    gap: 18px;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(47, 58, 64, 0.22);
}

.cookie-banner h3,
.cookie-option strong {
    margin: 0;
}

.cookie-banner-copy {
    display: grid;
    gap: 10px;
}

.cookie-banner-copy p {
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-modal-card {
    width: min(760px, 100%);
}

.cookie-option-list {
    display: grid;
    gap: 14px;
    margin: 20px 0 24px;
}

.cookie-option {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.9);
}

.cookie-option.is-required {
    background: rgba(82, 171, 84, 0.08);
    border-color: rgba(82, 171, 84, 0.18);
}

.cookie-option p {
    margin: 6px 0 0;
}

.cookie-option input[type=checkbox] {
    width: 24px;
    height: 24px;
    margin-top: 4px;
    accent-color: var(--primary-2);
    box-shadow: none;
}

.cookie-status-fixed {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 700;
    color: #2d8750;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
    margin-top: 0;
}

.legal-content p + h2,
.legal-content p + h3 {
    margin-top: 24px;
}

@media (max-width: 640px) {
    .cookie-backdrop {
        padding: 16px;
    }

    .cookie-banner-actions,
    .footer-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cookie-banner-actions .btn,
    .footer-links .footer-link-button {
        width: 100%;
    }

    .cookie-option {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-status-fixed {
        white-space: normal;
    }
}


.stats-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.stat-card-admin {
    display: grid;
    gap: 8px;
}

.stat-card-admin strong {
    font-size: 2rem;
    line-height: 1;
}

.stats-sections-admin {
    align-items: start;
}

.stats-headline {
    margin-bottom: 14px;
}
