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

:root {
    --primary: #d46e8c;
    --primary-light: #fbeaf0;
    --primary-dark: #b95d79;
    --secondary: #6e5e5e;
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --border: #f1f2f6;
    --success: #00b894;
    --error: #d63031;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --radius: 24px;
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    transition: background-color 0.4s ease;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar (Desktop only) */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: none; /* Mobile hidden */
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    padding: 30px 20px;
    animation: fadeIn 0.5s ease;
}

@media (min-width: 769px) {
    .sidebar { display: flex; }
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    border-radius: 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--bg-page);
    color: var(--primary);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Main Content area */
.main-content {
    flex: 1;
    width: 100%;
}

@media (min-width: 769px) {
    .main-content {
        margin-left: var(--sidebar-width);
        padding-bottom: 30px;
        min-height: 100vh;
    }

    /* Public pages must not inherit dashboard sidebar offset */
    .public-page .main-content {
        margin-left: 0;
        padding-bottom: 0;
        min-height: auto;
    }
}

.container {
    padding: 25px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Landing Page Components */
.public-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    transition: var(--transition);
}

.public-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.public-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.public-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.public-nav-link {
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.public-nav-link:hover { color: var(--primary); }

@media (max-width: 768px) {
    .public-nav { display: none; }
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(1200px 500px at 15% -10%, rgba(212, 110, 140, 0.16), transparent 62%),
        radial-gradient(900px 420px at 90% 8%, rgba(185, 93, 121, 0.12), transparent 68%),
        linear-gradient(180deg, #fffdfd 0%, #fff8fb 35%, #ffffff 100%);
    padding: 140px 0 100px;
    text-align: center;
}

.hero > .container {
    position: relative;
    z-index: 3;
}

.hero-bg-blob {
    position: absolute;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.hero-bg-blob-a {
    width: 320px;
    height: 320px;
    top: -70px;
    right: -80px;
    background: radial-gradient(circle at 35% 35%, rgba(212, 110, 140, 0.65), rgba(212, 110, 140, 0.08) 65%, transparent 75%);
    animation: heroFloatA 11s ease-in-out infinite;
}

.hero-bg-blob-b {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: -100px;
    background: radial-gradient(circle at 60% 40%, rgba(110, 94, 94, 0.4), rgba(110, 94, 94, 0.04) 65%, transparent 78%);
    animation: heroFloatB 13s ease-in-out infinite;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.4;
    background-image:
        linear-gradient(to right, rgba(212, 110, 140, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(212, 110, 140, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at 50% 35%, #000 30%, transparent 80%);
}

.hero-highlight {
    color: var(--primary);
    text-shadow: 0 2px 16px rgba(212, 110, 140, 0.32);
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 950;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

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

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.hero-btn-main {
    padding: 18px 40px;
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(212, 110, 140, 0.3);
}

.hero-btn-secondary {
    padding: 18px 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 110, 140, 0.2);
}

/* Home pastry decorations */
.home-decor-section {
    position: relative;
    overflow: hidden;
}

.pastry-mark {
    position: absolute;
    font-size: 1.6rem;
    opacity: 0.18;
    filter: saturate(1.1);
    pointer-events: none;
    z-index: 1;
    animation: pastryFloat 7s ease-in-out infinite;
}

.home-decor-section .container {
    position: relative;
    z-index: 2;
}

.pastry-mark-a {
    top: 22px;
    left: 22px;
}

.pastry-mark-b {
    top: 28px;
    right: 28px;
    animation-delay: 1.4s;
}

.pastry-mark-c {
    bottom: 24px;
    left: 26px;
    animation-delay: 0.8s;
}

.pastry-mark-d {
    bottom: 26px;
    right: 24px;
    animation-delay: 2.1s;
}

/* Sections reveal */
.section { padding: 100px 0; border-bottom: 1px solid var(--border); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.8rem; font-weight: 900; margin-bottom: 15px; letter-spacing: -1px; }

/* Cards Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 50px 40px;
    border-radius: 40px;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover { 
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.06);
    border-color: var(--primary-light);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    transition: var(--transition);
}

.feature-card:hover .icon-box {
    transform: rotate(10deg) scale(1.1);
}

/* Accordion FAQ */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 15px; border-radius: 20px; border: 1.5px solid var(--border); overflow: hidden; }
.faq-trigger { padding: 25px 30px; background: white; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 1.1rem; }
.faq-content { padding: 0 30px; max-height: 0; overflow: hidden; transition: all 0.4s ease; background: var(--bg-page); }
.faq-item.active .faq-content { padding: 25px 30px; max-height: 500px; }

/* Legal Page Content */
.legal-content { max-width: 900px; margin: 40px auto; line-height: 1.8; color: var(--text-muted); }
.legal-content h3 { color: var(--text-main); margin: 30px 0 15px; font-weight: 800; }
.legal-content p { margin-bottom: 20px; }

/* Global Utilities */
.btn {
    padding: 16px 32px;
    border-radius: 20px;
    font-weight: 800;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 10px 20px rgba(212, 110, 140, 0.2); }
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(212, 110, 140, 0.3); }

.btn-outline { border: 2px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Ingredients Actions */
.ingredients-topbar {
    margin-bottom: 22px;
    padding: 18px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #fff7fa 100%);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
}

.ingredients-topbar-text h2 {
    margin: 0;
    font-size: 1.95rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-main);
    line-height: 1.05;
}

.ingredients-topbar-text p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 42ch;
    line-height: 1.4;
}

.dashboard-topbar {
    margin-bottom: 22px;
    padding: 18px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #fff7fa 100%);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
}

.dashboard-topbar-text h2 {
    margin: 0;
    font-size: 1.95rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-main);
    line-height: 1.08;
}

.dashboard-topbar-text p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.4;
}

.dashboard-topbar-btn {
    padding: 11px 20px;
    border-radius: 14px;
    font-size: 0.92rem;
}

.recipe-detail-topbar {
    margin-bottom: 22px;
    padding: 14px 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #fff7fa 100%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipe-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.recipe-back-btn:hover {
    color: var(--primary);
    border-color: rgba(212, 110, 140, 0.35);
    background: var(--primary-light);
}

.recipe-detail-topbar-text span {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.recipe-detail-topbar-text h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.4px;
    color: var(--text-main);
    line-height: 1.15;
}

.recipe-summary-card {
    background: linear-gradient(145deg, #263039 0%, #1f2730 100%);
    color: #fff;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 30px rgba(27, 34, 42, 0.24);
}

.recipe-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.recipe-summary-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    opacity: 0.75;
}

.recipe-summary-cost {
    font-size: 1.02rem;
    font-weight: 800;
    color: #f7dce6;
}

.recipe-summary-price-block {
    margin: 14px 0 18px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.recipe-summary-label-main {
    display: block;
    margin-bottom: 4px;
    opacity: 0.92;
    color: #ffe7ef;
}

.recipe-summary-price {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.8px;
    color: #fff2f7;
    line-height: 1.05;
}

.recipe-summary-save-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    background: #fff;
    color: #1f2730;
    font-weight: 900;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.16);
}

.recipe-summary-save-btn:hover {
    transform: translateY(-2px);
    background: #fff6fa;
}

.ingredients-new-btn {
    width: auto;
    padding: 11px 20px;
    border-radius: 14px;
    font-size: 0.92rem;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 18px rgba(212, 110, 140, 0.22);
}

.ingredient-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--bg-page);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
}

.ingredient-action-btn svg {
    width: 18px;
    height: 18px;
}

.ingredient-action-btn-edit {
    color: var(--text-muted);
}

.ingredient-action-btn-edit:hover {
    color: var(--primary);
    border-color: rgba(212, 110, 140, 0.35);
    background: var(--primary-light);
}

.ingredient-action-btn-delete {
    color: var(--error);
}

.ingredient-action-btn-delete:hover {
    color: #fff;
    border-color: var(--error);
    background: var(--error);
}

.ingredient-action-btn:active {
    transform: scale(0.96);
}

.ingredients-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ingredients-form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.ingredients-form-btn {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    justify-content: center;
    border-radius: 14px;
    font-size: 0.95rem;
}

.ingredients-form-btn-secondary {
    background: #fff;
}

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: all 1s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* App Dashboard Specifics */
.app-header { background: var(--bg-card); padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
@media (min-width: 769px) { .app-header { display: none; } }
.bottom-nav { 
    position: fixed; bottom: 0; left: 0; right: 0; width: 100%; 
    background: var(--bg-card); display: flex; 
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom, 0px)); 
    border-top: 1px solid var(--border); z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}
@media (min-width: 769px) { .bottom-nav { display: none; } }
.nav-item { 
    flex: 1; display: flex; flex-direction: column; align-items: center; 
    font-size: 0.65rem; color: var(--text-muted); text-decoration: none; 
    gap: 5px; min-width: 0; transition: var(--transition);
}
.nav-item.active { color: var(--primary); font-weight: 800; }
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }

.card { 
    background: var(--bg-card); 
    border-radius: var(--radius); 
    padding: 20px; 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow); 
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}
.card:hover { transform: translateY(-5px); }

.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 25px; 
}
@media (min-width: 992px) { 
    .dashboard-grid { grid-template-columns: 2fr 1fr; } 
}
@media (min-width: 481px) { .grid-responsive { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { 
    .grid-responsive { grid-template-columns: repeat(3, 1fr); } 
    .ranking-card, .ranking-container { 
        grid-column: span 2; 
        background: var(--bg-card); 
        border-radius: var(--radius); 
        padding: 25px; 
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
}

.fab { position: fixed; bottom: 90px; right: 25px; width: 60px; height: 60px; background: var(--primary); border-radius: 30px; color: white; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgba(212, 110, 140, 0.3); border: none; z-index: 900; transition: var(--transition); }
@media (min-width: 769px) { .fab { bottom: 40px; } }

.form-control { width: 100%; padding: 15px 20px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--bg-page); font-size: 1rem; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); background: var(--bg-card); }

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.remember-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Footer Landing */
.public-footer {
    background:
        radial-gradient(420px 220px at 88% -10%, rgba(212, 110, 140, 0.16), transparent 70%),
        linear-gradient(180deg, #17191e 0%, #13151a 100%);
    color: #f5f7fb;
    padding: 64px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.public-footer .container {
    padding-bottom: 0 !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 1fr));
    gap: 26px;
    margin-bottom: 28px;
}

.footer-brand-col {
    padding-right: 10px;
}

.footer-brand-logo {
    color: #fff;
    margin-bottom: 16px;
    display: inline-flex;
}

.footer-brand-copy {
    color: #a6adbb;
    font-size: 0.92rem;
    line-height: 1.65;
    max-width: 42ch;
}

.footer-col h4 {
    color: #fff;
    font-weight: 800;
    margin-bottom: 14px;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

.footer-link {
    display: block;
    color: #b5bcc8;
    text-decoration: none;
    margin-bottom: 9px;
    transition: var(--transition);
    font-weight: 600;
    line-height: 1.35;
}

.footer-link:hover {
    color: #fff;
    transform: translateX(4px);
}

.footer-bottom-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: #939aab;
}

.footer-bottom-copy,
.footer-bottom-dev {
    line-height: 1.4;
}

.footer-bottom-dev {
    text-align: right;
}

.footer-dev-link {
    color: #ff8cad;
    font-weight: 800;
    text-decoration: none;
}

.footer-bottom-contact {
    margin-top: 10px;
    text-align: center;
    font-size: 0.76rem;
    color: #7e8594;
    line-height: 1.45;
}

/* Mobile Navigation Panel */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: var(--bg-sidebar);
    z-index: 5000;
    padding: 40px 30px;
    box-shadow: 20px 0 60px rgba(0,0,0,0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.mobile-nav-panel.active { left: 0; }

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 4999;
    display: none;
    animation: fadeIn 0.3s ease;
}
.mobile-nav-overlay.active { display: block; }

.mobile-nav-links { display: flex; flex-direction: column; gap: 15px; margin-top: 40px; }
.mobile-nav-link { 
    font-size: 1.1rem; 
    font-weight: 800; 
    color: var(--text-main); 
    text-decoration: none; 
    padding: 15px; 
    background: var(--bg-page); 
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    body { background-color: #f0f2f5 !important; }
    .main-content { background-color: transparent !important; }
    .container { background-color: transparent !important; padding: 0 12px 100px; }

    /* Keep public header compact on mobile */
    .public-header {
        padding: 10px 0;
    }

    .public-header .container {
        padding: 0 12px !important;
        min-height: 56px;
    }
    
    .section { padding: 60px 0; }
    .section-title h2 { font-size: 1.8rem; }
    .hero { padding: 72px 0 60px; }
    .hero h1 { font-size: 2.2rem; letter-spacing: -1px; margin-bottom: 20px; }
    .hero p { font-size: 1.05rem; margin-bottom: 30px; }
    .hero-btns { flex-direction: column; padding: 0 10px; }
    .hero-btns .btn { width: 100%; justify-content: center; }
    .hero-bg-blob-a {
        width: 210px;
        height: 210px;
        top: -40px;
        right: -60px;
        filter: blur(16px);
        opacity: 0.45;
    }
    .hero-bg-blob-b {
        width: 180px;
        height: 180px;
        left: -70px;
        bottom: -65px;
        filter: blur(14px);
        opacity: 0.38;
    }
    .hero-bg-grid {
        opacity: 0.28;
        background-size: 34px 34px;
    }
    .hero-btn-main,
    .hero-btn-secondary {
        padding: 16px 20px;
        border-radius: 16px;
    }

    .pastry-mark {
        font-size: 1.25rem;
        opacity: 0.13;
    }

    .pastry-mark-a,
    .pastry-mark-b {
        top: 14px;
    }

    .pastry-mark-c,
    .pastry-mark-d {
        bottom: 12px;
    }

    .public-footer {
        padding: 42px 0 22px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 16px;
        margin-bottom: 22px;
    }

    .footer-brand-col {
        grid-column: 1 / -1;
        padding-right: 0;
        margin-bottom: 2px;
    }

    .footer-brand-logo {
        margin-bottom: 10px;
    }

    .footer-brand-copy {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .footer-col h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .footer-link {
        margin-bottom: 8px;
        font-size: 0.98rem;
    }

    .footer-bottom-row {
        padding-top: 14px;
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.78rem;
        gap: 6px;
    }

    .footer-bottom-dev {
        text-align: left;
    }

    .footer-bottom-contact {
        margin-top: 8px;
        font-size: 0.72rem;
        text-align: left;
    }
    
    .grid-cards { grid-template-columns: 1fr; gap: 20px; }
    .feature-card { padding: 35px 25px; }
    
    .container { padding: 0 12px 100px; }
    .desktop-only { display: none !important; }
    
    h1, .h1 { font-size: 1.8rem !important; }
    h2, .h2 { font-size: 1.5rem !important; }
    h3, .h3 { font-size: 1.3rem !important; }
}
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-page);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
@media (min-width: 769px) { .mobile-menu-btn { display: none !important; } }

/* Auth Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 6000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.3s ease; }

.modal-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 440px;
    border-radius: 40px;
    padding: 40px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-card { transform: scale(1); opacity: 1; }

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-page);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-close:hover { color: var(--error); transform: rotate(90deg); }

.modal-header { text-align: center; margin-bottom: 30px; }
.modal-header h2 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.modal-header p { color: var(--text-muted); font-size: 1rem; }

.auth-form { display: none; }
.auth-form.active { display: block; animation: slideUpFade 0.4s ease; }

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

@keyframes heroFloatA {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 16px) scale(1.06); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes heroFloatB {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(14px, -12px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes pastryFloat {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(4deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.modal-message {
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    display: none;
}
.modal-message.error { background: #fee2e2; color: #b91c1c; display: block; }
.modal-message.success { background: #dcfce7; color: #15803d; display: block; }

/* Admin activity card */
.admin-activity-card {
    padding: 18px;
    border: 1px solid #eef1f6;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
}

.admin-activity-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-activity-head h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--text-main);
}

.admin-activity-head span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-page);
    border: 1px solid var(--border);
    padding: 4px 9px;
    border-radius: 999px;
}

.admin-activity-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.admin-activity-kpi {
    border: 1px solid var(--border);
    background: #fbfcfe;
    border-radius: 12px;
    padding: 10px;
}

.admin-activity-kpi-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 4px;
}

.admin-activity-kpi strong {
    font-size: 1.15rem;
    color: var(--text-main);
}

.admin-activity-meta {
    margin-top: 10px;
    font-size: 0.86rem;
    color: #667085;
    line-height: 1.45;
}

.admin-activity-btn {
    width: 100%;
    margin-top: 14px;
    border-radius: 12px;
    font-weight: 800;
    justify-content: center;
}

/* Dashboard desktop spacing */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

@media (min-width: 992px) {
    .dashboard-main-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }

    .dashboard-main-grid > .dashboard-ranking-card {
        grid-column: span 2;
        margin-bottom: 0;
    }

    .dashboard-main-grid > .dashboard-tip-card {
        grid-column: span 1;
        margin-bottom: 0;
        position: sticky;
        top: 18px;
    }
}

@media (max-width: 600px) {
    .responsive-table {
        background: transparent !important;
        border: none !important;
        width: 100% !important;
        display: block !important;
    }
    .responsive-table thead { display: none; }
    .responsive-table tbody { display: block !important; width: 100% !important; }
    .responsive-table tr { 
        display: block; 
        padding: 20px; 
        background: white !important;
        border-radius: 20px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
        border: 1px solid var(--border) !important;
        margin-bottom: 20px !important;
        position: relative;
        width: 100% !important;
    }
    .responsive-table td { 
        display: block; 
        padding: 4px 0 !important; 
        text-align: left !important;
        border: none !important;
    }
    .responsive-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.75rem;
        display: block;
        text-transform: uppercase;
        margin-bottom: 2px;
    }
    .responsive-table td:last-child {
        display: flex !important;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 15px !important;
        border-top: 1px solid var(--border) !important;
        padding-top: 15px !important;
        width: 100% !important;
    }

    .ingredients-new-btn {
        width: auto;
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .ingredients-topbar {
        margin-bottom: 18px;
        padding: 14px 12px;
        border-radius: 14px;
        gap: 12px;
    }

    .ingredients-topbar-text h2 {
        font-size: 1.75rem;
        line-height: 1.08;
    }

    .ingredients-topbar-text p {
        margin-top: 6px;
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .dashboard-topbar {
        margin-bottom: 18px;
        padding: 14px 12px;
        border-radius: 14px;
        gap: 12px;
    }

    .dashboard-topbar-text h2 {
        font-size: 1.75rem;
        line-height: 1.08;
    }

    .dashboard-topbar-text p {
        margin-top: 6px;
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .recipe-detail-topbar {
        margin-bottom: 18px;
        padding: 12px;
        border-radius: 14px;
        gap: 10px;
    }

    .recipe-back-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .recipe-detail-topbar-text span {
        font-size: 0.68rem;
        margin-bottom: 1px;
    }

    .recipe-detail-topbar-text h2 {
        font-size: 1.35rem;
        line-height: 1.12;
    }

    .recipe-summary-card {
        padding: 16px;
        border-radius: 14px;
    }

    .recipe-summary-cost {
        font-size: 0.95rem;
    }

    .recipe-summary-price {
        font-size: 1.95rem;
        letter-spacing: -0.5px;
    }

    .recipe-summary-save-btn {
        min-height: 44px;
        border-radius: 12px;
    }

    .ingredient-action-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .ingredients-form-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ingredients-form-grid-two {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ingredients-form-btn {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .admin-activity-card {
        padding: 14px;
    }

    .admin-activity-kpis {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
