:root {
    --bg-color: #F2F7FC;
    --primary-color: #052659;
    --dark-color: #021024;
    --text-color: #021024;
    --light-text: #3A5578;
    
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(242, 247, 252, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 8px 32px rgba(5, 38, 89, 0.08);
    
    --success: #10b981;
    --danger: #ef4444;
    --radius: 20px;
    
    /* Telegram Fallbacks */
    --tg-theme-bg-color: var(--bg-color);
    --tg-theme-text-color: var(--text-color);
    --tg-theme-button-color: var(--primary-color);
    --tg-theme-button-text-color: #ffffff;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--tg-theme-bg-color, var(--bg-color));
    color: var(--tg-theme-text-color, var(--text-color));
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--dark-color);
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    position: relative;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
}
.premium-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    position: sticky;
    top: 0;
}

.header-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

#user-points {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    background: rgba(5, 38, 89, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Main Area */
main {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 100px 20px;
}

/* Typography & Utils */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Loader Animation */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: var(--light-text);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(5, 38, 89, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Fade In Animation */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--tg-theme-button-color, var(--primary-color)), #021024);
    color: var(--tg-theme-button-text-color, #fff);
    border: none;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(5, 38, 89, 0.3);
    transition: transform 0.1s, box-shadow 0.2s;
}
.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(5, 38, 89, 0.2);
}
.btn-primary:disabled {
    background: var(--light-text);
    box-shadow: none;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Navigation */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--glass-border);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0;
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-item .icon { font-size: 24px; margin-bottom: 4px; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nav-item .label { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 600; opacity: 0.8; }
.nav-item.active { color: var(--primary-color); }
.nav-item.active .icon { transform: translateY(-4px) scale(1.1); }
.nav-item.active .label { opacity: 1; }

/* Home Page */
.hero-section {
    text-align: center;
    padding: 20px 0 30px;
}
.hero-logo {
    width: 80%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
}
.hero-text {
    font-size: 15px;
    color: var(--light-text);
    line-height: 1.6;
    padding: 0 15px;
}
.action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.action-card:active { transform: scale(0.98); }
.action-content h3 { font-size: 18px; margin-bottom: 4px; }
.action-content p { font-size: 13px; color: var(--light-text); }
.action-icon { font-size: 32px; background: rgba(5, 38, 89,0.05); padding: 12px; border-radius: 50%; }

/* Menu Page */
.menu-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 6px;
    border-radius: 20px;
    border: none;
}
.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.categories-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.category-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--dark-color);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}
.category-card:active { transform: scale(0.95); }

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--tg-theme-bg-color, #ffffff);
    border: none;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    padding: 12px 20px;
    margin: -36px -20px 20px -20px;
    width: calc(100% + 40px);
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: -15px;
    z-index: 100;
}
.back-icon { font-size: 20px; }

.grid-2col { display: grid; grid-template-columns: 1fr; gap: 20px; }
.menu-item-card { padding: 0; overflow: hidden; }
.menu-item-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.menu-item-info { padding: 20px; }
.menu-item-info h3 { font-size: 20px; margin-bottom: 8px; }
.menu-item-desc { font-size: 14px; color: var(--light-text); margin-bottom: 16px; white-space: pre-wrap; }

.kbzhu-container { display: flex; flex-wrap: wrap; gap: 6px; }
.kbzhu-pill {
    background: rgba(5, 38, 89, 0.05);
    color: var(--primary-color);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

/* Profile */
.profile-header { padding: 30px 20px; text-align: center; }
.avatar {
    font-size: 56px;
    width: 90px;
    height: 90px;
    line-height: 90px;
    background: linear-gradient(135deg, rgba(5, 38, 89,0.1), rgba(5, 38, 89,0.2));
    border-radius: 50%;
    margin: 0 auto 16px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}
.rank-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
}

.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.stat-box { text-align: center; padding: 16px 10px; margin-bottom: 0; }
.stat-val { display: block; font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 800; color: var(--primary-color); margin: 4px 0; }
.stat-label { font-size: 12px; color: var(--light-text); font-weight: 500; }

.reward-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.drinks-count { font-size: 14px; color: var(--light-text); }
.drinks-count strong { color: var(--primary-color); font-size: 18px; }

.progress-bar {
    height: 14px;
    background: rgba(5, 38, 89, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0 8px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #052659, #5483B3);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 10px;
}
.progress-text { font-size: 12px; color: var(--light-text); text-align: right; margin-bottom: 20px; font-weight: 500; }

.section-title { margin: 10px 0 15px; padding-left: 5px; font-size: 18px; }
.list-card { padding: 10px 20px; }
.leaderboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
}
.leaderboard-list-item:last-child { border-bottom: none; }
.leaderboard-name { font-weight: 500; }
.leaderboard-score { font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--primary-color); }

/* Quiz */
.quiz-hero-icon { font-size: 64px; margin-bottom: 10px; }
.quiz-subtitle { color: var(--light-text); margin: 10px 0 20px; }
.quiz-rules { background: rgba(0,0,0,0.02); padding: 20px; border-radius: 16px; margin-bottom: 25px; }
.rule-item { margin-bottom: 12px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.rule-item:last-child { margin-bottom: 0; }
.rule-icon { font-size: 20px; }

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}
.quiz-progress-pill, .quiz-score-pill {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}
.quiz-score-pill { color: var(--primary-color); }

.question-text {
    font-size: 22px;
    margin-bottom: 30px;
    line-height: 1.4;
}

.option-btn {
    display: block;
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.2s;
    color: var(--text-color);
}
.option-btn:active { transform: scale(0.98); }
.option-btn.correct {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.option-btn.wrong {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}
.res-stat {
    background: rgba(0,0,0,0.03);
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
}
.res-stat strong { font-size: 20px; }
.final-score-box {
    margin: 30px 0;
}
.final-score {
    font-size: 48px;
    color: var(--primary-color);
    line-height: 1;
    margin-top: 10px;
}

/* Quiz Bank Progress */
.quiz-bank-progress {
    margin: 0 0 18px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.03);
    border-radius: 14px;
}
.bank-progress-bar {
    height: 8px;
    background: rgba(0,0,0,0.07);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 8px;
}
.bank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 100px;
    width: 0%;
    transition: width 0.6s ease;
}
.bank-progress-text {
    font-size: 12px;
    color: var(--light-text);
    text-align: center;
}

/* Вторичная кнопка */
.btn-secondary {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:active { transform: scale(0.98); opacity: 0.8; }

/* ─── Велком-бук ─────────────────────────────────────────── */
.welcome-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.welcome-hero {
    text-align: center;
    padding: 28px 20px 22px;
}
.welcome-hero-icon {
    font-size: 44px;
    margin-bottom: 8px;
}
.welcome-hero h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}
.welcome-hero p {
    font-size: 14px;
    color: var(--light-text);
    line-height: 1.5;
}

.welcome-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-section-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.welcome-section-card:active {
    transform: scale(0.98);
}
.welcome-section-icon {
    font-size: 26px;
    min-width: 36px;
    text-align: center;
}
.welcome-section-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-color);
}
.welcome-arrow {
    margin-left: auto;
    font-size: 22px;
    color: var(--light-text);
    opacity: 0.6;
}

.welcome-section-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.section-content {
    padding: 22px 20px;
}
.section-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 18px;
    line-height: 1.3;
}
.section-body {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.8;
}
.section-body b {
    color: var(--primary-color);
    font-weight: 600;
}

/* ─── Tour Page ─── */
.tour-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
}
.tour-hero {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(193, 232, 255, 0.55) 0%, rgba(125, 160, 202, 0.25) 100%);
    border-radius: 20px;
    margin-bottom: 8px;
}
.tour-hero-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.tour-hero h2 {
    font-size: 22px;
    margin-bottom: 8px;
}
.tour-subtitle {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    line-height: 1.4;
}
.tour-videos {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.video-card {
    background: var(--tg-theme-bg-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--tg-theme-secondary-bg-color);
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}
.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-info {
    padding: 16px;
}
.video-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}
.video-info p {
    margin: 0;
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    line-height: 1.4;
}
.tour-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(193, 232, 255, 0.3);
    border-left: 4px solid var(--primary-color);
}
.tour-tip-icon {
    font-size: 24px;
}

/* ── Menu Item Additions ── */
.hit-badge-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff4b2b, #ff416c);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(255, 65, 108, 0.4);
    z-index: 10;
}

.hit-badge-inline {
    display: inline-block;
    background: linear-gradient(135deg, #ff4b2b, #ff416c);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.menu-item-allergens {
    font-size: 12px;
    color: #eab308;
    margin-top: 6px;
    margin-bottom: 8px;
    background: rgba(234, 179, 8, 0.1);
    padding: 6px 8px;
    border-radius: 6px;
}

/* ─── Trainings ─── */
.trainings-page, .training-view-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
}
.trainings-hero {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(5, 38, 89, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 4px;
}
.trainings-hero-icon { font-size: 48px; margin-bottom: 12px; }
.trainings-hero h2 { font-size: 22px; margin-bottom: 8px; }
.trainings-hero p { font-size: 14px; color: var(--tg-theme-hint-color); line-height: 1.4; }

.trainings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.training-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.training-card:active { transform: scale(0.98); }
.training-card-icon {
    font-size: 30px;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.12);
    border-radius: 12px;
}
.training-card-text h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.training-card-text p { font-size: 12.5px; color: var(--light-text); line-height: 1.4; }
.training-card-meta {
    font-size: 11px;
    color: var(--light-text);
    margin-top: 6px;
    display: inline-block;
    background: rgba(5, 38, 89, 0.08);
    padding: 2px 8px;
    border-radius: 8px;
}
.training-arrow { margin-left: auto; font-size: 22px; color: var(--light-text); opacity: 0.6; }

/* Module viewer */
.training-view-header { display: flex; flex-direction: column; gap: 10px; }
.training-progress-pill {
    align-self: flex-start;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    background: var(--card-bg);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}
.training-dots { display: flex; gap: 6px; margin-bottom: 4px; }
.training-dot {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: rgba(5, 38, 89, 0.12);
    transition: background 0.3s ease;
}
.training-dot.done { background: linear-gradient(90deg, #052659, #5483B3); }
.training-dot.active { background: #a855f7; }

.module-card { padding: 22px 20px; }
.module-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    margin-bottom: 16px;
    line-height: 1.3;
}
.module-body { font-size: 14px; line-height: 1.75; color: var(--text-color); }
.module-body p { margin-bottom: 12px; }
.module-body ul { padding-left: 20px; margin-bottom: 12px; }
.module-body li { margin-bottom: 6px; }
.module-body b { color: var(--primary-color); font-weight: 600; }

.formula-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(5, 38, 89, 0.08));
    border-left: 4px solid #a855f7;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 600;
    text-align: center;
    margin: 14px 0;
    font-size: 13.5px;
}

.compare-row { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.compare-bad, .compare-good {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}
.compare-bad { background: rgba(239, 68, 68, 0.08); border-left: 4px solid var(--danger); }
.compare-good { background: rgba(16, 185, 129, 0.08); border-left: 4px solid var(--success); }
.compare-tag { font-weight: 700; margin-right: 6px; }
.compare-effect { font-size: 12px; color: var(--light-text); padding: 0 4px; }

.quote-callout {
    background: rgba(5, 38, 89, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    font-style: italic;
    margin: 14px 0;
    font-size: 13.5px;
    color: var(--dark-color);
}

.taboo-card {
    background: rgba(239, 68, 68, 0.06);
    border-left: 4px solid var(--danger);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.taboo-card b { color: var(--danger); }

.exercise-card { background: rgba(5, 38, 89, 0.05); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.reveal-btn {
    margin-top: 10px;
    background: var(--tg-theme-button-color, var(--primary-color));
    color: var(--tg-theme-button-text-color, #fff);
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.reveal-answer {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,0.15);
    font-size: 13.5px;
}
.reveal-answer.shown { display: block; }

.training-nav-buttons { display: flex; gap: 10px; }
.training-nav-buttons .btn-secondary { flex: 1; }
.training-nav-buttons .btn-primary { flex: 2; }

/* ─── Events ─── */
.events-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
}
.events-hero {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(5, 38, 89, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 4px;
}
.events-hero-icon { font-size: 48px; margin-bottom: 12px; }
.events-hero h2 { font-size: 22px; margin-bottom: 8px; }
.events-hero p { font-size: 14px; color: var(--tg-theme-hint-color); line-height: 1.4; }

.events-section-label {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--light-text);
    padding-left: 4px;
    margin-top: 4px;
}

.events-list { display: flex; flex-direction: column; gap: 10px; }

.event-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-left: 4px solid var(--event-color, var(--primary-color));
}
.event-card.is-past { opacity: 0.55; }

.event-date-badge {
    flex: none;
    width: 52px;
    text-align: center;
    background: rgba(5, 38, 89, 0.07);
    border-radius: 12px;
    padding: 8px 4px;
}
.event-date-badge .day {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--event-color, var(--primary-color));
    line-height: 1;
}
.event-date-badge .month {
    display: block;
    font-size: 10.5px;
    color: var(--light-text);
    text-transform: uppercase;
    margin-top: 3px;
}

.event-body { flex: 1; min-width: 0; }
.event-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.event-title-row h3 { font-size: 15px; font-weight: 600; }
.event-type-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--event-color, var(--primary-color));
    background: var(--event-color-bg, rgba(5, 38, 89, 0.12));
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.event-when {
    font-size: 12.5px;
    color: var(--light-text);
    margin-bottom: 4px;
}
.event-branch-tag {
    font-size: 11.5px;
    color: var(--light-text);
    margin-bottom: 6px;
}
.event-desc {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
}
.events-empty {
    text-align: center;
    color: var(--light-text);
    padding: 30px 10px;
}


/* ─── Products ─── */
.products-page { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.products-hero {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(84, 131, 179, 0.16) 0%, rgba(5, 38, 89, 0.1) 100%);
    border-radius: 20px;
}
.products-hero-icon { font-size: 48px; margin-bottom: 12px; }
.products-hero h2 { font-size: 22px; margin-bottom: 8px; }
.products-hero p { font-size: 14px; color: var(--tg-theme-hint-color); line-height: 1.4; }

.products-search {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(5, 38, 89, 0.15);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 15px;
    outline: none;
}
.products-search:focus { border-color: var(--primary-color); }

.products-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.products-cats::-webkit-scrollbar { display: none; }
.products-cat {
    flex: none;
    border: 1px solid rgba(5, 38, 89, 0.15);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}
.products-cat.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.carb-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.carb-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.carb-complex { color: #052659; background: rgba(84, 131, 179, 0.16); }
.carb-fast    { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.carb-low     { color: #4b5563; background: rgba(107, 114, 128, 0.14); }

.products-list { display: flex; flex-direction: column; gap: 10px; }
.product-card { padding: 14px 16px; }
.product-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.product-emoji {
    flex: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(5, 38, 89, 0.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.product-head-text { flex: 1; min-width: 0; }
.product-head-text h3 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.product-rich-short { font-size: 12px; color: var(--light-text); margin-top: 2px; line-height: 1.35; }
.product-head-text .carb-badge { margin-top: 6px; margin-right: 4px; }
.product-warn-mini { color: #b91c1c; background: rgba(239, 68, 68, 0.1); }
.product-chevron { flex: none; font-size: 22px; color: var(--light-text); transition: transform 0.2s ease; }
.product-card.open .product-chevron { transform: rotate(90deg); }

.product-details { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(5, 38, 89, 0.18); font-size: 13.5px; line-height: 1.55; }
.product-card.open .product-details { display: block; }
.product-details p { margin-bottom: 8px; }
.product-cat-label { font-size: 11.5px; color: var(--light-text); margin-bottom: 6px; }
.product-section-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--light-text); margin: 10px 0 6px;
}
.product-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.product-chip { font-size: 12px; padding: 4px 9px; border-radius: 10px; background: rgba(84, 131, 179, 0.12); }
.product-chip.dish { background: rgba(5, 38, 89, 0.08); }
.product-carbs .carb-badge { margin-right: 4px; }
.product-say {
    margin: 10px 0 4px;
    padding: 10px 12px;
    border-left: 3px solid #5483B3;
    background: rgba(84, 131, 179, 0.1);
    border-radius: 0 10px 10px 0;
    font-size: 13px;
}
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.product-tag { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: rgba(5, 38, 89, 0.08); }
.product-tag.warn { background: rgba(239, 68, 68, 0.1); color: #b91c1c; font-weight: 600; }

/* ── Смена и чек-листы ── */
.shift-actions { display: flex; gap: 10px; margin-top: 16px; }
.shift-btn { padding: 12px; font-size: 16px; }
.shift-btn-out { background: linear-gradient(135deg, #5483B3, #3A5578); }
.section-title { font-size: 16px; margin: 6px 4px 12px; }
.cl-empty { color: var(--light-text); font-size: 14px; text-align: center; padding: 20px; }
.cl-card.cl-done { opacity: 0.75; }
.cl-card.cl-overdue { border-color: rgba(239, 68, 68, 0.45); }
.cl-card.cl-overdue p { color: #b91c1c; }
.checklist-head h2 { font-size: 20px; margin-bottom: 4px; }
.cl-meta { font-size: 13px; color: var(--light-text); margin-bottom: 12px; }
.cl-progress { height: 8px; border-radius: 4px; background: rgba(5, 38, 89, 0.08); overflow: hidden; }
.cl-progress-fill { height: 100%; background: var(--primary-color); border-radius: 4px; transition: width 0.3s ease; }
.cl-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cl-item { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 0; }
.cl-check { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--primary-color); background: transparent;
    color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.cl-item.is-done .cl-check { background: var(--success); border-color: var(--success); }
.cl-item.is-done .cl-text > div:first-child { color: var(--light-text); text-decoration: line-through; }
.cl-text { flex: 1; font-size: 15px; line-height: 1.35; }
.cl-sub { font-size: 12px; color: var(--light-text); margin-top: 2px; }
.cl-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.cl-photo-btn { flex: none; border: none; border-radius: 12px; padding: 8px 10px; font-size: 13px; font-weight: 600;
    background: rgba(5, 38, 89, 0.08); color: var(--primary-color); cursor: pointer; }

/* ── Библиотека HoReCa ── */
.lib-home-card { background: linear-gradient(135deg, rgba(193, 232, 255, 0.55) 0%, rgba(84, 131, 179, 0.18) 100%); border-color: #7DA0CA; }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.lib-card { padding: 16px; margin-bottom: 0; cursor: pointer; }
.lib-card-emoji { font-size: 30px; margin-bottom: 8px; }
.lib-card h3 { font-size: 15px; line-height: 1.25; margin-bottom: 4px; }
.lib-card p { font-size: 12px; color: var(--light-text); }
.lib-articles { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 16px; }
.lib-articles .lib-row { margin-bottom: 0; }
.lib-row.is-read h3 { color: var(--light-text); }
.lib-row-mark { flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(5, 38, 89, 0.06); font-size: 18px; color: var(--success); font-weight: 700; }
.lib-section-head { text-align: center; }
.lib-section-emoji { font-size: 44px; margin-bottom: 6px; }
.lib-section-head h2 { font-size: 21px; margin-bottom: 6px; }
.lib-section-head p { font-size: 14px; color: var(--light-text); }
.module-body h4 { font-size: 16px; margin: 16px 0 6px; color: var(--dark-color); }
.lib-table-wrap { overflow-x: auto; margin: 12px 0; }
.lib-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.35; }
.lib-table th { text-align: left; background: rgba(5, 38, 89, 0.08); color: var(--primary-color); padding: 8px; font-weight: 700; }
.lib-table td { padding: 8px; border-top: 1px solid rgba(5, 38, 89, 0.08); vertical-align: top; }
.lib-table td:first-child { font-weight: 600; }
