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

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow: hidden; width: 100%; height: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #f2f1f6; color: #1c1c1e; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

/* ===== КОНТЕЙНЕР ПРИЛОЖЕНИЯ ===== */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f9fc 0%, #f2f1f6 100%);
    position: relative;
    overflow: hidden; /* ← НЕТ ПРОКРУТКИ */
}

/* ===== РЕЖИМЫ ===== */
.mode {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden; /* ← НЕТ ПРОКРУТКИ */
}

.mode.active {
    display: flex;
}

/* ===== ЭКРАНЫ ===== */
.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto; /* ← КАЖДЫЙ ЭКРАН ПРОКРУЧИВАЕТСЯ САМ */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 90px; /* ← ОТСТУП ОТ ТАББАРА */
}

.screen.active {
    display: flex;
}

/* ===== PULL-TO-REFRESH ===== */
.pull-to-refresh {
    position: fixed;
    top: -60px;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: top 0.2s ease;
    border-bottom: 0.5px solid rgba(0,0,0,0.05);
}



.pull-to-refresh-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e5ea;
    border-top-color: #007aff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.pull-to-refresh.loading .pull-to-refresh-spinner {
    animation: spin 0.8s linear infinite;
}

.pull-to-refresh-text {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 500;
}

/* ===== ВЕРХНИЙ ФИКСИРОВАННЫЙ ТАББАР ===== */
.top-tabbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px;
    gap: 4px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.top-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    min-height: 52px;
}

.top-tab svg {
    width: 22px;
    height: 22px;
    stroke: #8e8e93;
    transition: all 0.2s;
    display: block;
}

.top-tab span {
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
    transition: all 0.2s;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.top-tab.active {
    background: #f2f1f6;
}

.top-tab.active svg {
    stroke: #007aff;
}

.top-tab.active span {
    color: #007aff;
    font-weight: 600;
}



.theme-tab {
    position: relative;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-tab span {
    display: none;
}

.theme-tab .sun-icon-header,
.theme-tab .moon-icon-header {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-tab .sun-icon-header {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

.theme-tab .moon-icon-header {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.app {
    padding-top: 70px;
}

.theme-toggle-fixed, .top-bar-fixed {
    display: none;
}

/* ===== ПАНЕЛЬ С РЕЖИМАМИ ===== */
.top-bar-modes {
    background: #ffffff;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(0,0,0,0.06);
}

/* Подкладка под верхней панелью — закрывает просвет на стыке с подменю */
.top-bar-modes::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 2px;
    background: inherit;   /* возьмёт фон самой панели */
    pointer-events: none;
}


.top-bar-modes .mode-switcher {
    display: flex;
    gap: 4px;
    background: #f2f1f6;
    border-radius: 14px;
    padding: 4px;
}

.top-bar-modes .mode-btn {
    flex: 1;
    padding: 10px 6px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.top-bar-modes .mode-btn.active {
    background: #ffffff;
    color: #1c1c1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}



.mode .top-bar {
    display: none;
}

/* ===== БАР ЗАГОЛОВКА ===== */
.section-bar {
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 0.5px solid rgba(0,0,0,0.06);
}

.section-bar-left {
    cursor: pointer;
}

.section-bar-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #f2f1f6, #e8e8ed);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1c1e;
    transition: all 0.3s ease;
}

.section-bar-icon svg {
    width: 24px;
    height: 24px;
}

.section-bar-text h1 {
    font-size: 19px;
    font-weight: 700;
    color: #1c1c1e;
    letter-spacing: -0.3px;
}

.section-bar-text p {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 2px;
}

/* ===== ПОДТАББАР ===== */
.sub-tabbar {
    display: flex;
    background: #ffffff;
    padding: 8px 12px;
    gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.sub-tab {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 30px;
    background: #f2f1f6;
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-tab.active {
    background: linear-gradient(135deg, #007aff, #0051d5);
    color: white;
    box-shadow: 0 4px 12px rgba(0,122,255,0.35);
}

.sub-tab svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ===== HERO-БЛОК СРОКА БЕРЕМЕННОСТИ ===== */
.pregnancy-hero {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
    margin: 16px;
    border-radius: 24px;
    padding: 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,149,0,0.1);
}

.pregnancy-hero-icon {
    font-size: 44px;
    background: linear-gradient(135deg, #fff0e6, #ffe6d5);
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pregnancy-hero-content {
    flex: 1;
}

.pregnancy-hero-title {
    font-size: 10px;
    font-weight: 600;
    color: #ff9500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.pregnancy-hero-weeks {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 14px;
}

.hero-weeks-number {
    font-size: 32px;
    font-weight: 800;
    color: #9a3412;
    line-height: 1;
}

.hero-weeks-text {
    font-size: 13px;
    font-weight: 500;
    color: #8e8e93;
}

.pregnancy-hero-edd {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fc;
    border-radius: 14px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.hero-edd-icon {
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-edd-icon svg {
    stroke: #ff9500;
}

.hero-edd-info {
    flex: 1;
}

.hero-edd-label {
    font-size: 9px;
    font-weight: 500;
    color: #8e8e93;
    margin-bottom: 2px;
}

.hero-edd-value {
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1e;
}

.pregnancy-hero-days-left {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff5e6, #ffe6d5);
    border-radius: 14px;
    padding: 8px 10px;
}

.hero-days-left-icon {
    font-size: 22px;
    width: 34px;
    height: 34px;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-days-left-info {
    flex: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
}

.hero-days-left-label {
    font-size: 9px;
    font-weight: 500;
    color: #ff9500;
    width: 100%;
    margin-bottom: 2px;
}

.hero-days-left-value {
    font-size: 20px;
    font-weight: 800;
    color: #ff9500;
    line-height: 1;
}

.hero-days-left-unit {
    font-size: 11px;
    font-weight: 500;
    color: #8e8e93;
    margin-left: 4px;
}

/* Тёмная тема */
body.dark-theme .pregnancy-hero {
    background: linear-gradient(135deg, #2c2c2e 0%, #2a2420 100%);
    border-color: rgba(255,149,0,0.2);
}

body.dark-theme .pregnancy-hero-icon {
    background: linear-gradient(135deg, #2a1f18, #241a14);
}

body.dark-theme .hero-weeks-number {
    color: #ffffff;
}

body.dark-theme .pregnancy-hero-edd {
    background: #3a3a3c;
}

body.dark-theme .hero-edd-icon {
    background: #2c2c2e;
}

body.dark-theme .hero-edd-icon svg {
    stroke: #ff9f0a;
}

body.dark-theme .hero-edd-value {
    color: #ffffff;
}

body.dark-theme .pregnancy-hero-days-left {
    background: linear-gradient(135deg, #2a1f18, #241a14);
}

body.dark-theme .hero-days-left-icon {
    background: #3a3a3c;
}

body.dark-theme .hero-days-left-value {
    color: #ff9f0a;
}

/* ===== ПОЛЗУНОК ПРОГРЕССА БЕРЕМЕННОСТИ ===== */
.pregnancy-progress-card {
    background: #ffffff;
    margin: 0 16px 16px 16px;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,149,0,0.1);
}

.progress-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.progress-card-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #fff0e6, #ffe6d5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #ff9500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-track {
    position: relative;
    height: 8px;
    background: #f2f1f6;
    border-radius: 4px;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9500, #ff7e00, #ff6600);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-dot {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid #ff9500;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(255,149,0,0.3);
    transition: left 0.5s ease;
    z-index: 2;
}

.progress-stages {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
}

.stage {
    text-align: center;
    flex: 1;
    position: relative;
}

.stage-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    margin: 0 auto 8px auto;
    transition: all 0.3s ease;
}

.stage-dot.active {
    width: 12px;
    height: 12px;
    background: #ff9500;
    box-shadow: 0 0 0 4px rgba(255,149,0,0.2);
}

.stage-label {
    font-size: 10px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 2px;
}

.stage.active .stage-label {
    color: #ff9500;
}

.stage-week {
    font-size: 9px;
    color: #cbd5e1;
}

.stage.active .stage-week {
    color: #ff9500;
}

.progress-message {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #ff9500;
    background: linear-gradient(135deg, #fff5e6, #ffe6d5);
    border-radius: 20px;
    padding: 8px 12px;
    margin-top: 8px;
}

/* Тёмная тема */
body.dark-theme .pregnancy-progress-card {
    background: #2c2c2e;
    border-color: rgba(255,149,0,0.2);
}

body.dark-theme .progress-card-icon {
    background: linear-gradient(135deg, #2a1f18, #241a14);
}

body.dark-theme .progress-track {
    background: #3a3a3c;
}

body.dark-theme .progress-dot {
    background: #2c2c2e;
    border-color: #ff9f0a;
}

body.dark-theme .stage-dot {
    background: #4a4a4c;
}

body.dark-theme .stage-dot.active {
    background: #ff9f0a;
}

body.dark-theme .progress-message {
    background: linear-gradient(135deg, #2a1f18, #241a14);
    color: #ff9f0a;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 16px 0;
    padding: 10px 20px;
    background: #f2f1f6;
    color: #007aff;
    border: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-small:active {
    transform: scale(0.97);
}

.btn-small svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================================
   ПРОГРЕСС БЕРЕМЕННОСТИ С ЭМОДЗИ (НОВЫЙ СТИЛЬ)
   ============================================================ */

.pregnancy-progress-card {
    background: #ffffff;
    margin: 0 16px 16px 16px;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,149,0,0.1);
}

.progress-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.progress-card-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #fff0e6, #ffe6d5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #ff9500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-track {
    position: relative;
    height: 12px;
    background: #f2f1f6;
    border-radius: 6px;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9500, #ff7e00, #ff6600);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* ===== ЭМОДЗИ ВМЕСТО ТОЧКИ ===== */
.progress-emoji {
    position: absolute;
    top: 50%;
    font-size: 44px;
    transform: translate(-50%, -50%);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    line-height: 1;
    pointer-events: none;
    animation: floatEmoji 2.5s ease-in-out infinite;
}

@keyframes floatEmoji {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
    }
    50% { 
        transform: translate(-50%, -58%) scale(1.1) rotate(-3deg); 
    }
}

/* ===== ПОДПИСЬ ПОД ЭМОДЗИ ===== */
.progress-week-label {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1e;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(6px);
}

.progress-track:hover .progress-week-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== СТАДИИ ===== */
.progress-stages {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
}

.stage {
    text-align: center;
    flex: 1;
    position: relative;
}

.stage-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    margin: 0 auto 8px auto;
    transition: all 0.3s ease;
}

.stage-dot.active {
    width: 12px;
    height: 12px;
    background: #ff9500;
    box-shadow: 0 0 0 4px rgba(255,149,0,0.2);
}

.stage-label {
    font-size: 10px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 2px;
}

.stage.active .stage-label {
    color: #ff9500;
}

.stage-week {
    font-size: 9px;
    color: #cbd5e1;
}

.stage.active .stage-week {
    color: #ff9500;
}

/* ===== СООБЩЕНИЕ ===== */
.progress-message {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #ff9500;
    background: linear-gradient(135deg, #fff5e6, #ffe6d5);
    border-radius: 20px;
    padding: 10px 16px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 420px) {
    .progress-emoji {
        font-size: 36px;
    }
    .progress-week-label {
        font-size: 11px;
        padding: 4px 12px;
    }
    .progress-track {
        height: 10px;
        margin-bottom: 18px;
    }
}

@media (max-width: 360px) {
    .progress-emoji {
        font-size: 30px;
    }
    .progress-week-label {
        font-size: 10px;
        padding: 4px 10px;
        white-space: normal;
        max-width: 180px;
        text-align: center;
    }
    .progress-track {
        height: 8px;
        margin-bottom: 16px;
    }
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme .pregnancy-progress-card {
    background: #2c2c2e;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .progress-card-icon {
    background: linear-gradient(135deg, #2a1f18, #241a14);
}

body.dark-theme .progress-fill {
    background: linear-gradient(90deg, #818cf8, #a78bfa, #c084fc) !important;
}

body.dark-theme .progress-emoji {
    filter: drop-shadow(0 4px 16px rgba(167, 139, 250, 0.35));
}

body.dark-theme .progress-week-label {
    background: rgba(44, 44, 46, 0.95);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-theme .stage-dot.active {
    background: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.2);
}

body.dark-theme .stage.active .stage-label {
    color: #a78bfa;
}

body.dark-theme .stage.active .stage-week {
    color: #a78bfa;
}

body.dark-theme .progress-message {
    background: linear-gradient(135deg, #2a1f18, #241a14);
    color: #a78bfa;
}

/* ===== БЫСТРЫЕ ДЕЙСТВИЯ ===== */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 20px 16px;
}

.stat-item {
    background: #fff;
    border-radius: 20px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition: transform 0.2s ease;
}

.stat-item:active .stat-icon {
    transform: scale(0.95);
}

.stat-icon.add {
    background: #007aff15;
    color: #007aff;
}

.stat-icon.calendar-icon {
    background: #ff950015;
    color: #ff9500;
}

.stat-icon.summary-icon {
    background: #34c75915;
    color: #34c759;
}

.stat-text {
    font-size: 12px;
    font-weight: 600;
    color: #3a3a3c;
}

/* ===== ДВЕ КОЛОНКИ ===== */
.home-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 20px;
    align-items: stretch;
}

.home-column {
    min-width: 0;
    background: #fff;
    border-radius: 20px;
    padding: 14px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.home-column.clickable {
    cursor: pointer;
}

.home-column.clickable:active {
    transform: scale(0.98);
}

.home-column h3 {
    font-size: 11px;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.4;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-column > div {
    flex: 1;
    overflow-y: auto;
    max-height: 240px;
}

/* ===== СВОДКА ЗА ДЕНЬ ===== */
.daily-summary-card {
    background: #ffffff;
    border-radius: 24px;
    margin: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.daily-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f1f6;
    flex-wrap: wrap;
    gap: 12px;
}

.daily-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}

.daily-summary-title svg {
    stroke: #007aff;
}

.daily-summary-date input {
    padding: 8px 12px;
    border-radius: 12px;
    border: none;
    background: #f2f1f6;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1e;
    cursor: pointer;
}

.daily-summary-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-summary-loading {
    text-align: center;
    padding: 20px;
    color: #8e8e93;
    font-size: 13px;
}

.summary-group {
    margin-bottom: 8px;
}

.summary-group-title {
    font-size: 11px;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.summary-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.summary-item {
    background: #f9f9fb;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s ease;
}

.summary-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.summary-item-info {
    flex: 1;
}

.summary-item-label {
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.summary-item-value {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.summary-item-unit {
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
}

.summary-item-status {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

.summary-item-status.normal {
    background: #d1fae5;
    color: #059669;
}

.summary-item-status.warning {
    background: #fee2e2;
    color: #dc2626;
}

.summary-item-status.info {
    background: #dbeafe;
    color: #2563eb;
}

.summary-empty {
    text-align: center;
    padding: 30px 20px;
    color: #8e8e93;
    background: #f9f9fb;
    border-radius: 14px;
}

.summary-empty svg {
    width: 40px;
    height: 40px;
    stroke: #cbd5e1;
    margin-bottom: 8px;
}

.summary-empty p {
    font-size: 13px;
}

/* ===== ГРУППИРОВКА ПО НЕДЕЛЯМ ===== */
.week-group {
    margin-bottom: 8px;
}
.week-group-title {
    font-size: 10px;
    font-weight: 700;
    color: #007aff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 0;
    margin-bottom: 2px;
    border-bottom: 1px solid #f2f1f6;
}
.week-group-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 11px;
}
.week-group-item span:first-child {
    font-weight: 500;
    color: #1c1c1e;
}
.week-group-item span:last-child {
    color: #8e8e93;
    font-size: 11px;
}

#upcoming-events .event-group {
    padding: 8px 0;
    border-bottom: 1px solid #f2f1f6;
}
#upcoming-events .event-group:last-child {
    border-bottom: none;
}
#upcoming-events .event-group-date {
    font-size: 10px;
    font-weight: 700;
    color: #ff9500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
#upcoming-events .event-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 2px 0;
    font-size: 12px;
}
#upcoming-events .event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff9500;
    flex-shrink: 0;
    margin-top: 5px;
}
.event-time-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #007aff;
    background: #f0f4ff;
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 4px;
}

/* ===== ПЕРИОДЫ ГРАФИКОВ ===== */
.chart-period-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.period-btn {
    background: #f2f1f6;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn.active {
    background: #007aff;
    color: white;
}

.period-btn:active {
    transform: scale(0.95);
}

.period-label {
    font-size: 12px;
    font-weight: 600;
    color: #1c1c1e;
    background: #f2f1f6;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ===== ФОРМА ===== */
.add-form {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.form-group select, .form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: none;
    background: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: #1c1c1e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    -webkit-appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238e8e93'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
#dynamic-fields {
    display: flex;
    gap: 10px;
}
#dynamic-fields input {
    flex: 1;
}
.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: #007aff;
    color: white;
    border: none;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}


/* ===== ДАВЛЕНИЕ ===== */
.bp-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.bp-input-group {
    flex: 1;
}
.bp-input-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 6px;
}
.bp-input-group input {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: #fff;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bp-time-row {
    margin-top: 8px;
}
.bp-time-row label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 8px;
}
.bp-time-display {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    font-size: 16px;
    color: #1c1c1e;
    transition: all 0.15s ease;
}
.bp-time-display:active {
    transform: scale(0.98);
}
.bp-time-display span:first-child {
    color: #8e8e93;
}
.bp-time-display span.selected {
    color: #1c1c1e;
}
.bp-time-display svg {
    stroke: #8e8e93;
}

/* ===== АНАЛИЗЫ ===== */
.tests-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tests-card {
    background: #fff;
    border-radius: 20px;
    padding: 18px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}
.tests-card.active {
    border: 2px solid #007aff;
}
.tests-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f1f6;
}
.tests-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.tests-card-badge {
    background: #007aff15;
    color: #007aff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.tests-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f2f1f6;
}
.test-item:last-child {
    border-bottom: none;
}
.test-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}
.test-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.test-info {
    flex: 1;
}
.test-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}
.test-week {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 4px;
}
.test-norm {
    font-size: 11px;
    color: #10b981;
}
.test-last-value {
    font-size: 11px;
    color: #007aff;
    margin-top: 4px;
}
.test-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f2f1f6;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}
.test-status.done {
    background: #d1fae5;
    color: #059669;
}
.test-item.available {
    opacity: 1;
}
.test-item.upcoming {
    opacity: 0.7;
}

/* ===== ЧЕК-ЛИСТ ===== */
.checklist-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.checklist-card {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}
.checklist-card.active {
    border: 2px solid #007aff;
}
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.checklist-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.checklist-badge {
    background: #007aff15;
    color: #007aff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    background: #f9f9fb;
}
.checklist-item.completed {
    background: #d1fae5;
}
.checklist-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: background 0.15s ease;
}
.checklist-item.completed .checklist-checkbox {
    background: #10b981;
    color: white;
}
.checklist-text {
    flex: 1;
    font-size: 13px;
    color: #1c1c1e;
    line-height: 1.4;
}
.checklist-item.completed .checklist-text {
    text-decoration: line-through;
    color: #8e8e93;
}
.checklist-deadline {
    display: block;
    font-size: 10px;
    color: #8e8e93;
    margin-top: 2px;
}

/* ===== ВРАЧИ ===== */
.doctors-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.doctors-card {
    background: #fff;
    border-radius: 20px;
    padding: 18px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}
.doctors-card.active {
    border: 2px solid #007aff;
}
.doctors-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f1f6;
}
.doctors-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.doctors-card-badge {
    background: #007aff15;
    color: #007aff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.doctors-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.doctor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f2f1f6;
}
.doctor-item:last-child {
    border-bottom: none;
}
.doctor-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}
.doctor-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.doctor-info {
    flex: 1;
}
.doctor-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}
.doctor-week {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 4px;
}
.doctor-purpose {
    font-size: 12px;
    color: #3a3a3c;
    margin-top: 4px;
}
.doctor-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f2f1f6;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}
.doctor-status.done {
    background: #d1fae5;
    color: #059669;
}
.doctor-item.available {
    opacity: 1;
}
.doctor-item.upcoming {
    opacity: 0.7;
}

/* ===== ПАРТНЁР ===== */
.partner-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.partner-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.partner-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.partner-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.partner-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.partner-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.partner-add-row input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 14px;
    border: none;
    background: #f2f1f6;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
.partner-notes-list, .partner-tasks-list {
    /*max-height: 200px;*/
    /*overflow-y: auto;*/
}
.partner-note-item, .partner-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #f2f1f6;
    position: relative;
}
.partner-note-item:last-child, .partner-task-item:last-child {
    border-bottom: none;
}
.partner-note-text {
    flex: 1;
    font-size: 13px;
    color: #1c1c1e;
}
.partner-note-meta {
    font-size: 10px;
    color: #8e8e93;
}
.partner-task-item.completed .partner-task-text {
    text-decoration: line-through;
    color: #8e8e93;
}
.partner-task-text {
    flex: 1;
    font-size: 13px;
    color: #1c1c1e;
}
.partner-task-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
    cursor: pointer;
}
.partner-delete-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.partner-delete-btn:active {
    transform: scale(0.97);
}
.partner-support-text p {
    padding: 8px 0;
    font-size: 13px;
    color: #3a3a3c;
    border-bottom: 1px solid #f2f1f6;
    display: flex;
    align-items: center;
    gap: 8px;
}
.partner-support-text p:last-child {
    border-bottom: none;
}
.empty-state {
    text-align: center;
    padding: 20px;
    color: #8e8e93;
    font-size: 12px;
}

/* ===== КНОПКА ДЛЯ ВЕСА ===== */
.weight-norm-btn {
    background: none;
    border: none;
    color: #007aff;
    font-size: 11px;
    margin-left: 8px;
    cursor: pointer;
}

/* ===== ГРАФИКИ ===== */
.charts-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chart-card {
    background: #fff;
    border-radius: 24px;
    padding: 18px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}
.chart-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.chart-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.chart-card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 2px;
}
.chart-card-desc {
    font-size: 11px;
    color: #8e8e93;
    margin: 0;
}
.chart-card-badge {
    background: #f2f1f6 !important;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Светлая тема — цвет соответствует графику */
.chart-card:nth-child(1) .chart-card-badge { color: #db2777 !important; }   /* Вес */
.chart-card:nth-child(2) .chart-card-badge { color: #8b5cf6 !important; }   /* Вес плода */
.chart-card:nth-child(3) .chart-card-badge { color: #ef4444 !important; }   /* Гемоглобин */
.chart-card:nth-child(4) .chart-card-badge { color: #f59e0b !important; }   /* Глюкоза */
.chart-card:nth-child(5) .chart-card-badge { color: #8b5cf6 !important; }   /* Ферритин */
.chart-card:nth-child(6) .chart-card-badge { color: #ef4444 !important; }   /* Давление (день) */
.chart-card:nth-child(7) .chart-card-badge { color: #3b82f6 !important; }   /* Давление (неделя) */
.chart-card:nth-child(8) .chart-card-badge { color: #10b981 !important; }   /* Шевеления */
.chart-card:nth-child(9) .chart-card-badge { color: #ec4899 !important; }   /* УЗИ: ЧСС */
.chart-card:nth-child(10) .chart-card-badge { color: #3b82f6 !important; }  /* УЗИ: КТР */
.chart-card:nth-child(11) .chart-card-badge { color: #f59e0b !important; }  /* УЗИ: БПР */
.chart-card:nth-child(12) .chart-card-badge { color: #6366f1 !important; }  /* ТТГ */

/* Тёмная тема — белый текст */
body.dark-theme .chart-card-badge {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #ffffff !important;
}

body.dark-theme .chart-card .chart-card-badge {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #ffffff !important;
}

/* Если бейдж содержит кнопку (например, для веса) */
body.dark-theme .chart-card-badge .weight-norm-btn {
    color: #a78bfa !important;
}
.chart-card canvas {
    max-height: 240px;
    width: 100% !important;
}

/* ===== ИСТОРИЯ ===== */
#history-table {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.history-week-title {
    font-size: 13px;
    font-weight: 700;
    color: #007aff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: inline-block;
}

/* Тёмная тема */
body.dark-theme .history-week-title {
    background: #3a3a3c !important;
    color: #a78bfa !important;
}
.history-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    transition: box-shadow 0.15s ease;
}
.history-card-info {
    flex: 1;
    min-width: 0;
}
.history-card-date {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 2px;
}
.history-card-category {
    font-size: 12px;
    font-weight: 600;
    color: #1c1c1e;
}
.history-card-value {
    font-size: 13px;
    color: #3a3a3c;
    margin-top: 2px;
    word-break: break-word;
}
.delete-btn {
    background: #ff3b30;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
    transition: all 0.15s ease;
}
.delete-btn:active {
    transform: scale(0.97);
}


/* ===== КАЛЕНДАРЬ ===== */
.calendar-container {
    padding: 16px;
}
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.cal-month-year {
    font-size: 16px;
    font-weight: 700;
}
.cal-nav-btn {
    background: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.15s ease;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    margin-bottom: 20px;
}
.cal-weekday {
    font-size: 11px;
    font-weight: 700;
    color: #8e8e93;
    padding: 8px 0;
    text-transform: uppercase;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s ease;
}
.cal-day:active {
    transform: scale(0.95);
}
.cal-day.empty {
    background: transparent;
    cursor: default;
}
.cal-day.empty:active {
    transform: none;
}
.cal-day.has-event::after {
    content: '';
    width: 5px;
    height: 5px;
    background: #007aff;
    border-radius: 50%;
    margin-top: 2px;
}
.cal-day.today {
    background: #007aff15;
    color: #007aff;
    font-weight: 700;
}
.cal-day.selected {
    background: #007aff;
    color: white;
}
.calendar-events h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}
.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border-radius: 14px;
    margin-bottom: 6px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.event-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.event-item-time {
    font-size: 12px;
    font-weight: 700;
    color: #007aff;
    background: #f0f4ff;
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.event-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}
.edit-btn {
    background: #f2f1f6;
    color: #007aff;
    border: none;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.edit-btn:active {
    transform: scale(0.97);
}
.add-event-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}
.add-event-row input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    border-radius: 14px;
    border: none;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.add-event-row input[type="time"] {
    width: 90px;
    flex-shrink: 0;
    padding: 12px 10px;
    border-radius: 14px;
    border: none;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    text-align: center;
}
.btn-add-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-add-event-icon {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
}
.btn-add-event svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== ИСПРАВЛЕНИЕ: ЦВЕТА В СОБЫТИЯХ КАЛЕНДАРЯ (ТЁМНАЯ ТЕМА) ===== */

/* Текст события — белый */
body.dark-theme .event-item .event-item-info span {
    color: #ffffff !important;
}

/* Время события — ярко-синий */
body.dark-theme .event-item .event-item-time {
    background: rgba(10, 132, 255, 0.2) !important;
    color: #0a84ff !important;
}

/* Контейнер события — тёмный фон */
body.dark-theme .event-item {
    background: rgba(58, 58, 60, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Кнопка удаления — красная и видимая */
body.dark-theme .event-item .delete-btn {
    color: #ff453a !important;
    background: rgba(255, 69, 58, 0.1) !important;
    border: 1px solid rgba(255, 69, 58, 0.2) !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
}

body.dark-theme .event-item .delete-btn:hover {
    background: rgba(255, 69, 58, 0.2) !important;
}

/* Кнопка редактирования — синяя и видимая */
body.dark-theme .event-item .edit-btn {
    color: #0a84ff !important;
    background: rgba(10, 132, 255, 0.1) !important;
    border: 1px solid rgba(10, 132, 255, 0.2) !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
}

body.dark-theme .event-item .edit-btn:hover {
    background: rgba(10, 132, 255, 0.2) !important;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.modal-content input[type="text"],
.modal-content input[type="time"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    background: #f2f1f6;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}



/* ОГРАНИЧЕНИЕ ДЛЯ ПОЛЯ ВРЕМЕНИ */
.modal-content input[type="time"] {
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

.modal-buttons {
    display: flex;
    gap: 8px;
}

.modal-buttons button {
    flex: 1;
}

/* ============================================================
   ФИКС: МОДАЛЬНОЕ ОКНО РЕДАКТИРОВАНИЯ СОБЫТИЙ
   ============================================================ */

#edit-event-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 9999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

#edit-event-modal[style*="display:flex"],
#edit-event-modal[style*="display: flex"] {
    display: flex !important;
}

#edit-event-modal .modal-content {
    background: #ffffff !important;
    border-radius: 28px !important;
    padding: 24px 20px !important;
    width: 100% !important;
    max-width: 360px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
    animation: modalSlideUp 0.3s ease !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10000 !important;
}

#edit-event-modal .modal-content h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1c1c1e !important;
    text-align: center !important;
    margin-bottom: 16px !important;
}

#edit-event-modal .modal-content input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    border: 1.5px solid #e5e5ea !important;
    background: #f9f9fb !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
    color: #1c1c1e !important;
    margin-bottom: 12px !important;
}

#edit-event-modal .modal-content input:focus {
    outline: none !important;
    border-color: #007aff !important;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1) !important;
}

#edit-event-modal .modal-content input[type="time"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#edit-event-modal .modal-buttons {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 4px !important;
}

#edit-event-modal .modal-buttons button {
    flex: 1 !important;
    padding: 14px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    z-index: 10001 !important;
}

#edit-event-modal .modal-buttons button:active {
    transform: scale(0.97) !important;
}

#edit-event-modal .modal-buttons .btn-small {
    background: #f2f1f6 !important;
    color: #8e8e93 !important;
}

#edit-event-modal .modal-buttons .btn-add-event {
    background: #007aff !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(0,122,255,0.25) !important;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme #edit-event-modal {
    background: rgba(0,0,0,0.7) !important;
}

body.dark-theme #edit-event-modal .modal-content {
    background: #2c2c2e !important;
}

body.dark-theme #edit-event-modal .modal-content h3 {
    color: #ffffff !important;
}

body.dark-theme #edit-event-modal .modal-content input {
    background: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme #edit-event-modal .modal-content input:focus {
    border-color: #0a84ff !important;
    box-shadow: 0 0 0 3px rgba(10,132,255,0.15) !important;
}

body.dark-theme #edit-event-modal .modal-buttons .btn-small {
    background: #3a3a3c !important;
    color: #98989e !important;
}

body.dark-theme #edit-event-modal .modal-buttons .btn-add-event {
    background: #0a84ff !important;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 420px) {
    #edit-event-modal .modal-content {
        padding: 20px 16px !important;
        max-width: 340px !important;
    }
    #edit-event-modal .modal-content input {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }
    #edit-event-modal .modal-buttons button {
        padding: 12px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 360px) {
    #edit-event-modal .modal-content {
        padding: 16px 12px !important;
        max-width: 300px !important;
    }
    #edit-event-modal .modal-content input {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    #edit-event-modal .modal-buttons button {
        padding: 10px !important;
        font-size: 13px !important;
    }
}

/* ============================================================
   СВОДКА (СТРАНИЦА) — УЛУЧШЕНИЕ ВИДИМОСТИ В СВЕТЛОЙ ТЕМЕ
   ============================================================ */

/* Карточка недели */
.summary-card {
    background: #ffffff !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    padding: 18px 16px !important;
    margin-bottom: 12px !important;
}

/* Текущая неделя — выделяем */
.summary-card-current {
    border: 2px solid #34c759 !important;
    background: #f0fdf4 !important;
}

/* Заголовок недели */
.summary-card h3 {
    color: #1c1c1e !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.summary-week-badge {
    background: #007aff15 !important;
    color: #007aff !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* Сетка показателей */
.summary-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 8px !important;
}

.summary-grid-item {
    background: #f8f9fc !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 14px !important;
    padding: 14px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.summary-grid-icon {
    font-size: 24px !important;
    width: 40px !important;
    height: 40px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #e5e5ea !important;
}

.summary-grid-text {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1c1c1e !important;
    word-break: break-word !important;
}

/* Пустое состояние */
.summary-empty {
    background: #f8f9fc !important;
    border: 1px dashed #e5e5ea !important;
    border-radius: 14px !important;
    padding: 20px !important;
    text-align: center !important;
    color: #8e8e93 !important;
}

/* Подсказка "Нажмите для подробностей" */
.summary-tap-hint {
    color: #8e8e93 !important;
    font-size: 12px !important;
    text-align: center !important;
    margin-top: 12px !important;
}

/* ============================================================
   ТЁМНАЯ ТЕМА
   ============================================================ */

body.dark-theme .summary-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}


/* ============================================================
   ПРИНУДИТЕЛЬНАЯ ЗЕЛЁНАЯ РАМКА В ТЁМНОЙ ТЕМЕ
   ============================================================ */

body.dark-theme .summary-card-current,
body.dark-theme .summary-card-current[style] {
    border: 1px solid #a6c3ad !important;
    border-color: hsl(135, 42%, 59%) !important;
    outline: none !important;
}

body.dark-theme .summary-card h3 {
    color: #ffffff !important;
}

body.dark-theme .summary-grid-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .summary-grid-icon {
    background: rgba(44, 44, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .summary-grid-text {
    color: #ffffff !important;
}

body.dark-theme .summary-week-badge {
    background: rgba(52, 199, 89, 0.15) !important;
    color: #6ee7b7 !important;
}

/* ===== СВОДКА ===== */
.summary-scroll {
    padding: 16px;
}
.summary-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.15s ease;
}
.summary-card.clickable:active {
    transform: scale(0.98);
}
.summary-card-current {
    border: 2px solid #34c759;
}
.summary-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.summary-week-badge {
    background: #007aff15;
    color: #007aff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}
.summary-empty {
    text-align: center;
    padding: 16px;
    color: #8e8e93;
}
.summary-empty span {
    font-size: 28px;
    display: block;
    margin-bottom: 4px;
}
.summary-empty p {
    font-size: 12px;
}
.summary-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.summary-preview-item {
    font-size: 12px;
    color: #3a3a3c;
    padding: 4px 0;
    border-bottom: 1px solid #f2f1f6;
    display: flex;
    align-items: center;
    gap: 6px;
}
.summary-preview-item:last-child {
    border-bottom: none;
}
.summary-preview-more {
    font-size: 11px;
    color: #007aff;
    font-weight: 600;
    padding: 2px 0;
}
.summary-tap-hint {
    font-size: 11px;
    color: #8e8e93;
    text-align: center;
    padding: 6px 0 0;
    margin-top: 4px;
}
.week-tips {
    margin-top: 12px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 16px;
}
.week-tips-title {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.week-tip-item {
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}
.week-tip-item:last-child {
    border-bottom: none;
}
.week-tip-item.warning {
    color: #dc2626;
}
.week-tip-item.info {
    color: #0284c7;
}
.week-tip-item.success {
    color: #10b981;
}
.summary-footer-note {
    font-size: 10px;
    color: #8e8e93;
    text-align: center;
    padding: 8px 12px 0;
    margin-top: 6px;
    border-top: 1px solid #f2f1f6;
    font-style: italic;
}

/* ===== ДЕТАЛИ НЕДЕЛИ ===== */
.week-detail-scroll {
    padding: 16px;
}
.detail-section {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.detail-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 8px;
}
.detail-stat {
    font-size: 13px;
    color: #3a3a3c;
    margin-bottom: 4px;
}
.detail-status {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}
.detail-recommendation {
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 10px;
    margin-top: 8px;
    line-height: 1.5;
}

/* ===== ЕЖЕДНЕВНАЯ СТАТЬЯ (НОВЫЙ РАЗДЕЛ) ===== */
.daily-article-section {
    padding: 0 16px 8px;
}

.daily-article-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 24px;
    padding: 16px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: slideInRight 0.4s ease;
}

.daily-article-card:active {
    transform: scale(0.98);
}

.daily-article-card.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    opacity: 0.9;
}

.daily-article-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    opacity: 0.9;
}

.daily-badge-icon {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 20px;
}

.read-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 20px;
}

.new-badge {
    margin-left: auto;
    background: #ff3b30;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    animation: pulse 1s infinite;
}

.daily-article-content {
    display: flex;
    gap: 12px;
}

.daily-article-icon {
    font-size: 40px;
}

.daily-article-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.daily-article-info p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 12px;
    font-size: 10px;
    opacity: 0.7;
}

.daily-article-btn {
    margin-top: 12px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
}

/* ===== МИНИ-СТАТИСТИКА НА ГЛАВНОЙ ===== */
.reading-mini-stats {
    margin: 8px 16px 16px;
    padding: 12px 16px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.reading-mini-stats:active {
    transform: scale(0.98);
}

.reading-mini-streak {
    font-weight: 700;
    color: #f59e0b;
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.reading-mini-progress {
    flex: 1;
    height: 6px;
    background: #e5e5ea;
    border-radius: 3px;
    margin: 0 12px;
    overflow: hidden;
}

.reading-mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ===== ПРЕВЬЮ СТАТЕЙ НА ГЛАВНОЙ ===== */
.daily-preview {
    background: white;
    border-radius: 20px;
    padding: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.daily-preview:active {
    transform: scale(0.98);
}

.daily-preview-badge {
    font-size: 10px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 6px;
}

.daily-preview-content {
    display: flex;
    gap: 12px;
}

.daily-preview-icon {
    font-size: 32px;
}

.daily-preview-title {
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 13px;
}

.daily-preview-desc {
    font-size: 11px;
    color: #8e8e93;
}

/* ===== СТАТИСТИКА ЧТЕНИЯ ===== */
.reading-stats-card {
    background: white;
    border-radius: 20px;
    margin: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.reading-stats-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.streak-badge {
    background: #fef3c7;
    color: #d97706;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.reading-progress-bar {
    height: 8px;
    background: #e5e5ea;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.reading-stats-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8e8e93;
}

/* ===== МИНИ-КАЛЕНДАРЬ ЧТЕНИЯ ===== */
.mini-calendar {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    gap: 8px;
}

.calendar-day {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: 12px;
    background: #f2f1f6;
    position: relative;
    transition: all 0.2s ease;
}

.calendar-day.read {
    background: #d1fae5;
    color: #059669;
}

.calendar-day.today {
    border: 2px solid #007aff;
    background: #eff6ff;
}

.calendar-day-name {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.calendar-day-date {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.check-mark {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== ДОСТИЖЕНИЯ ===== */
.achievements-section {
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-title-small {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.achievement-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
    animation: fadeInUp 0.3s ease;
}

.achievement-card:active {
    transform: scale(0.98);
}

.achievement-icon {
    font-size: 28px;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}

.achievement-desc {
    font-size: 10px;
    color: #b45309;
}

/* ===== ПОЛНЫЙ СПИСОК СТАТЕЙ ===== */
.articles-full-list {
    padding: 0 16px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.articles-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #8e8e93;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.articles-section-title:first-child {
    margin-top: 0;
}

.article-card {
    background: white;
    border-radius: 18px;
    padding: 14px 16px !important;
    margin: 0 0 10px 0 !important;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    animation: fadeInUp 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.article-card:active {
    transform: scale(0.98);
}

.article-card.read {
    opacity: 0.7;
    background: #f9fafb;
}

.article-card-icon {
    font-size: 36px;
}

.article-card-content {
    flex: 1;
}

.article-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.article-card-preview {
    font-size: 12px;
    color: #8e8e93;
    margin-bottom: 6px;
    line-height: 1.4;
}

.article-card-meta {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: #8e8e93;
    align-items: center;
    flex-wrap: wrap;
}

.read-badge-small {
    background: #d1fae5;
    color: #059669;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
}

/* ===== МОДАЛЬНОЕ ОКНО СТАТЬИ ===== */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.article-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.article-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    background: white;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.article-modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-modal-icon {
    font-size: 40px;
}

.article-modal-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.article-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-modal-close:active {
    transform: scale(0.95);
}

.article-modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #3a3a3c;
}

.article-modal-body h2, .article-modal-body h3 {
    color: #1c1c1e;
    margin: 16px 0 8px;
}

.article-modal-body h2:first-child, .article-modal-body h3:first-child {
    margin-top: 0;
}

.article-modal-body ul, .article-modal-body ol {
    padding-left: 20px;
    margin: 8px 0;
}

.article-modal-body li {
    margin-bottom: 4px;
}

.article-modal-body img {
    max-width: 100%;
    border-radius: 16px;
    margin: 12px 0;
}

.article-tip {
    background: #e0f2fe;
    padding: 12px;
    border-radius: 16px;
    margin: 16px 0;
}

.article-warning {
    background: #fee2e2;
    padding: 12px;
    border-radius: 16px;
    margin: 16px 0;
    color: #991b1b;
}

.article-recipe {
    background: #fef3c7;
    padding: 12px;
    border-radius: 16px;
    margin: 16px 0;
}

.article-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e5ea;
}

.article-footer-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 12px;
}

.article-actions {
    display: flex;
    gap: 12px;
}

.like-btn, .share-btn {
    padding: 8px 16px;
    border-radius: 30px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.like-btn:active, .share-btn:active {
    transform: scale(0.97);
}

.like-btn {
    background: #fee2e2;
    color: #dc2626;
}

.share-btn {
    background: #f2f1f6;
    color: #007aff;
}

/* ===== КАЛЕНДАРЬ ОВУЛЯЦИИ ===== */
.precon-settings {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.precon-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 0 16px 16px;
}
.precon-stat-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.15s ease;
}
.precon-stat-card:active {
    transform: scale(0.97);
}
.precon-stat-icon {
    font-size: 22px;
    margin-bottom: 4px;
}
.precon-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.precon-stat-label {
    font-size: 10px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.precon-phases {
    padding: 0 16px 16px;
}
.phase-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #f2f1f6;
}
.phase-segment {
    transition: width 0.5s ease;
}
.phase-menstrual {
    background: #ef4444;
}
.phase-follicular {
    background: #f59e0b;
}
.phase-ovulation {
    background: #ec4899;
}
.phase-luteal {
    background: #8b5cf6;
}
.phase-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 9px;
    font-weight: 600;
    padding: 0 2px;
}
.ovulation-calendar-container {
    margin: 0 16px 16px;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ovulation-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.ovulation-month-year {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
}
.ovulation-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}
.cal-day-sub {
    display: block;
    font-size: 8px;
    color: #8e8e93;
    margin-top: 1px;
}
.cal-day.ovulation-menstrual {
    background: #fef2f2;
    color: #ef4444;
    font-weight: 700;
}
.cal-day.ovulation-fertile {
    background: #d1fae5;
    color: #059669;
    font-weight: 600;
}
.cal-day.ovulation-day {
    background: #fce7f3;
    color: #db2777;
    font-weight: 700;
    box-shadow: 0 0 0 2px #ec4899, 0 2px 8px rgba(236,72,153,0.3);
    transform: scale(1.05);
    z-index: 2;
    position: relative;
}
.ovulation-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    justify-content: center;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ovulation-full-calendar {
    padding: 16px;
}
.ovulation-month-block {
    margin-bottom: 20px;
}
.ovulation-month-title {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 10px;
    text-align: center;
    text-transform: capitalize;
}
.precon-tips {
    padding: 0 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tip-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.tip-text {
    flex: 1;
    min-width: 0;
}
.tip-title {
    font-size: 12px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 2px;
}
.tip-desc {
    font-size: 11px;
    color: #8e8e93;
    line-height: 1.5;
}

/* ===== БАЗАЛЬНАЯ ТЕМПЕРАТУРА ===== */
.bt-add-form {
    padding: 16px;
}
.bt-add-form .form-group {
    margin-bottom: 12px;
}
.bt-add-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.bt-add-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: none;
    background: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: #1c1c1e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ===== ЗДОРОВЬЕ ===== */
.health-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.health-calendar-card {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.health-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.health-month-year {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
}
.health-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}
.health-day-summary {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.health-day-summary h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    text-align: center;
}
.health-day-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.health-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.health-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.health-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.health-card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
}
.vitamin-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vitamin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9f9fb;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #1c1c1e;
    transition: background 0.15s ease;
}
.vitamin-item:active {
    transform: scale(0.98);
}
.vitamin-item:has(input:checked) {
    background: #d1fae5;
    color: #059669;
}
.vitamin-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #10b981;
    cursor: pointer;
}
.vitamin-item label {
    cursor: pointer;
    flex: 1;
}
.lifestyle-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.lifestyle-form .form-group {
    margin-bottom: 0;
}
.lifestyle-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 6px;
}
.lifestyle-form input[type="number"], .lifestyle-form input[type="range"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    background: #f9f9fb;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
.lifestyle-form input[type="range"] {
    padding: 0;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e5ea;
    border-radius: 3px;
    outline: none;
}
.lifestyle-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,122,255,0.3);
}
.health-summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.health-stat-mini {
    background: #f8f9fc !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 14px !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
}
/* ===== ИСПРАВЛЕНИЕ: ФОН БЛОКОВ В РАЗДЕЛЕ "ЗДОРОВЬЕ" (ТОЛЬКО СВЕТЛАЯ ТЕМА) ===== */

/* Блоки показателей в разделе "Здоровье" — как в "Сводка за день" */
.health-stat-mini {
    background: #f8f9fc !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 14px !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
}

.health-stat-icon {
    background: #ffffff !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 12px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}
.health-stat-info {
    flex: 1;
    min-width: 0;
}
.health-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.health-stat-label {
    font-size: 10px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* ===== МОДАЛЬНОЕ ОКНО ВЫБОРА ВРЕМЕНИ ===== */
.time-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.time-picker-content {
    background: #fff;
    border-radius: 24px;
    width: 90%;
    max-width: 340px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}
.time-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 0.5px solid #e5e5ea;
}
.time-picker-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.time-picker-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px 8px;
}
.time-picker-body {
    padding: 20px;
}
.time-picker-columns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}
.time-picker-column {
    flex: 1;
    text-align: center;
}
.time-picker-column-title {
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.time-picker-list {
    height: 150px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    border-radius: 12px;
    background: #f8f9fa;
}
.time-picker-list::-webkit-scrollbar {
    width: 3px;
}
.time-picker-list::-webkit-scrollbar-track {
    background: #e5e5ea;
    border-radius: 3px;
}
.time-picker-list::-webkit-scrollbar-thumb {
    background: #007aff;
    border-radius: 3px;
}
.time-picker-item {
    padding: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #1c1c1e;
    cursor: pointer;
    scroll-snap-align: center;
    transition: all 0.2s;
}
.time-picker-item.selected {
    background: #007aff;
    color: white;
    font-weight: 700;
}
.time-picker-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}
.time-preset-btn {
    background: #f2f1f6;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1c1c1e;
    cursor: pointer;
    transition: all 0.15s ease;
}
.time-preset-btn:active {
    transform: scale(0.97);
}
.time-picker-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 0.5px solid #e5e5ea;
}
.time-picker-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}
.time-picker-btn:active {
    transform: scale(0.97);
}
.time-picker-btn.cancel {
    background: #f2f1f6;
    color: #8e8e93;
}
.time-picker-btn.ok {
    background: #007aff;
    color: white;
}

/* ===== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ДОБАВЛЕНИЯ АНАЛИЗА ===== */
.modal-add-analysis .required-field label {
    font-weight: 700;
}

.modal-add-analysis .required-star {
    color: #ff3b30;
    font-size: 14px;
    margin-left: 2px;
}

.modal-add-analysis .optional-badge {
    font-size: 10px;
    font-weight: 400;
    background: #e8e8ed;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    color: #8e8e93;
}

.modal-add-analysis .field-hint {
    display: block;
    font-size: 10px;
    color: #8e8e93;
    margin-top: 4px;
    margin-bottom: 0;
}

.modal-add-analysis .form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modal-add-analysis .form-row input {
    flex: 1;
}

.btn-add-analysis {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #007aff;
}

.btn-add-analysis:active {
    transform: scale(0.95);
}

.delete-test-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    color: #ff3b30;
    padding: 2px 6px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.delete-test-btn:active {
    transform: scale(0.97);
}

/* ===== РОДЫ ===== */
.labor-countdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.countdown-card {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    color: white !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25) !important;
}

.countdown-card .countdown-value {
    font-size: 32px;
    font-weight: 800;
    color: white !important;
}

.countdown-card .countdown-label {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Тёмная тема */
body.dark-theme .countdown-card {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    box-shadow: none !important;
}

body.dark-theme .countdown-card .countdown-value {
    color: #ffffff !important;
}

body.dark-theme .countdown-card .countdown-label {
    color: #98989e !important;
}

.labor-readiness {
    background: #ffffff;
    border-radius: 20px;
    margin: 0 16px 16px;
    padding: 16px;
}

.readiness-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.readiness-bar {
    height: 8px;
    background: #e5e5ea;
    border-radius: 4px;
    overflow: hidden;
}

.readiness-fill {
    height: 100%;
    background: linear-gradient(90deg, #34c759, #30b0c0);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.labor-precursors {
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1c1c1e;
}

.precursor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.precursor-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.precursor-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.precursor-text {
    flex: 1;
    font-size: 12px;
}

.labor-actions {
    padding: 0 16px 16px;
}

.labor-tips {
    padding: 0 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.labor-tips .tip-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 0;
}

/* Схваткомер */
.contraction-timer {
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 16px;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    color: white;
}

.timer-display {
    font-size: 48px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.timer-btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.timer-btn.start {
    background: #34c759;
    color: white;
}

.timer-btn.stop {
    background: #ff3b30;
    color: white;
}

.contraction-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: #ffffff;
    margin: 0 16px;
    border-radius: 20px;
}

.stat-mini {
    text-align: center;
}

.stat-mini-label {
    font-size: 11px;
    color: #8e8e93;
    display: block;
}

.stat-mini-value {
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
}

.contraction-history {
    margin: 16px;
}

.contraction-history h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.contraction-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.contraction-advice {
    padding: 16px;
}

.advice-card {
    background: #f0f9ff;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 12px;
}

.advice-icon {
    font-size: 28px;
}

.advice-text p {
    font-size: 12px;
    color: #3a3a3c;
    margin-top: 4px;
}

/* Сумка в роддом */
.hospital-bag-scroll {
    padding: 16px;
}

.bag-category {
    background: #ffffff;
    border-radius: 20px;
    margin-bottom: 16px;
    overflow: hidden;
}

.bag-category-header {
    padding: 14px 16px;
    background: #f8f9fa;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.bag-items {
    padding: 12px;
}

.bag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f1f6;
}

.bag-item:last-child {
    border-bottom: none;
}

.bag-item-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ===== МАЛЫШ ===== */
.baby-info-card {
    background: linear-gradient(135deg, #fbcfe8, #f9a8d4);
    margin: 16px;
    border-radius: 24px;
    padding: 20px;
    color: #831843;
}


.baby-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.baby-info-item {
    flex: 1;
}

.baby-info-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
    display: block;
}

.baby-info-value {
    font-size: 16px;
    font-weight: 700;
}

.baby-stats {
    padding-top: 0;
}

.baby-timeline {
    padding: 16px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 8px;
}

.timeline-time {
    font-size: 11px;
    font-weight: 600;
    color: #007aff;
    min-width: 50px;
}

.timeline-icon {
    font-size: 20px;
}

.timeline-text {
    flex: 1;
    font-size: 13px;
}

.baby-add-form {
    padding: 16px;
}

.baby-measurements-list {
    padding: 16px;
}

.measurement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 14px;
    margin-bottom: 6px;
}

/* Кормление */
.feed-add-form {
    padding: 16px;
}

.feed-type-buttons, .feed-side-buttons {
    display: flex;
    gap: 12px;
}

.feed-type-btn, .feed-side-btn {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.feed-type-btn.active, .feed-side-btn.active {
    background: #007aff;
    border-color: #007aff;
    color: white;
}

.feed-history {
    padding: 16px;
}

.feed-history h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 14px;
    margin-bottom: 6px;
}

/* Прививки */
.vaccinations-scroll {
    padding: 16px;
}

.vaccine-card {
    background: #ffffff;
    border-radius: 20px;
    margin-bottom: 16px;
    overflow: hidden;
}

.vaccine-header {
    padding: 14px 16px;
    background: #f8f9fa;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.vaccine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f1f6;
}

.vaccine-name {
    flex: 1;
    font-size: 13px;
}

.vaccine-date {
    font-size: 11px;
    color: #8e8e93;
}

.vaccine-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vaccine-status.done {
    background: #34c759;
    color: white;
}

/* Сон */
.sleep-add-form {
    padding: 16px;
}

.sleep-history {
    padding: 16px;
}

.sleep-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 14px;
    margin-bottom: 6px;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme {
    --bg-primary: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-card: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #98989e;
    --border-color: rgba(255,255,255,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark-theme {
    background: var(--bg-primary);
}

body.dark-theme .app {
    background: linear-gradient(135deg, #1c1c1e, #2c2c2e);
}

body.dark-theme .pull-to-refresh {
    background: rgba(28,28,30,0.95);
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .pull-to-refresh-text {
    color: #98989e;
}

body.dark-theme .pull-to-refresh-spinner {
    border-color: #3a3a3c;
    border-top-color: #0a84ff;
}

body.dark-theme .top-tabbar-fixed {
    background: rgba(28,28,30,0.95);
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .top-tab svg {
    stroke: #98989e;
}

body.dark-theme .top-tab span {
    color: #98989e;
}

body.dark-theme .top-tab.active {
    background: #2c2c2e;
}

body.dark-theme .top-tab.active svg {
    stroke: #0a84ff;
}

body.dark-theme .top-tab.active span {
    color: #0a84ff;
}

body.dark-theme .theme-tab .sun-icon-header {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

body.dark-theme .theme-tab .moon-icon-header {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

body.dark-theme .top-bar-modes {
    background: #1c1c1e;
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .top-bar-modes .mode-switcher {
    background: #3a3a3c;
}

body.dark-theme .top-bar-modes .mode-btn {
    color: #98989e;
}

body.dark-theme .top-bar-modes .mode-btn.active {
    background: #2c2c2e;
    color: #ffffff;
}

body.dark-theme .section-bar,
body.dark-theme .sub-tabbar {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

body.dark-theme .section-bar-icon {
    background: #3a3a3c;
    color: var(--text-primary);
}

body.dark-theme .section-bar-text h1,
body.dark-theme .section-bar-text p {
    color: var(--text-primary) !important;
}

body.dark-theme .info-card,
body.dark-theme .stat-item,
body.dark-theme .home-column,
body.dark-theme .chart-card,
body.dark-theme .history-card,
body.dark-theme .summary-card,
body.dark-theme .detail-section,
body.dark-theme .daily-preview,
body.dark-theme .health-calendar-card,
body.dark-theme .health-day-summary,
body.dark-theme .health-card,
body.dark-theme .precon-stat-card,
body.dark-theme .ovulation-calendar-container,
body.dark-theme .tip-card,
body.dark-theme .bt-add-form input,
body.dark-theme .form-group select,
body.dark-theme .form-group input,
body.dark-theme .bp-time-display,
body.dark-theme .time-picker-content,
body.dark-theme .modal-content,
body.dark-theme .tests-card,
body.dark-theme .checklist-card,
body.dark-theme .doctors-card,
body.dark-theme .partner-card,
body.dark-theme .daily-summary-card,
body.dark-theme .precursor-item,
body.dark-theme .contraction-stats,
body.dark-theme .contraction-item,
body.dark-theme .bag-category,
body.dark-theme .bag-category-header,
body.dark-theme .timeline-item,
body.dark-theme .measurement-item,
body.dark-theme .feed-item,
body.dark-theme .vaccine-card,
body.dark-theme .vaccine-header,
body.dark-theme .sleep-item,
body.dark-theme .article-card,
body.dark-theme .reading-stats-card,
body.dark-theme .article-modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
}

body.dark-theme .sub-tab {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .sub-tab.active {
    background: linear-gradient(135deg, #0a84ff, #0051d5);
    color: white;
    box-shadow: 0 4px 12px rgba(10,132,255,0.35);
}

body.dark-theme .info-card .value {
    background: linear-gradient(135deg, #0a84ff, #0051d5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme .progress-strip-track {
    background: #3a3a3c;
}

body.dark-theme .progress-strip-fill {
    background: linear-gradient(90deg, #a78bfa, #8b5cf6, #c084fc);
}

body.dark-theme .progress-strip-message {
    background: #3a3a3c;
    color: #a78bfa;
}

body.dark-theme .period-btn {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .period-btn.active {
    background: #0a84ff;
    color: white;
}

body.dark-theme .period-label {
    background: #3a3a3c;
    color: #ffffff;
}

body.dark-theme .tabbar {
    background: rgba(28,28,30,0.98);
    backdrop-filter: blur(10px);
    border-top-color: rgba(255,255,255,0.08);
}

body.dark-theme .tab-icon svg {
    stroke: #98989e;
}

body.dark-theme .tab.active {
    background: #2c2c2e;
}

body.dark-theme .tab.active .tab-icon svg {
    stroke: #0a84ff;
}

body.dark-theme .tab.active .tab-label {
    color: #0a84ff;
}

body.dark-theme .tab-icon-center svg {
    stroke: #0a84ff;
}

body.dark-theme .btn-small {
    background: #3a3a3c;
    color: #0a84ff;
}

body.dark-theme .btn-primary {
    background: #0a84ff;
}

body.dark-theme .delete-btn {
    background: #ff453a;
}

body.dark-theme .cal-day.today {
    background: #0a84ff20;
    color: #0a84ff;
}

body.dark-theme .cal-day.selected {
    background: #0a84ff;
    color: white;
}

body.dark-theme .week-tips {
    background: #3a3a3c;
}

body.dark-theme .week-tip-item {
    border-bottom-color: #4a4a4c;
}

body.dark-theme .summary-preview-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .summary-footer-note {
    border-top-color: var(--border-color);
}

body.dark-theme .form-group select,
body.dark-theme select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2398989e'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 40px !important;
    color: var(--text-primary) !important;
}

body.dark-theme .event-time-badge {
    background: #0a84ff30;
    color: #0a84ff;
}

body.dark-theme .btn-add-event {
    background: #0a84ff;
}

body.dark-theme .bp-time-display svg {
    stroke: #98989e;
}

body.dark-theme .time-picker-header {
    border-bottom-color: var(--border-color);
}

body.dark-theme .time-picker-list {
    background: #3a3a3c;
}

body.dark-theme .time-picker-item {
    color: var(--text-primary);
}

body.dark-theme .time-picker-item.selected {
    background: #0a84ff;
}

body.dark-theme .time-picker-footer {
    border-top-color: var(--border-color);
}

body.dark-theme .time-preset-btn {
    background: #3a3a3c;
    color: var(--text-primary);
}

body.dark-theme .health-stat-mini {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

body.dark-theme .health-stat-icon {
    background: rgba(44, 44, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

body.dark-theme .vitamin-item {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

body.dark-theme .lifestyle-form input[type="number"],
body.dark-theme .lifestyle-form input[type="range"] {
    background: #3a3a3c;
    color: var(--text-primary);
}

body.dark-theme .tests-card.active,
body.dark-theme .checklist-card.active,
body.dark-theme .doctors-card.active {
    border-color: #0a84ff;
}

body.dark-theme .tests-card-header,
body.dark-theme .doctors-card-header {
    border-bottom-color: var(--border-color);
}

body.dark-theme .test-item,
body.dark-theme .doctor-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .test-checkbox,
body.dark-theme .doctor-checkbox {
    background: #3a3a3c;
    color: var(--text-primary);
}

body.dark-theme .test-status,
body.dark-theme .doctor-status {
    background: #3a3a3c;
    color: var(--text-secondary);
}

body.dark-theme .test-status.done,
body.dark-theme .doctor-status.done {
    background: #065f46;
    color: #6ee7b7;
}

body.dark-theme .test-norm {
    color: #6ee7b7;
}

body.dark-theme .test-last-value {
    color: #0a84ff;
}

body.dark-theme .doctor-purpose {
    color: var(--text-secondary);
}

body.dark-theme .checklist-item {
    background: #3a3a3c;
}

body.dark-theme .checklist-item.completed {
    background: #065f46;
}

body.dark-theme .checklist-checkbox {
    background: #2c2c2e;
}

body.dark-theme .partner-add-row input {
    background: #3a3a3c;
    color: var(--text-primary);
}

body.dark-theme .partner-note-item, 
body.dark-theme .partner-task-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .partner-support-text p {
    border-bottom-color: var(--border-color);
    color: var(--text-secondary);
}

body.dark-theme .empty-state {
    color: var(--text-secondary);
}

body.dark-theme .weight-norm-btn {
    color: #0a84ff;
}

body.dark-theme .btn-add-analysis {
    background: #0a84ff20;
    color: #0a84ff;
}

body.dark-theme .delete-test-btn {
    color: #ff453a;
}

body.dark-theme .modal-add-analysis .optional-badge {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .modal-add-analysis .field-hint {
    color: #98989e;
}

body.dark-theme .countdown-card {
    background: linear-gradient(135deg, #4c51bf, #5b21b6);
}

body.dark-theme .contraction-timer {
    background: linear-gradient(135deg, #4c51bf, #5b21b6);
}

body.dark-theme .advice-card {
    background: #1e3a5f;
}

body.dark-theme .vaccine-status {
    background: #3a3a3c;
}

/* Тёмная тема для статей */
body.dark-theme .daily-article-card {
    background: linear-gradient(135deg, #4c51bf, #5b21b6);
}

body.dark-theme .daily-article-card.completed {
    background: linear-gradient(135deg, #065f46, #047857);
}

body.dark-theme .article-card.read {
    background: #3a3a3c;
}

body.dark-theme .article-tip {
    background: #1e3a5f;
}

body.dark-theme .article-warning {
    background: #7f1a1a;
    color: #fca5a5;
}

body.dark-theme .article-recipe {
    background: #78350f;
}

body.dark-theme .achievement-card {
    background: linear-gradient(135deg, #78350f, #92400e);
}

body.dark-theme .achievement-name {
    color: #fde68a;
}

body.dark-theme .achievement-desc {
    color: #fcd34d;
}

body.dark-theme .streak-badge {
    background: #78350f;
    color: #fbbf24;
}

body.dark-theme .calendar-day.read {
    background: #065f46;
    color: #6ee7b7;
}

body.dark-theme .calendar-day.today {
    border-color: #0a84ff;
    background: #1e3a5f;
}

body.dark-theme .reading-mini-stats {
    background: var(--bg-card);
}

body.dark-theme .reading-mini-streak {
    background: #78350f;
    color: #fbbf24;
}

body.dark-theme .like-btn {
    background: #7f1a1a;
    color: #fca5a5;
}

body.dark-theme .share-btn {
    background: #3a3a3c;
    color: #0a84ff;
}

/* Для режима подготовки в тёмной теме */
body.dark-theme #mode-preconception .tab-icon svg {
    stroke: #98989e !important;
}

body.dark-theme #mode-preconception .tab.active .tab-icon svg {
    stroke: #ec4899 !important;
}

body.dark-theme #mode-preconception .tab.active .tab-label {
    color: #ec4899 !important;
}

body.dark-theme #mode-preconception .tab:not(.tab-center)::after {
    background: #ec4899 !important;
}

body.dark-theme #mode-preconception .tab-icon-center {
    background: #ec4899 !important;
}

body.dark-theme #mode-preconception .tab.tab-center.active .tab-icon-center {
    background: var(--bg-secondary) !important;
}

body.dark-theme #mode-preconception .tab.tab-center.active .tab-icon-center svg {
    stroke: #ec4899 !important;
}

body.dark-theme .ovulation-calendar-grid .cal-day {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

body.dark-theme .cal-day.ovulation-menstrual {
    background: #7f1a1a !important;
    color: #fca5a5 !important;
}

body.dark-theme .cal-day.ovulation-fertile {
    background: #065f46 !important;
    color: #6ee7b7 !important;
}

body.dark-theme .cal-day.ovulation-day {
    background: #9d174d !important;
    color: #f9a8d4 !important;
    box-shadow: 0 0 0 2px #ec4899 !important;
}

body.dark-theme .ovulation-legend .legend-item {
    color: var(--text-secondary) !important;
}

/* ===== ПРОЧЕЕ ===== */
::-webkit-scrollbar {
    display: none;
}

@supports (padding-top: env(safe-area-inset-top)) {
    .top-tabbar-fixed {
        padding-top: calc(8px + env(safe-area-inset-top));
    }
    .pull-to-refresh {
        top: calc(-60px + env(safe-area-inset-top));
    }
    .app {
        padding-top: calc(70px + env(safe-area-inset-top));
    }
    .tabbar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* ===== ОТЗЫВЧИВОСТЬ ===== */
@media (max-width: 380px) {
    .precon-stats {
        gap: 6px;
    }
    .precon-stat-value {
        font-size: 14px;
    }
    .cal-day {
        font-size: 12px;
        padding: 6px 2px;
    }
    .sub-tab {
        font-size: 10px;
        padding: 6px 8px;
    }
    .sub-tab svg {
        width: 14px;
        height: 14px;
    }
    .top-bar-modes .mode-btn {
        font-size: 9px;
        padding: 8px 4px;
    }
    .top-bar-modes .mode-btn svg {
        width: 12px;
        height: 12px;
    }
    .top-tab span {
        font-size: 9px;
    }
    .top-tab svg {
        width: 18px;
        height: 18px;
    }
    .top-tab {
        min-height: 48px;
        padding: 4px 6px;
    }
    .period-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    .period-label {
        font-size: 10px;
        padding: 4px 8px;
    }
    .timer-display {
        font-size: 36px;
    }
    .countdown-value {
        font-size: 24px;
    }
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    .summary-items-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ДИСКЛЕЙМЕР (СЕРЫЙ, НА ТОМ ЖЕ МЕСТЕ) ===== */
.disclaimer-bar {
    position: relative;
    top: auto;
    background: #f8f9fc; /* Светло-серый фон */
    padding: 6px 16px;
    font-size: 10px;
    color: #8e8e93; /* Серый текст */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 0.5px solid #e5e5ea; /* Светло-серая линия */
    margin-top: 0;
}

/* Иконка (опционально) */
.disclaimer-bar .disclaimer-icon {
    font-size: 12px;
    flex-shrink: 0;
}

/* Тёмная тема */
body.dark-theme .disclaimer-bar {
    background: #2c2c2e; /* Тёмно-серый фон */
    color: #98989e; /* Светло-серый текст */
    border-bottom-color: #3a3a3c; /* Тёмно-серая линия */
}

/* ===== НИЖНИЙ ТАББАР (ЗАКРЕПЛЁННЫЙ) ===== */
.tabbar {
    display: flex !important;
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-top: 0.5px solid rgba(0,0,0,0.06) !important;
    padding: 8px 12px 12px !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    z-index: 1000 !important;
    gap: 4px !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05) !important;
}

.tab {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    padding: 8px 4px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 14px !important;
    background: transparent !important;
}

.tab-icon {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tab-icon svg {
    width: 22px !important;
    height: 22px !important;
    stroke: #8e8e93 !important;
    transition: all 0.2s !important;
}

.tab-icon-center {
    width: 40px !important;
    height: 40px !important;
    background: #007aff !important;
    border-radius: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: -8px !important;
    box-shadow: 0 4px 12px rgba(0,122,255,0.3) !important;
}

.tab-icon-center svg {
    width: 24px !important;
    height: 24px !important;
    stroke: white !important;
}

.tab-label {
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #8e8e93 !important;
    transition: all 0.2s !important;
    letter-spacing: -0.2px !important;
}

.tab.active {
    background: #f2f1f6 !important;
}

.tab.active .tab-label {
    color: #007aff !important;
    font-weight: 600 !important;
}

.tab.active .tab-icon svg {
    stroke: #007aff !important;
}



.tabbar.five-tabs .tab-label {
    font-size: 9px !important;
}

.tabbar.five-tabs .tab-icon svg {
    width: 20px !important;
    height: 20px !important;
}

/* Тёмная тема для таббара */
body.dark-theme .tabbar {
    background: rgba(28,28,30,0.98) !important;
    border-top-color: rgba(255,255,255,0.08) !important;
}

body.dark-theme .tab-icon svg {
    stroke: #98989e !important;
}

body.dark-theme .tab.active {
    background: #2c2c2e !important;
}

body.dark-theme .tab.active .tab-icon svg {
    stroke: #0a84ff !important;
}

body.dark-theme .tab.active .tab-label {
    color: #0a84ff !important;
}

body.dark-theme .tab-icon-center {
    background: #0a84ff !important;
}

body.dark-theme .tab-icon-center svg {
    stroke: white !important;
}

/* ===== ЗАГОЛОВОК "ПОЛЕЗНЫЕ СТАТЬИ" (СОВРЕМЕННЫЙ) ===== */
.articles-preview {
    padding: 8px 16px 20px;
}

.articles-preview-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.articles-preview-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5ea, transparent);
}

.articles-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
    background: #f2f1f6;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.articles-preview-title svg {
    width: 16px;
    height: 16px;
    stroke: #007aff;
}

/* Тёмная тема */
body.dark-theme .articles-preview-line {
    background: linear-gradient(90deg, transparent, #3a3a3c, transparent);
}

body.dark-theme .articles-preview-title {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .articles-preview-title svg {
    stroke: #0a84ff;
}

/* ===== РАСШИРЕННЫЙ БЛОК СТАТЕЙ НА ГЛАВНОЙ ===== */
.articles-preview-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Статья дня (крупная) */
.daily-article-preview {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 24px;
    padding: 18px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.daily-article-preview:active {
    transform: scale(0.98);
}

.daily-article-preview-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12px;
    opacity: 0.9;
}

.badge-icon {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 20px;
}

.new-badge-small {
    margin-left: auto;
    background: #ff3b30;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    animation: pulse 1s infinite;
}

.daily-article-preview-content {
    display: flex;
    gap: 14px;
}

.daily-article-preview-icon {
    font-size: 48px;
}

.daily-article-preview-info {
    flex: 1;
}

.daily-article-preview-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.daily-article-preview-info p {
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Блок "Читайте также" */
.more-articles-section {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.more-articles-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f1f6;
}

.more-articles-icon {
    font-size: 16px;
}

.more-articles-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-article-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f9f9fb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-article-card:active {
    transform: scale(0.98);
    background: #f2f1f6;
}

.mini-article-icon {
    font-size: 32px;
}

.mini-article-info {
    flex: 1;
}

.mini-article-title {
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.mini-article-meta {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: #8e8e93;
}

/* Персонализированные статьи */
.personalized-articles {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,122,255,0.15);
}

.personalized-articles-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,122,255,0.15);
}

.personalized-icon {
    font-size: 16px;
}

.personalized-articles-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.personalized-article-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.personalized-article-card:active {
    transform: scale(0.98);
}

.personalized-article-icon {
    font-size: 32px;
}

.personalized-article-info {
    flex: 1;
}

.personalized-article-title {
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.personalized-article-category {
    font-size: 10px;
    color: #007aff;
    font-weight: 500;
}

.personalized-arrow {
    font-size: 16px;
    color: #007aff;
    opacity: 0.6;
}

/* Тёмная тема */
body.dark-theme .more-articles-section {
    background: var(--bg-card);
}

body.dark-theme .more-articles-header {
    border-bottom-color: var(--border-color);
    color: #98989e;
}

body.dark-theme .mini-article-card {
    background: #3a3a3c;
}

body.dark-theme .mini-article-title {
    color: var(--text-primary);
}

body.dark-theme .personalized-articles {
    background: var(--bg-card);
    border-color: rgba(10,132,255,0.3);
}

body.dark-theme .personalized-articles-header {
    color: #0a84ff;
    border-bottom-color: rgba(10,132,255,0.3);
}

body.dark-theme .personalized-article-card {
    background: rgba(10,132,255,0.1);
}

body.dark-theme .personalized-article-title {
    color: var(--text-primary);
}

body.dark-theme .personalized-article-category {
    color: #0a84ff;
}

body.dark-theme .daily-article-preview {
    background: linear-gradient(135deg, #4c51bf, #5b21b6);
}

/* Отступ между блоками статей */
.more-articles-section {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 16px;  /* ДОБАВЛЯЕМ ОТСТУП СНИЗУ */
}

.personalized-articles {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,122,255,0.15);
    margin-top: 0;  /* УБЕЖДАЕМСЯ, ЧТО ОТСТУП СВЕРХУ НЕТ (БУДЕТ ЗА СЧЁТ margin-bottom ПРЕДЫДУЩЕГО БЛОКА) */
}

/* ===== СТИЛИ ДЛЯ СВОДКИ ===== */
.summary-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-card {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.summary-card-current {
    border: 2px solid #34c759;
    background: linear-gradient(135deg, #fff, #f0fff4);
}

.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-week-badge {
    background: #007aff15;
    color: #007aff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.current-badge {
    background: #34c75915;
    color: #34c759;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.summary-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.summary-item {
    background: #f9f9fb;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item-icon {
    font-size: 24px;
}

.summary-item-label {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 2px;
}

.summary-item-value {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
}

.summary-empty-state {
    text-align: center;
    padding: 24px;
    color: #8e8e93;
    background: #f9f9fb;
    border-radius: 14px;
}

/* ===== СТИЛИ ДЛЯ ИСТОРИИ ===== */
.history-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: white;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.history-item-icon {
    font-size: 28px;
    width: 48px;
    text-align: center;
}

.history-item-content {
    flex: 1;
}

.history-item-date {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 2px;
}

.history-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 2px;
}

.history-item-value {
    font-size: 13px;
    color: #3a3a3c;
}

.history-delete-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    color: #ff3b30;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme .summary-card {
    background: var(--bg-card);
}

body.dark-theme .summary-card-current {
    background: linear-gradient(135deg, #2c2c2e, #1a3a2a);
}

body.dark-theme .summary-item {
    background: #3a3a3c;
}

body.dark-theme .summary-item-value {
    color: var(--text-primary);
}

body.dark-theme .history-item {
    background: var(--bg-card);
}

body.dark-theme .history-item-name {
    color: var(--text-primary);
}

body.dark-theme .history-item-value {
    color: var(--text-secondary);
}
/* Модальное окно для добавления анализа */
.modal-add-analysis {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-add-analysis .modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-add-analysis .form-group {
    margin-bottom: 16px;
}

.modal-add-analysis .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1c1c1e;
}

.modal-add-analysis .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.modal-add-analysis .form-group input:focus {
    outline: none;
    border-color: #007aff;
}

/* Тёмная тема */
body.dark-theme .modal-add-analysis .modal-content {
    background: #2c2c2e;
}

body.dark-theme .modal-add-analysis .form-group label {
    color: white;
}

body.dark-theme .modal-add-analysis .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: white;
}
/* Кнопка добавления задачи */
.btn-add-task {
    background: #007aff15;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #007aff;
}

.btn-add-task:active {
    transform: scale(0.95);
}

.btn-add-task svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Пользовательские задачи */
.custom-task {
    background: #f0f7ff;
    position: relative;
}

.delete-task-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
    flex-shrink: 0;
}

.delete-task-btn:active {
    transform: scale(0.95);
}

.checklist-note {
    display: block;
    font-size: 10px;
    color: #007aff;
    margin-top: 4px;
}

/* Модальное окно для добавления задачи */
.modal-add-task {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-add-task .modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-add-task .form-group {
    margin-bottom: 16px;
}

.modal-add-task .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1c1c1e;
}

.modal-add-task .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* Тёмная тема */
body.dark-theme .modal-add-task .modal-content {
    background: #2c2c2e;
}

body.dark-theme .modal-add-task .form-group label {
    color: white;
}

body.dark-theme .modal-add-task .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: white;
}

body.dark-theme .custom-task {
    background: #1e3a5f;
}

body.dark-theme .checklist-note {
    color: #0a84ff;
}
/* Кнопка добавления врача */
.btn-add-doctor {
    background: #007aff15;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #007aff;
}

.btn-add-doctor:active {
    transform: scale(0.95);
}

.btn-add-doctor svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Пользовательские врачи */
.custom-doctor {
    background: #f0f7ff;
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 12px;
}

.custom-doctor .doctor-info {
    flex: 1;
}

.doctor-specialty {
    font-size: 12px;
    color: #007aff;
    font-weight: 500;
    margin-left: 8px;
}

.doctor-contact {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 4px;
}

.doctor-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.delete-doctor-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.delete-doctor-btn:active {
    transform: scale(0.95);
}

/* Модальное окно для добавления врача */
.modal-add-doctor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-add-doctor .modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-add-doctor .form-group {
    margin-bottom: 16px;
}

.modal-add-doctor .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1c1c1e;
}

.modal-add-doctor .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* Тёмная тема */
body.dark-theme .modal-add-doctor .modal-content {
    background: #2c2c2e;
}

body.dark-theme .modal-add-doctor .form-group label {
    color: white;
}

body.dark-theme .modal-add-doctor .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: white;
}

body.dark-theme .custom-doctor {
    background: #1e3a5f;
}

body.dark-theme .doctor-specialty {
    color: #0a84ff;
}

body.dark-theme .delete-doctor-btn {
    background: #ff453a;
}
/* Модальное окно согласия */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.consent-modal-content {
    background: white;
    border-radius: 32px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

.consent-modal-header {
    text-align: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid #f2f1f6;
}

.consent-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.consent-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1c1c1e;
}

.consent-modal-body {
    padding: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #3a3a3c;
}

.consent-modal-body p {
    margin-bottom: 14px;
}

.consent-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px 24px;
    border-top: 1px solid #f2f1f6;
}

.consent-btn {
    flex: 1;
    padding: 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.consent-btn-agree {
    background: #007aff;
    color: white;
}

.consent-btn-agree:active {
    transform: scale(0.97);
    background: #0051d5;
}

.consent-btn-disagree {
    background: #f2f1f6;
    color: #8e8e93;
}

.consent-btn-disagree:active {
    transform: scale(0.97);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Тёмная тема */
body.dark-theme .consent-modal-content {
    background: #2c2c2e;
}

body.dark-theme .consent-modal-header h2 {
    color: white;
}

body.dark-theme .consent-modal-header {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .consent-modal-body {
    color: #98989e;
}

body.dark-theme .consent-modal-footer {
    border-top-color: #3a3a3c;
}

body.dark-theme .consent-btn-disagree {
    background: #3a3a3c;
    color: #98989e;
}
/* Карточки норм ВОЗ */
.who-card {
    background: #ffffff;
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.who-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
}

.who-card-icon {
    font-size: 22px;
}

.who-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
}

.who-card-content {
    padding: 12px 16px;
}

.who-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.who-item {
    padding: 10px 0;
    border-bottom: 1px solid #f2f1f6;
}

.who-item:last-child {
    border-bottom: none;
}

.who-grid-2 .who-item {
    border-bottom: none;
    padding: 8px;
    background: #f9f9fb;
    border-radius: 14px;
}

.who-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.who-item-value {
    font-size: 16px;
    font-weight: 700;
    color: #007aff;
    margin-bottom: 2px;
}

.who-unit {
    font-size: 11px;
    font-weight: 400;
    color: #8e8e93;
}

.who-item-desc {
    font-size: 10px;
    color: #8e8e93;
}

.who-disclaimer {
    margin-top: 20px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 16px;
    font-size: 11px;
    color: #92400e;
    text-align: center;
}

/* Тёмная тема */
body.dark-theme .who-card {
    background: #2c2c2e;
}

body.dark-theme .who-card-header {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
}

body.dark-theme .who-card-title {
    color: white;
}

body.dark-theme .who-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .who-grid-2 .who-item {
    background: #3a3a3c;
}

body.dark-theme .who-item-name {
    color: white;
}

body.dark-theme .who-item-value {
    color: #0a84ff;
}

body.dark-theme .who-disclaimer {
    background: #78350f;
    color: #fcd34d;
}
/* Модальное окно для добавления в календарь */
.schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.schedule-modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.schedule-modal-content h3 {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.schedule-modal-content .form-group {
    margin-bottom: 16px;
}

.schedule-modal-content .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.schedule-modal-content .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
}

/* Кнопка добавления в календарь */
.btn-schedule {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    margin-left: 8px;
}

.btn-schedule:active {
    transform: scale(0.95);
}

.scheduled-badge {
    font-size: 11px;
    color: #10b981;
    background: #d1fae5;
    padding: 4px 8px;
    border-radius: 20px;
    margin-left: 8px;
    white-space: nowrap;
}

.test-actions, .doctor-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Тёмная тема */
body.dark-theme .schedule-modal-content {
    background: #2c2c2e;
}

body.dark-theme .schedule-modal-content .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: white;
}

body.dark-theme .scheduled-badge {
    background: #065f46;
    color: #6ee7b7;
}
/* Отступы между блоками в чек-листе родов */
.labor-checklist-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.labor-checklist-scroll .checklist-card {
    margin-bottom: 0;
}

/* Если блоки внутри имеют свои отступы */
#labor-checklist-container .checklist-card {
    margin-bottom: 16px;
}

#labor-checklist-container .checklist-card:last-child {
    margin-bottom: 0;
}
/* Кнопка добавления задачи */
.btn-add-task {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #007aff;
}

.btn-add-task:active {
    transform: scale(0.95);
}

.btn-add-task svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Пользовательские задачи */
.custom-task {
    background: #f0f7ff;
    position: relative;
}

.delete-task-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
    flex-shrink: 0;
}

.delete-task-btn:active {
    transform: scale(0.95);
}

.checklist-note {
    display: block;
    font-size: 10px;
    color: #007aff;
    margin-top: 4px;
}

/* Тёмная тема */
body.dark-theme .custom-task {
    background: #1e3a5f;
}

body.dark-theme .checklist-note {
    color: #0a84ff;
}
/* ===== КАТЕГОРИИ МАЛЫША ===== */
.baby-categories {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.baby-category-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.baby-category-card:active {
    transform: scale(0.98);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}

.category-subtitle {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.category-arrow {
    margin-left: auto;
    stroke: #8e8e93;
    opacity: 0.6;
}

.category-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.stat-badge {
    flex: 1;
    background: #f9f9fb;
    border-radius: 14px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-badge-icon {
    font-size: 20px;
}

.stat-badge-value {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
}

.stat-badge-label {
    font-size: 10px;
    color: #8e8e93;
    margin-left: auto;
}

.category-preview {
    font-size: 11px;
    color: #8e8e93;
    padding-top: 8px;
    border-top: 1px solid #f2f1f6;
    display: flex;
    justify-content: space-between;
}

.baby-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 0;
}

.timeline-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
}

.timeline-title svg {
    stroke: #007aff;
}

.timeline-view-all {
    background: none;
    border: none;
    font-size: 11px;
    color: #007aff;
    font-weight: 500;
    cursor: pointer;
}

/* Тёмная тема */
body.dark-theme .baby-category-card {
    background: #2c2c2e;
}

body.dark-theme .category-title {
    color: #ffffff;
}

body.dark-theme .stat-badge {
    background: #3a3a3c;
}

body.dark-theme .stat-badge-value {
    color: #ffffff;
}

body.dark-theme .category-preview {
    border-top-color: #3a3a3c;
}

body.dark-theme .timeline-title {
    color: #ffffff;
}

.btn-add-record {
    background: #007aff15;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.btn-add-record:active {
    transform: scale(0.95);
}
/* ===== НАСТРОЙКИ ===== */
.settings-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-group {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.settings-group-title {
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-group-title span:first-child {
    font-size: 20px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f2f1f6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-item:active {
    background: #f2f1f6;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.settings-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.settings-item-text {
    flex: 1;
}

.settings-item-label {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 2px;
}

.settings-item-desc {
    font-size: 11px;
    color: #8e8e93;
    line-height: 1.3;
}

/* Переключатель (switch) */
/* Стили для переключателей в настройках */
.settings-switch {
    width: 50px;
    height: 30px;
    background: #e5e5ea;
    border-radius: 30px;
    position: relative;
    transition: background 0.3s ease;
    cursor: pointer;
}

.settings-switch.active {
    background: #34c759 !important;
}

.switch-track {
    width: 100%;
    height: 100%;
    border-radius: 30px;
}

.switch-thumb {
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.settings-switch.active .switch-thumb {
    transform: translateX(20px);
}

/* Кнопка сброса */
.settings-reset-btn {
    width: 100%;
    padding: 14px;
    background: #f2f1f6;
    border: none;
    border-radius: 14px;
    color: #ff3b30;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.settings-reset-btn:active {
    transform: scale(0.97);
    background: #fee2e2;
}

/* Тёмная тема для настроек */
body.dark-theme .settings-group {
    background: #2c2c2e;
}

body.dark-theme .settings-group-title {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme .settings-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .settings-item:active {
    background: #3a3a3c;
}

body.dark-theme .settings-item-label {
    color: #ffffff;
}

body.dark-theme .settings-item-icon {
    background: #3a3a3c;
}
/* ===== ГРАФИКИ НА ГЛАВНОЙ ===== */
#home-charts-container {
    margin: 16px;
}

.home-charts-section {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.home-charts-title {
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-charts-grid {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-chart-card {
    background: #f9f9fb;
    border-radius: 20px;
    padding: 16px;
}

.home-chart-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.home-chart-icon {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.home-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1c1c1e;
}

.home-chart-card canvas {
    width: 100% !important;
    max-height: 200px !important;
}

/* Тёмная тема */
body.dark-theme #home-charts-container .home-charts-section {
    background: #2c2c2e;
}

body.dark-theme #home-charts-container .home-charts-title {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #home-charts-container .home-chart-card {
    background: #3a3a3c;
}

body.dark-theme #home-charts-container .home-chart-title {
    color: #ffffff;
}

body.dark-theme #home-charts-container .home-chart-icon {
    background: #2c2c2e;
}
/* ===== НАСТРОЙКИ - ИСПРАВЛЕНИЕ ===== */

/* Контейнер настроек */
.settings-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px;
}

/* Группа настроек */
.settings-group {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.settings-group-title {
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-group-subtitle {
    padding: 10px 16px;
    font-size: 12px;
    color: #8e8e93;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
}

/* Элемент настройки */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f2f1f6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-item:active {
    background: #f2f1f6;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.settings-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.settings-item-text {
    flex: 1;
}

.settings-item-label {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 2px;
}

.settings-item-desc {
    font-size: 11px;
    color: #8e8e93;
    line-height: 1.3;
}

/* Переключатель */
/* Стили для переключателей в настройках */
.settings-switch {
    width: 50px;
    height: 30px;
    background: #e5e5ea;
    border-radius: 30px;
    position: relative;
    transition: background 0.3s ease;
    cursor: pointer;
}

.settings-switch.active {
    background: #34c759 !important;
}

.switch-track {
    width: 100%;
    height: 100%;
    border-radius: 30px;
}

.switch-thumb {
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.settings-switch.active .switch-thumb {
    transform: translateX(20px);
}

/* Селектор графиков в настройках */
.settings-charts-selector {
    background: #f9f9fb;
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid #f2f1f6;
}

.settings-selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
    margin-bottom: 12px;
}

.charts-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.chart-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: #1c1c1e;
}

.chart-checkbox:active {
    transform: scale(0.98);
    background: #f2f1f6;
}

.chart-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007aff;
    cursor: pointer;
    margin: 0;
}

.chart-checkbox span {
    flex: 1;
}

/* Кнопка сброса */
.settings-reset-btn {
    width: 100%;
    padding: 14px;
    background: #f2f1f6;
    border: none;
    border-radius: 14px;
    color: #ff3b30;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.settings-reset-btn:active {
    transform: scale(0.97);
    background: #fee2e2;
}

/* Тёмная тема для настроек */
body.dark-theme .settings-group {
    background: #2c2c2e;
}

body.dark-theme .settings-group-title {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme .settings-group-subtitle {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
    color: #98989e;
}

body.dark-theme .settings-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .settings-item:active {
    background: #3a3a3c;
}

body.dark-theme .settings-item-label {
    color: #ffffff;
}

body.dark-theme .settings-item-icon {
    background: #3a3a3c;
}

body.dark-theme .settings-charts-selector {
    background: #3a3a3c;
    border-top-color: #4a4a4c;
}

body.dark-theme .settings-selector-label {
    color: #0a84ff;
}

body.dark-theme .chart-checkbox {
    background: #2c2c2e;
    color: white;
}

body.dark-theme .chart-checkbox:active {
    background: #4a4a4c;
}

body.dark-theme .settings-reset-btn {
    background: #3a3a3c;
    color: #ff453a;
}
/* Принудительные стили для переключателей */
.settings-switch {
    width: 50px !important;
    height: 30px !important;
    background: #cbd5e1 !important;
    border-radius: 30px !important;
    position: relative !important;
    cursor: pointer !important;
}

.settings-switch.active {
    background: #22c55e !important;
}

.settings-switch .switch-thumb {
    width: 26px !important;
    height: 26px !important;
    background: white !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    transition: transform 0.2s ease !important;
}

.settings-switch.active .switch-thumb {
    transform: translateX(20px) !important;
}
/* ПРИНУДИТЕЛЬНЫЕ СТИЛИ ДЛЯ ПОЛЗУНКОВ */
.settings-switch.active {
    background: #34c759 !important;
}

.settings-switch .switch-thumb {
    background: white !important;
}

.settings-switch.active .switch-thumb {
    transform: translateX(20px) !important;
}

/* Для ползунка темы тоже */
#switch-theme-global.active {
    background: #34c759 !important;
}

#switch-theme-global .switch-thumb {
    background: white !important;
}

#switch-theme-global.active .switch-thumb {
    transform: translateX(20px) !important;
}
/* УСИЛЕННЫЕ СТИЛИ ДЛЯ ВСЕХ ПОЛЗУНКОВ */
.settings-switch {
    width: 56px !important;
    height: 32px !important;
    background: #cbd5e1 !important;
    border-radius: 32px !important;
    position: relative !important;
    cursor: pointer !important;
    display: inline-block !important;
}

.settings-switch .switch-thumb {
    width: 28px !important;
    height: 28px !important;
    background: white !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    transition: transform 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.settings-switch.active {
    background: #22c55e !important;
}

.settings-switch.active .switch-thumb {
    transform: translateX(24px) !important;
}
/* ===== ПОЛЬЗОВАТЕЛЬСКИЕ ВИТАМИНЫ ===== */
.custom-vitamins-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-vitamin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9fb;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.custom-vitamin-item .vitamin-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.custom-vitamin-info {
    flex: 1;
}

.custom-vitamin-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
}

.custom-vitamin-dose {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.custom-vitamin-note {
    font-size: 11px;
    color: #007aff;
    margin-top: 2px;
}

.delete-vitamin-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.delete-vitamin-btn:active {
    transform: scale(0.95);
}

/* Модальное окно для добавления витамина */
.modal-add-vitamin {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-add-vitamin .modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.modal-add-vitamin .form-group {
    margin-bottom: 16px;
}

.modal-add-vitamin .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1c1c1e;
}

.modal-add-vitamin .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* Тёмная тема */
body.dark-theme .custom-vitamin-item {
    background: #3a3a3c;
}

body.dark-theme .custom-vitamin-name {
    color: white;
}

body.dark-theme .modal-add-vitamin .modal-content {
    background: #2c2c2e;
}

body.dark-theme .modal-add-vitamin .form-group label {
    color: white;
}

body.dark-theme .modal-add-vitamin .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: white;
}
.btn-primary, .btn-add-event, .tab-icon-center {
    background-color: var(--btn-color, #007aff) !important;
}
/* Очистка от накопленных элементов */
.temp-color-element,
.color-overlay,
.color-tooltip,
.toast-message:not(:first-child) {
    display: none !important;
}

/* Предотвращение дублирования тостов */
.toast-message {
    z-index: 10000;
}

/* Очистка анимаций при смене темы */
* {
    transition: background-color 0.2s ease, 
                color 0.2s ease,
                border-color 0.2s ease;
}
/* Подсказка о показателях */
.test-hint {
    background: #f8fafc;
    border-radius: 20px;
    padding: 14px;
    margin-top: 12px;
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

.hint-icon {
    font-size: 36px;
}

.hint-content {
    flex: 1;
}

.hint-title {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.hint-text {
    font-size: 12px;
    color: #3a3a3c;
    margin-bottom: 10px;
    line-height: 1.4;
}

.hint-norms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.norm-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.norm-badge.good {
    background: #d1fae5;
    color: #059669;
}

.norm-badge.low {
    background: #fee2e2;
    color: #dc2626;
}

.norm-badge.high {
    background: #fef3c7;
    color: #d97706;
}

.hint-tip {
    font-size: 11px;
    color: #007aff;
    background: #e0f2fe;
    padding: 8px 12px;
    border-radius: 14px;
    margin-top: 4px;
}

/* Тёмная тема */
body.dark-theme .test-hint {
    background: #3a3a3c;
}

body.dark-theme .hint-title {
    color: #ffffff;
}

body.dark-theme .hint-text {
    color: #cbd5e1;
}

body.dark-theme .hint-tip {
    background: #1e3a5f;
    color: #0a84ff;
}
/* Стили для расшифровки УЗИ */
.hint-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e5ea;
}

.hint-item:last-child {
    border-bottom: none;
}

.hint-item-label {
    font-size: 12px;
    font-weight: 600;
    color: #1c1c1e;
    min-width: 50px;
}

.hint-item-value {
    font-size: 12px;
    font-weight: 700;
    color: #007aff;
}

.hint-item-desc {
    font-size: 10px;
    color: #8e8e93;
}

/* Тёмная тема */
body.dark-theme .hint-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .hint-item-label {
    color: #ffffff;
}

body.dark-theme .hint-item-value {
    color: #0a84ff;
}

body.dark-theme .hint-item-desc {
    color: #98989e;
}
/* Нормы ТТГ */
.norm-details {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 10px;
    margin-top: 8px;
}

.norm-details div {
    font-size: 12px;
    color: #1c1c1e;
    padding: 4px 0;
}

.norm-details strong {
    color: #059669;
}

body.dark-theme .norm-details {
    background: #1a3a2a;
}

body.dark-theme .norm-details div {
    color: #ffffff;
}
/* Стили для раздела "Рост и вес" - ровные отступы */
#screen-baby-growth .baby-add-form {
    background: #ffffff;
    margin: 16px;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#screen-baby-growth .baby-add-form .form-group {
    margin-bottom: 16px;
}

#screen-baby-growth .baby-add-form .form-group:last-of-type {
    margin-bottom: 20px;
}

#screen-baby-growth .baby-add-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 8px;
}

#screen-baby-growth .baby-add-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

#screen-baby-growth .baby-add-form input:focus {
    outline: none;
    border-color: #007aff;
}

#screen-baby-growth .btn-primary {
    width: 100%;
    margin-top: 0;
}

/* График */
#screen-baby-growth .chart-card {
    background: #ffffff;
    margin: 16px;
    padding: 16px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#screen-baby-growth .chart-card canvas {
    width: 100% !important;
    max-height: 250px;
}

/* Список измерений */
#screen-baby-growth .baby-measurements-list {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

#screen-baby-growth .baby-measurements-list .measurement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f2f1f6;
}

#screen-baby-growth .baby-measurements-list .measurement-item:last-child {
    border-bottom: none;
}

#screen-baby-growth .delete-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Тёмная тема */
body.dark-theme #screen-baby-growth .baby-add-form,
body.dark-theme #screen-baby-growth .chart-card,
body.dark-theme #screen-baby-growth .baby-measurements-list {
    background: #2c2c2e;
}

body.dark-theme #screen-baby-growth .baby-add-form input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #screen-baby-growth .baby-add-form label {
    color: #ffffff;
}

body.dark-theme #screen-baby-growth .baby-measurements-list .measurement-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme #screen-baby-growth .baby-measurements-list .measurement-item div:first-child {
    color: #ffffff;
}
/* ===== РЕЖИМ МАЛЫШ - КОРМЛЕНИЕ ===== */
#screen-baby-feed .baby-feed-form {
    background: #ffffff;
    margin: 16px;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#screen-baby-feed .baby-feed-form .form-group {
    margin-bottom: 16px;
}

#screen-baby-feed .baby-feed-form .form-group:last-of-type {
    margin-bottom: 20px;
}

#screen-baby-feed .baby-feed-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 8px;
}

#screen-baby-feed .baby-feed-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

#screen-baby-feed .baby-feed-form input:focus {
    outline: none;
    border-color: #007aff;
}

#screen-baby-feed .btn-primary {
    width: 100%;
    margin-top: 0;
}

/* Кнопки выбора типа кормления */
#screen-baby-feed .feed-type-buttons,
#screen-baby-feed .feed-side-buttons {
    display: flex;
    gap: 12px;
}

#screen-baby-feed .feed-type-btn,
#screen-baby-feed .feed-side-btn {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#screen-baby-feed .feed-type-btn.active,
#screen-baby-feed .feed-side-btn.active {
    background: #007aff;
    border-color: #007aff;
    color: white;
}

#screen-baby-feed .feed-type-btn:active,
#screen-baby-feed .feed-side-btn:active {
    transform: scale(0.97);
}

/* Список кормлений */
#screen-baby-feed .baby-feed-list {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

#screen-baby-feed .feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f2f1f6;
}

#screen-baby-feed .feed-item:last-child {
    border-bottom: none;
}

#screen-baby-feed .feed-item div:first-child strong {
    font-size: 15px;
    color: #1c1c1e;
}

#screen-baby-feed .feed-item div:first-child div {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 4px;
}

#screen-baby-feed .delete-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

#screen-baby-feed .delete-btn:active {
    transform: scale(0.95);
}

/* Тёмная тема */
body.dark-theme #screen-baby-feed .baby-feed-form,
body.dark-theme #screen-baby-feed .baby-feed-list {
    background: #2c2c2e;
}

body.dark-theme #screen-baby-feed .baby-feed-form label {
    color: #ffffff;
}

body.dark-theme #screen-baby-feed .baby-feed-form input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #screen-baby-feed .feed-type-btn,
body.dark-theme #screen-baby-feed .feed-side-btn {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #screen-baby-feed .feed-type-btn.active,
body.dark-theme #screen-baby-feed .feed-side-btn.active {
    background: #0a84ff;
    border-color: #0a84ff;
    color: white;
}

body.dark-theme #screen-baby-feed .feed-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme #screen-baby-feed .feed-item div:first-child strong {
    color: #ffffff;
}
/* ===== РЕЖИМ МАЛЫШ - СОН ===== */
#screen-baby-sleep .baby-sleep-form {
    background: #ffffff;
    margin: 16px;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#screen-baby-sleep .baby-sleep-form .form-group {
    margin-bottom: 16px;
}

#screen-baby-sleep .baby-sleep-form .form-group:last-of-type {
    margin-bottom: 20px;
}

#screen-baby-sleep .baby-sleep-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 8px;
}

#screen-baby-sleep .baby-sleep-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

#screen-baby-sleep .baby-sleep-form input:focus {
    outline: none;
    border-color: #007aff;
}

#screen-baby-sleep .baby-sleep-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;  /* ← УВЕЛИЧЕН ОТСТУП ПОСЛЕ двух полей */
}

#screen-baby-sleep .baby-sleep-form .form-row-2 .form-group {
    margin-bottom: 0;
}

/* Дополнительный отступ для блока длительности */
#screen-baby-sleep .baby-sleep-form .form-group:has(#sleep-duration-display) {
    margin-top: 8px;
    margin-bottom: 20px;
}

#screen-baby-sleep .btn-primary {
    width: 100%;
    margin-top: 8px;  /* ← НЕБОЛЬШОЙ ОТСТУП ПЕРЕД КНОПКОЙ */
}

/* График сна */
#screen-baby-sleep .chart-card {
    background: #ffffff;
    margin: 16px;
    padding: 16px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#screen-baby-sleep .chart-card canvas {
    width: 100% !important;
    max-height: 200px;
}

/* Список сна */
#screen-baby-sleep .baby-sleep-list {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

#screen-baby-sleep .sleep-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f2f1f6;
}

#screen-baby-sleep .sleep-item:last-child {
    border-bottom: none;
}

#screen-baby-sleep .sleep-item div:first-child strong {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
}

#screen-baby-sleep .sleep-item div:first-child div {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 4px;
}

#screen-baby-sleep .delete-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

#screen-baby-sleep .delete-btn:active {
    transform: scale(0.95);
}

/* Тёмная тема */
body.dark-theme #screen-baby-sleep .baby-sleep-form,
body.dark-theme #screen-baby-sleep .chart-card,
body.dark-theme #screen-baby-sleep .baby-sleep-list {
    background: #2c2c2e;
}

body.dark-theme #screen-baby-sleep .baby-sleep-form label {
    color: #ffffff;
}

body.dark-theme #screen-baby-sleep .baby-sleep-form input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #screen-baby-sleep .sleep-item {
    border-bottom-color: #3a3a3c;
}

body.dark-theme #screen-baby-sleep .sleep-item div:first-child strong {
    color: #ffffff;
}
/* ===== СИМПТОМЫ ===== */
.symptoms-container {
    padding: 16px;
}

.symptoms-date-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-radius: 24px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.date-nav-btn {
    background: #f2f1f6;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
}

.symptoms-current-date {
    font-size: 16px;
    font-weight: 600;
    color: #1c1c1e;
}

.symptoms-form {
    background: #ffffff;
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.symptoms-group {
    margin-bottom: 20px;
}

.symptoms-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f2f1f6;
}

.symptoms-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.symptom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f9f9fb;
    border-radius: 14px;
    cursor: pointer;
}

.symptom-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #007aff;
    cursor: pointer;
}

.symptom-checkbox span {
    font-size: 13px;
    color: #1c1c1e;
}

.symptoms-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.symptom-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f9f9fb;
    border-radius: 30px;
    cursor: pointer;
}

.symptom-radio input {
    width: 16px;
    height: 16px;
    accent-color: #007aff;
    cursor: pointer;
}

.symptom-radio span {
    font-size: 13px;
    color: #1c1c1e;
}

.symptoms-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #e5e5ea;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.symptoms-history {
    background: #ffffff;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.symptoms-history-title {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f2f1f6;
}

.symptoms-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.symptom-history-item {
    padding: 10px 0;
    border-bottom: 1px solid #f2f1f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.symptom-history-date {
    font-size: 12px;
    font-weight: 600;
    color: #007aff;
}

.symptom-history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.symptom-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f2f1f6;
    color: #1c1c1e;
}

/* Тёмная тема */
body.dark-theme .symptoms-date-selector,
body.dark-theme .symptoms-form,
body.dark-theme .symptoms-history {
    background: #2c2c2e;
}

body.dark-theme .symptom-checkbox,
body.dark-theme .symptom-radio {
    background: #3a3a3c;
}

body.dark-theme .symptom-checkbox span,
body.dark-theme .symptom-radio span {
    color: #ffffff;
}

body.dark-theme .symptoms-group textarea {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}
/* Компактная сводка в режиме подготовки */
.precon-compact-summary {
    background: #ffffff;
    border-radius: 20px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin: 0 16px 16px 16px;
    width: calc(100% - 32px);
    max-width: 468px;
    box-sizing: border-box;
}

.compact-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f2f1f6;
}

.compact-summary-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
}

.compact-summary-title svg {
    width: 12px;
    height: 12px;
    stroke: #007aff;
}

.compact-summary-date input {
    padding: 3px 6px;
    border-radius: 10px;
    border: none;
    background: #f2f1f6;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
}

.compact-summary-content {
    padding: 2px 0;
}

.compact-summary-placeholder {
    text-align: center;
    padding: 8px;
    color: #8e8e93;
    font-size: 11px;
    width: 100%;
}

/* Тёмная тема */
body.dark-theme .precon-compact-summary {
    background: #2c2c2e;
}

body.dark-theme .compact-summary-title {
    color: #98989e;
}

body.dark-theme .compact-summary-header {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .compact-summary-placeholder {
    color: #98989e;
}

/* Улучшенный pull-to-refresh */
.pull-to-refresh {
    position: fixed;
    top: -60px;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
    transition: top 0.2s ease;
    border-bottom: 0.5px solid rgba(0,0,0,0.05);
    pointer-events: none;
}



.pull-to-refresh-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e5ea;
    border-top-color: #007aff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.pull-to-refresh.loading .pull-to-refresh-spinner {
    animation: spin 0.8s linear infinite;
}

.pull-to-refresh-text {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Тёмная тема */
body.dark-theme .pull-to-refresh {
    background: rgba(28,28,30,0.95);
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .pull-to-refresh-text {
    color: #98989e;
}

body.dark-theme .pull-to-refresh-spinner {
    border-color: #3a3a3c;
    border-top-color: #0a84ff;
}

/* Отключение стандартного обновления браузера - ИСПРАВЛЕНО */
body {
    /* overscroll-behavior: none;  ← ЗАКОММЕНТИРОВАНО - было причиной поломки pull-to-refresh */
    -webkit-overflow-scrolling: touch;
}

.app {
    /* overscroll-behavior: contain;  ← ЗАКОММЕНТИРОВАНО - было причиной поломки pull-to-refresh */
}
/* Список кормлений - полное исправление */
#feed-list,
.baby-feed-list {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 16px !important;
    margin: 0 0 25px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

/* Карточка дня - каждая отдельно */
.feed-day-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Заголовок карточки */
.feed-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
}

.feed-day-date {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feed-day-date::before {
    content: "📅";
    font-size: 16px;
}

.feed-day-stats {
    display: flex;
    gap: 8px;
}

.feed-stat {
    font-size: 11px;
    font-weight: 600;
    color: #007aff;
    background: rgba(0,122,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Контейнер для записей дня */
.feed-day-items {
    padding: 4px 0;
}

/* Одна запись кормления */
.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f1f6;
    background: #ffffff;
}

.feed-item:last-child {
    border-bottom: none;
}

.feed-item-time {
    font-size: 14px;
    font-weight: 700;
    color: #007aff;
    min-width: 50px;
}

.feed-item-info {
    flex: 1;
}

.feed-item-type {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feed-icon {
    font-size: 18px;
}

.feed-type-text {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
}

.feed-item-details {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

/* Кнопка удаления */
.delete-feed-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: #ff3b30;
}

.delete-feed-btn:active {
    transform: scale(0.95);
    background: rgba(255,59,48,0.1);
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme #feed-list,
body.dark-theme .baby-feed-list {
    background: transparent !important;
}

body.dark-theme .feed-day-card {
    background: #2c2c2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark-theme .feed-day-header {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
}

body.dark-theme .feed-day-date {
    color: #ffffff;
}

body.dark-theme .feed-stat {
    background: rgba(10,132,255,0.2);
    color: #0a84ff;
}

body.dark-theme .feed-item {
    background: #2c2c2e;
    border-bottom-color: #3a3a3c;
}

body.dark-theme .feed-type-text {
    color: #ffffff;
}

body.dark-theme .feed-item-time {
    color: #0a84ff;
}

body.dark-theme .delete-feed-btn {
    color: #ff453a;
}
/* ===== ИСТОРИЯ ИЗМЕРЕНИЙ (РОСТ И ВЕС) С ГРУППИРОВКОЙ ===== */
#baby-measurements-list {
    background: transparent !important;
    padding: 0 16px !important;
    margin: 0 0 25px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

/* Карточка дня */
.measurement-day-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Заголовок карточки */
.measurement-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
    flex-wrap: wrap;
    gap: 8px;
}

.measurement-day-date {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.measurement-day-date::before {
    content: "📅";
    font-size: 16px;
}

.measurement-day-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.measurement-stat {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16,185,129,0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Контейнер для записей дня */
.measurement-day-items {
    padding: 4px 0;
}

/* Одна запись измерения */
.measurement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f1f6;
    background: #ffffff;
}

.measurement-item:last-child {
    border-bottom: none;
}

.measurement-item-info {
    flex: 1;
}

.measurement-item-values {
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1e;
}

/* Кнопка удаления */
.delete-measurement-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: #ff3b30;
}

.delete-measurement-btn:active {
    transform: scale(0.95);
    background: rgba(255,59,48,0.1);
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme #baby-measurements-list {
    background: transparent !important;
}

body.dark-theme .measurement-day-card {
    background: #2c2c2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark-theme .measurement-day-header {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
}

body.dark-theme .measurement-day-date {
    color: #ffffff;
}

body.dark-theme .measurement-stat {
    background: rgba(16,185,129,0.2);
    color: #6ee7b7;
}

body.dark-theme .measurement-item {
    background: #2c2c2e;
    border-bottom-color: #3a3a3c;
}

body.dark-theme .measurement-item-values {
    color: #ffffff;
}

body.dark-theme .delete-measurement-btn {
    color: #ff453a;
}
/* ===== ИСТОРИЯ СНА С ГРУППИРОВКОЙ ===== */
#sleep-history {
    background: transparent !important;
    padding: 0 16px !important;
    margin: 0 0 20px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

/* Карточка дня */
.sleep-day-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Заголовок карточки */
.sleep-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fc;
    border-bottom: 1px solid #f2f1f6;
    flex-wrap: wrap;
    gap: 8px;
}

.sleep-day-date {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sleep-day-date::before {
    content: "📅";
    font-size: 16px;
}

.sleep-day-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sleep-stat {
    font-size: 11px;
    font-weight: 600;
    color: #8b5cf6;
    background: rgba(139,92,246,0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Контейнер для записей дня */
.sleep-day-items {
    padding: 4px 0;
}

/* Одна запись сна */
.sleep-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f1f6;
    background: #ffffff;
}

.sleep-item:last-child {
    border-bottom: none;
}

.sleep-item-info {
    flex: 1;
}

.sleep-item-time {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.sleep-item-duration {
    font-size: 12px;
    font-weight: 500;
    color: #8b5cf6;
}

/* Кнопка удаления */
.delete-sleep-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: #ff3b30;
}

.delete-sleep-btn:active {
    transform: scale(0.95);
    background: rgba(255,59,48,0.1);
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme #sleep-history {
    background: transparent !important;
}

body.dark-theme .sleep-day-card {
    background: #2c2c2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark-theme .sleep-day-header {
    background: #3a3a3c;
    border-bottom-color: #4a4a4c;
}

body.dark-theme .sleep-day-date {
    color: #ffffff;
}

body.dark-theme .sleep-stat {
    background: rgba(139,92,246,0.2);
    color: #c084fc;
}

body.dark-theme .sleep-item {
    background: #2c2c2e;
    border-bottom-color: #3a3a3c;
}

body.dark-theme .sleep-item-time {
    color: #ffffff;
}

body.dark-theme .sleep-item-duration {
    color: #c084fc;
}

body.dark-theme .delete-sleep-btn {
    color: #ff453a;
}
/* ===== МОДАЛЬНОЕ ОКНО ДЛЯ КАЛЕНДАРЯ (СВЕТЛАЯ ТЕМА) ===== */
.schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.schedule-modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.schedule-modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #1c1c1e;
}

.schedule-modal-content .form-group {
    margin-bottom: 16px;
}

.schedule-modal-content .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1c1c1e;
}

.schedule-modal-content .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #1c1c1e;
    box-sizing: border-box;
}

.schedule-modal-content .form-group input:focus {
    outline: none;
    border-color: #007aff;
}

.schedule-modal-content .modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.schedule-modal-content .btn-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    background: #f2f1f6;
    border: none;
    color: #8e8e93;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedule-modal-content .btn-cancel:active {
    transform: scale(0.97);
}

.schedule-modal-content .btn-save {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    background: #007aff;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedule-modal-content .btn-save:active {
    transform: scale(0.97);
    background: #0051d5;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme .schedule-modal-content {
    background: #2c2c2e;
}

body.dark-theme .schedule-modal-content h3 {
    color: #ffffff;
}

body.dark-theme .schedule-modal-content .form-group label {
    color: #ffffff;
}

body.dark-theme .schedule-modal-content .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme .schedule-modal-content .form-group input:focus {
    border-color: #0a84ff;
}

body.dark-theme .schedule-modal-content .btn-cancel {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .schedule-modal-content .btn-save {
    background: #0a84ff;
}
/* ===== ИСПРАВЛЕНИЕ ДЛЯ РАЗДЕЛА АНАЛИЗЫ (МОБИЛЬНАЯ ВЕРСИЯ) ===== */

/* Карточка анализа */
.test-item {
    display: flex;
    flex-direction: column;  /* ← Меняем на колонку на мобильных */
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Левая часть с информацией */
.test-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

/* Чекбокс */
.test-checkbox {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

/* Информация об анализе */
.test-info {
    flex: 1;
}

.test-name {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
    word-break: break-word;
}

.test-week {
    font-size: 12px;
    color: #8e8e93;
    margin-bottom: 4px;
}

.test-norm {
    font-size: 11px;
    color: #10b981;
    margin-top: 4px;
}

/* Правая часть - действия */
.test-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.test-status {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 30px;
    background: #f2f1f6;
    white-space: nowrap;
}

.test-status.done {
    background: #d1fae5;
    color: #059669;
}

/* Кнопка добавления в календарь */
.btn-schedule {
    background: #007aff15;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-schedule:active {
    transform: scale(0.95);
}

/* Бейдж "Добавлено" */
.scheduled-badge {
    font-size: 11px;
    color: #10b981;
    background: #d1fae5;
    padding: 6px 12px;
    border-radius: 30px;
    white-space: nowrap;
}

/* Кнопка удаления анализа */
.delete-test-btn {
    background: #ff3b30;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.delete-test-btn:active {
    transform: scale(0.95);
}

/* Для планшетов и больших экранов */
@media (min-width: 600px) {
    .test-item {
        flex-direction: row;
        align-items: center;
    }
    
    .test-actions {
        width: auto;
        justify-content: flex-end;
        flex-shrink: 0;
    }
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme .test-item {
    background: #2c2c2e;
    box-shadow: none;
}

body.dark-theme .test-name {
    color: #ffffff;
}

body.dark-theme .test-checkbox {
    background: #3a3a3c;
    color: #ffffff;
}

body.dark-theme .test-status {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .test-status.done {
    background: #065f46;
    color: #6ee7b7;
}

body.dark-theme .btn-schedule {
    background: #0a84ff20;
}

body.dark-theme .scheduled-badge {
    background: #065f46;
    color: #6ee7b7;
}
/* Кнопка добавления задачи в календарь */
.btn-schedule-task {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-schedule-task:active {
    transform: scale(0.95);
}

/* Для контейнера с действиями задачи */
.task-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Тёмная тема */
body.dark-theme .btn-schedule-task {
    background: #0a84ff20;
}
/* Кнопка добавления врача в календарь */
.btn-schedule-doctor {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-schedule-doctor:active {
    transform: scale(0.95);
}

/* Контейнер для действий врача */
.doctor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Тёмная тема */
body.dark-theme .btn-schedule-doctor {
    background: #0a84ff20;
}
/* ===== ВРАЧИ - ОСНОВНЫЕ СТИЛИ ===== */
.doctors-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.doctors-card.active {
    border: 2px solid #007aff;
}

.doctors-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f1f6;
}

.doctors-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}

.doctors-card-badge {
    background: #007aff15;
    color: #007aff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.doctors-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Карточка врача */
.doctor-item {
    background: #f9f9fb;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Верхняя строка с информацией и кнопками */
.doctor-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.doctor-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 2;
    min-width: 0;
}

.doctor-details {
    flex: 1;
    min-width: 0;
}

.doctor-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.doctor-week {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 4px;
}

.doctor-purpose {
    font-size: 12px;
    color: #3a3a3c;
    margin-top: 4px;
}

.doctor-contact {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 4px;
}

.doctor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.doctor-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    background: #ffffff;
    white-space: nowrap;
}

.doctor-status.done {
    background: #d1fae5;
    color: #059669;
}

/* Кнопки */
.btn-schedule-doctor {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-schedule-doctor:active {
    transform: scale(0.95);
}

.delete-doctor-btn {
    background: #ff3b30;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.delete-doctor-btn:active {
    transform: scale(0.95);
}

.scheduled-badge {
    font-size: 11px;
    color: #10b981;
    background: #d1fae5;
    padding: 4px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ===== ЗАМЕТКИ ВРАЧА - ОБЯЗАТЕЛЬНО ВНИЗУ НА ВСЮ ШИРИНУ ===== */
.doctor-notes-bottom {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e5ea;
    width: 100%;
    display: block;
    clear: both;
}

.note-add-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.note-input-bottom {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    width: auto;
}

.note-input-bottom:focus {
    outline: none;
    border-color: #007aff;
    background: #ffffff;
}

.note-input-bottom::placeholder {
    color: #cbd5e1;
    font-size: 12px;
}

.note-save-bottom {
    background: #007aff;
    border: none;
    padding: 8px 18px;
    border-radius: 24px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.note-save-bottom:active {
    transform: scale(0.97);
}

/* Блок с сохранённой заметкой */
.note-display-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f7ff;
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.note-text-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 13px;
    color: #1c1c1e;
    word-break: break-word;
}

.note-content-bottom {
    flex: 1;
    word-break: break-word;
}

.note-meta-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.note-date-bottom {
    font-size: 10px;
    color: #8e8e93;
}

.note-delete-bottom {
    background: none;
    border: none;
    color: #ff3b30;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
}

.note-delete-bottom:active {
    background: rgba(255,59,48,0.1);
}

.custom-badge {
    font-size: 9px;
    background: #e0e7ff;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Тёмная тема */
body.dark-theme .doctors-card {
    background: #2c2c2e;
}

body.dark-theme .doctors-card-header {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .doctors-card-header h3 {
    color: #ffffff;
}

body.dark-theme .doctor-item {
    background: #3a3a3c;
}

body.dark-theme .doctor-name {
    color: #ffffff;
}

body.dark-theme .doctor-purpose {
    color: #98989e;
}

body.dark-theme .doctor-notes-bottom {
    border-top-color: #4a4a4c;
}

body.dark-theme .note-input-bottom {
    background: #2c2c2e;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme .note-input-bottom:focus {
    border-color: #0a84ff;
}

body.dark-theme .note-display-bottom {
    background: #1e3a5f;
}

body.dark-theme .note-text-bottom {
    color: #e0e7ff;
}

body.dark-theme .note-save-bottom {
    background: #0a84ff;
}

body.dark-theme .btn-schedule-doctor {
    background: #0a84ff20;
}

body.dark-theme .scheduled-badge {
    background: #065f46;
    color: #6ee7b7;
}
/* Контейнер карточки врача - 2 части */
.doctor-card-container {
    background: #f9f9fb;
    border-radius: 18px;
    margin-bottom: 12px;
    overflow: hidden;
}

/* Верхняя часть: информация и кнопки */
.doctor-top-part {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
}

/* Нижняя часть: заметки */
.doctor-bottom-part {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #f2f1f6;
    width: 100%;
    box-sizing: border-box;
}

.note-add-part {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.note-input-part {
    flex: 1;
    min-width: 0;
    background: #f9f9fb;
    border: 1px solid #e5e5ea;
    border-radius: 24px;
    padding: 8px 12px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.note-input-part::placeholder {
    font-size: 12px;
    color: #cbd5e1;
}

.note-input-part:focus {
    outline: none;
    border-color: #007aff;
}

.note-save-part {
    background: #007aff;
    border: none;
    padding: 6px 14px;
    border-radius: 24px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.note-save-part:active {
    transform: scale(0.97);
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .note-input-part::placeholder {
        font-size: 10px;
    }
    
    .note-input-part {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .note-save-part {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Стили для элементов внутри нижней части */
.note-add-part {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.note-input-part {
    flex: 1;
    background: #f9f9fb;
    border: 1px solid #e5e5ea;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.note-input-part:focus {
    outline: none;
    border-color: #007aff;
}

.note-save-part {
    background: #007aff;
    border: none;
    padding: 8px 18px;
    border-radius: 24px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.note-save-part:active {
    transform: scale(0.97);
}

.note-display-part {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f7ff;
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.note-text-part {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 13px;
    color: #1c1c1e;
}

.note-content-part {
    flex: 1;
    word-break: break-word;
}

.note-meta-part {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.note-date-part {
    font-size: 10px;
    color: #8e8e93;
}

.note-delete-part {
    background: none;
    border: none;
    color: #ff3b30;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Тёмная тема */
body.dark-theme .doctor-card-container {
    background: #3a3a3c;
}

body.dark-theme .doctor-bottom-part {
    background: #2c2c2e;
    border-top-color: #4a4a4c;
}

body.dark-theme .note-input-part {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme .note-display-part {
    background: #1e3a5f;
}

body.dark-theme .note-text-part {
    color: #e0e7ff;
}

body.dark-theme .note-save-part {
    background: #0a84ff;
}
/* Кнопка поделиться графиком */
.btn-share-chart {
    background: #f2f1f6;
    border: none;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.btn-share-chart:active {
    transform: scale(0.97);
    background: #e5e5ea;
}

/* Тёмная тема */
body.dark-theme .btn-share-chart {
    background: #3a3a3c;
    color: #0a84ff;
}

body.dark-theme .btn-share-chart:active {
    background: #4a4a4c;
}
/* ===== ВЫБОР РЕБЁНКА ===== */
.baby-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.baby-selector-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    background: #f2f1f6;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: #8e8e93;
}

.baby-selector-item:active {
    transform: scale(0.97);
}

.baby-selector-item.active {
    background: #007aff;
    color: white;
}

.baby-selector-item .baby-selector-avatar {
    font-size: 16px;
}

.baby-selector-item .baby-selector-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.baby-selector-item .baby-selector-check {
    font-size: 12px;
}

.baby-selector-add {
    background: #007aff15;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #007aff;
    transition: all 0.2s ease;
}

.baby-selector-add:active {
    transform: scale(0.95);
}

/* Кнопка "Добавить малыша" в шапке */
.btn-add-baby {
    background: #007aff15;
    border: none;
    padding: 8px 14px;
    border-radius: 30px;
    color: #007aff;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add-baby:active {
    transform: scale(0.97);
}

/* Модальное окно добавления ребёнка */
.modal-add-baby {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-add-baby .modal-content {
    background: white;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.modal-add-baby .form-group {
    margin-bottom: 16px;
}

.modal-add-baby .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1c1c1e;
}

.modal-add-baby .form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* Тёмная тема */
body.dark-theme .baby-selector-item {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .baby-selector-item.active {
    background: #0a84ff;
    color: white;
}

body.dark-theme .baby-selector-add {
    background: #0a84ff20;
    color: #0a84ff;
}

body.dark-theme .btn-add-baby {
    background: #0a84ff20;
    color: #0a84ff;
}

body.dark-theme .modal-add-baby .modal-content {
    background: #2c2c2e;
}

body.dark-theme .modal-add-baby .form-group label {
    color: white;
}

body.dark-theme .modal-add-baby .form-group input {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: white;
}
/* ===== СТАТЬИ ДЛЯ МАЛЫША ===== */
.baby-articles-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 90px;
}

.baby-article-card:active {
    transform: scale(0.98);
    background: #f2f1f6;
}

/* Тёмная тема */
body.dark-theme .baby-article-card {
    background: #2c2c2e !important;
}

body.dark-theme .baby-article-card:active {
    background: #3a3a3c !important;
}
/* Скрываем ненужные блоки в разделе "Журнал" */
#reading-stats-container {
    display: none !important;
}

.achievements-section {
    display: none !important;
}
/* ============================================================
   ИСПРАВЛЕНИЕ: ШИРИНА СТАТЕЙ В ЖУРНАЛЕ (ПРИНУДИТЕЛЬНО)
   ============================================================ */

/* Контейнер списка статей — убираем лишние отступы */
.articles-full-list {
    padding: 0 16px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Все дочерние блоки — на всю ширину */
.articles-full-list > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Информационный блок о триместре (вверху) — убираем лишние отступы */
.articles-full-list > div:first-child {
    margin: 16px 0 24px 0 !important;  /* ← снизу 24px (больше) */
    padding: 16px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}



/* КАРТОЧКА СТАТЬИ — полная ширина */
.article-card {
    background: white;
    border-radius: 18px;
    padding: 14px 16px !important;
    margin: 0 0 10px 0 !important;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    animation: fadeInUp 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Содержимое карточки */
.article-card .article-card-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Тёмная тема */
body.dark-theme .article-card {
    background: #2c2c2e;
}



/* Для блока "статья дня" в журнале */
.articles-full-list .daily-article-preview,
.articles-full-list > div > div[style*="background: linear-gradient"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
/* Стили для витаминов с галочкой */
.vitamin-item:has(input:checked) {
    background: #d1fae5 !important;
    color: #059669 !important;
}

.vitamin-item:has(input:checked) .vitamin-checkbox {
    background: #10b981;
    color: white;
}

/* Стили для пользовательских витаминов с галочкой */
.custom-vitamin-item .vitamin-checkbox.taken {
    background: #10b981;
    color: white;
}
/* ===== ВИТАМИНЫ - ВИЗУАЛЬНЫЕ СТИЛИ ===== */
.vitamin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9f9fb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vitamin-item:active {
    transform: scale(0.98);
}

.vitamin-item .vitamin-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #8e8e93;
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vitamin-item label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
}

/* Состояние "отмечено" */
.vitamin-item.checked {
    background: #d1fae5 !important;
    color: #059669 !important;
}

.vitamin-item.checked .vitamin-checkbox {
    background: #10b981 !important;
    color: white !important;
}
/* ===== НОВЫЕ СТИЛИ ДЛЯ ВИТАМИНОВ ===== */
.vitamin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9f9fb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.vitamin-item:active {
    transform: scale(0.97);
}

.vitamin-item .vitamin-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #8e8e93;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.vitamin-item .vitamin-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
}

.vitamin-item.checked {
    background: #d1fae5 !important;
    color: #059669 !important;
}

.vitamin-item.checked .vitamin-checkbox {
    background: #10b981 !important;
    color: white !important;
}
/* Для дисклеймера в справочной информации */
.ref-disclaimer {
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fc;
    border-radius: 12px;
    border-left: 3px solid #ff9500;
}

.ref-footer {
    font-size: 10px;
    color: #8e8e93;
    margin-top: 12px;
    text-align: center;
    border-top: 1px solid #f2f1f6;
    padding-top: 12px;
}
/* ===== ПОДСВЕТКА РАЗДЕЛА В МОДАЛЬНОМ ОКНЕ ===== */
.who-section.highlight {
    background: #f0f7ff !important;
    border-left: 3px solid #007aff !important;
}

/* Тёмная тема */
body.dark-theme .who-section.highlight {
    background: #1e3a5f !important;
    border-left-color: #0a84ff !important;
}
/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #ffffff;
    border-radius: 28px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Тёмная тема */
body.dark-theme .modal-content {
    background: #2c2c2e;
    color: #ffffff;
}
/* ===== СВОДКА - СЕТКА ПОКАЗАТЕЛЕЙ ===== */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.summary-grid-item {
    background: #f8f9fc;
    border-radius: 16px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.summary-grid-item:active {
    transform: scale(0.97);
}

.summary-grid-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.summary-grid-text {
    font-size: 13px;
    font-weight: 500;
    color: #1c1c1e;
    line-height: 1.3;
    word-break: break-word;
}

/* Тёмная тема */
body.dark-theme .summary-grid-item {
    background: #3a3a3c;
}

body.dark-theme .summary-grid-text {
    color: #ffffff;
}

body.dark-theme .summary-grid-icon {
    background: #2c2c2e;
}
/* ===== ССЫЛКА НА СПРАВОЧНУЮ ИНФОРМАЦИЮ В ГРАФИКАХ ===== */
.chart-ref-link {
    cursor: pointer;
    font-size: 11px;
    color: #007aff;
    padding: 8px 12px;
    border-radius: 20px;
    background: #f0f7ff;
    display: inline-block;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
}

.chart-ref-link:hover {
    background: #dbeafe;
}

.chart-ref-link:active {
    transform: scale(0.97);
}

/* Тёмная тема */
body.dark-theme .chart-ref-link {
    background: #1e3a5f;
    color: #0a84ff;
}

body.dark-theme .chart-ref-link:hover {
    background: #1a3355;
}

/* ===== ЗАМЕТКИ МАЛЫША ===== */
#screen-baby-notes .baby-notes-form textarea {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    background: #f9f9fb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.5;
}

#screen-baby-notes .baby-notes-form textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
    background: #ffffff;
}

#screen-baby-notes .baby-notes-form input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    background: #f9f9fb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#screen-baby-notes .baby-notes-form input[type="date"]:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
    background: #ffffff;
}

#screen-baby-notes .baby-notes-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Тёмная тема */
body.dark-theme #screen-baby-notes .baby-notes-form {
    background: #2c2c2e !important;
}

body.dark-theme #screen-baby-notes .baby-notes-form textarea {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #screen-baby-notes .baby-notes-form textarea:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10,132,255,0.2);
    background: #3a3a3c;
}

body.dark-theme #screen-baby-notes .baby-notes-form input[type="date"] {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #ffffff;
}

body.dark-theme #screen-baby-notes .baby-notes-form input[type="date"]:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10,132,255,0.2);
    background: #3a3a3c;
}

body.dark-theme #screen-baby-notes .baby-notes-form .form-group label {
    color: #98989e;
}

body.dark-theme #baby-notes-list > div {
    background: #2c2c2e !important;
}

body.dark-theme #baby-notes-list > div > div:first-child {
    background: #3a3a3c !important;
    border-bottom-color: #4a4a4c !important;
}

body.dark-theme #baby-notes-list > div > div:first-child span:last-child {
    color: #0a84ff !important;
}

body.dark-theme #baby-notes-list > div > div:last-child > div {
    border-bottom-color: #3a3a3c !important;
}

body.dark-theme #baby-notes-list > div > div:last-child > div > div:first-child > div:first-child {
    color: #ffffff !important;
}

body.dark-theme #baby-notes-list .empty-state {
    background: #3a3a3c !important;
    color: #98989e !important;
}
/* Стили для статей в разделе "Роды" */
.article-modal .article-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e5ea;
}

.article-modal .article-footer-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #8e8e93;
    margin-bottom: 12px;
}

.article-modal .article-actions {
    display: flex;
    gap: 12px;
}

.article-modal .like-btn,
.article-modal .share-btn {
    padding: 8px 16px;
    border-radius: 30px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-modal .like-btn {
    background: #fee2e2;
    color: #dc2626;
}

.article-modal .share-btn {
    background: #f2f1f6;
    color: #007aff;
}

.article-modal .like-btn:active,
.article-modal .share-btn:active {
    transform: scale(0.97);
}

body.dark-theme .article-modal .article-footer {
    border-top-color: #3a3a3c;
}

body.dark-theme .article-modal .like-btn {
    background: #7f1a1a;
    color: #fca5a5;
}

body.dark-theme .article-modal .share-btn {
    background: #3a3a3c;
    color: #0a84ff;
}

/* ===== СТЕКЛЯННЫЙ НИЖНИЙ ТАББАР (ПРЕМИУМ-ВЕРСИЯ) ===== */

.tabbar {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 
        0 -1px 4px rgba(0, 0, 0, 0.04),
        0 -8px 32px rgba(0, 0, 0, 0.06) !important;
    border-top: 0.5px solid rgba(255, 255, 255, 0.5) !important;
    padding: 8px 12px 12px !important;
}

.tab {
    position: relative;
    padding: 8px 4px !important;
    border-radius: 14px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tab.active {
    background: rgba(0, 122, 255, 0.10) !important;
}

.tab.active .tab-icon svg {
    stroke: #007aff !important;
    stroke-width: 2.5px !important;
}

.tab.active .tab-label {
    color: #007aff !important;
    font-weight: 700 !important;
}



.tab-icon {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tab-icon svg {
    width: 22px !important;
    height: 22px !important;
    stroke: #8e8e93 !important;
    transition: all 0.25s ease !important;
}

.tab-label {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #8e8e93 !important;
    transition: all 0.25s ease !important;
    letter-spacing: -0.2px !important;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme .tabbar {
    background: rgba(28, 28, 30, 0.72) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 
        0 -1px 4px rgba(0, 0, 0, 0.2),
        0 -8px 32px rgba(0, 0, 0, 0.3) !important;
    border-top: 0.5px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .tab.active {
    background: rgba(10, 132, 255, 0.15) !important;
}

body.dark-theme .tab.active .tab-icon svg {
    stroke: #0a84ff !important;
}

body.dark-theme .tab.active .tab-label {
    color: #0a84ff !important;
}

/* ===== ПЛАВНОСТЬ ПРИ ПЕРЕКЛЮЧЕНИИ ВКЛАДОК ===== */

/* Плавное появление контента */
.screen {
    animation: fadeSlideIn 0.25s ease forwards;
}

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

/* Плавное переключение табов (нижний таббар) */
.tab {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tab-icon svg {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tab-label {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавное появление карточек */
.chart-card,
.summary-card,
.tests-card,
.checklist-card,
.doctors-card,
.partner-card,
.daily-summary-card,
.health-card,
.vitamin-item,
.custom-vitamin-item,
.precursor-item,
.bag-category {
    animation: fadeSlideIn 0.3s ease forwards;
    opacity: 0;
}

/* Задержки для каскадного эффекта */
.chart-card:nth-child(1) { animation-delay: 0.05s; }
.chart-card:nth-child(2) { animation-delay: 0.08s; }
.chart-card:nth-child(3) { animation-delay: 0.11s; }
.chart-card:nth-child(4) { animation-delay: 0.14s; }
.chart-card:nth-child(5) { animation-delay: 0.17s; }
.chart-card:nth-child(6) { animation-delay: 0.20s; }

/* ===== АНИМАЦИЯ КАРТОЧЕК ===== */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active .chart-card,
.screen.active .summary-card,
.screen.active .health-card {
    animation: fadeSlideIn 0.35s ease forwards;
    opacity: 0;
}

.screen.active .chart-card:nth-child(1) { animation-delay: 0.05s; }
.screen.active .chart-card:nth-child(2) { animation-delay: 0.10s; }
.screen.active .chart-card:nth-child(3) { animation-delay: 0.15s; }
.screen.active .chart-card:nth-child(4) { animation-delay: 0.20s; }
.screen.active .chart-card:nth-child(5) { animation-delay: 0.25s; }
.screen.active .chart-card:nth-child(6) { animation-delay: 0.30s; }

/* ===== ПЛАВНЫЙ СКРОЛЛ ===== */
.screen {
    scroll-behavior: smooth !important;
}

html {
    scroll-behavior: smooth !important;
}

/* ===== ИКОНКА В ХЕДЕРЕ ===== */
.section-bar-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    transition: transform 0.2s ease !important;
}

.section-bar-icon:hover {
    transform: scale(1.05);
}

.section-bar-icon svg {
    width: 28px !important;
    height: 28px !important;
}

/* ===== КАРТОЧКИ С ТЕНЬЮ ===== */
.chart-card,
.summary-card,
.health-card,
.daily-summary-card,
.tests-card,
.checklist-card,
.doctors-card,
.partner-card {
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.02) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

.chart-card:hover,
.summary-card:hover {
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.06),
        0 12px 32px rgba(0,0,0,0.04) !important;
    transform: translateY(-2px) !important;
}

/* ===== АДАПТАЦИЯ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ ===== */
@media (max-width: 380px) {
    .tab-label {
        font-size: 9px !important;
    }
    
    .tab-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .section-bar {
        padding: 12px 16px !important;
    }
    
    .section-bar-text h1 {
        font-size: 16px !important;
    }
}

/* ===== ИКОНКА В ХЕДЕРЕ ===== */
.section-bar-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    transition: transform 0.2s ease !important;
}

.section-bar-icon:hover {
    transform: scale(1.05);
}

.section-bar-icon svg {
    width: 28px !important;
    height: 28px !important;
}


/* ===== ГЛОБАЛЬНЫЙ ФОН ПРИЛОЖЕНИЯ — ПРЕМИУМ ВЕРСИЯ ===== */

/* Основной фон для body */
body {
    background: linear-gradient(160deg, #f0f4ff 0%, #e8edf5 40%, #f5f0f8 100%);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
}

/* Декоративные круги */
body::before {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    top: -160px;
    right: -120px;
    animation: floatBgPremium 14s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -160px;
    animation: floatBgPremium 16s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatBgPremium {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== ВАЖНО: Контейнер приложения — ПРОЗРАЧНЫЙ ===== */
.app {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* Все основные контейнеры — поверх фона */
.mode,
.screen,
.auth-container,
.profile-container,
.admin-container {
    position: relative;
    z-index: 1;
}

/* Стеклянный эффект для всех карточек */
.card,
.auth-container,
.profile-container .card,
.pregnancy-hero,
.pregnancy-progress-card,
.daily-summary-card,
.chart-card,
.summary-card,
.tests-card,
.checklist-card,
.doctors-card,
.partner-card,
.health-card,
.health-calendar-card,
.health-day-summary,
.precon-stat-card,
.ovulation-calendar-container,
.tip-card,
.vitamin-item,
.custom-vitamin-item,
.precursor-item,
.bag-category,
.contraction-stats,
.contraction-item,
.timeline-item,
.measurement-item,
.feed-item,
.vaccine-card,
.sleep-item,
.article-card,
.reading-stats-card,


.labor-readiness
{
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.04),
        0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Тёмная тема — фон без градиента */
body.dark-theme {
    background: #1c1c1e !important;
}

/* Убираем круги в тёмной теме */
body.dark-theme::before,
body.dark-theme::after {
    display: none !important;
}

/* Тёмная тема для карточек */
body.dark-theme .card,
body.dark-theme .auth-container,
body.dark-theme .profile-container .card,
body.dark-theme .pregnancy-hero,
body.dark-theme .pregnancy-progress-card,
body.dark-theme .daily-summary-card,
body.dark-theme .chart-card,
body.dark-theme .summary-card,
body.dark-theme .tests-card,
body.dark-theme .checklist-card,
body.dark-theme .doctors-card,
body.dark-theme .partner-card,
body.dark-theme .health-card,
body.dark-theme .health-calendar-card,
body.dark-theme .health-day-summary,
body.dark-theme .precon-stat-card,
body.dark-theme .ovulation-calendar-container,
body.dark-theme .tip-card,
body.dark-theme .vitamin-item,
body.dark-theme .custom-vitamin-item,
body.dark-theme .precursor-item,
body.dark-theme .bag-category,
body.dark-theme .contraction-stats,
body.dark-theme .contraction-item,
body.dark-theme .timeline-item,
body.dark-theme .measurement-item,
body.dark-theme .feed-item,
body.dark-theme .vaccine-card,
body.dark-theme .sleep-item,
body.dark-theme .article-card,
body.dark-theme .reading-stats-card,
body.dark-theme .baby-info-card,
body.dark-theme .countdown-card,
body.dark-theme .labor-readiness,
body.dark-theme .contraction-timer {
    background: #2c2c2e !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ============================================================
   УЛУЧШЕННАЯ ТИПОГРАФИКА — ПРЕМИУМ
   ============================================================ */

/* Основные шрифты — с засечками для заголовков */
h1, h2, h3, h4, 
.section-bar-text h1,
.card-title,
.modal-content h3,
.auth-title,
.app-name,
.hero-weeks-number,
.countdown-value,
.stat-number {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.02em;
}

/* Увеличенный межстрочный интервал для читаемости */
p, .text, .description, .card-text,
.article-text, .summary-text {
    line-height: 1.6;
}

/* Жирные цифры */
.stat-number,
.hero-weeks-number,
.countdown-value,
.measurement-value,
.feed-count {
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Заголовки с градиентом — как в дорогих приложениях */
.section-bar-text h1,
.app-name,
.auth-title,
.modal-content h3 {
    background: linear-gradient(135deg, #1c1c1e 0%, #4a4a4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Тёмная тема — градиент светлеет */
body.dark-theme .section-bar-text h1,
body.dark-theme .app-name,
body.dark-theme .auth-title,
body.dark-theme .modal-content h3 {
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Улучшенные подзаголовки */
.section-bar-text p,
.auth-subtitle,
.card-subtitle {
    color: #8e8e93;
    font-weight: 400;
    letter-spacing: 0.01em;
}

body.dark-theme .section-bar-text p,
body.dark-theme .auth-subtitle,
body.dark-theme .card-subtitle {
    color: #98989e;
}

/* ============================================================
   МИКРО-АНИМАЦИИ — ОТЗЫВЧИВОСТЬ
   ============================================================ */

/* Плавные переходы у всех интерактивных элементов */
.btn-primary, 
.btn-add-event, 
.tab, 
.sub-tab,
.stat-item,
.card,
.chart-card,
.summary-card,
.daily-summary-card,
.tests-card,
.checklist-card,
.doctors-card,
.partner-card,
.baby-category-card,
.countdown-card,
.vitamin-item,
.custom-vitamin-item,
.precursor-item,
.bag-item,
.doctor-item,
.test-item,
.feed-item,
.sleep-item,
.measurement-item,
.article-card,
.mini-article-card,
.personalized-article-card,
.daily-article-card,
.achievement-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}


/* Отдельно для карточек — лёгкий подъём при наведении */
.card:hover,
.chart-card:hover,
.summary-card:hover,
.daily-summary-card:hover,
.baby-category-card:hover,
.countdown-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.03);
}

/* Для мобильных — убираем hover (только тап) */
@media (hover: none) {
    .card:hover,
    .chart-card:hover,
    .summary-card:hover,
    .daily-summary-card:hover,
    .baby-category-card:hover,
    .countdown-card:hover {
        transform: none !important;
    }
}

/* Плавное появление элементов при загрузке */
.screen.active .card,
.screen.active .chart-card,
.screen.active .summary-card,
.screen.active .daily-summary-card,
.screen.active .tests-card,
.screen.active .checklist-card,
.screen.active .baby-category-card {
    animation: fadeSlideIn 0.4s ease forwards;
    opacity: 0;
}

/* Задержки для каскадного эффекта */
.screen.active .card:nth-child(1) { animation-delay: 0.05s; }
.screen.active .card:nth-child(2) { animation-delay: 0.10s; }
.screen.active .card:nth-child(3) { animation-delay: 0.15s; }
.screen.active .card:nth-child(4) { animation-delay: 0.20s; }
.screen.active .card:nth-child(5) { animation-delay: 0.25s; }
.screen.active .card:nth-child(6) { animation-delay: 0.30s; }

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

/* ============================================================
   ГРАДИЕНТНЫЕ АКЦЕНТЫ — ДОРОГОЙ СТИЛЬ
   ============================================================ */

/* Активные вкладки — градиентные */
.sub-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35) !important;
}

/* Активные кнопки в подтаббаре */
.mode-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25) !important;
}

/* Бейджи — градиентные */
.badge,
.checklist-badge,
.doctors-card-badge,
.tests-card-badge,
.achievement-card {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
}

/* Полоска прогресса — градиентная */
.progress-fill,
.readiness-fill,
.progress-strip-fill {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa) !important;
    background-size: 200% 100% !important;
    animation: gradientMove 3s ease infinite !important;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



/* Тёмная тема — градиенты остаются, но чуть ярче */
body.dark-theme .sub-tab.active {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.4) !important;
}

body.dark-theme .mode-btn.active {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
}

/* ============================================================
   БРЕНДОВЫЙ ЭЛЕМЕНТ — АНИМИРОВАННОЕ СЕРДЕЧКО
   ============================================================ */

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
    }
    14% { 
        transform: scale(1.08) rotate(-2deg); 
    }
    28% { 
        transform: scale(1) rotate(2deg); 
    }
    42% { 
        transform: scale(1.04) rotate(-1deg); 
    }
    70% { 
        transform: scale(1) rotate(0deg); 
    }
}

/* Применяем к иконке беременности на главной */
.pregnancy-hero-icon {
    animation: heartbeat 2s ease-in-out infinite;
    display: inline-block;
}

/* Или к любой иконке с классом .brand-heart */
.brand-heart {
    animation: heartbeat 2s ease-in-out infinite;
    display: inline-block;
}

/* Анимированный градиентный текст для важных заголовков */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientTextMove 4s ease infinite;
}

@keyframes gradientTextMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================================
   СКЕЛЕТОН-ЗАГРУЗКА — ПРЕМИАЛЬНЫЙ ОФЛАЙН
   ============================================================ */

.skeleton {
    background: linear-gradient(90deg, #e8e8ed 25%, #f2f1f6 50%, #e8e8ed 75%);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Тёмная тема */
body.dark-theme .skeleton {
    background: linear-gradient(90deg, #2c2c2e 25%, #3a3a3c 50%, #2c2c2e 75%);
    background-size: 200% 100%;
}

/* Плавная смена темы для всех элементов, включая SVG */
* {
    transition: background-color 0s ease, 
                color 0s ease, 
                border-color 0s ease,
                box-shadow 0s ease,
                stroke 0s ease,
                fill 0s ease !important;
}

/* И для SVG отдельно */
svg {
    transition: stroke 0.3s ease, fill 0.3s ease !important;
}

/* И для иконок в таббаре */
.tab-icon svg {
    transition: stroke 0.3s ease !important;
}

/* ============================================================
   ТЁМНАЯ ТЕМА — ПОЛНОЕ ИСПРАВЛЕНИЕ
   ============================================================ */

/* Общие правила */
body.dark-theme {
    background: #1c1c1e;
    color: #ffffff;
}

body.dark-theme .app {
    background: transparent;
}

/* Все тексты — белые, кроме исключений */
body.dark-theme,
body.dark-theme * {
    color: #ffffff;
}

/* Исключения — серые элементы */
body.dark-theme .text-muted,
body.dark-theme .stat-label,
body.dark-theme .chart-card-desc,
body.dark-theme .summary-item-label,
body.dark-theme .event-item-time,
body.dark-theme .cal-weekday,
body.dark-theme .tab-label:not(.active),
body.dark-theme .sub-tab:not(.active),
body.dark-theme .partner-note-meta,
body.dark-theme .doctor-week,
body.dark-theme .test-week,
body.dark-theme .symptom-badge,
body.dark-theme .password-hint,
body.dark-theme .auth-subtitle,
body.dark-theme .app-tagline,
body.dark-theme .member-since,
body.dark-theme .compact-summary-title,
body.dark-theme .daily-summary-title,
body.dark-theme .section-bar-text p,
body.dark-theme .phase-label,
body.dark-theme .legend-item,
body.dark-theme .precon-stat-label,
body.dark-theme .summary-empty,
body.dark-theme .empty-state,
body.dark-theme .tip-desc,
body.dark-theme .compact-summary-placeholder,
body.dark-theme .note-date-part,
body.dark-theme .note-delete-part,
body.dark-theme .scheduled-badge,
body.dark-theme .custom-badge,
body.dark-theme .category-subtitle,
body.dark-theme .stat-badge-label,
body.dark-theme .category-preview,
body.dark-theme .timeline-view-all,
body.dark-theme .hero-days-left-unit,
body.dark-theme .hero-weeks-text,
body.dark-theme .progress-message,
body.dark-theme .stage-label,
body.dark-theme .stage-week,
body.dark-theme .countdown-label,
body.dark-theme .readiness-header,
body.dark-theme .tip-text,
body.dark-theme .contraction-advice,
body.dark-theme .summary-tap-hint,
body.dark-theme .week-tips-title,
body.dark-theme .week-tip-item,
body.dark-theme .detail-stat,
body.dark-theme .detail-section-title,
body.dark-theme .detail-ref-link,
body.dark-theme .chart-ref-link {
    color: #98989e !important;
}

/* Заголовки — белые */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme .section-bar-text h1,
body.dark-theme .app-name,
body.dark-theme .auth-title,
body.dark-theme .modal-content h3,
body.dark-theme .summary-week-badge,
body.dark-theme .chart-card-header h3,
body.dark-theme .tests-card-header h3,
body.dark-theme .checklist-header h3,
body.dark-theme .doctors-card-header h3,
body.dark-theme .partner-card-header h3,
body.dark-theme .health-card-header h3,
body.dark-theme .baby-info-value,
body.dark-theme .category-title,
body.dark-theme .settings-group-title,
body.dark-theme .settings-item-label,
body.dark-theme .timeline-title,
body.dark-theme .app-name span,
body.dark-theme .auth-title span,
body.dark-theme .section-bar-text h1 span,
body.dark-theme .modal-content h3 span {
    color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

/* Градиентные заголовки — становятся белыми */
body.dark-theme .section-bar-text h1,
body.dark-theme .app-name,
body.dark-theme .auth-title,
body.dark-theme .modal-content h3 {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    background-clip: unset !important;
}

/* Активные вкладки */
body.dark-theme .sub-tab.active {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
}

body.dark-theme .mode-btn.active {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
}

/* Кнопки */
body.dark-theme .btn-primary,
body.dark-theme .btn-save,
body.dark-theme .btn-modal-close {
    color: #ffffff !important;
}

body.dark-theme .btn-cancel {
    color: #98989e !important;
}

body.dark-theme .btn-danger {
    color: #ff453a !important;
}

/* Поля ввода */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #8e8e93 !important;
}

body.dark-theme input:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
    border-color: #a78bfa !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
}

/* Модальные окна */
body.dark-theme .modal-content {
    background: #2c2c2e !important;
    color: #ffffff !important;
}

body.dark-theme .modal-content h3 {
    color: #ffffff !important;
}

body.dark-theme .modal-content input {
    background: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme .modal-content .btn-cancel {
    background: #3a3a3c !important;
    color: #98989e !important;
}

/* Календарь */
body.dark-theme .cal-day {
    color: #ffffff !important;
    background: #2c2c2e !important;
}

body.dark-theme .cal-day.today {
    background: rgba(167, 139, 250, 0.2) !important;
    color: #a78bfa !important;
}

body.dark-theme .cal-day.selected {
    background: #a78bfa !important;
    color: #ffffff !important;
}

body.dark-theme .cal-day.has-event::after {
    background: #a78bfa !important;
}

body.dark-theme .cal-weekday {
    color: #8e8e93 !important;
}

body.dark-theme .calendar-nav .cal-month-year {
    color: #ffffff !important;
}

/* Таббары */
body.dark-theme .tabbar {
    background: rgba(28, 28, 30, 0.9) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .tab .tab-label {
    color: #8e8e93 !important;
}

body.dark-theme .tab.active .tab-label {
    color: #a78bfa !important;
}

body.dark-theme .tab .tab-icon svg {
    stroke: #8e8e93 !important;
}

body.dark-theme .tab.active .tab-icon svg {
    stroke: #a78bfa !important;
}

body.dark-theme .tab.active {
    background: rgba(167, 139, 250, 0.1) !important;
}

/* Схваткомер и ПДР */
body.dark-theme .countdown-card,
body.dark-theme .contraction-timer {
    background: linear-gradient(135deg, #4c51bf, #7c3aed) !important;
    color: #ffffff !important;
}

body.dark-theme .countdown-card .countdown-value,
body.dark-theme .countdown-card .countdown-label,
body.dark-theme .contraction-timer .timer-display {
    color: #ffffff !important;
}

/* Тёмная тема для кнопок навигации календаря */
body.dark-theme .calendar-nav button,
body.dark-theme .ovulation-calendar-nav button,
body.dark-theme .health-calendar-nav button {
    background: #3a3a3c !important;
    color: #ffffff !important;
    border: 1px solid #4a4a4c !important;
}

body.dark-theme .calendar-nav button:hover,
body.dark-theme .ovulation-calendar-nav button:hover,
body.dark-theme .health-calendar-nav button:hover {
    background: #4a4a4c !important;
}

/* ============================================================
   РАЗДЕЛ "СИМПТОМЫ" — ТЁМНАЯ ТЕМА
   ============================================================ */

/* Форма симптомов */
body.dark-theme .symptoms-form {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .symptoms-group-title {
    color: #ffffff !important;
    border-bottom-color: #3a3a3c !important;
}

/* Чекбоксы симптомов */
body.dark-theme .symptom-checkbox {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

body.dark-theme .symptom-checkbox span {
    color: #ffffff !important;
}

body.dark-theme .symptom-checkbox input[type="checkbox"] {
    accent-color: #a78bfa !important;
}

/* Радио-кнопки аппетита */
body.dark-theme .symptom-radio {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

body.dark-theme .symptom-radio span {
    color: #ffffff !important;
}

body.dark-theme .symptom-radio input[type="radio"] {
    accent-color: #a78bfa !important;
}

/* Текстовое поле */
body.dark-theme .symptoms-group textarea {
    background: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme .symptoms-group textarea::placeholder {
    color: #8e8e93 !important;
}

/* История симптомов */
body.dark-theme .symptoms-history {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .symptoms-history-title {
    color: #ffffff !important;
    border-bottom-color: #3a3a3c !important;
}

body.dark-theme .symptom-history-item {
    border-bottom-color: #3a3a3c !important;
}

body.dark-theme .symptom-history-date {
    color: #a78bfa !important;
}

body.dark-theme .symptom-badge {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

/* Селектор даты */
body.dark-theme .symptoms-date-selector {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .symptoms-current-date {
    color: #ffffff !important;
}

body.dark-theme .date-nav-btn {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

/* ============================================================
   РАЗДЕЛ "ЗДОРОВЬЕ" — ПОЛНОЕ ИСПРАВЛЕНИЕ
   ============================================================ */

/* --- СВЕТЛАЯ ТЕМА --- */

/* Общие карточки */
.health-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 16px;
}

.health-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.health-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.health-card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
}

/* Календарь здоровья */
.health-calendar-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.health-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.health-month-year {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
}

.health-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.health-calendar-grid .cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.15s ease;
    color: #1c1c1e;
}

.health-calendar-grid .cal-day.today {
    background: #007aff15;
    color: #007aff;
    font-weight: 700;
}

.health-calendar-grid .cal-day.selected {
    background: #007aff;
    color: white;
}

.health-calendar-grid .cal-day.has-event::after {
    content: '';
    width: 5px;
    height: 5px;
    background: #007aff;
    border-radius: 50%;
    margin-top: 2px;
}

/* Сводка за день */
.health-day-summary {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.health-day-summary h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    text-align: center;
}

.health-day-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.health-stat-mini {
    background: #f8f9fc !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 14px !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
}

/* ===== ИСПРАВЛЕНИЕ: ФОН БЛОКОВ В РАЗДЕЛЕ "ЗДОРОВЬЕ" (ТОЛЬКО СВЕТЛАЯ ТЕМА) ===== */

/* Блоки показателей в разделе "Здоровье" — как в "Сводка за день" */
.health-stat-mini {
    background: #f8f9fc !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 14px !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
}

.health-stat-icon {
    background: #ffffff !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 12px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.health-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}

.health-stat-label {
    font-size: 10px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Витамины */
.vitamin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f9f9fb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.vitamin-item:active {
    transform: scale(0.97);
}

.vitamin-item .vitamin-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #8e8e93;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.vitamin-item .vitamin-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1e;
    cursor: pointer;
}

/* ОТМЕЧЕННОЕ СОСТОЯНИЕ ВИТАМИНА — СТАНОВИТСЯ ЗЕЛЁНЫМ */
.vitamin-item.checked {
    background: #d1fae5 !important;
    color: #059669 !important;
}

.vitamin-item.checked .vitamin-checkbox {
    background: #10b981 !important;
    color: white !important;
}

.vitamin-item.checked .vitamin-label {
    color: #059669 !important;
}

/* Пользовательские витамины */
.custom-vitamin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9fb;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.custom-vitamin-item .vitamin-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #8e8e93;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-vitamin-item .vitamin-checkbox.taken {
    background: #10b981 !important;
    color: white !important;
}

.custom-vitamin-info {
    flex: 1;
}

.custom-vitamin-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
}

.custom-vitamin-dose {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.custom-vitamin-note {
    font-size: 11px;
    color: #007aff;
    margin-top: 2px;
}

.delete-vitamin-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.delete-vitamin-btn:active {
    transform: scale(0.95);
}

/* Образ жизни */
.lifestyle-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lifestyle-form .form-group {
    margin-bottom: 0;
}

.lifestyle-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 6px;
}

.lifestyle-form input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    background: #f9f9fb;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1c1c1e;
}

.lifestyle-form input[type="range"] {
    width: 100%;
    padding: 0;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e5ea;
    border-radius: 3px;
    outline: none;
}

.lifestyle-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,122,255,0.3);
}


/* ============================================================
   РАЗДЕЛ "ЗДОРОВЬЕ" — ТЁМНАЯ ТЕМА
   ============================================================ */

body.dark-theme .health-card {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .health-card-header h3 {
    color: #ffffff !important;
}

body.dark-theme .health-card-icon {
    background: #3a3a3c !important;
}

/* Календарь здоровья — тёмная тема */
body.dark-theme .health-calendar-card {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .health-month-year {
    color: #ffffff !important;
}

body.dark-theme .health-calendar-grid .cal-day {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

body.dark-theme .health-calendar-grid .cal-day.today {
    background: rgba(167, 139, 250, 0.2) !important;
    color: #a78bfa !important;
}

body.dark-theme .health-calendar-grid .cal-day.selected {
    background: #a78bfa !important;
    color: #ffffff !important;
}

body.dark-theme .health-calendar-grid .cal-day.has-event::after {
    background: #a78bfa !important;
}

/* Сводка за день — тёмная тема */
body.dark-theme .health-day-summary {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .health-day-summary h3 {
    color: #ffffff !important;
}

body.dark-theme .health-stat-mini {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

body.dark-theme .health-stat-value {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

body.dark-theme .health-stat-label {
    color: #98989e !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin-top: 2px !important;
}

body.dark-theme .health-stat-icon {
    background: rgba(44, 44, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

/* ============================================================
   ВИТАМИНЫ И ДОБАВКИ — ЕДИНЫЙ СТИЛЬ (КАК "МОИ ДОБАВКИ")
   ============================================================ */

/* --- ВИТАМИНЫ --- */
body.dark-theme .vitamin-item {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

body.dark-theme .vitamin-item .vitamin-checkbox {
    background: #3a3a3c !important;
    color: #8e8e93 !important;
    border: 2px solid #4a4a4c !important;
}

body.dark-theme .vitamin-item .vitamin-label {
    color: #ffffff !important;
}

/* ОТМЕЧЕННЫЙ ВИТАМИН — ЗЕЛЁНЫЙ ФОН, БЕЛАЯ ГАЛОЧКА */
body.dark-theme .vitamin-item.checked {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
}

body.dark-theme .vitamin-item.checked .vitamin-checkbox {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

body.dark-theme .vitamin-item.checked .vitamin-label {
    color: #6ee7b7 !important;
}


/* --- ПОЛЬЗОВАТЕЛЬСКИЕ ДОБАВКИ (МОИ ДОБАВКИ) --- */
body.dark-theme .custom-vitamin-item {
    background: #3a3a3c !important;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

body.dark-theme .custom-vitamin-item .vitamin-checkbox {
    background: #3a3a3c !important;
    color: #8e8e93 !important;
    border: 2px solid #4a4a4c !important;
}

/* ОТМЕЧЕННАЯ ДОБАВКА — ЗЕЛЁНЫЙ ФОН, БЕЛАЯ ГАЛОЧКА */
body.dark-theme .custom-vitamin-item[data-checked="true"] {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-theme .custom-vitamin-item[data-checked="true"] .vitamin-checkbox {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

body.dark-theme .custom-vitamin-name {
    color: #ffffff !important;
}

body.dark-theme .custom-vitamin-dose {
    color: #98989e !important;
}

body.dark-theme .custom-vitamin-note {
    color: #a78bfa !important;
}

body.dark-theme .delete-vitamin-btn {
    background: #ff453a !important;
    color: #ffffff !important;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

body.dark-theme .delete-vitamin-btn:active {
    transform: scale(0.95);
}

/* Пустые состояния */
body.dark-theme .empty-state {
    color: #98989e !important;
}


/* Образ жизни — тёмная тема */
body.dark-theme .lifestyle-form .form-group label {
    color: #98989e !important;
}

body.dark-theme .lifestyle-form input[type="number"] {
    background: #3a3a3c !important;
    border: 1px solid #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme .lifestyle-form input[type="range"] {
    background: #4a4a4c !important;
}

body.dark-theme .lifestyle-form input[type="range"]::-webkit-slider-thumb {
    background: #a78bfa !important;
}

/* Кнопки в тёмной теме */
body.dark-theme .health-card .btn-primary {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
}

/* ============================================================
   ГЛАВНАЯ СТРАНИЦА (БЕРЕМЕННОСТЬ) — ТЁМНАЯ ТЕМА
   ============================================================ */

/* HERO-БЛОК (срок беременности) */
body.dark-theme .pregnancy-hero {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .pregnancy-hero-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme .pregnancy-hero-title {
    color: #a78bfa !important;
}

body.dark-theme .hero-weeks-number {
    color: #ffffff !important;
}

body.dark-theme .hero-weeks-text {
    color: #98989e !important;
}

body.dark-theme .pregnancy-hero-edd {
    background: rgba(58, 58, 60, 0.6) !important;
}

body.dark-theme .hero-edd-icon {
    background: rgba(44, 44, 46, 0.8) !important;
}

body.dark-theme .hero-edd-label {
    color: #98989e !important;
}

body.dark-theme .hero-edd-value {
    color: #ffffff !important;
}

body.dark-theme .pregnancy-hero-days-left {
    background: rgba(58, 58, 60, 0.6) !important;
}

body.dark-theme .hero-days-left-icon {
    background: rgba(44, 44, 46, 0.8) !important;
}

body.dark-theme .hero-days-left-value {
    color: #a78bfa !important;
}

body.dark-theme .hero-days-left-label {
    color: #a78bfa !important;
}

body.dark-theme .hero-days-left-unit {
    color: #98989e !important;
}

/* ПРОГРЕСС БЕРЕМЕННОСТИ */
body.dark-theme .pregnancy-progress-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .progress-card-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme .progress-card-title {
    color: #a78bfa !important;
}

body.dark-theme .progress-track {
    background: #3a3a3c !important;
}

body.dark-theme .progress-fill {
    background: linear-gradient(90deg, #818cf8, #a78bfa) !important;
}

body.dark-theme .progress-dot {
    background: #2c2c2e !important;
    border-color: #a78bfa !important;
}

body.dark-theme .stage-dot {
    background: #4a4a4c !important;
}

body.dark-theme .stage-dot.active {
    background: #a78bfa !important;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.2) !important;
}

body.dark-theme .stage-label {
    color: #98989e !important;
}

body.dark-theme .stage.active .stage-label {
    color: #a78bfa !important;
}

body.dark-theme .stage-week {
    color: #6b6b70 !important;
}

body.dark-theme .stage.active .stage-week {
    color: #a78bfa !important;
}

body.dark-theme .progress-message {
    background: rgba(58, 58, 60, 0.6) !important;
    color: #a78bfa !important;
}

/* БЫСТРЫЕ ДЕЙСТВИЯ */
body.dark-theme .stat-item {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .stat-text {
    color: #ffffff !important;
}

body.dark-theme .stat-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

/* ДВЕ КОЛОНКИ (История и события) */
body.dark-theme .home-column {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .home-column h3 {
    color: #98989e !important;
}

body.dark-theme .week-group-title {
    color: #a78bfa !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .week-group-item span:first-child {
    color: #ffffff !important;
}

body.dark-theme .week-group-item span:last-child {
    color: #98989e !important;
}

body.dark-theme .event-group {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .event-group-date {
    color: #a78bfa !important;
}

body.dark-theme .event-row span {
    color: #ffffff !important;
}

body.dark-theme .event-time-badge {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
}

/* ЕЖЕДНЕВНАЯ СТАТЬЯ */
body.dark-theme .daily-article-card {
    background: linear-gradient(135deg, #4c51bf, #7c3aed) !important;
}

body.dark-theme .daily-article-card.completed {
    background: linear-gradient(135deg, #065f46, #047857) !important;
}

/* ПРЕВЬЮ СТАТЕЙ */
body.dark-theme .articles-preview-title {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #98989e !important;
}

body.dark-theme .articles-preview-line {
    background: linear-gradient(90deg, transparent, #3a3a3c, transparent) !important;
}

body.dark-theme .more-articles-section {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .more-articles-header {
    color: #98989e !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .mini-article-card {
    background: rgba(58, 58, 60, 0.6) !important;
}

body.dark-theme .mini-article-title {
    color: #ffffff !important;
}

body.dark-theme .mini-article-meta {
    color: #98989e !important;
}

body.dark-theme .personalized-articles {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(167, 139, 250, 0.2) !important;
}

body.dark-theme .personalized-articles-header {
    color: #a78bfa !important;
    border-color: rgba(167, 139, 250, 0.15) !important;
}

body.dark-theme .personalized-article-card {
    background: rgba(167, 139, 250, 0.1) !important;
}

body.dark-theme .personalized-article-title {
    color: #ffffff !important;
}

body.dark-theme .personalized-article-category {
    color: #a78bfa !important;
}

/* КНОПКА "ИЗМЕНИТЬ ДАТУ ПМ" */
body.dark-theme .btn-small {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #a78bfa !important;
}

/* СВОДКА ЗА ДЕНЬ */
body.dark-theme .daily-summary-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 20px !important;
}

/* Чуть заметная серая полоска */
body.dark-theme .daily-summary-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .daily-summary-title {
    color: #ffffff !important;
}

body.dark-theme .daily-summary-title svg {
    stroke: #a78bfa !important;
}

/* ============================================================
   ГЛАВНАЯ — ПОКАЗАТЕЛИ В СВОДКЕ ЗА ДЕНЬ (КАК В СВОДКЕ)
   ============================================================ */

/* Карточки показателей на главной — как в сводке */
.daily-summary-content .summary-item {
    background: #f8f9fc !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 14px !important;
    padding: 12px !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.daily-summary-content .summary-item-icon {
    background: #ffffff !important;
    border: 1px solid #e5e5ea !important;
    border-radius: 12px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

.daily-summary-content .summary-item-label {
    color: #8e8e93 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.daily-summary-content .summary-item-value {
    color: #1c1c1e !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.daily-summary-content .summary-item-unit {
    color: #8e8e93 !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    margin-left: 4px !important;
}

/* Группы показателей */
.daily-summary-content .summary-group-title {
    color: #8e8e93 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 8px !important;
}

/* Сетка показателей */
.daily-summary-content .summary-items-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 10px !important;
}

/* ============================================================
   ТЁМНАЯ ТЕМА
   ============================================================ */

body.dark-theme .daily-summary-content .summary-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .daily-summary-content .summary-item-icon {
    background: rgba(44, 44, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .daily-summary-content .summary-item-value {
    color: #ffffff !important;
}

body.dark-theme .daily-summary-content .summary-item-label {
    color: #98989e !important;
}

body.dark-theme .daily-summary-content .summary-item-unit {
    color: #98989e !important;
}

/* ПОЛЕ ВЫБОРА ДАТЫ */
body.dark-theme .daily-summary-date input {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #ffffff !important;
    border: 1px solid #4a4a4c !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
}

body.dark-theme .daily-summary-date input::placeholder {
    color: #8e8e93 !important;
}

body.dark-theme .daily-summary-date input:focus {
    border-color: #a78bfa !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
}

body.dark-theme .daily-summary-date input::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
    opacity: 0.7 !important;
    cursor: pointer !important;
}

body.dark-theme .daily-summary-date input::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
}

/* ГРУППЫ ПОКАЗАТЕЛЕЙ */
body.dark-theme .summary-group-title {
    color: #98989e !important;
}

body.dark-theme .summary-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border-radius: 14px !important;
}

body.dark-theme .summary-item-icon {
    background: rgba(44, 44, 46, 0.8) !important;
}

body.dark-theme .summary-item-label {
    color: #98989e !important;
}

body.dark-theme .summary-item-value {
    color: #ffffff !important;
}

body.dark-theme .summary-item-unit {
    color: #98989e !important;
}

/* ПУСТОЕ СОСТОЯНИЕ */
body.dark-theme .summary-empty {
    color: #98989e !important;
    background: rgba(58, 58, 60, 0.4) !important;
    border-radius: 14px !important;
}

body.dark-theme .summary-empty svg {
    stroke: #6b6b70 !important;
}

body.dark-theme .summary-empty p {
    color: #98989e !important;
}

/* ============================================================
   ПАРТНЁР — ТЁМНАЯ ТЕМА
   ============================================================ */

body.dark-theme .partner-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .partner-card-header h3 {
    color: #ffffff !important;
}

body.dark-theme .partner-card-icon {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #a78bfa !important;
}

body.dark-theme .partner-add-row input {
    background: rgba(58, 58, 60, 0.8) !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme .partner-add-row input::placeholder {
    color: #8e8e93 !important;
}

body.dark-theme .partner-add-row .btn-add-event {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
}

body.dark-theme .partner-note-item {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .partner-note-text {
    color: #ffffff !important;
}

body.dark-theme .partner-note-meta {
    color: #98989e !important;
}

body.dark-theme .partner-task-item {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .partner-task-text {
    color: #ffffff !important;
}

body.dark-theme .partner-task-item.completed .partner-task-text {
    color: #6ee7b7 !important;
}

body.dark-theme .partner-task-item input[type="checkbox"] {
    accent-color: #a78bfa !important;
}

body.dark-theme .partner-delete-btn {
    background: #ff453a !important;
    color: #ffffff !important;
}

body.dark-theme .partner-support-text p {
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .partner-support-text p .support-icon {
    color: #a78bfa !important;
}

body.dark-theme .empty-state {
    color: #98989e !important;
}

/* ============================================================
   РОДЫ — ПРЕДВЕСТНИКИ (ТЁМНАЯ ТЕМА)
   ============================================================ */

/* Контейнер предвестников */
body.dark-theme .labor-precursors {
    background: transparent !important;
}

/* Карточки предвестников */
body.dark-theme .precursor-item {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .precursor-item .precursor-text {
    color: #ffffff !important;
}

/* Заголовок "Предвестники родов" */
body.dark-theme .labor-precursors .section-title {
    color: #a78bfa !important;
}

body.dark-theme .labor-precursors .section-title span {
    color: #a78bfa !important;
}

/* ===== ПРЕДВЕСТНИКИ РОДОВ - СТИЛИ КАК В ПРИВИВКАХ ===== */

/* Карточка предвестника - как в прививках */
.precursor-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    border: 1px solid #f2f1f6 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.precursor-item:active {
    transform: scale(0.98) !important;
}

/* Галочка - как в прививках (круглая) */
.precursor-checkbox {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #f2f1f6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    color: #8e8e93 !important;
    border: 2px solid #e5e5ea !important;
}

/* Отмеченная галочка - как в прививках */
.precursor-checkbox.done {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* ===== ТЁМНАЯ ТЕМА ===== */

/* Тёмная тема - карточка */
body.dark-theme .precursor-item {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .precursor-item .precursor-text {
    color: #ffffff !important;
}

/* Тёмная тема - неактивная галочка (серая) */
body.dark-theme .precursor-checkbox {
    background: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #98989e !important;
}

/* Тёмная тема - активная галочка (зелёная) */
body.dark-theme .precursor-checkbox.done {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* Тёмная тема - отмеченный предвестник (вся карточка слегка зелёная) */
body.dark-theme .precursor-item.done {
    background: rgba(16, 185, 129, 0.08) !important;
}

/* ============================================================
   РОДЫ — ЧЕК-ЛИСТ ПОДГОТОВКИ (ТЁМНАЯ ТЕМА)
   ============================================================ */

/* Карточка чек-листа */
body.dark-theme .labor-checklist-scroll .checklist-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .checklist-header h3 {
    color: #ffffff !important;
}

body.dark-theme .checklist-badge {
    background: rgba(167, 139, 250, 0.2) !important;
    color: #a78bfa !important;
}

/* Элементы чек-листа (неотмеченные) */
body.dark-theme .checklist-item {
    background: rgba(58, 58, 60, 0.6) !important;
    color: #ffffff !important;
}

body.dark-theme .checklist-checkbox {
    background: #3a3a3c !important;
    color: #8e8e93 !important;
}

/* Элементы чек-листа (отмеченные) */
body.dark-theme .checklist-item.completed {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-theme .checklist-item.completed .checklist-checkbox {
    background: #10b981 !important;
    color: #ffffff !important;
}

body.dark-theme .checklist-item.completed .checklist-text {
    color: #6ee7b7 !important;
}

body.dark-theme .checklist-text {
    color: #ffffff !important;
}

body.dark-theme .checklist-deadline {
    color: #98989e !important;
}

/* Кнопка "Добавить задачу" */
body.dark-theme .btn-add-task {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
}

body.dark-theme .btn-add-task svg {
    stroke: #a78bfa !important;
}

/* Пользовательские задачи */
body.dark-theme .custom-task {
    background: rgba(167, 139, 250, 0.08) !important;
}

body.dark-theme .custom-task .checklist-text {
    color: #ffffff !important;
}

body.dark-theme .custom-task .checklist-note {
    color: #a78bfa !important;
}

body.dark-theme .custom-task .delete-task-btn {
    background: #ff453a !important;
    color: #ffffff !important;
}

/* Модальное окно добавления задачи */
body.dark-theme .modal-add-task .modal-content {
    background: #2c2c2e !important;
}

body.dark-theme .modal-add-task .modal-content h3 {
    color: #ffffff !important;
}

body.dark-theme .modal-add-task .form-group label {
    color: #ffffff !important;
}

body.dark-theme .modal-add-task .form-group input {
    background: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme .modal-add-task .btn-cancel {
    background: #3a3a3c !important;
    color: #98989e !important;
}

body.dark-theme .modal-add-task .btn-save {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
}

/* ============================================================
   РОДЫ — СУМКА В РОДДОМ (ТЁМНАЯ ТЕМА)
   ============================================================ */

/* Карточка категории */
body.dark-theme .bag-category {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .bag-category-header {
    background: rgba(58, 58, 60, 0.6) !important;
    color: #ffffff !important;
}

body.dark-theme .bag-category-header span:last-child {
    color: #a78bfa !important;
}

/* Элементы сумки */
body.dark-theme .bag-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .bag-item-name {
    color: #ffffff !important;
}

/* Галочка — НЕОТМЕЧЕННАЯ */
body.dark-theme .bag-item-checkbox {
    background: #3a3a3c !important;
    color: #8e8e93 !important;
}

/* Галочка — ОТМЕЧЕННАЯ */
body.dark-theme .bag-item-checkbox.checked,
body.dark-theme .bag-item.done .bag-item-checkbox,
body.dark-theme .bag-item.completed .bag-item-checkbox {
    background: #10b981 !important;
    color: #ffffff !important;
}

/* Заголовок раздела */
body.dark-theme .section-title {
    color: #a78bfa !important;
}

body.dark-theme .section-title span {
    color: #a78bfa !important;
}

/* ============================================================
   РАЗДЕЛ "РОДЫ" — ДЫХАНИЕ (ПОЛНАЯ ТЁМНАЯ ТЕМА)
   ============================================================ */

/* --- КАРТОЧКИ ТЕХНИК ДЫХАНИЯ --- */
body.dark-theme #breathing-techniques-container > div {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ЗАГОЛОВКИ ТЕХНИК — БЕЛЫЕ */
body.dark-theme #breathing-techniques-container > div > div:first-child > div:last-child > div:first-child {
    color: #ffffff !important;
}

/* ПОДЗАГОЛОВКИ ТЕХНИК */
body.dark-theme #breathing-techniques-container > div > div:first-child > div:last-child > div:last-child {
    color: #a0a0a6 !important;
}

/* ОПИСАНИЕ ТЕХНИК */
body.dark-theme #breathing-techniques-container > div > div:nth-child(2) {
    color: #cbd5e1 !important;
}

/* БЛОК "КАК ДЕЛАТЬ" */
body.dark-theme #breathing-techniques-container > div > div[style*="background: #f8f9fc"] {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ЗАГОЛОВОК "КАК ДЕЛАТЬ" */
body.dark-theme #breathing-techniques-container > div > div[style*="background: #f8f9fc"] > div:first-child {
    color: #98989e !important;
}

/* ШАГИ В БЛОКЕ "КАК ДЕЛАТЬ" */
body.dark-theme #breathing-techniques-container > div > div[style*="background: #f8f9fc"] ul li {
    color: #ffffff !important;
}

/* ТЕГИ (КОГДА / ДЛИТЕЛЬНОСТЬ) */
body.dark-theme #breathing-techniques-container > div > div:last-child span {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #98989e !important;
}

/* --- БЛОК "КАК ТРЕНИРОВАТЬСЯ" (ГРАДИЕНТНЫЙ) --- */
body.dark-theme #breathing-practice-container > div:first-child {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
    border: none !important;
}

body.dark-theme #breathing-practice-container > div:first-child div:first-child {
    color: #ffffff !important;
}

body.dark-theme #breathing-practice-container > div:first-child div:last-child {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* --- КАРТОЧКИ ПРАКТИК (КАК "СОВЕТЫ ДЛЯ ПАРТНЁРА") --- */
body.dark-theme #breathing-practice-container > div:not(:first-child) {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ЗАГОЛОВКИ ПРАКТИК — БЕЛЫЕ */
body.dark-theme #breathing-practice-container > div:not(:first-child) > div > div:first-child {
    color: #ffffff !important;
}

/* ОПИСАНИЯ ПРАКТИК */
body.dark-theme #breathing-practice-container > div:not(:first-child) > div > div:last-child {
    color: #cbd5e1 !important;
}

/* --- КАРТОЧКИ СОВЕТОВ ДЛЯ ПАРТНЁРА --- */
body.dark-theme #partner-tips-container > div {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme #partner-tips-container > div > div > div:first-child {
    color: #ffffff !important;
}

body.dark-theme #partner-tips-container > div > div > div:last-child {
    color: #cbd5e1 !important;
}

/* --- ВАЖНОЕ НАПОМИНАНИЕ (ЖЁЛТЫЙ БЛОК) --- */
body.dark-theme #breathing-content > div:last-child {
    background: rgba(251, 191, 36, 0.12) !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
}

body.dark-theme #breathing-content > div:last-child > div > div > div:first-child {
    color: #fbbf24 !important;
}

body.dark-theme #breathing-content > div:last-child > div > div > div:last-child {
    color: #fcd34d !important;
}

/* --- ЗАГОЛОВКИ РАЗДЕЛОВ (НАЗВАНИЯ ГРУПП) --- */
body.dark-theme #breathing-content > div:first-child > div:first-child > span:last-child,
body.dark-theme #breathing-content > div:nth-child(2) > div:first-child > span:last-child,
body.dark-theme #breathing-content > div:nth-child(3) > div:first-child > span:last-child {
    color: #ffffff !important;
}

/* --- СЧЁТЧИК ТЕХНИК (БЕЙДЖ) --- */
body.dark-theme #breathing-content > div:first-child > div:first-child > span:last-child {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #98989e !important;
}

/* --- ИКОНКИ В ЗАГОЛОВКАХ РАЗДЕЛОВ --- */
body.dark-theme #breathing-content > div:first-child > div:first-child > span:first-child,
body.dark-theme #breathing-content > div:nth-child(2) > div:first-child > span:first-child,
body.dark-theme #breathing-content > div:nth-child(3) > div:first-child > span:first-child {
    color: #ffffff !important;
}

/* ============================================================
   УНИВЕРСАЛЬНЫЕ ПРАВИЛА ДЛЯ ВСЕХ БЕЛЫХ БЛОКОВ В РАЗДЕЛЕ ДЫХАНИЯ
   ============================================================ */

/* Все карточки с фоном #ffffff в разделе дыхания */
body.dark-theme #breathing-content div[style*="background: #ffffff"],
body.dark-theme #breathing-content div[style*="background: #fff"],
body.dark-theme #breathing-content div[style*="background: white"] {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Все карточки с фоном #f8f9fc в разделе дыхания */
body.dark-theme #breathing-content div[style*="background: #f8f9fc"] {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Все заголовки в разделе дыхания — БЕЛЫЕ */
body.dark-theme #breathing-content [style*="font-weight: 700"] {
    color: #ffffff !important;
}

body.dark-theme #breathing-content [style*="font-weight: bold"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 18px */
body.dark-theme #breathing-content [style*="font-size: 18px"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 16px */
body.dark-theme #breathing-content [style*="font-size: 16px"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 15px */
body.dark-theme #breathing-content [style*="font-size: 15px"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 14px */
body.dark-theme #breathing-content [style*="font-size: 14px"] {
    color: #ffffff !important;
}

/* Текст с цветом #1c1c1e → белый */
body.dark-theme #breathing-content [style*="color: #1c1c1e"] {
    color: #ffffff !important;
}

/* Текст с цветом #3a3a3c → светло-серый */
body.dark-theme #breathing-content [style*="color: #3a3a3c"] {
    color: #cbd5e1 !important;
}

/* Текст с цветом #8e8e93 → серый */
body.dark-theme #breathing-content [style*="color: #8e8e93"] {
    color: #98989e !important;
}

/* Текст с цветом #007aff → синий (оставляем) */
body.dark-theme #breathing-content [style*="color: #007aff"] {
    color: #0a84ff !important;
}

/* Текст с цветом #92400e (в жёлтом блоке) → жёлтый */
body.dark-theme #breathing-content [style*="color: #92400e"] {
    color: #fbbf24 !important;
}

/* Текст с цветом #78350f (в жёлтом блоке) → жёлтый */
body.dark-theme #breathing-content [style*="color: #78350f"] {
    color: #fcd34d !important;
}

/* ============================================================
   ИСПРАВЛЕНИЕ ДЛЯ ВСЕХ ЭЛЕМЕНТОВ В КАРТОЧКАХ
   ============================================================ */

/* Все элементы внутри карточек с белым фоном */
body.dark-theme #breathing-content div[style*="background: #ffffff"] *,
body.dark-theme #breathing-content div[style*="background: #fff"] *,
body.dark-theme #breathing-content div[style*="background: white"] * {
    color: #ffffff !important;
}

/* Но исключаем элементы, которые должны быть серыми */
body.dark-theme #breathing-content div[style*="background: #ffffff"] [style*="color: #8e8e93"],
body.dark-theme #breathing-content div[style*="background: #fff"] [style*="color: #8e8e93"],
body.dark-theme #breathing-content div[style*="background: white"] [style*="color: #8e8e93"] {
    color: #98989e !important;
}

body.dark-theme #breathing-content div[style*="background: #ffffff"] [style*="color: #007aff"],
body.dark-theme #breathing-content div[style*="background: #fff"] [style*="color: #007aff"],
body.dark-theme #breathing-content div[style*="background: white"] [style*="color: #007aff"] {
    color: #0a84ff !important;
}

/* ============================================================
   РАЗДЕЛ "РОДЫ" — УПРАЖНЕНИЯ (ПОЛНАЯ ТЁМНАЯ ТЕМА)
   ============================================================ */

/* --- КАРТОЧКИ УПРАЖНЕНИЙ --- */
body.dark-theme #exercises-container > div {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ЗАГОЛОВКИ УПРАЖНЕНИЙ — БЕЛЫЕ */
body.dark-theme #exercises-container > div > div:first-child > div:last-child > div:first-child {
    color: #ffffff !important;
}

/* ПОДЗАГОЛОВКИ УПРАЖНЕНИЙ */
body.dark-theme #exercises-container > div > div:first-child > div:last-child > div:last-child {
    color: #a0a0a6 !important;
}

/* ОПИСАНИЕ УПРАЖНЕНИЙ */
body.dark-theme #exercises-container > div > div:nth-child(2) {
    color: #cbd5e1 !important;
}

/* БЛОК "КАК ДЕЛАТЬ" */
body.dark-theme #exercises-container > div > div[style*="background: #f8f9fc"] {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ЗАГОЛОВОК "КАК ДЕЛАТЬ" */
body.dark-theme #exercises-container > div > div[style*="background: #f8f9fc"] > div:first-child {
    color: #98989e !important;
}

/* ШАГИ В БЛОКЕ "КАК ДЕЛАТЬ" */
body.dark-theme #exercises-container > div > div[style*="background: #f8f9fc"] ul li {
    color: #ffffff !important;
}

/* ТЕГИ (КОГДА / ДЛИТЕЛЬНОСТЬ) */
body.dark-theme #exercises-container > div > div:nth-last-child(2) span {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #98989e !important;
}

/* СОВЕТ (СИНИЙ БЛОК) */
body.dark-theme #exercises-container > div > div:last-child {
    background: rgba(10, 132, 255, 0.15) !important;
    color: #0a84ff !important;
}

/* --- СОВЕТЫ ПО РЕГУЛЯРНОСТИ --- */
body.dark-theme #regularity-tips-container > div {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ЗАГОЛОВКИ СОВЕТОВ ПО РЕГУЛЯРНОСТИ */
body.dark-theme #regularity-tips-container > div > div > div:first-child {
    color: #ffffff !important;
}

/* ОПИСАНИЯ СОВЕТОВ ПО РЕГУЛЯРНОСТИ */
body.dark-theme #regularity-tips-container > div > div > div:last-child {
    color: #98989e !important;
}

/* --- СОВЕТЫ ПО БЕЗОПАСНОСТИ --- */
body.dark-theme #safety-tips-container > div {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ЗАГОЛОВКИ СОВЕТОВ ПО БЕЗОПАСНОСТИ */
body.dark-theme #safety-tips-container > div > div > div:first-child {
    color: #ffffff !important;
}

/* ОПИСАНИЯ СОВЕТОВ ПО БЕЗОПАСНОСТИ */
body.dark-theme #safety-tips-container > div > div > div:last-child {
    color: #cbd5e1 !important;
}

/* --- ВАЖНОЕ НАПОМИНАНИЕ (ЖЁЛТЫЙ БЛОК) --- */
body.dark-theme #exercises-content > div:last-child {
    background: rgba(251, 191, 36, 0.12) !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
}

body.dark-theme #exercises-content > div:last-child > div > div > div:first-child {
    color: #fbbf24 !important;
}

body.dark-theme #exercises-content > div:last-child > div > div > div:last-child {
    color: #fcd34d !important;
}

/* --- ЗАГОЛОВКИ РАЗДЕЛОВ --- */
body.dark-theme #exercises-content > div:first-child > div:first-child > span:last-child,
body.dark-theme #exercises-content > div:nth-child(2) > div:first-child > span:last-child,
body.dark-theme #exercises-content > div:nth-child(3) > div:first-child > span:last-child {
    color: #ffffff !important;
}

/* --- СЧЁТЧИК УПРАЖНЕНИЙ (БЕЙДЖ) --- */
body.dark-theme #exercises-content > div:first-child > div:first-child > span:last-child {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #98989e !important;
}

/* --- ИКОНКИ В ЗАГОЛОВКАХ РАЗДЕЛОВ --- */
body.dark-theme #exercises-content > div:first-child > div:first-child > span:first-child,
body.dark-theme #exercises-content > div:nth-child(2) > div:first-child > span:first-child,
body.dark-theme #exercises-content > div:nth-child(3) > div:first-child > span:first-child {
    color: #ffffff !important;
}

/* ============================================================
   УНИВЕРСАЛЬНЫЕ ПРАВИЛА ДЛЯ ВСЕХ БЕЛЫХ БЛОКОВ В РАЗДЕЛЕ УПРАЖНЕНИЙ
   ============================================================ */

/* Все карточки с фоном #ffffff в разделе упражнений */
body.dark-theme #exercises-content div[style*="background: #ffffff"],
body.dark-theme #exercises-content div[style*="background: #fff"],
body.dark-theme #exercises-content div[style*="background: white"] {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Все карточки с фоном #f8f9fc в разделе упражнений */
body.dark-theme #exercises-content div[style*="background: #f8f9fc"] {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Все заголовки в разделе упражнений — БЕЛЫЕ */
body.dark-theme #exercises-content [style*="font-weight: 700"] {
    color: #ffffff !important;
}

body.dark-theme #exercises-content [style*="font-weight: bold"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 18px */
body.dark-theme #exercises-content [style*="font-size: 18px"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 16px */
body.dark-theme #exercises-content [style*="font-size: 16px"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 15px */
body.dark-theme #exercises-content [style*="font-size: 15px"] {
    color: #ffffff !important;
}

/* Все заголовки с размером шрифта 14px */
body.dark-theme #exercises-content [style*="font-size: 14px"] {
    color: #ffffff !important;
}

/* Текст с цветом #1c1c1e → белый */
body.dark-theme #exercises-content [style*="color: #1c1c1e"] {
    color: #ffffff !important;
}

/* Текст с цветом #3a3a3c → светло-серый */
body.dark-theme #exercises-content [style*="color: #3a3a3c"] {
    color: #cbd5e1 !important;
}

/* Текст с цветом #8e8e93 → серый */
body.dark-theme #exercises-content [style*="color: #8e8e93"] {
    color: #98989e !important;
}

/* Текст с цветом #007aff → синий (оставляем) */
body.dark-theme #exercises-content [style*="color: #007aff"] {
    color: #0a84ff !important;
}

/* Текст с цветом #92400e (в жёлтом блоке) → жёлтый */
body.dark-theme #exercises-content [style*="color: #92400e"] {
    color: #fbbf24 !important;
}

/* Текст с цветом #78350f (в жёлтом блоке) → жёлтый */
body.dark-theme #exercises-content [style*="color: #78350f"] {
    color: #fcd34d !important;
}

/* ============================================================
   ИСПРАВЛЕНИЕ ДЛЯ ВСЕХ ЭЛЕМЕНТОВ В КАРТОЧКАХ
   ============================================================ */

/* Все элементы внутри карточек с белым фоном */
body.dark-theme #exercises-content div[style*="background: #ffffff"] *,
body.dark-theme #exercises-content div[style*="background: #fff"] *,
body.dark-theme #exercises-content div[style*="background: white"] * {
    color: #ffffff !important;
}

/* Но исключаем элементы, которые должны быть серыми */
body.dark-theme #exercises-content div[style*="background: #ffffff"] [style*="color: #8e8e93"],
body.dark-theme #exercises-content div[style*="background: #fff"] [style*="color: #8e8e93"],
body.dark-theme #exercises-content div[style*="background: white"] [style*="color: #8e8e93"] {
    color: #98989e !important;
}

body.dark-theme #exercises-content div[style*="background: #ffffff"] [style*="color: #007aff"],
body.dark-theme #exercises-content div[style*="background: #fff"] [style*="color: #007aff"],
body.dark-theme #exercises-content div[style*="background: white"] [style*="color: #007aff"] {
    color: #0a84ff !important;
}

/* ============================================================
   РОДЫ — СТАТЬИ (ПРИНУДИТЕЛЬНОЕ ИСПРАВЛЕНИЕ)
   ============================================================ */

/* Все карточки статей в разделе "Роды" */
body.dark-theme #labor-articles-content div[style*="background: white"],
body.dark-theme #labor-articles-content div[style*="background: #ffffff"],
body.dark-theme #labor-articles-content div[style*="background: #fff"] {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

/* Все тексты внутри карточек */
body.dark-theme #labor-articles-content div[style*="background: white"] *,
body.dark-theme #labor-articles-content div[style*="background: #ffffff"] *,
body.dark-theme #labor-articles-content div[style*="background: #fff"] * {
    color: #ffffff !important;
}

/* Заголовки статей */
body.dark-theme #labor-articles-content div[style*="font-weight: 700"] {
    color: #ffffff !important;
}

/* Описания статей */
body.dark-theme #labor-articles-content div[style*="color: #8e8e93"] {
    color: #98989e !important;
}

/* Статья дня (градиент) */
body.dark-theme #labor-articles-content div[style*="background: linear-gradient"] {
    background: linear-gradient(135deg, #4c51bf, #7c3aed) !important;
}

body.dark-theme #labor-articles-content div[style*="background: linear-gradient"] * {
    color: #ffffff !important;
}

/* Модальное окно */
body.dark-theme .article-modal-content {
    background: #2c2c2e !important;
}

body.dark-theme .article-modal-header {
    background: linear-gradient(135deg, #4c51bf, #7c3aed) !important;
}

body.dark-theme .article-modal-header h2 {
    color: #ffffff !important;
}

body.dark-theme .article-modal-body {
    color: #cbd5e1 !important;
}

body.dark-theme .article-modal-body h2,
body.dark-theme .article-modal-body h3 {
    color: #ffffff !important;
}

body.dark-theme .article-tip {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #cbd5e1 !important;
}

body.dark-theme .article-warning {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.dark-theme .article-footer {
    border-color: #3a3a3c !important;
}

body.dark-theme .like-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.dark-theme .share-btn {
    background: #3a3a3c !important;
    color: #a78bfa !important;
}

/* Бейджи с количеством — белый текст, прозрачный фон */
body.dark-theme #labor-articles-content .category-badge,
body.dark-theme #labor-articles-content .article-count,
body.dark-theme #labor-articles-content span:not([class]) {
    background: transparent !important;
    color: #ffffff !important;
}

/* Блок категории — прозрачный */
body.dark-theme #labor-articles-content div[style*="margin-top: 20px"] {
    background: transparent !important;
}

/* Название категории — белое */
body.dark-theme #labor-articles-content div[style*="margin-top: 20px"] > div:first-child {
    color: #ffffff !important;
}

/* Иконка 📋 и текст категории */
body.dark-theme #labor-articles-content div[style*="margin-top: 20px"] > div:first-child span {
    color: #ffffff !important;
}

/* ============================================================
   МАЛЫШ — ГЛАВНАЯ (ПОЛНАЯ ТЁМНАЯ ТЕМА)
   ============================================================ */

/* --- ВЕРХНЯЯ ПАНЕЛЬ --- */
body.dark-theme .section-bar {
    background: rgba(44, 44, 46, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .section-bar-text h1 {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.dark-theme .section-bar-text p {
    color: #98989e !important;
}

body.dark-theme .section-bar-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme .section-bar-icon svg {
    stroke: #a78bfa !important;
}

/* --- КНОПКА "ДОБАВИТЬ МАЛЫША" --- */
body.dark-theme .btn-add-baby {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
}

/* --- СЕЛЕКТОР РЕБЁНКА --- */
body.dark-theme .baby-selector-item {
    background: #3a3a3c !important;
    color: #98989e !important;
    border: 1px solid #4a4a4c !important;
}

body.dark-theme .baby-selector-item .baby-selector-name {
    color: #98989e !important;
}

body.dark-theme .baby-selector-item.active {
    background: rgba(167, 139, 250, 0.2) !important;
    color: #a78bfa !important;
    border-color: #a78bfa !important;
}

body.dark-theme .baby-selector-item.active .baby-selector-name {
    color: #ffffff !important;
}

body.dark-theme .baby-selector-add {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
}

/* --- КАРТОЧКА МАЛЫША --- */
body.dark-theme .baby-info-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .baby-info-card .baby-info-label {
    color: #98989e !important;
}

body.dark-theme .baby-info-card .baby-info-value {
    color: #ffffff !important;
}

body.dark-theme .baby-info-card .btn-small {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* --- ГРАФИК ВЕСА --- */
body.dark-theme .chart-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .chart-card-header h3 {
    color: #ffffff !important;
}

body.dark-theme .chart-card-desc {
    color: #98989e !important;
}

body.dark-theme .chart-card-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme .btn-add-record {
    background: rgba(167, 139, 250, 0.15) !important;
}

body.dark-theme .btn-add-record svg {
    stroke: #a78bfa !important;
}

/* --- КАТЕГОРИИ (Сон, Рост и вес, Кормление) --- */
body.dark-theme .baby-category-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .category-title {
    color: #ffffff !important;
}

body.dark-theme .category-subtitle {
    color: #98989e !important;
}

body.dark-theme .category-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme .category-arrow {
    stroke: #98989e !important;
}

body.dark-theme .stat-badge {
    background: rgba(58, 58, 60, 0.6) !important;
}

body.dark-theme .stat-badge-value {
    color: #ffffff !important;
}

body.dark-theme .stat-badge-label {
    color: #98989e !important;
}

body.dark-theme .category-preview {
    color: #98989e !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* --- НЕДАВНИЕ СОБЫТИЯ (ТАЙМЛАЙН) --- */
body.dark-theme .baby-timeline-header {
    background: transparent !important;
}

body.dark-theme .baby-timeline-header .timeline-title {
    color: #ffffff !important;
}

body.dark-theme .baby-timeline-header .timeline-title svg {
    stroke: #a78bfa !important;
}

body.dark-theme .timeline-view-all {
    color: #a78bfa !important;
}

body.dark-theme .timeline-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
}

body.dark-theme .timeline-item .timeline-time {
    color: #a78bfa !important;
}

body.dark-theme .timeline-item .timeline-text {
    color: #ffffff !important;
}

body.dark-theme .timeline-item .timeline-icon {
    color: #a78bfa !important;
}

/* --- ПУСТЫЕ СОСТОЯНИЯ --- */
body.dark-theme .empty-state {
    color: #98989e !important;
}

body.dark-theme .baby-timeline .empty-state {
    color: #98989e !important;
}
/* ============================================================
   МАЛЫШ — ПРИНУДИТЕЛЬНОЕ ИСПРАВЛЕНИЕ
   ============================================================ */

/* Все кнопки выбора ребёнка */
.baby-selector-item {
    background: #3a3a3c !important;
    color: #98989e !important;
}

.baby-selector-item.active {
    background: #a78bfa !important;
    color: #ffffff !important;
}

.baby-selector-item .baby-selector-name {
    color: #98989e !important;
}

.baby-selector-item.active .baby-selector-name {
    color: #ffffff !important;
}

/* Все события в таймлайне */
.timeline-item {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

.timeline-item * {
    color: #ffffff !important;
}

.timeline-item .timeline-time {
    color: #a78bfa !important;
}

/* ============================================================
   МАЛЫШ — НЕДАВНИЕ СОБЫТИЯ (СВЕТЛАЯ ТЕМА)
   ============================================================ */

/* Светлая тема — фон и цвета по умолчанию */
.timeline-item {
    background: #ffffff !important;
    border: 1px solid #f2f1f6 !important;
    border-radius: 14px !important;
    margin-bottom: 8px !important;
    padding: 12px !important;
}

.timeline-item .timeline-time {
    color: #007aff !important;
}

.timeline-item .timeline-text {
    color: #1c1c1e !important;
}

.timeline-item .timeline-icon {
    color: #007aff !important;
}

.timeline-item * {
    color: #1c1c1e !important;
}

.timeline-item .timeline-time {
    color: #007aff !important;
}

.timeline-item .timeline-icon {
    color: #007aff !important;
}

.baby-timeline-header .timeline-title {
    color: #1c1c1e !important;
}

.baby-timeline-header .timeline-title svg {
    stroke: #007aff !important;
}

.timeline-view-all {
    color: #007aff !important;
}

.empty-state {
    color: #8e8e93 !important;
}

/* ============================================================
   МАЛЫШ — НЕДАВНИЕ СОБЫТИЯ (ТЁМНАЯ ТЕМА)
   ============================================================ */

body.dark-theme .timeline-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .timeline-item .timeline-time {
    color: #a78bfa !important;
}

body.dark-theme .timeline-item .timeline-text {
    color: #ffffff !important;
}

body.dark-theme .timeline-item .timeline-icon {
    color: #a78bfa !important;
}

body.dark-theme .timeline-item * {
    color: #ffffff !important;
}

body.dark-theme .timeline-item .timeline-time {
    color: #a78bfa !important;
}

body.dark-theme .timeline-item .timeline-icon {
    color: #a78bfa !important;
}

body.dark-theme .baby-timeline-header .timeline-title {
    color: #ffffff !important;
}

body.dark-theme .baby-timeline-header .timeline-title svg {
    stroke: #a78bfa !important;
}

body.dark-theme .timeline-view-all {
    color: #a78bfa !important;
}

body.dark-theme .empty-state {
    color: #98989e !important;
}

/* ============================================================
   МАЛЫШ — РОСТ, КОРМЛЕНИЕ, СОН (ОДНА КАРТОЧКА НА ДАТУ)
   ============================================================ */

/* Контейнер дня — одна общая карточка */
.measurement-day-card,
.feed-day-card,
.sleep-day-card {
    background: #ffffff !important;
    border: 1px solid #f2f1f6 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

/* Заголовок дня */
.measurement-day-header,
.feed-day-header,
.sleep-day-header {
    background: #f8f9fc !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #f2f1f6 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Контейнер для записей внутри дня */
.measurement-day-items,
.feed-day-items,
.sleep-day-items {
    padding: 4px 0 !important;
    background: transparent !important;
}

/* КАЖДАЯ ЗАПИСЬ — с разделительной линией */
.measurement-item,
.feed-item,
.sleep-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #f2f1f6 !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* ТЕКСТ В СВЕТЛОЙ ТЕМЕ */
.measurement-item .measurement-item-values,
.feed-item .feed-item-info,
.sleep-item .sleep-item-info {
    color: #1c1c1e !important;
}

.measurement-item .measurement-item-time,
.feed-item .feed-item-time,
.sleep-item .sleep-item-time {
    color: #007aff !important;
}

.measurement-day-date,
.feed-day-date,
.sleep-day-date {
    color: #1c1c1e !important;
}

.measurement-stat,
.feed-stat,
.sleep-stat {
    color: #007aff !important;
}

/* ПОСЛЕДНЯЯ ЗАПИСЬ — БЕЗ ЛИНИИ */
.measurement-item:last-child,
.feed-item:last-child,
.sleep-item:last-child {
    border-bottom: none !important;
}

/* ============================================================
   ТЁМНАЯ ТЕМА
   ============================================================ */

body.dark-theme .measurement-day-card,
body.dark-theme .feed-day-card,
body.dark-theme .sleep-day-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}

body.dark-theme .measurement-day-header,
body.dark-theme .feed-day-header,
body.dark-theme .sleep-day-header {
    background: rgba(58, 58, 60, 0.6) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .measurement-day-date,
body.dark-theme .feed-day-date,
body.dark-theme .sleep-day-date {
    color: #ffffff !important;
}

body.dark-theme .measurement-stat,
body.dark-theme .feed-stat,
body.dark-theme .sleep-stat {
    color: #a78bfa !important;
}

body.dark-theme .measurement-item,
body.dark-theme .feed-item,
body.dark-theme .sleep-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}

body.dark-theme .measurement-item .measurement-item-values,
body.dark-theme .feed-item .feed-item-info,
body.dark-theme .sleep-item .sleep-item-info {
    color: #ffffff !important;
}

body.dark-theme .measurement-item .measurement-item-time,
body.dark-theme .feed-item .feed-item-time,
body.dark-theme .sleep-item .sleep-item-time {
    color: #a78bfa !important;
}

body.dark-theme .measurement-item:last-child,
body.dark-theme .feed-item:last-child,
body.dark-theme .sleep-item:last-child {
    border-bottom: none !important;
}

/* ============================================================
   МАЛЫШ — СЕЛЕКТОР ДЕТЕЙ (УБИРАЕМ ФОН)
   ============================================================ */

/* Убираем фон у всех блоков с детьми */
body.dark-theme #baby-selector-container > div,
body.dark-theme .baby-selector-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Имя ребёнка — серое */
body.dark-theme #baby-selector-container > div span,
body.dark-theme .baby-selector-item .baby-selector-name {
    color: #b0b0b8 !important;
}

/* Активный ребёнок — белый */
body.dark-theme #baby-selector-container > div.active span,
body.dark-theme .baby-selector-item.active .baby-selector-name {
    color: #ffffff !important;
}

/* Кнопка "Добавить малыша" */
body.dark-theme .btn-add-baby {
    background: transparent !important;
    color: #a78bfa !important;
}

/* ============================================================
   РАЗДЕЛ "МАЛЫШ" — СТАТЬИ ПО ВОЗРАСТУ (ПОЛНАЯ ТЁМНАЯ ТЕМА)
   ============================================================ */

/* ============================================================
   1. БЛОК С ВОЗРАСТОМ (ПО КЛАССУ .baby-age-block)
   ============================================================ */

/* САМ БЛОК — ТЁМНЫЙ ФОН */
body.dark-theme .baby-age-block {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
}

/* ВСЕ ТЕКСТЫ ВНУТРИ БЛОКА — БЕЛЫЕ */
body.dark-theme .baby-age-block * {
    color: #ffffff !important;
}

/* ИСКЛЮЧЕНИЯ — делаем их серыми или синими */
body.dark-theme .baby-age-block div[style*="font-size: 12px"] {
    color: #98989e !important;
}

body.dark-theme .baby-age-block div[style*="font-size: 18px"] {
    color: #0a84ff !important;
}

body.dark-theme .baby-age-block div[style*="font-size: 14px"][style*="font-weight: 600"] {
    color: #0a84ff !important;
}

/* НИЖНЯЯ ЧАСТЬ (ЧЕРЕЗ 10 ДНЕЙ...) */
body.dark-theme .baby-age-block > div:last-child {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .baby-age-block > div:last-child div[style*="font-size: 13px"] {
    color: #0a84ff !important;
}

body.dark-theme .baby-age-block > div:last-child div[style*="font-size: 11px"] {
    color: #98989e !important;
}

body.dark-theme .baby-age-block > div:last-child > div:last-child {
    background: rgba(10, 132, 255, 0.15) !important;
    color: #0a84ff !important;
}

/* ============================================================
   2. БЛОК "УКАЖИТЕ ДАТУ РОЖДЕНИЯ" (ЖЁЛТЫЙ)
   ============================================================ */

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: #fef3c7"] {
    background: rgba(251, 191, 36, 0.12) !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
    border-radius: 16px !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: #fef3c7"] * {
    color: #ffffff !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: #fef3c7"] div[style*="font-size: 12px"] {
    color: #fbbf24 !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: #fef3c7"] div[style*="font-size: 14px"] {
    color: #fcd34d !important;
}

/* ============================================================
   3. БЛОК "СТАТЬЯ ДНЯ" (ГРАДИЕНТНЫЙ)
   ============================================================ */

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: linear-gradient(135deg, #667eea, #764ba2)"] {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
    border: none !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: linear-gradient(135deg, #667eea, #764ba2)"] h4 {
    color: #ffffff !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: linear-gradient(135deg, #667eea, #764ba2)"] p {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: linear-gradient(135deg, #667eea, #764ba2)"] > div:last-child > div:last-child > div {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: linear-gradient(135deg, #667eea, #764ba2)"] > div:first-child > span:first-child {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme #baby-articles-list > div:first-child > div[style*="background: linear-gradient(135deg, #667eea, #764ba2)"] > div:first-child > span:last-child {
    background: #ff3b30 !important;
    color: #ffffff !important;
}

/* ============================================================
   4. КАРТОЧКИ СТАТЕЙ
   ============================================================ */

body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"] {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ЗАГОЛОВКИ СТАТЕЙ — БЕЛЫЕ */
body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"] > div > div:last-child > div:first-child {
    color: #ffffff !important;
}

/* ПРЕВЬЮ СТАТЕЙ */
body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"] > div > div:last-child > div:nth-child(2) {
    color: #98989e !important;
}

/* МЕТАДАННЫЕ СТАТЕЙ */
body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"] > div > div:last-child > div:last-child span {
    color: #98989e !important;
}

/* ЗАБЛОКИРОВАННЫЕ СТАТЬИ (СКОРО) */
body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"][style*="opacity: 0.5"] > div > div:last-child > div:first-child {
    color: #6b6b70 !important;
}

body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"][style*="opacity: 0.5"] > div > div:last-child > div:nth-child(2) {
    color: #5a5a5e !important;
}

body.dark-theme #baby-articles-list > div:not(:first-child) > div > div[onclick*="openBabyArticle"][style*="opacity: 0.5"] > div > div:last-child > div:last-child span {
    color: #5a5a5e !important;
}

/* ============================================================
   5. ЗАГОЛОВКИ ВОЗРАСТНЫХ ГРУПП
   ============================================================ */

body.dark-theme #baby-articles-list > div:not(:first-child) > div:first-child > span:last-child {
    color: #ffffff !important;
}

/* БЕЙДЖИ ВОЗРАСТНЫХ ГРУПП (количество статей) */
body.dark-theme #baby-articles-list > div:not(:first-child) > div:first-child > span:nth-child(3) {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #98989e !important;
}

/* БЕЙДЖ "текущий возраст" */
body.dark-theme #baby-articles-list > div:not(:first-child) > div:first-child > span[style*="background: #e0f2fe"] {
    background: rgba(10, 132, 255, 0.15) !important;
    color: #0a84ff !important;
}

/* БЕЙДЖ "скоро" */
body.dark-theme #baby-articles-list > div:not(:first-child) > div:first-child > span[style*="background: #fef3c7"] {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fbbf24 !important;
}

/* ============================================================
   6. ПУСТОЕ СОСТОЯНИЕ
   ============================================================ */

body.dark-theme #baby-articles-list > div[style*="text-align: center"] {
    color: #98989e !important;
}

/* ============================================================
   7. УНИВЕРСАЛЬНЫЕ ПРАВИЛА ДЛЯ ВСЕХ КАРТОЧЕК СТАТЕЙ
   ============================================================ */

/* Все карточки статей с белым фоном */
body.dark-theme #baby-articles-list div[style*="background: white"],
body.dark-theme #baby-articles-list div[style*="background: #ffffff"],
body.dark-theme #baby-articles-list div[style*="background: #fff"] {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Все заголовки в карточках статей */
body.dark-theme #baby-articles-list div[style*="font-weight: 700"] {
    color: #ffffff !important;
}

/* Текст с цветом #1c1c1e → белый */
body.dark-theme #baby-articles-list [style*="color: #1c1c1e"] {
    color: #ffffff !important;
}

/* Текст с цветом #8e8e93 → серый */
body.dark-theme #baby-articles-list [style*="color: #8e8e93"] {
    color: #98989e !important;
}

/* Иконки 🔒 в заблокированных статьях */
body.dark-theme #baby-articles-list div[style*="font-size: 20px"][style*="opacity: 0.3"] {
    opacity: 0.5 !important;
}

/* ============================================================
   8. МОДАЛЬНОЕ ОКНО СТАТЬИ (ТЁМНАЯ ТЕМА)
   ============================================================ */

body.dark-theme .article-modal-content {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .article-modal-header {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
}

body.dark-theme .article-modal-header h2 {
    color: #ffffff !important;
}

body.dark-theme .article-modal-close {
    color: #ffffff !important;
}

body.dark-theme .article-modal-body {
    color: #cbd5e1 !important;
}

body.dark-theme .article-modal-body h2,
body.dark-theme .article-modal-body h3 {
    color: #ffffff !important;
}

body.dark-theme .article-tip {
    background: rgba(10, 132, 255, 0.15) !important;
    color: #cbd5e1 !important;
}

body.dark-theme .article-warning {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.dark-theme .article-recipe {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fcd34d !important;
}

body.dark-theme .article-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .article-footer-info {
    color: #98989e !important;
}

body.dark-theme .like-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.dark-theme .share-btn {
    background: rgba(58, 58, 60, 0.6) !important;
    color: #0a84ff !important;
}

/* ============================================================
   РАЗДЕЛ "МАЛЫШ" — МОИ ЗАМЕТКИ (ТЁМНАЯ ТЕМА)
============================================================ */

/* --- ФОРМА ДОБАВЛЕНИЯ ЗАМЕТКИ --- */
body.dark-theme #screen-baby-notes .baby-notes-form,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme #screen-baby-notes .baby-notes-form label,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child label {
    color: #98989e !important;
}

body.dark-theme #screen-baby-notes .baby-notes-form input,
body.dark-theme #screen-baby-notes .baby-notes-form textarea,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child input,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child textarea {
    background: rgba(58, 58, 60, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

body.dark-theme #screen-baby-notes .baby-notes-form input::placeholder,
body.dark-theme #screen-baby-notes .baby-notes-form textarea::placeholder,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child input::placeholder,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child textarea::placeholder {
    color: #6b6b70 !important;
}

body.dark-theme #screen-baby-notes .baby-notes-form input:focus,
body.dark-theme #screen-baby-notes .baby-notes-form textarea:focus,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child input:focus,
body.dark-theme #screen-baby-notes > div:first-child > div:first-child textarea:focus {
    border-color: #0a84ff !important;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15) !important;
}

body.dark-theme #screen-baby-notes .btn-primary {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
}

/* --- КАЛЕНДАРЬ ЗАМЕТОК - КОНТЕЙНЕР --- */

/* КОНТЕЙНЕР КАЛЕНДАРЯ — ПРИНУДИТЕЛЬНО ТЁМНЫЙ */
body.dark-theme #screen-baby-notes > div:nth-child(2) > div,
body.dark-theme #screen-baby-notes .notes-calendar-container,
body.dark-theme #screen-baby-notes div[style*="background:#ffffff"]:has(#notes-calendar-grid) {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ЗАГОЛОВОК МЕСЯЦА — БЕЛЫЙ */
body.dark-theme #screen-baby-notes #notes-calendar-title {
    color: #ffffff !important;
}

/* КНОПКИ НАВИГАЦИИ */
body.dark-theme #screen-baby-notes button[onclick*="changeNotesMonth"] {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ДНИ НЕДЕЛИ */
body.dark-theme #screen-baby-notes .notes-calendar-weekday {
    color: #98989e !important;
}

/* ===== КАЛЕНДАРЬ ЗАМЕТОК - ЯЧЕЙКИ (ПРИНУДИТЕЛЬНЫЕ СТИЛИ) ===== */

/* Базовые стили для ячеек календаря заметок */
.notes-calendar-day {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 2px !important;
    border-radius: 12px !important;
    min-height: 40px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 15px !important;
}

/* Светлая тема - обычная ячейка */
.notes-calendar-day {
    background: #f9f9fb !important;
    color: #1c1c1e !important;
    border: none !important;
}

/* Светлая тема - сегодня */
.notes-calendar-day.today {
    background: rgba(0, 122, 255, 0.08) !important;
    color: #007aff !important;
    border: 2px solid #007aff !important;
}

/* Светлая тема - выбрана */
.notes-calendar-day.selected {
    background: #007aff !important;
    color: #ffffff !important;
    border: 2px solid #007aff !important;
    box-shadow: none !important;
}

/* Светлая тема - с заметками */
.notes-calendar-day.has-note {
    background: #f0fdf4 !important;
    color: #059669 !important;
}

/* Светлая тема - выбрана и с заметками */
.notes-calendar-day.selected.has-note {
    background: #007aff !important;
    color: #ffffff !important;
    border: 2px solid #007aff !important;
}

/* ===== ТЁМНАЯ ТЕМА - ЯЧЕЙКИ ===== */

/* Тёмная тема - обычная ячейка */
body.dark-theme .notes-calendar-day {
    background: #3a3a3c !important;
    color: #ffffff !important;
    border: none !important;
}

/* Тёмная тема - сегодня */
body.dark-theme .notes-calendar-day.today {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
    border: 2px solid #a78bfa !important;
}

/* Тёмная тема - выбрана (ГЛАВНОЕ ПРАВИЛО) */
body.dark-theme .notes-calendar-day.selected {
    background: #7c3aed !important;
    color: #ffffff !important;
    border: 2px solid #8b5cf6 !important;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3) !important;
}

/* Тёмная тема - с заметками */
body.dark-theme .notes-calendar-day.has-note {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
}

/* Тёмная тема - выбрана и с заметками */
body.dark-theme .notes-calendar-day.selected.has-note {
    background: #7c3aed !important;
    color: #ffffff !important;
    border: 2px solid #8b5cf6 !important;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3) !important;
}

/* --- БЛОК "ОСОБЕННО ВАЖНЫЕ" --- */
body.dark-theme #screen-baby-notes .pinned-header {
    color: #ffffff !important;
}

body.dark-theme #screen-baby-notes .pinned-header span {
    color: #ffffff !important;
}

body.dark-theme #screen-baby-notes .pinned-header span:first-child {
    color: #fbbf24 !important;
}

body.dark-theme #screen-baby-notes .pinned-header span:last-child {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #ffffff !important;
}

/* --- ЗАКРЕПЛЁННЫЕ ЗАМЕТКИ --- */
body.dark-theme #screen-baby-notes #baby-notes-pinned > div:not(.pinned-header) {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 149, 0, 0.15) !important;
    border-radius: 16px !important;
}

body.dark-theme #screen-baby-notes #baby-notes-pinned button[onclick*="togglePinNote"] {
    background: rgba(255, 149, 0, 0.15) !important;
    border: 1px solid rgba(255, 149, 0, 0.2) !important;
    color: #fbbf24 !important;
}

/* --- ЗАМЕТКИ ЗА ВЫБРАННЫЙ ДЕНЬ --- */
body.dark-theme #screen-baby-notes #notes-selected-date-label {
    color: #ffffff !important;
}

body.dark-theme #screen-baby-notes #baby-notes-list > div {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme #screen-baby-notes #baby-notes-list > div > div {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme #screen-baby-notes #baby-notes-list > div > div:last-child {
    border-bottom: none !important;
}

body.dark-theme #screen-baby-notes #baby-notes-list > div > div > div:first-child > div:first-child {
    color: #ffffff !important;
}

body.dark-theme #screen-baby-notes #baby-notes-list > div > div > div:first-child > div:last-child {
    color: #98989e !important;
}

body.dark-theme #screen-baby-notes #baby-notes-list button[onclick*="deleteBabyNote"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* --- ВЕРХНЯЯ ПАНЕЛЬ --- */
body.dark-theme #screen-baby-notes .section-bar-text h1 {
    color: #ffffff !important;
}

body.dark-theme #screen-baby-notes .section-bar-text p {
    color: #98989e !important;
}

body.dark-theme #screen-baby-notes .section-bar-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme #screen-baby-notes .section-bar-icon svg {
    stroke: #a78bfa !important;
}

/* --- ЗАКРЕПЛЁННЫЕ ЗАМЕТКИ --- */
body.dark-theme #screen-baby-notes #baby-notes-pinned > div:not(.pinned-header) {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 149, 0, 0.15) !important;
    border-radius: 16px !important;
}

body.dark-theme #screen-baby-notes #baby-notes-pinned button[onclick*="togglePinNote"] {
    background: rgba(255, 149, 0, 0.15) !important;
    border: 1px solid rgba(255, 149, 0, 0.2) !important;
    color: #fbbf24 !important;
}

/* Заголовок "Особенно важные" в тёмной теме */
body.dark-theme .pinned-header span {
    color: #ffffff !important;
}

body.dark-theme .pinned-header span:first-child {
    color: #fbbf24 !important;
}

body.dark-theme .pinned-header span:last-child {
    background: rgba(58, 58, 60, 0.8) !important;
    color: #ffffff !important;
}

/* ============================================================
   МАЛЫШ — ПРИВИВКИ (ТЁМНАЯ ТЕМА)
   ============================================================ */

/* Вся карточка прививок */
body.dark-theme .vaccine-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

/* Заголовок карточки */
body.dark-theme .vaccine-header {
    background: rgba(58, 58, 60, 0.6) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .vaccine-header span:last-child {
    color: #a78bfa !important;
}

/* Элемент прививки */
body.dark-theme .vaccine-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
}

body.dark-theme .vaccine-item:last-child {
    border-bottom: none !important;
}

body.dark-theme .vaccine-name {
    color: #ffffff !important;
}

body.dark-theme .vaccine-name strong {
    color: #ffffff !important;
}

body.dark-theme .vaccine-date {
    color: #98989e !important;
}

/* Галочка — НЕОТМЕЧЕННАЯ */
body.dark-theme .vaccine-status {
    background: #3a3a3c !important;
    color: #8e8e93 !important;
}

/* Галочка — ОТМЕЧЕННАЯ */
body.dark-theme .vaccine-status.done {
    background: #10b981 !important;
    color: #ffffff !important;
}

/* Подсказка внизу */
body.dark-theme .tip-card {
    background: rgba(44, 44, 46, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
}

body.dark-theme .tip-card .tip-title {
    color: #ffffff !important;
}

body.dark-theme .tip-card .tip-desc {
    color: #98989e !important;
}

body.dark-theme .tip-card .tip-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

/* Заголовок страницы */
body.dark-theme .section-bar {
    background: rgba(44, 44, 46, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .section-bar-text h1 {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.dark-theme .section-bar-text p {
    color: #98989e !important;
}

body.dark-theme .section-bar-icon {
    background: rgba(58, 58, 60, 0.8) !important;
}

body.dark-theme .section-bar-icon svg {
    stroke: #a78bfa !important;
}

/* ============================================================
   ОТКЛЮЧАЕМ ДЁРГАНИЕ ПРИ КЛИКАХ (ТОЛЬКО ДЛЯ КАРТОЧЕК И ЭЛЕМЕНТОВ, КОТОРЫЕ ДЁРГАЮТСЯ)
   ============================================================ */

/* Отключаем эффект нажатия только для карточек и контейнеров */
.card:active,
.chart-card:active,
.summary-card:active,
.daily-summary-card:active,
.baby-category-card:active,
.article-card:active,
.mini-article-card:active,
.personalized-article-card:active,
.precursor-item:active,
.vitamin-item:active,
.custom-vitamin-item:active,
.bag-item:active,
.doctor-item:active,
.test-item:active,
.feed-item:active,
.sleep-item:active,
.measurement-item:active,
.achievement-card:active,
.daily-article-card:active,
.partner-task-item:active,
.partner-note-item:active,
.timeline-item:active,
.countdown-card:active,
.contraction-item:active,
.event-item:active,
.cal-day:active,
.cal-nav-btn:active,
.date-nav-btn:active,
.mode-btn:active,
.top-tab:active,
.settings-item:active,
.avatar-option:active,
.consent-btn:active,
.btn-cancel:active,
.btn-danger:active,
.btn-confirm:active,
.btn-modal-close:active,
.btn-back-app:active,
.btn-logout:active,
.btn-outline:active,
.btn-small:active,
.btn-add-analysis:active,
.btn-add-task:active,
.btn-add-doctor:active,
.btn-schedule:active,
.btn-schedule-doctor:active,
.btn-schedule-task:active,
.delete-btn:active,
.delete-test-btn:active,
.delete-task-btn:active,
.delete-doctor-btn:active,
.delete-vitamin-btn:active,
.delete-measurement-btn:active,
.delete-feed-btn:active,
.delete-sleep-btn:active,
.edit-btn:active,
.like-btn:active,
.share-btn:active,
.time-preset-btn:active,
.timer-btn:active,
.symptom-checkbox:active,
.symptom-radio:active,
.checklist-item:active,
.checklist-checkbox:active,
.checklist-card:active {
    transform: none !important;
    scale: 1 !important;
    -webkit-transform: none !important;
    transition: none !important;
}

/* НО НЕ ОТКЛЮЧАЕМ ДЛЯ КНОПОК В МОДАЛЬНЫХ ОКНАХ И ИНТЕРАКТИВНЫХ ЭЛЕМЕНТОВ */
.modal-content button:active,
.modal-content .btn-save:active,
.modal-content .btn-cancel:active,
.modal-content .btn-primary:active,
button.btn-save:active,
button.btn-cancel:active {
    transform: scale(0.97) !important;
    transition: transform 0.15s ease !important;
}

/* Отключаем эффект нажатия для всех остальных кликабельных элементов, 
   но оставляем рабочими кнопки в модалках */
button:active:not(.modal-content button):not(.btn-save):not(.btn-cancel),
a:active,
[role="button"]:active {
    transform: none !important;
    scale: 1 !important;
    -webkit-transform: none !important;
    transition: none !important;
}

/* Отключаем дергание в чек-листе родов */
.labor-checklist-scroll .checklist-item {
    transition: none !important;
    animation: none !important;
}

.labor-checklist-scroll .checklist-item:active {
    transform: none !important;
    scale: 1 !important;
}

/* Отключаем дергание при клике на галочку */
.checklist-checkbox:active {
    transform: none !important;
    scale: 1 !important;
}

/* Отключаем все анимации в чек-листе */
.checklist-item,
.checklist-item *,
.checklist-item:active,
.checklist-item *:active {
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    animation: none !important;
}

/* Отключаем дергание карточек чек-листа */
.checklist-card,
.checklist-card:active {
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
}

/* Отключаем анимацию при перерисовке чек-листа */
.labor-checklist-scroll {
    animation: none !important;
}

.labor-checklist-scroll .checklist-item {
    transition: none !important;
}

/* ============================================================
   СПРАВОЧНАЯ ИНФОРМАЦИЯ — ПОЛНАЯ ТЁМНАЯ ТЕМА (БЕЗ ПОЛОСЫ)
   ============================================================ */

/* Фон модального окна */
body.dark-theme #whoModal {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* Контент модального окна */
body.dark-theme #whoModal .modal-content {
    background: rgba(44, 44, 46, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Заголовок */
body.dark-theme #whoModal .modal-content h3 {
    color: #ffffff !important;
}

body.dark-theme #whoModal .modal-content > div:first-child span:first-child {
    color: #ffffff !important;
}

/* ============================================================
   КРЕСТИК ЗАКРЫТИЯ
   ============================================================ */

/* Крестик в светлой теме */
#whoModal .modal-content > div:first-child button {
    color: #1c1c1e !important;
    background: transparent !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 4px 10px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
}

#whoModal .modal-content > div:first-child button:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}

#whoModal .modal-content > div:first-child button:active {
    transform: scale(0.92) !important;
}

/* Крестик в тёмной теме — белый */
body.dark-theme #whoModal .modal-content > div:first-child button {
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
}

body.dark-theme #whoModal .modal-content > div:first-child button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Если крестик — это SVG */
body.dark-theme #whoModal .modal-content > div:first-child button svg {
    stroke: #ffffff !important;
}

/* Если крестик — это текст ✕ */
body.dark-theme #whoModal .modal-content > div:first-child button:not(:empty) {
    color: #ffffff !important;
}

/* ============================================================
   РАЗДЕЛЫ
   ============================================================ */

/* Все разделы по умолчанию (светлая тема) */
#whoModal .modal-content .who-section {
    background: transparent !important;
    border-left: none !important;
    padding: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    transition: all 0.3s ease !important;
}

/* Все разделы по умолчанию (тёмная тема) */
body.dark-theme #whoModal .modal-content .who-section {
    background: rgba(58, 58, 60, 0.6) !important;
    border-left: none !important;
}

/* Заголовки разделов */
body.dark-theme #whoModal .modal-content .who-section > div:first-child {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Значения (цифры) */
body.dark-theme #whoModal .modal-content .who-section div[style*="color: #007aff"] {
    color: #a78bfa !important;
}

/* Описания */
body.dark-theme #whoModal .modal-content .who-section div[style*="color: #8e8e93"] {
    color: #98989e !important;
}

/* ============================================================
   ПОДСВЕТКА РАЗДЕЛА
   ============================================================ */

/* Подсветка — светлая тема (без полосы) */
#whoModal .modal-content .who-section.highlight {
    background: #f0f7ff !important;
    border-left: none !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 8px !important;
}

#whoModal .modal-content .who-section.highlight > div:first-child {
    color: #1c1c1e !important;
}

/* Подсветка — тёмная тема (без полосы) */
body.dark-theme #whoModal .modal-content .who-section.highlight {
    background: rgba(167, 139, 250, 0.2) !important;
    border-left: none !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.05) !important;
}

body.dark-theme #whoModal .modal-content .who-section.highlight > div:first-child {
    color: #ffffff !important;
}

body.dark-theme #whoModal .modal-content .who-section.highlight div[style*="color: #007aff"] {
    color: #a78bfa !important;
}

/* Дополнительная подсветка при наведении */
body.dark-theme #whoModal .modal-content .who-section:hover {
    background: rgba(167, 139, 250, 0.08) !important;
}

/* ============================================================
   ДИСКЛЕЙМЕР (ЖЁЛТЫЙ БЛОК)
   ============================================================ */

body.dark-theme #whoModal .modal-content .who-disclaimer,
body.dark-theme #whoModal .modal-content div[style*="background: #fef3c7"] {
    background: rgba(251, 191, 36, 0.12) !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
}

body.dark-theme #whoModal .modal-content .who-disclaimer strong,
body.dark-theme #whoModal .modal-content div[style*="background: #fef3c7"] strong {
    color: #fcd34d !important;
}

body.dark-theme #whoModal .modal-content > div[style*="padding: 16px; background: #fef3c7"] {
    background: rgba(251, 191, 36, 0.12) !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
}

body.dark-theme #whoModal .modal-content > div[style*="padding: 16px; background: #fef3c7"] strong {
    color: #fcd34d !important;
}

/* ============================================================
   КНОПКА "ЗАКРЫТЬ"
   ============================================================ */

body.dark-theme #whoModal .modal-content button[onclick*="closeWHOModal"] {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-theme #whoModal .modal-content button[onclick*="closeWHOModal"]:hover {
    background: linear-gradient(135deg, #6d7bf7, #9b8bfa) !important;
}

/* ============================================================
   СЕТКИ (ВЕС ПЛОДА И Т.Д.)
   ============================================================ */

body.dark-theme #whoModal .modal-content .who-grid-2 {
    background: transparent !important;
}

body.dark-theme #whoModal .modal-content .who-grid-2 .who-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border-radius: 12px !important;
    padding: 10px !important;
}

body.dark-theme #whoModal .modal-content .who-grid-2 .who-item .who-item-name {
    color: #ffffff !important;
}

body.dark-theme #whoModal .modal-content .who-grid-2 .who-item .who-item-value {
    color: #a78bfa !important;
}

body.dark-theme #whoModal .modal-content .who-grid-2 .who-item .who-item-desc {
    color: #98989e !important;
}

body.dark-theme #whoModal .modal-content .who-grid-3 {
    background: transparent !important;
}

body.dark-theme #whoModal .modal-content .who-grid-3 .who-item {
    background: rgba(58, 58, 60, 0.6) !important;
    border-radius: 12px !important;
    padding: 10px !important;
}

body.dark-theme #whoModal .modal-content .who-grid-3 .who-item .who-item-name {
    color: #ffffff !important;
}

body.dark-theme #whoModal .modal-content .who-grid-3 .who-item .who-item-value {
    color: #a78bfa !important;
}

/* Строки в разделах */
body.dark-theme #whoModal .modal-content .who-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme #whoModal .modal-content .who-item:last-child {
    border-bottom: none !important;
}

/* ============================================================
   СКРОЛЛБАР
   ============================================================ */

body.dark-theme #whoModal .modal-content::-webkit-scrollbar-track {
    background: #2c2c2e !important;
}

body.dark-theme #whoModal .modal-content::-webkit-scrollbar-thumb {
    background: #4a4a4c !important;
    border-radius: 10px !important;
}

body.dark-theme #whoModal .modal-content::-webkit-scrollbar-thumb:hover {
    background: #5a5a5c !important;
}

/* ============================================================
   ⭐ ФИКС ТАПА ПО ГРАФИКАМ НА МОБИЛЬНЫХ (ПРАВИЛЬНАЯ ВЕРСИЯ)
   ============================================================ */
@media (max-width: 768px) {
    .chart-card canvas {
        touch-action: pan-y !important;    /* ⭐ разрешаем и тап, и скролл */
        pointer-events: auto !important;   /* ⭐ НЕ блокируем тап! */
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .charts-scroll {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        touch-action: pan-y !important;
    }
}

/* ===== ЭМОЦИИ: ТЁМНАЯ ТЕМА ===== */

/* Кнопки эмоций */
body.dark-theme #screen-emotions .emotion-btn {
    background: rgba(58, 58, 60, 0.8) !important;
    border-color: transparent !important;
}

body.dark-theme #screen-emotions .emotion-btn.selected {
    background: rgba(167, 139, 250, 0.2) !important;
    border-color: #a78bfa !important;
}

body.dark-theme #screen-emotions .emotion-btn .emotion-label {
    color: #98989e !important;
}

/* Верхняя панель */
body.dark-theme #screen-emotions > div:first-child {
    background: #2c2c2e !important;
}

body.dark-theme #screen-emotions .section-bar-text h1 {
    color: #ffffff !important;
}

body.dark-theme #screen-emotions .section-bar-text p {
    color: #98989e !important;
}

/* Карточки и блоки */
body.dark-theme #screen-emotions [style*="background:rgba(255,255,255,0.7)"] {
    background: rgba(44, 44, 46, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Блок с графиком */
body.dark-theme #screen-emotions [style*="background:rgba(255,255,255,0.7)"]:has(canvas) {
    background: rgba(44, 44, 46, 0.85) !important;
}

/* Заголовок "Динамика настроения" */
body.dark-theme #screen-emotions .emotion-chart-title {
    color: #ffffff !important;
}

/* Текст "за 7 дней" */
body.dark-theme #emotion-period-label {
    color: #98989e !important;
}

/* Дата */
body.dark-theme #screen-emotions #emotion-date-display {
    color: #ffffff !important;
}

/* Кнопки смены даты */
body.dark-theme #screen-emotions button[onclick*="changeEmotionDate"] {
    color: #98989e !important;
}

/* Текстовое поле */
body.dark-theme #screen-emotions textarea {
    background: rgba(58, 58, 60, 0.8) !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme #screen-emotions textarea::placeholder {
    color: #8e8e93 !important;
}

/* Кнопка "Сохранить запись" */
body.dark-theme #screen-emotions button[onclick*="saveEmotion"] {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
}

/* Блок AI-анализа */
body.dark-theme #emotion-ai-insight > div {
    background: linear-gradient(135deg, #1e1e2f, #2a2a3e) !important;
    border-left-color: #a78bfa !important;
}

body.dark-theme #emotion-ai-insight .emotion-insight-title {
    color: #ffffff !important;
}

body.dark-theme #emotion-ai-insight #emotion-insight-text {
    color: #cbd5e1 !important;
}

/* Кнопки переключения периода (7/30 дней) */
body.dark-theme .emotion-period-btn {
    background: rgba(58, 58, 60, 0.6) !important;
    border-color: #4a4a4c !important;
    color: #98989e !important;
}

body.dark-theme .emotion-period-btn.active {
    background: #818cf8 !important;
    color: white !important;
    border-color: #818cf8 !important;
}

body.dark-theme .emotion-period-btn:hover:not(.active) {
    background: #3a3a3c !important;
}

/* ===== СОВЕТЫ НА ОСНОВЕ НАСТРОЕНИЯ (ТЁМНАЯ ТЕМА) ===== */
body.dark-theme #emotion-advice-card {
    background: linear-gradient(135deg, #1e1e2f, #2a2a3e) !important;
}

body.dark-theme #emotion-advice-card span[style*="color:#1c1c1e"] {
    color: #ffffff !important;
}

body.dark-theme #emotion-advice-text {
    color: #cbd5e1 !important;
}

body.dark-theme #emotion-advice-text strong {
    color: #a78bfa !important;
}

/* ===== ГРАФИК ЭМОЦИЙ - ПОЛНОСТЬЮ ИСПРАВЛЕННЫЙ ===== */

/* Контейнер карточки */
#screen-emotions .emotion-chart-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px !important;
    margin: 0 0 16px 0 !important;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden !important;
    position: relative;
}

/* Обёртка для canvas — ВАЖНО: убираем все лишние стили */
#screen-emotions .emotion-chart-card .chart-wrapper {
    width: 100% !important;
    height: 200px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Canvas — МИНИМАЛЬНЫЕ стили, Chart.js сам управляет размерами */
#emotion-chart {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Отключаем события */
#screen-emotions .emotion-chart-card canvas {
    touch-action: pan-y !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}


/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme #screen-emotions .emotion-chart-card {
    background: rgba(44, 44, 46, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme #screen-emotions .emotion-chart-title {
    color: #ffffff !important;
}

body.dark-theme #screen-emotions .emotion-period-label {
    color: #98989e !important;
}

body.dark-theme #screen-emotions textarea {
    background: rgba(58, 58, 60, 0.8) !important;
    border-color: #4a4a4c !important;
    color: #ffffff !important;
}

body.dark-theme #screen-emotions textarea::placeholder {
    color: #8e8e93 !important;
}

body.dark-theme #screen-emotions .emotion-save-btn {
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
}

/* ----- 6. КНОПКИ ЭМОЦИЙ ----- */
#screen-emotions .emotion-btn {
    text-align: center;
    padding: 12px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

#screen-emotions .emotion-btn.selected {
    background: rgba(99, 102, 241, 0.12);
    border-color: #6366f1;
}

#screen-emotions .emotion-btn .emotion-label {
    font-size: 10px;
    color: #8e8e93;
    margin-top: 4px;
}

/* Тёмная тема для кнопок эмоций */
body.dark-theme #screen-emotions .emotion-btn {
    background: rgba(58, 58, 60, 0.8);
    border-color: transparent;
}

body.dark-theme #screen-emotions .emotion-btn.selected {
    background: rgba(167, 139, 250, 0.2);
    border-color: #a78bfa;
}

body.dark-theme #screen-emotions .emotion-btn .emotion-label {
    color: #98989e;
}

/* ----- 7. КНОПКИ ПЕРИОДА ----- */
.emotion-period-btn {
    padding: 4px 14px;
    border-radius: 30px;
    border: 1px solid #e5e5ea;
    background: transparent;
    color: #8e8e93;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.emotion-period-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

body.dark-theme .emotion-period-btn {
    background: rgba(58, 58, 60, 0.6);
    border-color: #4a4a4c;
    color: #98989e;
}

body.dark-theme .emotion-period-btn.active {
    background: #818cf8;
    color: white;
    border-color: #818cf8;
}

/* ----- 8. СОВЕТЫ ----- */
body.dark-theme #emotion-advice-card {
    background: linear-gradient(135deg, #1e1e2f, #2a2a3e) !important;
}

body.dark-theme #emotion-advice-text {
    color: #cbd5e1 !important;
}

body.dark-theme #emotion-advice-text strong {
    color: #a78bfa !important;
}

/* ===== ПУЛЬСАЦИЯ ЛАМПОЧКИ СОВЕТА ДНЯ ===== */

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

.pulse-lamp {
    animation: pulse-glow 2s ease-in-out infinite;
    display: inline-block;
}

/* ----- 9. ВЕРХНЯЯ ПАНЕЛЬ (ТЁМНАЯ ТЕМА) ----- */
body.dark-theme #screen-emotions .section-bar {
    background: #2c2c2e !important;
}

body.dark-theme #screen-emotions .section-bar-text h1 {
    color: #ffffff !important;
}

body.dark-theme #screen-emotions .section-bar-text p {
    color: #98989e !important;
}

/* ===== АНАЛИТИКА: ПЕРЕКЛЮЧАТЕЛЬ ===== */
#screen-summary .analytics-tab-btn {
    flex: 1;
    padding: 10px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

#screen-summary .analytics-tab-btn.active {
    background: #007aff;
    color: white;
}

#screen-summary .analytics-tab-btn.inactive {
    background: #f2f1f6;
    color: #8e8e93;
}

/* Тёмная тема */
body.dark-theme #screen-summary .analytics-tab-btn.inactive {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme #screen-summary .analytics-tab-btn.active {
    background: #0a84ff;
    color: white;
}

body.dark-theme #screen-summary [style*="background:#f8f9fc"] {
    background: #2c2c2e !important;
    border-bottom-color: #3a3a3c !important;
}

/* ============================================================
   ТЁМНАЯ ТЕМА ДЛЯ ИСТОРИИ (ВКЛАДКА "АНАЛИТИКА")
   ============================================================ */

/* Заголовки дат (Сегодня, Вчера, ...) */
body.dark-theme #history-table [style*="background:#f0f7ff"] {
    background: #2a2a3e !important;
    color: #a78bfa !important;
}

/* Карточки записей */
body.dark-theme #history-table [style*="background:rgba(255,255,255,0.7)"] {
    background: rgba(44, 44, 46, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Название категории (Вес, Давление, ...) */
body.dark-theme #history-table [style*="color:#8e8e93"] {
    color: #98989e !important;
}

/* Значение записи (число) */
body.dark-theme #history-table [style*="color:#1c1c1e"] {
    color: #ffffff !important;
}

/* Дата записи справа */
body.dark-theme #history-table [style*="color:#8e8e93;text-align:right"] {
    color: #6b6b70 !important;
}

/* Пустое состояние */
body.dark-theme #history-table [style*="color:#8e8e93"]:has(> p) {
    color: #98989e !important;
}

body.dark-theme #history-table [style*="color:#1c1c1e"]:has(> p) {
    color: #ffffff !important;
}

/* Кнопка удаления (крестик) — становится светлее на тёмном фоне */
body.dark-theme #history-table button[onclick*="deleteRecord"] {
    color: #ff453a !important;
}

body.dark-theme #history-table button[onclick*="deleteRecord"]:hover {
    background: rgba(255, 69, 58, 0.15) !important;
}

/* Время добавления 🕐 */
body.dark-theme #history-table [style*="color:#8e8e93;margin-left:8px;"] {
    color: #6b6b70 !important;
}

/* Тёмная тема для переключателя (с классами) */
body.dark-theme .analytics-tabs-container {
    background: #2c2c2e !important;
    border-bottom-color: #3a3a3c !important;
}

body.dark-theme .analytics-tab-btn.active {
    background: #0a84ff !important;
    color: #ffffff !important;
}

body.dark-theme .analytics-tab-btn.inactive {
    background: #3a3a3c !important;
    color: #98989e !important;
}

body.dark-theme .analytics-tab-btn.inactive:hover {
    background: #4a4a4c !important;
    color: #ffffff !important;
}

/* Убираем лишний отступ у экрана аналитики */
#screen-summary {
    padding-bottom: 0 !important;
}

/* Убираем лишний отступ у экрана эмоций */
#screen-emotions {
    padding-bottom: 0 !important;
}

/* ============================================================
   РЕЖИМ ВРАЧА - ОПТИМИЗАЦИЯ
   ============================================================ */

/* Отключаем анимации для врача */
.doctor-mode .screen {
    animation: none !important;
}

.doctor-mode .chart-card,
.doctor-mode .summary-card,
.doctor-mode .tests-card,
.doctor-mode .checklist-card,
.doctor-mode .doctors-card,
.doctor-mode .partner-card,
.doctor-mode .daily-summary-card,
.doctor-mode .health-card,
.doctor-mode .vitamin-item,
.doctor-mode .custom-vitamin-item,
.doctor-mode .precursor-item,
.doctor-mode .bag-category {
    animation: none !important;
    opacity: 1 !important;
}

/* Отключаем hover-эффекты для врача */
.doctor-mode .card:hover,
.doctor-mode .chart-card:hover,
.doctor-mode .summary-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   ЖУРНАЛ (СТАТЬИ) — ПОЛНАЯ ТЁМНАЯ ТЕМА (ВСЕ БЛОКИ)
   ============================================================ */

/* --- 1. ВСЕ КАРТОЧКИ С БЕЛЫМ ФОНОМ В ЖУРНАЛЕ --- */
body.dark-theme .articles-full-list div[style*="background: white"],
body.dark-theme .articles-full-list div[style*="background: #ffffff"],
body.dark-theme .articles-full-list div[style*="background: #fff"],
body.dark-theme .articles-full-list div[style*="background:white"],
body.dark-theme .articles-full-list div[style*="background:#ffffff"],
body.dark-theme .articles-full-list div[style*="background:#fff"] {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div:first-child > span[style*="color: #1c1c1e"] {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:first-child {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .articles-full-list > div:first-child > div > div > div:first-child {
    color: #98989e !important;
}

body.dark-theme .articles-full-list > div:first-child > div > div > div:nth-child(2) {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:first-child > div > div > div:last-child {
    color: #a78bfa !important;
}

/* --- 2. ВСЕ КАРТОЧКИ В ПРЕВЬЮ НА ГЛАВНОЙ --- */
body.dark-theme .articles-preview-content div[style*="background: white"],
body.dark-theme .articles-preview-content div[style*="background: #ffffff"],
body.dark-theme .articles-preview-content div[style*="background: #fff"],
body.dark-theme .articles-preview-content div[style*="background:white"] {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

/* --- 3. БЛОК С ИНФОРМАЦИЕЙ О ТРИМЕСТРЕ --- */
.articles-full-list > div:first-child {
    margin: 16px 0 24px 0 !important;  /* ← снизу 24px (больше) */
    padding: 16px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.dark-theme .articles-full-list > div:first-child > div > div > div:first-child {
    color: #98989e !important;
}

body.dark-theme .articles-full-list > div:first-child > div > div > div:nth-child(2) {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:first-child > div > div > div:last-child {
    color: #a78bfa !important;
}

/* --- 4. БЛОК "СТАТЬЯ ДНЯ" (ГРАДИЕНТ) --- */
body.dark-theme .articles-full-list > div:first-child > div[style*="background: linear-gradient"] {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
    border: none !important;
}

body.dark-theme .articles-full-list > div:first-child > div[style*="background: linear-gradient"] > div > div:last-child > div:first-child {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:first-child > div[style*="background: linear-gradient"] > div > div:last-child > div:nth-child(2) {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.dark-theme .articles-full-list > div:first-child > div[style*="background: linear-gradient"] > div > div:last-child > div:last-child {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* --- 5. ЗАГОЛОВКИ ТРИМЕСТРОВ --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div:first-child > span:first-child {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div:first-child > span:last-child {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div:first-child > span:nth-child(3) {
    background: #3a3a3c !important;
    color: #98989e !important;
}

/* --- 6. БЕЙДЖ "ТЕКУЩИЙ" --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div:first-child > span[style*="background: #e0f2fe"] {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
}

/* --- 7. БЕЙДЖ "ДОСТУПЕН" (БЕЛЫЙ ФОН ИСПРАВЛЕН) --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div:first-child > span[style*="background: #f2f1f6"] {
    background: #3a3a3c !important;
    color: #98989e !important;
}

/* --- 8. НАЗВАНИЕ КАТЕГОРИИ --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="margin-bottom: 4px"] > div:first-child {
    color: #98989e !important;
}

/* --- 9. КАРТОЧКИ СТАТЕЙ ВНУТРИ КАТЕГОРИЙ --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="background: white"] {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="background: white"] > div > div:last-child > div:first-child {
    color: #ffffff !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="background: white"] > div > div:last-child > div:nth-child(2) {
    color: #98989e !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="background: white"] > div > div:last-child > div:last-child span {
    color: #6b6b70 !important;
}

/* --- 10. ИКОНКА СТАТЬИ --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="background: white"] > div > div:first-child {
    filter: brightness(0.9) !important;
}

/* --- 11. ГАЛОЧКА "ПРОЧИТАНО" --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="background: white"] > div > div:last-child > div:last-child span[style*="color: #10b981"] {
    color: #6ee7b7 !important;
}

/* --- 12. ЗАБЛОКИРОВАННЫЕ СТАТЬИ (СКОРО) --- */
body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="opacity: 0.5"] > div > div:last-child > div:first-child {
    color: #6b6b70 !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="opacity: 0.5"] > div > div:last-child > div:nth-child(2) {
    color: #5a5a5e !important;
}

body.dark-theme .articles-full-list > div:not(:first-child) > div > div[style*="opacity: 0.5"] > div > div:last-child > div:last-child span {
    color: #5a5a5e !important;
}

/* --- 13. ПУСТОЕ СОСТОЯНИЕ --- */
body.dark-theme .articles-full-list > div[style*="text-align: center"] {
    color: #98989e !important;
}

body.dark-theme .articles-full-list > div[style*="text-align: center"] p {
    color: #98989e !important;
}

/* ============================================================
   ПРЕВЬЮ СТАТЕЙ НА ГЛАВНОЙ
   ============================================================ */

/* --- 1. БЛОК "ПОЛЕЗНЫЕ СТАТЬИ" --- */
body.dark-theme .articles-preview-content .more-articles-section {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .articles-preview-content .more-articles-header {
    color: #98989e !important;
    border-bottom-color: #3a3a3c !important;
}

/* --- 2. МИНИ-КАРТОЧКИ СТАТЕЙ --- */
body.dark-theme .articles-preview-content .mini-article-card {
    background: #3a3a3c !important;
}

body.dark-theme .articles-preview-content .mini-article-card .mini-article-title {
    color: #ffffff !important;
}

body.dark-theme .articles-preview-content .mini-article-card .mini-article-meta {
    color: #98989e !important;
}

/* --- 3. БЛОК "ПЕРСОНАЛИЗИРОВАННЫЕ СТАТЬИ" --- */
body.dark-theme .articles-preview-content .personalized-articles {
    background: #2c2c2e !important;
    border: 1px solid rgba(167, 139, 250, 0.2) !important;
}

body.dark-theme .articles-preview-content .personalized-articles-header {
    color: #a78bfa !important;
    border-bottom-color: rgba(167, 139, 250, 0.15) !important;
}

body.dark-theme .articles-preview-content .personalized-article-card {
    background: rgba(167, 139, 250, 0.08) !important;
}

body.dark-theme .articles-preview-content .personalized-article-card .personalized-article-title {
    color: #ffffff !important;
}

body.dark-theme .articles-preview-content .personalized-article-card .personalized-article-category {
    color: #a78bfa !important;
}

body.dark-theme .articles-preview-content .personalized-article-card .personalized-arrow {
    color: #a78bfa !important;
}

/* --- 4. СТАТЬЯ ДНЯ НА ГЛАВНОЙ --- */
body.dark-theme .articles-preview-content .daily-article-preview {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
    border: none !important;
}

body.dark-theme .articles-preview-content .daily-article-preview .daily-article-preview-info h4 {
    color: #ffffff !important;
}

body.dark-theme .articles-preview-content .daily-article-preview .daily-article-preview-info p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* --- 5. НОВЫЙ БЕЙДЖ --- */
body.dark-theme .new-badge-small,
body.dark-theme .new-badge {
    background: #ff453a !important;
    color: #ffffff !important;
}

/* --- 6. ЗАГОЛОВОК "ПОЛЕЗНЫЕ СТАТЬИ" (СЕРАЯ ПЛАШКА) --- */
body.dark-theme .articles-preview-title {
    background: #3a3a3c !important;
    color: #98989e !important;
}

body.dark-theme .articles-preview-line {
    background: linear-gradient(90deg, transparent, #3a3a3c, transparent) !important;
}

/* --- 7. ДОПОЛНИТЕЛЬНО: ВСЕ ТЕКСТЫ В КАРТОЧКАХ СТАТЕЙ --- */
body.dark-theme .articles-full-list div[style*="background: white"] *,
body.dark-theme .articles-full-list div[style*="background: #ffffff"] *,
body.dark-theme .articles-full-list div[style*="background: #fff"] * {
    color: #ffffff !important;
}

/* Но исключения (должны остаться серыми) */
body.dark-theme .articles-full-list div[style*="background: white"] [style*="color: #8e8e93"],
body.dark-theme .articles-full-list div[style*="background: #ffffff"] [style*="color: #8e8e93"],
body.dark-theme .articles-full-list div[style*="background: #fff"] [style*="color: #8e8e93"] {
    color: #98989e !important;
}

body.dark-theme .articles-full-list div[style*="background: white"] [style*="color: #10b981"],
body.dark-theme .articles-full-list div[style*="background: #ffffff"] [style*="color: #10b981"],
body.dark-theme .articles-full-list div[style*="background: #fff"] [style*="color: #10b981"] {
    color: #6ee7b7 !important;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО СТАТЬИ
   ============================================================ */

body.dark-theme .article-modal-content {
    background: #2c2c2e !important;
    border: 1px solid #3a3a3c !important;
}

body.dark-theme .article-modal-header {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
}

body.dark-theme .article-modal-header h2 {
    color: #ffffff !important;
}

body.dark-theme .article-modal-close {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .article-modal-body {
    color: #cbd5e1 !important;
}

body.dark-theme .article-modal-body h2,
body.dark-theme .article-modal-body h3 {
    color: #ffffff !important;
}

body.dark-theme .article-modal-body strong {
    color: #ffffff !important;
}

body.dark-theme .article-tip {
    background: rgba(10, 132, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

body.dark-theme .article-warning {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
}

body.dark-theme .article-recipe {
    background: rgba(251, 191, 36, 0.10) !important;
    color: #fcd34d !important;
}

body.dark-theme .article-footer {
    border-top: 1px solid #3a3a3c !important;
}

body.dark-theme .article-footer-info {
    color: #98989e !important;
}

body.dark-theme .article-actions .like-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.dark-theme .article-actions .share-btn {
    background: #3a3a3c !important;
    color: #a78bfa !important;
}

/* ============================================================
   ЕЖЕДНЕВНАЯ СТАТЬЯ (БЛОК НА ГЛАВНОЙ)
   ============================================================ */

body.dark-theme .daily-article-card {
    background: linear-gradient(135deg, #4c51bf, #5b21b6) !important;
    border: none !important;
}

body.dark-theme .daily-article-card.completed {
    background: linear-gradient(135deg, #065f46, #047857) !important;
}

body.dark-theme .daily-article-card .daily-article-badge {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .daily-article-card .daily-article-info h4 {
    color: #ffffff !important;
}

body.dark-theme .daily-article-card .daily-article-info p {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.dark-theme .daily-article-card .article-meta {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ============================================================
   КОНЕЦ: ЖУРНАЛ — ПОЛНАЯ ТЁМНАЯ ТЕМА
   ============================================================ */

   /* ============================================================
   ПЛАШКА УСТАНОВКИ PWA
   ============================================================ */
.pwa-install-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    
    animation: slideDownPwa 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: sticky;
    top: 0;
    z-index: 998;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box;
}

@keyframes slideDownPwa {
    0% { opacity: 0; transform: translateY(-20px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-banner-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.2px;
}

.pwa-banner-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    margin-top: 1px;
}

.pwa-banner-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-banner-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: none;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

.pwa-banner-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.02);
}

.pwa-banner-btn:active {
    transform: scale(0.97);
}

.pwa-banner-close {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-banner-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.pwa-banner-close:active {
    transform: scale(0.92);
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО УСТАНОВКИ PWA
   ============================================================ */
.pwa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.pwa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pwa-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 32px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-modal-content::-webkit-scrollbar {
    display: none;
}

.pwa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pwa-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
    margin: 0;
}

.pwa-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

.pwa-modal-close:hover {
    background: rgba(0,0,0,0.05);
}

/* ===== ВКЛАДКИ iOS / Android ===== */
.pwa-os-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #f2f1f6;
    border-radius: 14px;
    padding: 4px;
}

.pwa-os-tab {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.pwa-os-tab.active {
    background: white;
    color: #1c1c1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pwa-os-tab:active {
    transform: scale(0.97);
}

.pwa-os-content {
    display: none;
    animation: fadeSlideIn 0.25s ease forwards;
}

.pwa-os-content.active {
    display: block;
}

/* ===== ШАГИ ===== */
.pwa-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f1f6;
}

.pwa-step:last-child {
    border-bottom: none;
}

.pwa-step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.pwa-step-text {
    font-size: 14px;
    color: #1c1c1e;
    line-height: 1.4;
}

.pwa-step-text strong {
    color: #6366f1;
}

/* ===== ФУТЕР МОДАЛЬНОГО ОКНА ===== */
.pwa-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f2f1f6;
}

.pwa-modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.pwa-modal-btn:active {
    transform: scale(0.97);
}

.pwa-modal-btn-secondary {
    background: #f2f1f6;
    color: #8e8e93;
}

.pwa-modal-btn-secondary:hover {
    background: #e5e5ea;
}

.pwa-modal-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.pwa-modal-btn-primary:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

/* ============================================================
   ТЁМНАЯ ТЕМА
   ============================================================ */
body.dark-theme .pwa-modal-content {
    background: #2c2c2e;
}

body.dark-theme .pwa-modal-header h3 {
    color: #ffffff;
}

body.dark-theme .pwa-modal-close {
    color: #98989e;
}

body.dark-theme .pwa-modal-close:hover {
    background: rgba(255,255,255,0.05);
}

body.dark-theme .pwa-os-tabs {
    background: #3a3a3c;
}

body.dark-theme .pwa-os-tab {
    color: #98989e;
}

body.dark-theme .pwa-os-tab.active {
    background: #2c2c2e;
    color: #ffffff;
}

body.dark-theme .pwa-step {
    border-bottom-color: #3a3a3c;
}

body.dark-theme .pwa-step-text {
    color: #ffffff;
}

body.dark-theme .pwa-step-text strong {
    color: #a78bfa;
}

body.dark-theme .pwa-modal-footer {
    border-top-color: #3a3a3c;
}

body.dark-theme .pwa-modal-btn-secondary {
    background: #3a3a3c;
    color: #98989e;
}

body.dark-theme .pwa-modal-btn-secondary:hover {
    background: #4a4a4c;
}

body.dark-theme .pwa-modal-btn-primary {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
}

body.dark-theme .pwa-install-banner {
    background: linear-gradient(135deg, #4c51bf, #5b21b6);
}

body.dark-theme .pwa-banner-btn {
    background: rgba(255,255,255,0.15);
}

body.dark-theme .pwa-banner-btn:hover {
    background: rgba(255,255,255,0.25);
}

body.dark-theme .pwa-banner-close {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}

body.dark-theme .pwa-banner-close:hover {
    background: rgba(255,255,255,0.15);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 420px) {
    .pwa-modal-content {
        padding: 20px 16px;
        border-radius: 28px;
    }
    
    .pwa-step-text {
        font-size: 13px;
    }
    
    .pwa-banner-title {
        font-size: 13px;
    }
    
    .pwa-banner-desc {
        font-size: 10px;
    }
    
    .pwa-banner-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .pwa-banner-icon {
        font-size: 22px;
    }
    
    .pwa-banner-title {
        font-size: 11px;
    }
    
    .pwa-banner-desc {
        display: none;
    }
    
    .pwa-banner-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* ============================================================
   ⭐ БЕЙДЖ PREMIUM НА ГРАФИКАХ
   ============================================================ */

.charts-premium-badge {
    margin-bottom: 16px;
    /* Наследует стили от .premium-locked-card */
}

/* Дополнительный отступ для бейджа в начале списка графиков */
#screen-charts .charts-scroll > .charts-premium-badge:first-child {
    margin-top: 0;
}

/* Тёмная тема — уже обрабатывается в premium.js */

/* ============================================================
   ⭐ ИСПРАВЛЕНИЕ: КНОПКА "ЗАГРУЗИТЬ ЕЩЁ" УХОДИТ ПОД ТАББАР
   ============================================================ */

/* Контейнер истории (вкладка "Аналитика" → "История") */
#history-table {
    padding-bottom: 120px !important;  /* ← было 16px, стало 120px */
}

/* Контейнер сводки (вкладка "Аналитика" → "Сводка") */
#summary-content {
    padding-bottom: 120px !important;
}

/* На всякий случай — контейнер аналитики */
#analytics-summary-container,
#analytics-history-container {
    padding-bottom: 40px !important;
}

/* ============================================================
   ⭐ АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ
   ============================================================ */
@media (max-width: 420px) {
    #history-table {
        padding-bottom: 100px !important;
    }
    
    #summary-content {
        padding-bottom: 100px !important;
    }
}

/* ============================================================
   ⭐ УЧИТЫВАЕМ SAFE AREA (iPhone с чёлкой)
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #history-table {
        padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
    }
    
    #summary-content {
        padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
    }
}

/* ===== AI-АНАЛИЗ ЭМОЦИЙ ===== */
#emotion-ai-insight {
    animation: fadeSlideIn 0.4s ease forwards;
    margin-bottom: 8px;
}

/* Тёмная тема */
body.dark-theme #emotion-ai-insight > div {
    background: linear-gradient(135deg, #1e1e2f, #2a2a3e) !important;
    border-left-color: #a78bfa !important;
}

body.dark-theme #emotion-ai-insight .emotion-insight-title {
    color: #ffffff !important;
}

body.dark-theme #emotion-ai-insight #emotion-insight-text {
    color: #cbd5e1 !important;
}

/* ===== СКЕЛЕТОНЫ ДЛЯ ГЛАВНОЙ ===== */
.skeleton-card {
    pointer-events: none;
    user-select: none;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    margin-bottom: 10px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }

.skeleton-circle {
    border-radius: 50%;
    flex-shrink: 0;
}

/* Hero-скелетон */
.skeleton-hero {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.skeleton-hero .skeleton-circle {
    width: 60px;
    height: 60px;
}

.skeleton-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-hero-text .skeleton-line:first-child { height: 10px; width: 30%; }
.skeleton-hero-text .skeleton-line:nth-child(2) { height: 28px; width: 50%; }
.skeleton-hero-text .skeleton-line:last-child { height: 36px; width: 100%; }

/* Сводка за день */
.skeleton-summary-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.skeleton-summary-row .skeleton-line {
    flex: 1;
    height: 40px;
}

/* Статья дня */
.skeleton-article {
    display: flex;
    gap: 12px;
    align-items: center;
}

.skeleton-article .skeleton-circle {
    width: 40px;
    height: 40px;
}

.skeleton-article-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-article-text .skeleton-line:first-child { height: 12px; width: 70%; }
.skeleton-article-text .skeleton-line:last-child { height: 10px; width: 90%; }

/* Только для тёмной темы — перебиваем inline-стили */
body.dark-theme .baby-chart-tab {
    background: #3a3a3c !important;
    color: #98989e !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .baby-chart-tab.active {
    background: #0a84ff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.35) !important;
}

/* ============================================================
   ⭐ ФИКС ТАПА ПО ГРАФИКАМ НА МОБИЛЬНЫХ
   ============================================================ */

/* Разрешаем вертикальный скролл, но не блокируем тап */
.charts-scroll,
#screen-charts .charts-scroll {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* Canvas: разрешаем и скролл, и тап */
.charts-scroll canvas,
#screen-charts canvas,
.home-chart-card canvas,
#home-charts-container canvas,
.chart-card canvas {
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}

/* ============================================================
   ⭐ ЦВЕТА ПОЛА РЕБЁНКА — BOY / GIRL (полная замена)
   ============================================================ */

/* --- КАРТОЧКА МАЛЫША: стеклянная база --- */
.baby-info-card {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12);
}

/* --- ПОЛ: тонировка подложки --- */
.baby-info-card.girl {
    background: rgba(252, 231, 243, 0.55) !important;  /* розовое молоко */
    border: 1px solid rgba(244, 114, 182, 0.4) !important;
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.14);
}

.baby-info-card.boy {
    background: rgba(219, 234, 254, 0.55) !important;  /* голубое молоко */
    border: 1px solid rgba(96, 165, 250, 0.4) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.14);
}

/* --- РЯДЫ: две пилюли рядом --- */
.baby-info-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.baby-info-row:last-of-type {
    margin-bottom: 0;
}

.baby-info-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Пилюли тонируются в цвет пола */
.baby-info-card.girl .baby-info-item {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(244, 114, 182, 0.25);
}

.baby-info-card.boy .baby-info-item {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(96, 165, 250, 0.25);
}

.baby-info-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(55, 65, 81, 0.75);
}

/* Метки в цвет пола */
.baby-info-card.girl .baby-info-label { color: rgba(157, 23, 77, 0.8); }
.baby-info-card.boy  .baby-info-label { color: rgba(30, 64, 175, 0.8); }

.baby-info-value {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.baby-info-card.girl .baby-info-value { color: #831843; }
.baby-info-card.boy  .baby-info-value { color: #1e3a5f; }

/* --- КНОПКА РЕДАКТИРОВАНИЯ: по центру, на всю ширину --- */
.baby-info-card .btn-small {
    display: block;
    margin: 12px auto 0;
    width: 100%;
    padding: 11px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f472b6, #a855f7) !important;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
    transition: transform 0.15s ease;
}

.baby-info-card.boy .btn-small {
    background: linear-gradient(135deg, #60a5fa, #6366f1) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.baby-info-card .btn-small:active {
    transform: scale(0.97);
}

/* --- ЭМОДЗИ ПОЛА: с цветным ореолом --- */
.baby-gender-emoji {
    font-size: 48px;
    line-height: 1;
    display: inline-block;
    margin: 2px 0 10px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

.baby-gender-emoji.girl {
    background: rgba(244, 114, 182, 0.18);
    box-shadow: 0 0 0 6px rgba(244, 114, 182, 0.1);
}

.baby-gender-emoji.boy {
    background: rgba(96, 165, 250, 0.18);
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.1);
}

.baby-gender-emoji-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-left: 10px;
    vertical-align: middle;
    color: #1f2937;
}

.baby-info-card.girl .baby-gender-emoji-name { color: #9d174d; }
.baby-info-card.boy  .baby-gender-emoji-name { color: #1e40af; }

/* --- ЗАГОЛОВОК С ИМЕНЕМ --- */
#baby-name.girl {
    color: #be185d !important;
}

#baby-name.boy {
    color: #1e40af !important;
}

body.dark-theme #baby-name.girl {
    color: #f9a8d4 !important;
}

body.dark-theme #baby-name.boy {
    color: #93c5fd !important;
}

/* --- БЕЙДЖ PREMIUM МАЛЫША (по полу) --- */
.premium-badge.baby-badge.girl {
    background: rgba(236, 72, 153, 0.08) !important;
    color: #db2777 !important;
    border-color: rgba(236, 72, 153, 0.18) !important;
}

.premium-badge.baby-badge.girl .premium-badge-dot {
    background: #ec4899 !important;
}

.premium-badge.baby-badge.boy {
    background: rgba(59, 130, 246, 0.08) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.18) !important;
}

.premium-badge.baby-badge.boy .premium-badge-dot {
    background: #3b82f6 !important;
}

/* --- БЛОК ВОЗРАСТА В СТАТЬЯХ (по полу) --- */
.baby-age-block.girl {
    background: #fce7f3 !important;
    border: 1px solid rgba(236, 72, 153, 0.15) !important;
}

.baby-age-block.boy {
    background: #dbeafe !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .baby-age-block.girl {
    background: #3a1f2e !important;
    border-color: rgba(236, 72, 153, 0.2) !important;
}

body.dark-theme .baby-age-block.boy {
    background: #1a2a3f !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* ===== ТЁМНАЯ ТЕМА КАРТОЧКИ МАЛЫША — как в статьях по возрасту ===== */

/* Карточка: плотная заливка в цвет пола */
body.dark-theme .baby-info-card.girl {
    background: #3a1f2e !important;
    border-color: rgba(236, 72, 153, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

body.dark-theme .baby-info-card.boy {
    background: #1a2a3f !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Пилюли: чуть светлее карточки, с рамкой в цвет пола */
body.dark-theme .baby-info-card .baby-info-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .baby-info-card.girl .baby-info-item {
    background: rgba(244, 114, 182, 0.08);
    border-color: rgba(244, 114, 182, 0.25);
}

body.dark-theme .baby-info-card.boy .baby-info-item {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

/* Метки: светлая версия цвета пола */
body.dark-theme .baby-info-card .baby-info-label {
    color: rgba(209, 213, 219, 0.8);
}

body.dark-theme .baby-info-card.girl .baby-info-label {
    color: rgba(251, 207, 232, 0.9);
}

body.dark-theme .baby-info-card.boy .baby-info-label {
    color: rgba(191, 219, 254, 0.9);
}

/* Значения */
body.dark-theme .baby-info-card .baby-info-value {
    color: #f9fafb;
}

body.dark-theme .baby-info-card.girl .baby-info-value {
    color: #fbcfe8;
}

body.dark-theme .baby-info-card.boy .baby-info-value {
    color: #dbeafe;
}

/* Кнопка остаётся яркой */
body.dark-theme .baby-info-card .btn-small {
    background: linear-gradient(135deg, #f472b6, #a855f7) !important;
}

body.dark-theme .baby-info-card.boy .btn-small {
    background: linear-gradient(135deg, #60a5fa, #6366f1) !important;
}

/* Имя рядом с эмодзи */
body.dark-theme .baby-gender-emoji-name {
    color: #f3f4f6;
}

body.dark-theme .baby-info-card.girl .baby-gender-emoji-name {
    color: #f9a8d4;
}

body.dark-theme .baby-info-card.boy .baby-gender-emoji-name {
    color: #93c5fd;
}
/* ===== ТЁМНАЯ ТЕМА: кнопка Редактировать в карточке малыша ===== */

body.dark-theme .baby-info-card .btn-small {
    color: #ffffff !important;
    background: linear-gradient(135deg, #f472b6, #a855f7) !important;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

body.dark-theme .baby-info-card.boy .btn-small {
    background: linear-gradient(135deg, #60a5fa, #6366f1) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}


/* ============================================================
   ПАНЕЛИ — НАЛОЖЕНИЕ (OVERLAY): КОНТЕНТ НЕ СДВИГАЕТСЯ НИКОГДА
   ============================================================ */

/* 1. Базовое состояние панелей */
.top-bar-modes,
#pregnancy-sub-tabbar,
#labor-sub-tabbar,
#baby-sub-tabbar {
    position: sticky;      /* до включения оверлея — как сейчас */
    top: 0;
    transform: translateY(0) translateZ(0);
    opacity: 1;
    visibility: visible;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border: none !important;
    box-shadow: none !important;
    z-index: 900;

    /* только transform и opacity — раскладку не трогаем */
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

#pregnancy-sub-tabbar,
#labor-sub-tabbar,
#baby-sub-tabbar { z-index: 899; }

/* 2. Скрытое состояние — панель уезжает, место НЕ схлопываем */
.bars-hidden .top-bar-modes,
.bars-hidden #pregnancy-sub-tabbar,
.bars-hidden #labor-sub-tabbar,
.bars-hidden #baby-sub-tabbar,
.top-bar-modes.modes-hidden,
#pregnancy-sub-tabbar.modes-hidden,
#labor-sub-tabbar.modes-hidden,
#baby-sub-tabbar.modes-hidden {
    transform: translateY(-100%) translateZ(0);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0s linear 0.35s !important;
}

/* 3. ОВЕРЛЕЙ-РЕЖИМ — включает JS после замеров */
.app.bars-overlay {
    position: relative;
}
.app.bars-overlay .top-bar-modes,
.app.bars-overlay #pregnancy-sub-tabbar,
.app.bars-overlay #labor-sub-tabbar,
.app.bars-overlay #baby-sub-tabbar {
    position: absolute;
    left: 0;
    right: 0;
}
.app.bars-overlay .top-bar-modes {
    top: var(--bars-top, 104px);
}
.app.bars-overlay #pregnancy-sub-tabbar,
.app.bars-overlay #labor-sub-tabbar,
.app.bars-overlay #baby-sub-tabbar {
    top: var(--bar-h-top, 66px);   /* сразу под верхней панелью */
}

/* Контент начинается ПОД панелями — отступ теперь часть скролла */
.app.bars-overlay .mode .screen {
    padding-top: var(--bars-total, 118px);
}
.app.bars-overlay #mode-preconception .screen {
    padding-top: var(--bar-h-top, 66px);  /* у «Подготовки» нет саб-таббара */
}

/* 4. Нижний таббар — без изменений */
.tabbar {
    transform: translateY(0) translateZ(0);
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
}
.bars-hidden .tabbar {
    transform: translateY(100%) translateZ(0);
}

/* 5. Контент */
.mode .screen {
    transform: none !important;
    transition: none !important;
}

/* ============================================================
   ЗАПЛАТКА ДЛЯ ДИСКЛЕЙМЕРА (ВАШ КОД, БЕЗ ИЗМЕНЕНИЙ)
   ============================================================ */
.disclaimer-bar {
    position: relative;
}

.app.bars-hidden .disclaimer-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 5px;
    background: #f8f9fc;
    pointer-events: none;
    z-index: 10;
}

body.dark-theme .app.bars-hidden .disclaimer-bar::after {
    background: #2c2c2e;
}

/* ============================================================
   ПЛАВНОЕ СКРЫТИЕ ВЕРХНИХ ПАНЕЛЕЙ — КОНЕЦ
   ============================================================ */

