/* ============================================================
   TABOBAT6 — PAGES.CSS
   Единый файл стилей для всех страниц сайта
   ============================================================ */

/* ── ОБЩИЕ КОМПОНЕНТЫ ── */
.hero-section {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.badge-online {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #00b894;
    margin-right: 4px;
}

/* ── ГЛАВНАЯ СТРАНИЦА (home.php) ── */
.home-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
}
.home-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.home-hero p { font-size: 1.1rem; opacity: .9; }
.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.doctor-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s;
}
.doctor-card:hover { transform: translateY(-3px); }
.doctor-card img { width: 100%; height: 200px; object-fit: cover; }
.doctor-card .info { padding: 1rem; }
.doctor-card .name { font-weight: 700; font-size: 1rem; }
.doctor-card .spec { font-size: .85rem; color: #666; }

/* ── КОНТЕНТ (ibn-sina, phytotherapy, oncology) ── */
.content-nav {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
}
.content-nav .nav-link {
    color: var(--dark);
    padding: .4rem .75rem;
    border-radius: 8px;
    font-size: .9rem;
}
.content-nav .nav-link:hover,
.content-nav .nav-link.active {
    background: rgba(0,184,148,.1);
    color: var(--primary);
}
.content-body {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
}
.content-body h2 { color: var(--primary); margin: 1.5rem 0 .75rem; }
.content-body h3 { color: var(--dark); margin: 1.25rem 0 .5rem; }
.topic-item {
    padding: .75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    border-left: 3px solid transparent;
}
.topic-item:hover { background: rgba(0,184,148,.08); border-left-color: var(--primary); }
.topic-item.active { background: rgba(0,184,148,.12); border-left-color: var(--primary); font-weight: 600; }

/* ── ТРАВЫ (herbs) ── */
.herb-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s;
    height: 100%;
}
.herb-card:hover { transform: translateY(-3px); }
.herb-card img { width: 100%; height: 180px; object-fit: cover; }
.herb-card .body { padding: 1rem; }
.herb-card .name { font-weight: 700; color: var(--dark); margin-bottom: .25rem; }
.herb-card .latin { font-size: .8rem; color: #888; font-style: italic; }
.herb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .75rem;
    background: rgba(0,184,148,.1);
    color: var(--primary);
    margin: 2px;
}

/* ── РЕЦЕПТЫ (recipes) ── */
.recipes-grid { margin-bottom: 1rem; }
.recipe-card {
    border-radius: 16px;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}
.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.recipe-card__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    min-height: 3rem;
}
.recipe-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
}
.recipe-card__category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}
.recipe-card__verified {
    margin-left: auto;
    font-size: 1rem;
    opacity: 0.95;
}
.recipe-card__title {
    font-weight: 800;
    font-size: 1.02rem;
    line-height: 1.35;
    margin: 0;
    padding: 0 1rem 0.45rem;
}
.recipe-card__title a {
    color: inherit;
    text-decoration: none;
}
.recipe-card__title a:hover { text-decoration: underline; }
.recipe-card__excerpt {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #475569;
    margin: 0;
    padding: 0 1rem 0.5rem;
    flex: 1;
}
.recipe-card__symptoms {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    padding: 0 1rem 0.65rem;
}
.recipe-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.55);
}
.recipe-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
    color: #64748b;
    min-width: 0;
}
.recipe-card__meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recipe-card__btn {
    flex-shrink: 0;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
}
.recipe-card--hue-0 .recipe-card__head { background: linear-gradient(135deg, #bbf7d0, #86efac); color: #14532d; }
.recipe-card--hue-0 .recipe-card__btn { background: #15803d; border-color: #15803d; color: #fff; }
.recipe-card--hue-1 .recipe-card__head { background: linear-gradient(135deg, #bfdbfe, #93c5fd); color: #1e3a8a; }
.recipe-card--hue-1 .recipe-card__btn { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.recipe-card--hue-2 .recipe-card__head { background: linear-gradient(135deg, #fde68a, #fcd34d); color: #78350f; }
.recipe-card--hue-2 .recipe-card__btn { background: #b45309; border-color: #b45309; color: #fff; }
.recipe-card--hue-3 .recipe-card__head { background: linear-gradient(135deg, #fbcfe8, #f9a8d4); color: #831843; }
.recipe-card--hue-3 .recipe-card__btn { background: #be185d; border-color: #be185d; color: #fff; }
.recipe-card--hue-4 .recipe-card__head { background: linear-gradient(135deg, #ddd6fe, #c4b5fd); color: #4c1d95; }
.recipe-card--hue-4 .recipe-card__btn { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.recipe-card--hue-5 .recipe-card__head { background: linear-gradient(135deg, #a5f3fc, #67e8f9); color: #155e75; }
.recipe-card--hue-5 .recipe-card__btn { background: #0e7490; border-color: #0e7490; color: #fff; }

/* ── МАГАЗИН (shop) ── */
.product-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    background: #fff;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-card .body { padding: 1rem; }
.product-card .name { font-weight: 700; font-size: .95rem; margin-bottom: .5rem; }
.product-card .price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.product-card .old-price { font-size: .85rem; color: #999; text-decoration: line-through; }
.cart-badge {
    position: fixed;
    bottom: 20px; right: 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    font-weight: 700;
    z-index: 100;
    cursor: pointer;
}

/* ── ФОРУМ ── */
.forum-topic {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow .15s;
}
.forum-topic:hover { box-shadow: var(--shadow-md); }
.forum-topic .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.forum-topic .title { font-weight: 600; color: var(--dark); margin-bottom: .2rem; }
.forum-topic .meta { font-size: .8rem; color: #888; }
.forum-topic .stats { margin-left: auto; text-align: center; flex-shrink: 0; }
.forum-topic .stats span { display: block; font-size: .75rem; color: #888; }
.forum-topic .stats strong { font-size: 1rem; color: var(--dark); }

/* ── КОНСУЛЬТАЦИИ ── */
.consultation-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.consultation-card.urgent { border-left-color: var(--danger); }
.consultation-card.answered { border-left-color: var(--success); }
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 600;
}
.status-pending  { background: rgba(253,203,110,.2); color: #b8860b; }
.status-answered { background: rgba(0,184,148,.15); color: var(--primary); }
.status-closed   { background: rgba(0,0,0,.06); color: #666; }
.status-urgent   { background: rgba(255,118,117,.15); color: var(--danger); }

/* ── ПРОФИЛЬ ── */
.profile-header {
    background: var(--gradient-primary);
    border-radius: 16px;
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.profile-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.4);
    flex-shrink: 0;
}
.profile-name { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.profile-role { opacity: .85; font-size: .9rem; }
.profile-stats { display: flex; gap: 1.5rem; margin-top: .75rem; }
.profile-stat { text-align: center; }
.profile-stat strong { display: block; font-size: 1.25rem; font-weight: 700; }
.profile-stat span { font-size: .75rem; opacity: .8; }

/* ── ЧАТЫ / СООБЩЕНИЯ ── */
.chat-list-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.chat-list-item:hover { background: rgba(0,184,148,.08); }
.chat-list-item.active { background: rgba(0,184,148,.12); }
.chat-list-item .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.chat-list-item .name { font-weight: 600; font-size: .9rem; }
.chat-list-item .preview { font-size: .8rem; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.chat-list-item .time { margin-left: auto; font-size: .75rem; color: #aaa; flex-shrink: 0; }
.msg-bubble {
    max-width: 70%;
    padding: .6rem 1rem;
    border-radius: 16px;
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: .5rem;
}
.msg-bubble.mine { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; margin-left: auto; }
.msg-bubble.theirs { background: #fff; color: var(--dark); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }

/* ── ОПРОС ПАЦИЕНТА (patient-survey) ── */
.survey-wrap { max-width: 760px; margin: 0 auto; }
.survey-step {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    color: #252525;
}
.survey-step__num {
    display: inline-flex;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    margin-right: 10px;
    flex-shrink: 0;
}
.survey-step__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a3a2a !important;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.symptom-chip, .contra-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    background: #fff;
    color: #333;
}
.symptom-chip:hover { border-color: var(--primary); color: var(--primary); }
.symptom-chip.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.contra-chip:hover { border-color: var(--danger); color: var(--danger); }
.contra-chip.selected { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Давом / жинс: выделение (перебивает body.dark-theme .border { … !important }) */
.survey-wrap label.duration-btn.survey-option-selected,
.survey-wrap label.gender-btn.survey-option-selected {
    background: #198754 !important;
    color: #fff !important;
    border-color: #198754 !important;
    font-weight: 700;
}

.survey-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%);
    border-radius: 20px;
    padding: 36px 28px;
    color: #fff;
    margin-bottom: 28px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(15, 45, 120, 0.22);
}

.result-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%);
    border-radius: 20px;
    padding: 36px 28px;
    color: #fff;
    margin-bottom: 28px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(15, 45, 120, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.result-hero__icon { font-size: 2.5rem; line-height: 1; }
.result-hero__title { font-size: 1.5rem; font-weight: 800; }
.result-hero__complaint { font-size: 0.98rem; opacity: 0.95; margin-top: 8px; }
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28);
}
.submit-btn:hover { opacity: .92; }

.survey-hint { font-size: 13px; color: #666; }
.survey-hint--muted { color: #888; }

/* ── РЕЗУЛЬТАТЫ ОПРОСА ── */
.result-wrap { max-width: 860px; margin: 0 auto; color: #252525; }
.result-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.result-section__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}
.herb-result-card {
    border: 1px solid #e8f5e9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #f9fffe;
}
.plan-block {
    background: #f0faf4;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

/* ── АВТОРИЗАЦИЯ ── */
.auth-card {
    max-width: 480px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.auth-card .title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }
.auth-divider { text-align: center; color: #aaa; margin: 1rem 0; position: relative; }
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #eee;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ── УВЕДОМЛЕНИЯ ── */
.notification-item {
    display: flex;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    margin-bottom: .5rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: background .15s;
}
.notification-item.unread { background: rgba(0,184,148,.06); border-left: 3px solid var(--primary); }
.notification-item .icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }
.notification-item .text { flex: 1; font-size: .9rem; }
.notification-item .time { font-size: .75rem; color: #aaa; flex-shrink: 0; }

/* ── ОНЛАЙН КОНСУЛЬТАЦИЯ ── */
.online-chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.online-chat-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
}
.online-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
}
.online-chat-form {
    padding: .75rem 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: .5rem;
    background: #fff;
}

/* ── ПОИСК ── */
.search-result-item {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid transparent;
    transition: border-color .15s;
}
.search-result-item:hover { border-left-color: var(--primary); }
.search-result-item .type-badge {
    font-size: .7rem;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(0,184,148,.1);
    color: var(--primary);
    margin-bottom: .5rem;
    display: inline-block;
}
.search-result-item .title { font-weight: 600; color: var(--dark); margin-bottom: .25rem; }
.search-result-item .snippet { font-size: .85rem; color: #666; line-height: 1.5; }
.search-result-item mark { background: rgba(0,184,148,.2); color: var(--dark); border-radius: 3px; padding: 0 2px; }

/* ── АДАПТИВ ── */
@media (max-width: 768px) {
    .home-hero h1 { font-size: 1.75rem; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-stats { justify-content: center; }
    .msg-bubble { max-width: 85%; }
    .auth-card { margin: 1rem; padding: 1.5rem; }
    .survey-step { padding: 18px; }
    .online-chat-wrap { height: calc(100vh - 150px); }
}

/* ── ГРУППОВОЙ ЧАТ (chat/index.php) ── */
.chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.chat-participants-panel { background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid #e9ecef; overflow: hidden; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.chat-participants-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #f8fafc; border-bottom: 1px solid #e9ecef; }
.chat-participants-tabs { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid #e9ecef; background: #fff; }
.chat-participants-tab { flex: 1; border: 1px solid #dbe3ee; background: #f8fafc; color: #475569; border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chat-participants-tab.active { background: #00b894; color: #fff; border-color: #00a585; }
.chat-participants-list { overflow-y: auto; padding: 8px; flex: 1; }
.chat-participant-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.chat-participant-item:hover { background: #f8fafc; }
.chat-participant-item.disabled { opacity: .65; cursor: default; }
.chat-participant-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.chat-participant-meta { min-width: 0; flex: 1; }
.chat-participant-name { font-size: 13px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-participant-role { font-size: 11px; color: #64748b; }
.chat-participant-role.doctor { color: #2563eb; }
.chat-participant-role.admin { color: #7c3aed; }
.chat-participant-role.moderator { color: #ea580c; }
.chat-participant-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.15); flex-shrink: 0; }
.chat-participants-empty { color: #94a3b8; min-height: 120px; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 12px; }
.chat-main-panel { min-width: 0; }
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 120px); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: linear-gradient(135deg, #00b894, #00856f); color: #fff; flex-shrink: 0; }
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-avatar { width: 42px; height: 42px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.chat-header-title h4 { margin: 0; font-size: 16px; font-weight: 600; }
.chat-header-title small { font-size: 12px; opacity: 0.85; }
.chat-header-actions { display: flex; gap: 8px; }
.chat-header-actions button { background: rgba(255,255,255,0.15); border: none; border-radius: 8px; color: #fff; width: 36px; height: 36px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.chat-header-actions button:hover { background: rgba(255,255,255,0.25); }
.chat-search-container { display: none; padding: 10px 16px; background: #f8f9fa; border-bottom: 1px solid #e9ecef; flex-shrink: 0; }
.chat-search-container.active { display: block; }
.chat-search-input { width: 100%; padding: 8px 14px; border: 1px solid #dee2e6; border-radius: 20px; font-size: 14px; outline: none; }
.chat-search-input:focus { border-color: #00b894; }
.chat-search-results { margin-top: 8px; max-height: 200px; overflow-y: auto; }
.chat-search-result { padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.chat-search-result:hover { background: #e9ecef; }
.chat-pinned { flex-shrink: 0; }
.chat-pinned-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #fff8e1; border-bottom: 1px solid #ffe082; font-size: 13px; color: #555; }
.chat-pinned-item i { color: #f59e0b; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: #f5f7fa; }
.chat-empty { text-align: center; margin: auto; color: #aaa; }
.chat-empty i { font-size: 48px; margin-bottom: 12px; display: block; }
.chat-date-separator { text-align: center; margin: 12px 0 8px; }
.chat-date-separator span { background: #e2e8f0; color: #64748b; font-size: 12px; padding: 3px 12px; border-radius: 12px; }
.message-wrapper { display: flex; align-items: flex-end; gap: 8px; max-width: 75%; position: relative; }
.message-wrapper.own { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.message-bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: 10px 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); position: relative; max-width: 100%; word-break: break-word; }
.message-wrapper.own .message-bubble { background: linear-gradient(135deg, #00b894, #00856f); color: #fff; border-radius: 16px 16px 4px 16px; }
.message-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.message-author { font-size: 12px; font-weight: 600; color: #00b894; }
.message-author.doctor { color: #0984e3; }
.message-author.admin { color: #6c5ce7; }
.message-author.moderator { color: #e17055; }
.message-header .message-badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; width: auto; height: auto; min-width: 0; font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 500; }
.message-badge.doctor { background: #dbeafe; color: #0984e3; }
.message-badge.admin { background: #ede9fe; color: #6c5ce7; }
.message-text { font-size: 14px; line-height: 1.5; }
.message-wrapper.own .message-text { color: #fff; }
.message-image { max-width: 240px; max-height: 200px; border-radius: 10px; margin-top: 6px; cursor: pointer; display: block; object-fit: cover; }
.message-footer { display: flex; align-items: center; gap: 4px; margin-top: 4px; justify-content: flex-end; }
.message-time { font-size: 11px; color: #94a3b8; }
.message-wrapper.own .message-time { color: rgba(255,255,255,0.7); }
.message-pinned-icon { font-size: 10px; color: #f59e0b; }
.message-reply { background: rgba(0,0,0,0.05); border-left: 3px solid #00b894; border-radius: 6px; padding: 6px 10px; margin-bottom: 6px; cursor: pointer; font-size: 12px; }
.message-wrapper.own .message-reply { background: rgba(255,255,255,0.15); border-left-color: rgba(255,255,255,0.6); }
.message-reply-author { font-weight: 600; margin-bottom: 2px; }
.message-actions { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity 0.15s; display: flex; gap: 4px; align-items: center; }
.message-bubble:hover .message-actions { opacity: 1; }
.message-wrapper.own .message-actions { opacity: 1; }
.message-actions button { background: rgba(0,0,0,0.08); border: none; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 11px; color: #555; display: flex; align-items: center; justify-content: center; }
.message-actions .message-edit-btn { background: rgba(0, 184, 148, 0.15); color: #0f766e; }
.message-wrapper.own .message-actions button { background: rgba(255,255,255,0.2); color: #fff; }
.message-wrapper.own .message-actions .message-edit-btn { background: rgba(255,255,255,0.28); color: #fff; }
.message-edited { font-size: 10px; opacity: 0.75; margin-right: 6px; font-style: italic; }
.message-wrapper.own .message-edited { color: rgba(255,255,255,0.85); }
.message-wrapper.is-editing .message-actions { opacity: 0; pointer-events: none; }
.message-menu { position: fixed; z-index: 9999; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); padding: 6px; min-width: 160px; display: none; }
.message-menu.active { display: block; }
.message-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: #333; text-align: left; }
.message-menu button:hover { background: #f1f5f9; }
.message-menu button.danger { color: #ef4444; }
.message-menu button.danger:hover { background: #fef2f2; }
.message-menu button i { width: 16px; text-align: center; }
.message-edit-wrap { margin-top: 6px; }
.message-edit-input { width: 100%; padding: 8px; border: 1px solid #00b894; border-radius: 8px; font-size: 14px; resize: none; min-height: 60px; font-family: inherit; outline: none; }
.message-edit-actions { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.message-edit-cancel, .message-edit-save { padding: 4px 12px; border-radius: 6px; border: none; cursor: pointer; font-size: 12px; }
.message-edit-cancel { background: #e2e8f0; color: #555; }
.message-edit-save { background: #00b894; color: #fff; }
.chat-input-container { flex-shrink: 0; padding: 12px 16px; background: #fff; border-top: 1px solid #e9ecef; }
.chat-reply-preview { display: none; background: #f0fdf4; border-left: 3px solid #00b894; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; align-items: center; justify-content: space-between; gap: 8px; }
.chat-reply-preview.active { display: flex; }
.chat-reply-preview-author { font-weight: 600; color: #00b894; margin-bottom: 2px; }
.chat-reply-cancel { background: none; border: none; font-size: 18px; cursor: pointer; color: #94a3b8; flex-shrink: 0; }
.chat-input-form { display: flex; align-items: center; gap: 8px; }
.chat-attach-btn { width: 38px; height: 38px; background: #f1f5f9; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #64748b; font-size: 16px; flex-shrink: 0; }
.chat-attach-btn:hover { background: #e2e8f0; }
.chat-input { flex: 1; padding: 10px 16px; border: 1px solid #e2e8f0; border-radius: 24px; font-size: 14px; outline: none; font-family: inherit; }
.chat-input:focus { border-color: #00b894; }
.chat-send-btn { width: 40px; height: 40px; background: linear-gradient(135deg, #00b894, #00856f); border: none; border-radius: 50%; color: #fff; font-size: 16px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.chat-send-btn:hover { opacity: 0.9; }
.chat-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.chat-login-prompt { text-align: center; padding: 16px; background: #f8f9fa; border-top: 1px solid #e9ecef; font-size: 14px; color: #64748b; flex-shrink: 0; }
.chat-login-prompt a { color: #00b894; font-weight: 500; }
.chat-image-preview { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.85); align-items: center; justify-content: center; }
.chat-image-preview.active { display: flex; }
.chat-image-preview img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.chat-image-preview-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 32px; cursor: pointer; }
.chat-history-loader { text-align: center; padding: 8px; font-size: 13px; color: #94a3b8; display: none; }
.chat-history-loader.active { display: block; }
.chat-new-indicator { display: none; position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); background: #00b894; color: #fff; border: none; border-radius: 20px; padding: 6px 16px; font-size: 13px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,184,148,0.4); z-index: 10; }
.chat-new-indicator.active { display: block; }
.archive-modal { display: none; position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.archive-modal.active { display: flex; }
.archive-modal-content { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; box-shadow: 0 16px 48px rgba(0,0,0,0.2); }
.archive-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e9ecef; }
.archive-modal-header h3 { margin: 0; font-size: 18px; }
.archive-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #94a3b8; }
.archive-modal-body { padding: 20px 24px; }
.archive-option { margin-bottom: 14px; }
.archive-radio, .archive-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.archive-date-fields { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.date-field label { font-size: 13px; color: #64748b; margin-bottom: 4px; display: block; }
.date-field input { width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; outline: none; }
.archive-stats { background: #f0fdf4; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.archive-modal-footer { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid #e9ecef; justify-content: flex-end; }
.btn-cancel { padding: 8px 18px; border-radius: 8px; background: #e2e8f0; border: none; cursor: pointer; font-size: 14px; }
.btn-view-archives { padding: 8px 18px; border-radius: 8px; background: #f1f5f9; color: #333; text-decoration: none; font-size: 14px; }
.btn-archive { padding: 8px 18px; border-radius: 8px; background: #00b894; color: #fff; border: none; cursor: pointer; font-size: 14px; }
body.dark-theme .chat-container { background: #1e293b; }
body.dark-theme .chat-messages { background: #0f172a; }
body.dark-theme .message-bubble { background: #1e293b; color: #e2e8f0; box-shadow: none; }
body.dark-theme .chat-input-container { background: #1e293b; border-color: #334155; }
body.dark-theme .chat-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark-theme .chat-participants-panel { background: #1e293b; border-color: #334155; }
body.dark-theme .chat-participants-header { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark-theme .chat-participants-tabs { background: #1e293b; border-color: #334155; }
body.dark-theme .chat-participants-tab { background: #334155; border-color: #475569; color: #cbd5e1; }
body.dark-theme .chat-participants-tab.active { background: #00b894; border-color: #00b894; color: #fff; }
body.dark-theme .chat-participant-item:hover { background: #334155; }
body.dark-theme .chat-participant-name { color: #e2e8f0; }
body.dark-theme .chat-participant-role { color: #94a3b8; }
body.dark-theme .chat-participants-empty { color: #94a3b8; }
body.dark-theme .archive-modal-content { background: #1e293b; color: #e2e8f0; }
body.dark-theme .archive-modal-header,
body.dark-theme .archive-modal-footer { border-color: #334155; }
body.dark-theme .archive-modal-close { color: #cbd5e1; }
body.dark-theme .archive-stats { background: #0f172a; color: #cbd5e1; }
body.dark-theme .date-field label { color: #cbd5e1; }
body.dark-theme .date-field input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark-theme .archive-option small.text-muted { color: #94a3b8 !important; }
body.dark-theme .btn-cancel { background: #334155; color: #e2e8f0; }
body.dark-theme .btn-view-archives { background: #1f2937; color: #e2e8f0; }
body.dark-theme .archive-radio,
body.dark-theme .archive-checkbox { color: #e2e8f0; }
body.dark-theme .chat-date-separator span { background: #334155; color: #94a3b8; }
body.dark-theme .message-menu { background: #1e293b; }
body.dark-theme .message-menu button { color: #e2e8f0; }
body.dark-theme .message-menu button:hover { background: #334155; }
body.dark-theme .chat-header h4,
body.dark-theme .chat-header-title small { color: rgba(255, 255, 255, 0.92); }
body.dark-theme .chat-header-actions button {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: none;
}
body.dark-theme .chat-header-actions button:hover { background: rgba(255, 255, 255, 0.24); }
body.dark-theme .chat-search-container {
    background: #0f172a;
    border-bottom: 1px solid #334155;
}
body.dark-theme .chat-search-input {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}
body.dark-theme .chat-search-result { color: #e2e8f0; }
body.dark-theme .chat-search-result:hover { background: #334155; }
body.dark-theme .chat-pinned-item {
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    border-bottom-color: rgba(251, 191, 36, 0.25);
}
body.dark-theme .chat-empty { color: #94a3b8; }
body.dark-theme .chat-empty h5 { color: #e2e8f0; }
body.dark-theme .message-reply {
    background: rgba(15, 23, 42, 0.45);
    border-left-color: #34d399;
    color: #e2e8f0;
}
body.dark-theme .message-wrapper.own .message-reply {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.55);
    color: rgba(255, 255, 255, 0.95);
}
body.dark-theme .chat-attach-btn {
    background: #334155;
    color: #cbd5e1;
}
body.dark-theme .chat-attach-btn:hover { background: #475569; }
body.dark-theme .chat-login-prompt {
    background: #0f172a;
    border-top-color: #334155;
    color: #94a3b8;
}
body.dark-theme .chat-reply-preview {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: #34d399;
    color: #e2e8f0;
}
body.dark-theme .chat-reply-preview-author { color: #6ee7b7; }
@media (max-width: 768px) {
    .chat-layout { grid-template-columns: 1fr; gap: 10px; }
    .chat-participants-panel { order: 2; max-height: 240px; }
    .chat-main-panel { order: 1; }
    .chat-container { height: calc(100vh - 80px); border-radius: 0; }
    .message-wrapper { max-width: 90%; }
}

/* ── HOME PAGE ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.hero-section { min-height: 450px; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: background-image 1s ease-in-out; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(29, 78, 216, 0.65), rgba(37, 99, 235, 0.5), rgba(14, 116, 144, 0.45)); }
.hero-icon { animation: float 3s ease-in-out infinite; }

/* ── Главная: три яркие карточки после hero ── */
.home-feature-card {
    border: none !important;
    color: #fff;
    overflow: hidden;
    position: relative;
}

.home-feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 42%);
    pointer-events: none;
    z-index: 0;
}

.home-feature-card .card-body {
    position: relative;
    z-index: 1;
}

.home-feature-card--sina {
    background: linear-gradient(145deg, #047857 0%, #10b981 52%, #34d399 100%) !important;
    box-shadow: 0 14px 36px rgba(16, 185, 129, 0.32) !important;
}

.home-feature-card--phyto {
    background: linear-gradient(145deg, #0369a1 0%, #0ea5e9 52%, #38bdf8 100%) !important;
    box-shadow: 0 14px 36px rgba(14, 165, 233, 0.32) !important;
}

.home-feature-card--onco {
    background: linear-gradient(145deg, #c2410c 0%, #f97316 52%, #fbbf24 100%) !important;
    box-shadow: 0 14px 36px rgba(249, 115, 22, 0.32) !important;
}

.home-feature-card--mizaj {
    background: linear-gradient(145deg, #6d28d9 0%, #8b5cf6 52%, #a78bfa 100%) !important;
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.32) !important;
}

.home-feature-card--survey {
    background: linear-gradient(145deg, #0f766e 0%, #14b8a6 52%, #2dd4bf 100%) !important;
    box-shadow: 0 14px 36px rgba(20, 184, 166, 0.32) !important;
}

.home-feature-card--shop {
    background: linear-gradient(145deg, #b45309 0%, #d97706 52%, #fbbf24 100%) !important;
    box-shadow: 0 14px 36px rgba(217, 119, 6, 0.32) !important;
}

.home-feature-card--books {
    background: linear-gradient(145deg, #1d4ed8 0%, #3b82f6 52%, #60a5fa 100%) !important;
    box-shadow: 0 14px 36px rgba(59, 130, 246, 0.32) !important;
}

.home-feature-card .card-title {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.home-feature-card__desc {
    color: rgba(255, 255, 255, 0.94) !important;
    font-size: 0.95rem;
    line-height: 1.55;
}

.home-feature-card .icon-wrapper {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    color: #fff !important;
}

.home-feature-card .icon-wrapper i {
    color: #fff !important;
}

.home-feature-card .home-feature-btn {
    background: #fff !important;
    border: none !important;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-feature-card--sina .home-feature-btn { color: #047857 !important; }
.home-feature-card--phyto .home-feature-btn { color: #0369a1 !important; }
.home-feature-card--onco .home-feature-btn { color: #c2410c !important; }
.home-feature-card--mizaj .home-feature-btn { color: #6d28d9 !important; }
.home-feature-card--survey .home-feature-btn { color: #0f766e !important; }
.home-feature-card--shop .home-feature-btn { color: #b45309 !important; }
.home-feature-card--books .home-feature-btn { color: #1d4ed8 !important; }

.home-feature-card .home-feature-btn:hover {
    background: rgba(255, 255, 255, 0.94) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.home-feature-card.hover-card::before {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.2), transparent);
    height: 3px;
    opacity: 1;
}

.home-feature-card.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2) !important;
}

/* ── Главная: две фиолетовые карточки ниже ── */
.home-secondary-card {
    border: none !important;
    color: #fff;
    overflow: hidden;
    position: relative;
}

.home-secondary-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.home-secondary-card .card-body {
    position: relative;
    z-index: 1;
}

.home-secondary-card--consult {
    background: linear-gradient(145deg, #5b21b6 0%, #7c3aed 52%, #a78bfa 100%) !important;
    box-shadow: 0 14px 36px rgba(124, 58, 237, 0.34) !important;
}

.home-secondary-card--forum {
    background: linear-gradient(145deg, #6d28d9 0%, #8b5cf6 52%, #c4b5fd 100%) !important;
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.34) !important;
}

.home-secondary-card .card-title {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.home-secondary-card__desc {
    color: rgba(255, 255, 255, 0.94) !important;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.home-secondary-card .icon-wrapper-small {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    color: #fff !important;
    flex-shrink: 0;
}

.home-secondary-card .icon-wrapper-small i {
    color: #fff !important;
}

.home-secondary-card .home-secondary-btn {
    background: #fff !important;
    border: none !important;
    color: #5b21b6 !important;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-secondary-card .home-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.94) !important;
    color: #4c1d95 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.home-secondary-card.hover-card::before {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.2), transparent);
    height: 3px;
    opacity: 1;
}

.home-secondary-card.hover-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(91, 33, 182, 0.38) !important;
}

.hover-card { transition: all 0.3s ease; }
.hover-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; }
.icon-wrapper { display: inline-block; padding: 20px; background: rgba(25,135,84,0.1); border-radius: 50%; }
.icon-wrapper-small { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: rgba(25,135,84,0.1); border-radius: 12px; }

/* ── DOCTORS ── */
.certificate-col { background: linear-gradient(135deg, #f8f9fa, #e9ecef); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; min-height: 180px; }
.certificate-link { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 2px solid #dee2e6; transition: all 0.3s; }
.certificate-link:hover { border-color: #28a745; box-shadow: 0 4px 12px rgba(40,167,69,0.3); }
.certificate-img { width: 100%; max-width: 160px; height: 120px; object-fit: cover; display: block; }
.certificate-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
.certificate-link:hover .certificate-overlay { opacity: 1; }
.certificate-overlay i { font-size: 1.5rem; margin-bottom: 5px; }
.certificate-overlay span { font-size: 0.75rem; }
.no-certificate { text-align: center; color: #adb5bd; padding: 20px; }
.no-certificate i { font-size: 3rem; display: block; margin-bottom: 10px; }
.certificate-preview { position: relative; display: block; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; border: 2px solid #28a745; box-shadow: 0 2px 8px rgba(40,167,69,0.2); transition: all 0.3s; }
.certificate-preview:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(40,167,69,0.4); }
.certificate-thumb { width: 100%; height: 100%; object-fit: cover; }
.certificate-zoom { position: absolute; inset: 0; background: rgba(0,0,0,0.5); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; font-size: 1.5rem; }
.certificate-preview:hover .certificate-zoom { opacity: 1; }
#certificateModal .modal-body img { max-height: 80vh; }
@media (max-width: 767px) {
    .certificate-col { min-height: 150px; }
    .certificate-img { max-width: 120px; height: 90px; }
}

/* ── MESSAGES (messages/index.php, messages/conversation.php) ── */
.messages-list { display: flex; flex-direction: column; gap: 2px; }
.message-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; text-decoration: none; color: inherit; transition: background 0.15s; border: 1px solid transparent; }
.message-item:hover { background: rgba(0,184,148,0.06); border-color: rgba(0,184,148,0.15); color: inherit; }
.message-item.unread { background: rgba(0,184,148,0.08); border-color: rgba(0,184,148,0.2); }
.message-item .message-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.message-item .message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { width: 100%; height: 100%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 20px; }
.message-item .message-content { flex: 1; min-width: 0; }
.message-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.message-name { font-weight: 600; font-size: 14px; color: #1e293b; }
.message-time { font-size: 12px; color: #94a3b8; flex-shrink: 0; }
.message-bottom { display: flex; justify-content: space-between; align-items: center; }
.message-snippet { font-size: 13px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.message-item .message-badge { background: #00b894; color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Conversation */
.conv-header { display: flex; align-items: center; gap: 12px; padding: 12px 0 16px; border-bottom: 1px solid #e9ecef; margin-bottom: 0; }
.conv-peer { display: flex; align-items: center; gap: 10px; }
.peer-name { font-weight: 600; font-size: 15px; }
.peer-sub { font-size: 12px; }
.conv-messages { height: calc(100vh - 280px); overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }
.msg-row.theirs { justify-content: flex-start; }
.msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 16px; position: relative; word-break: break-word; }
.msg-row.mine .msg-bubble { background: linear-gradient(135deg, #00b894, #00856f); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg-row.theirs .msg-bubble { background: #fff; color: #1e293b; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.msg-text { font-size: 14px; line-height: 1.5; }
.msg-time { font-size: 11px; opacity: 0.7; text-align: right; margin-top: 4px; }
.msg-action { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,0.2); border: none; border-radius: 4px; width: 22px; height: 22px; cursor: pointer; font-size: 10px; color: #fff; display: none; align-items: center; justify-content: center; }
.msg-bubble:hover .msg-action { display: flex; }
.msg-atts { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.att a { font-size: 13px; color: inherit; text-decoration: underline; }
.att-img .att-thumb { max-width: 200px; max-height: 160px; border-radius: 8px; display: block; }
.att-name { font-size: 12px; margin-top: 4px; }
.att-thumb-link { display: inline-block; }
.msg-edit-wrap { display: flex; flex-direction: column; gap: 6px; }
.msg-edit-input { width: 100%; padding: 8px; border: 1px solid rgba(255,255,255,0.4); border-radius: 8px; background: rgba(255,255,255,0.15); color: #fff; font-size: 14px; resize: none; font-family: inherit; outline: none; }
.msg-row.theirs .msg-edit-input { background: #f8f9fa; color: #1e293b; border-color: #dee2e6; }
.msg-edit-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty-state { text-align: center; padding: 40px 0; }
.conv-compose { padding: 12px 0; border-top: 1px solid #e9ecef; }
.compose-form { display: flex; align-items: flex-end; gap: 8px; }
.compose-form textarea { flex: 1; resize: none; border-radius: 20px; padding: 10px 16px; font-size: 14px; max-height: 160px; overflow-y: auto; }
.compose-form.is-dragover { outline: 2px dashed #00b894; border-radius: 12px; }
body.dark-theme .message-item { color: #e2e8f0; }
body.dark-theme .message-item:hover { background: rgba(0,184,148,0.1); }
body.dark-theme .message-name { color: #f1f5f9; }
body.dark-theme .msg-row.theirs .msg-bubble { background: #1e293b; color: #e2e8f0; }
body.dark-theme .conv-header, body.dark-theme .conv-compose { border-color: #334155; }

/* ── NOTIFICATIONS ── */
.notifications-list { display: flex; flex-direction: column; gap: 8px; }
.notification-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); border-left: 3px solid transparent; transition: background 0.15s; }
.notification-item.unread { background: rgba(0,184,148,0.05); border-left-color: var(--primary); }
.notification-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notification-content { flex: 1; }
.notification-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--dark); }
.notification-message { font-size: 13px; color: #555; margin-bottom: 4px; }
.notification-time { font-size: 12px; }
.notification-actions { flex-shrink: 0; }

body.dark-theme .notification-item {
    background: #1c2128 !important;
    border: 1px solid #30363d;
    color: #e6edf3;
}
body.dark-theme .notification-title { color: #e6edf3 !important; }
body.dark-theme .notification-message { color: #8b949e !important; }
body.dark-theme .notification-time { color: #6e7681 !important; }

.access-referral-promo {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #e2e8f0;
    font-size: 14px;
}
.access-referral-promo strong { color: #f1f5f9; }
.access-referral-promo p { color: #94a3b8; margin-bottom: 0; }
.access-referral-promo__link {
    display: inline-block;
    margin-top: 8px;
    color: #10b981;
    font-weight: 600;
    text-decoration: none;
}
.access-referral-promo__link:hover { color: #34d399; text-decoration: underline; }

/* ── ACCESS PAYMENT (standalone) ── */
.access-page-wrap { position: relative; z-index: 1; width: 100%; max-width: 520px; }
.access-brand { text-align: center; margin-bottom: 32px; }
.access-brand-icon { width: 56px; height: 56px; background: linear-gradient(135deg, #10b981, #059669); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 12px; box-shadow: 0 0 30px rgba(16,185,129,0.3); }
.access-brand-name { font-size: 20px; font-weight: 700; color: #f1f5f9; letter-spacing: -0.3px; }
.access-brand-sub { font-size: 13px; color: #64748b; margin-top: 2px; }
.access-main-card { background: rgba(15,23,42,0.9); border: 1px solid rgba(255,255,255,0.07); border-radius: 24px; padding: 36px; backdrop-filter: blur(20px); box-shadow: 0 25px 60px rgba(0,0,0,0.5); }
.access-card-header { text-align: center; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.access-lock-badge { width: 48px; height: 48px; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: #10b981; margin-bottom: 14px; }
.access-card-title { font-size: 22px; font-weight: 700; color: #f1f5f9; margin-bottom: 6px; }
.access-card-desc { font-size: 14px; color: #64748b; line-height: 1.6; }
.access-amount-block { background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(5,150,105,0.05)); border: 1px solid rgba(16,185,129,0.15); border-radius: 16px; padding: 20px 24px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.access-amount-label { font-size: 13px; color: #64748b; margin-bottom: 4px; }
.access-amount-value { font-size: 28px; font-weight: 800; color: #10b981; letter-spacing: -0.5px; }
.access-amount-currency { font-size: 14px; color: #64748b; font-weight: 400; }
.access-amount-icon { width: 44px; height: 44px; background: rgba(16,185,129,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #10b981; }
.access-section-label { font-size: 12px; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.access-card-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.2s; }
.access-card-item:hover, .access-card-item.selected { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.25); }
.access-card-item-icon { width: 36px; height: 36px; background: rgba(99,102,241,0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #818cf8; flex-shrink: 0; }
.access-card-item-info { flex: 1; }
.access-card-item-label { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.access-card-item-number { font-size: 15px; font-weight: 600; color: #e2e8f0; letter-spacing: 1px; font-family: 'Courier New', monospace; }
.access-card-item-holder { font-size: 12px; color: #475569; margin-top: 1px; }
.access-card-radio { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.15); border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.access-card-item.selected .access-card-radio { border-color: #10b981; background: #10b981; }
.access-card-item.selected .access-card-radio::after { content: ''; width: 6px; height: 6px; background: white; border-radius: 50%; }
.access-status-block { border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.access-status-pending { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #fbbf24; }
.access-status-rejected { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #f87171; }
.access-status-approved { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #34d399; }
.access-form-label { font-size: 13px; font-weight: 500; color: #94a3b8; margin-bottom: 8px; display: block; }
.access-upload-zone { border: 2px dashed rgba(255,255,255,0.1); border-radius: 14px; padding: 28px 20px; text-align: center; cursor: pointer; transition: all 0.3s; position: relative; background: rgba(255,255,255,0.02); }
.access-upload-zone:hover, .access-upload-zone.dragover { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.04); }
.access-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.access-upload-icon { font-size: 28px; color: #334155; margin-bottom: 10px; transition: color 0.3s; }
.access-upload-zone:hover .access-upload-icon { color: #10b981; }
.access-upload-title { font-size: 14px; font-weight: 500; color: #94a3b8; margin-bottom: 4px; }
.access-upload-hint { font-size: 12px; color: #475569; }
.access-upload-preview { display: none; margin-top: 12px; border-radius: 10px; overflow: hidden; max-height: 160px; }
.access-upload-preview img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; }
.access-upload-filename { display: none; margin-top: 10px; font-size: 13px; color: #10b981; font-weight: 500; }
.access-textarea { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px 16px; color: #e2e8f0; font-size: 14px; resize: none; transition: border-color 0.2s; font-family: inherit; }
.access-textarea:focus { outline: none; border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.03); }
.access-textarea::placeholder { color: #334155; }
.access-btn-submit { width: 100%; padding: 15px; background: linear-gradient(135deg, #10b981, #059669); border: none; border-radius: 14px; color: white; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 20px rgba(16,185,129,0.25); margin-bottom: 12px; }
.access-btn-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(16,185,129,0.35); }
.access-btn-logout { width: 100%; padding: 12px; background: transparent; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; color: #475569; font-size: 14px; cursor: pointer; transition: all 0.2s; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; }
.access-btn-logout:hover { border-color: rgba(239,68,68,0.3); color: #f87171; background: rgba(239,68,68,0.05); }
.access-steps { display: flex; gap: 8px; margin-bottom: 28px; }
.access-step { flex: 1; text-align: center; }
.access-step-num { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.access-step.done .access-step-num { background: #10b981; color: white; }
.access-step.active .access-step-num { background: rgba(16,185,129,0.15); border: 2px solid #10b981; color: #10b981; }
.access-step.pending .access-step-num { background: rgba(255,255,255,0.05); color: #334155; }
.access-step-line { height: 1px; background: rgba(255,255,255,0.06); flex: 1; margin-top: 14px; }
.access-step-label { font-size: 11px; color: #475569; }
.access-step.active .access-step-label { color: #94a3b8; }
.access-flash-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; color: #34d399; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.access-flash-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; color: #f87171; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.access-flash-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; color: #93c5fd; font-size: 14px; display: flex; align-items: center; gap: 10px; }

.receipt-pay-page { margin: 0 !important; padding: 20px !important; background: #0a0a0f !important; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.receipt-pay-page::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse 80% 50% at 20% 20%, rgba(16,185,129,0.08) 0%, transparent 60%), radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99,102,241,0.06) 0%, transparent 60%); pointer-events: none; z-index: 0; }
.receipt-pay-page--blue::before { background: radial-gradient(ellipse 80% 50% at 20% 20%, rgba(59,130,246,0.1) 0%, transparent 60%), radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99,102,241,0.06) 0%, transparent 60%); }
.receipt-pay-page--blue .access-brand-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 0 30px rgba(59,130,246,0.3); }
.receipt-pay-page--blue .access-lock-badge { color: #60a5fa; background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); }
.receipt-pay-page--blue .access-amount-block { background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(37,99,235,0.05)); border-color: rgba(59,130,246,0.15); }
.receipt-pay-page--blue .access-amount-value, .receipt-pay-page--blue .access-amount-icon { color: #60a5fa; }
.receipt-pay-page--blue .access-btn-submit { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 20px rgba(59,130,246,0.25); }
.receipt-pay-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.receipt-pay-step { flex: 1; text-align: center; font-size: 11px; color: #64748b; }
.receipt-pay-step__num { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(16,185,129,0.15); color: #10b981; font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.receipt-pay-step__text { display: block; line-height: 1.3; }
.receipt-pay-amount-hint { font-size: 11px; color: #64748b; margin-top: 4px; }
.receipt-copy-btn { flex-shrink: 0; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); border-radius: 8px; color: #94a3b8; cursor: pointer; transition: all 0.2s; }
.receipt-copy-btn:hover { border-color: rgba(16,185,129,0.4); color: #10b981; background: rgba(16,185,129,0.08); }
.access-upload-zone.is-filled { border-style: solid; border-color: rgba(16,185,129,0.35); }
.access-status-time { margin-left: auto; font-size: 11px; opacity: 0.75; }

/* ── МИЗОЖНИ АНИҚЛАШ (mizaj) ── */
.mizaj-wrap { max-width: 920px; margin: 0 auto 2rem; }
.mizaj-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%);
    border-radius: 20px;
    padding: 34px 24px;
    color: #fff;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(15, 45, 120, 0.22);
}
.mizaj-hero__icon { font-size: 2.4rem; margin-bottom: 10px; opacity: 0.95; }
.mizaj-hero__title { font-size: 1.75rem; font-weight: 800; margin-bottom: 10px; color: #fff !important; }
.mizaj-hero__text { margin: 0; opacity: 0.94; line-height: 1.55; }
.mizaj-card {
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}
.mizaj-card--howto {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 55%, #a7f3d0 100%);
    border-color: rgba(16, 185, 129, 0.28);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.12);
}
.mizaj-card--howto .mizaj-section-title { color: #065f46 !important; }
.mizaj-card--howto .mizaj-steps { color: #064e3b; }

.mizaj-card--methods {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 55%, #fde68a 100%);
    border-color: rgba(245, 158, 11, 0.32);
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.12);
}
.mizaj-card--methods .mizaj-section-title { color: #92400e !important; }
.mizaj-card--methods .mizaj-muted { color: #78350f; }
.mizaj-card--methods .mizaj-table th {
    background: rgba(245, 158, 11, 0.18);
    color: #78350f;
}
.mizaj-card--methods .mizaj-table td { color: #451a03; }
.mizaj-card--methods code {
    background: rgba(255, 255, 255, 0.55);
    color: #92400e;
}

.mizaj-card--form {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 55%, #ddd6fe 100%);
    border-color: rgba(139, 92, 246, 0.28);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.12);
}
.mizaj-card--form .form-label { color: #5b21b6; font-weight: 600; }
.mizaj-card--form .form-control,
.mizaj-card--form .form-select {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(139, 92, 246, 0.22);
}
.mizaj-card--form .mizaj-kb-hint { color: #6d28d9; }

.mizaj-card--result {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: rgba(100, 116, 139, 0.2);
    padding: 16px;
}
.mizaj-card--actions {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.1);
}
.mizaj-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mizaj-result-panel {
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.mizaj-result-panel:last-child { margin-bottom: 0; }
.mizaj-result-panel--innate {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border-color: rgba(249, 115, 22, 0.28);
}
.mizaj-result-panel--innate .mizaj-result-title { color: #9a3412 !important; }
.mizaj-result-panel--innate .mizaj-table th { background: rgba(249, 115, 22, 0.14); }

.mizaj-result-panel--natural {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.28);
}
.mizaj-result-panel--natural .mizaj-result-title { color: #1e40af !important; }
.mizaj-result-panel--natural .mizaj-table th { background: rgba(59, 130, 246, 0.14); }

.mizaj-result-panel--acquired {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(34, 197, 94, 0.28);
}
.mizaj-result-panel--acquired .mizaj-result-title { color: #166534 !important; }
.mizaj-result-panel--acquired .mizaj-table th { background: rgba(34, 197, 94, 0.14); }

.mizaj-result-panel--damaged {
    background: linear-gradient(145deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: rgba(168, 85, 247, 0.28);
}
.mizaj-result-panel--damaged .mizaj-result-title { color: #6b21a8 !important; }

.mizaj-result-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.mizaj-result-panel .mizaj-muted { color: #475569; }
.mizaj-result-panel code,
.mizaj-card--result code {
    background: rgba(255, 255, 255, 0.65);
    padding: 2px 6px;
    border-radius: 6px;
}

.mizaj-section-title { font-size: 1.15rem; font-weight: 700; color: #172554 !important; margin-bottom: 14px; }
.mizaj-steps { padding-left: 1.2rem; line-height: 1.7; color: #334155; }
.mizaj-muted { color: #64748b; font-size: 0.92rem; }
.mizaj-table th { background: rgba(37, 99, 235, 0.08); font-size: 0.88rem; }
.mizaj-table td, .mizaj-table th { vertical-align: top; }
.mizaj-name-input { font-size: 1.05rem; min-height: 72px; direction: ltr; }
.mizaj-submit-btn { border-radius: 999px; padding: 0.55rem 1.4rem; font-weight: 700; }
.mizaj-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}
.mizaj-submit,
.mizaj-reset {
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 700;
}
.mizaj-kb-hint { font-size: 0.88rem; color: #64748b; margin: 14px 0 8px; }
.mizaj-kb-letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.mizaj-kb-key {
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.mizaj-kb-key:hover { background: rgba(37, 99, 235, 0.16); }
.mizaj-result-block {
    border-top: 1px dashed rgba(59, 130, 246, 0.25);
    padding-top: 18px;
    margin-top: 18px;
}
.mizaj-result-block:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.mizaj-result-heading { font-size: 1.15rem; font-weight: 700; color: #1e3a8a !important; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mizaj-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 600;
}
.mizaj-code { background: rgba(15, 23, 42, 0.06); padding: 2px 6px; border-radius: 6px; }
.mizaj-abjad-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.mizaj-abjad-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px; padding: 2px 8px; font-size: 0.85rem;
}
.mizaj-abjad-char { direction: rtl; unicode-bidi: isolate; font-size: 1rem; }
.mizaj-arabic-text {
    direction: rtl;
    unicode-bidi: isolate;
    display: inline-block;
    text-align: right;
    font-size: 1.1rem;
    line-height: 1.6;
}
.mizaj-accordion-toggle { color: inherit !important; font-weight: 700; }
.mizaj-accordion-toggle .fa-chevron-down { transition: transform 0.2s; }
.mizaj-accordion-toggle:not(.collapsed) .fa-chevron-down { transform: rotate(180deg); }
.mizaj-print-summary {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.95rem;
}
.mizaj-result-block--innate .mizaj-badge { background: rgba(16, 185, 129, 0.15); color: #047857; }
.mizaj-result-block--acquired .mizaj-badge { background: rgba(14, 165, 233, 0.15); color: #0369a1; }
.mizaj-result-block--damaged .mizaj-badge { background: rgba(249, 115, 22, 0.15); color: #c2410c; }
@media print {
    .navbar, .site-footer, .mizaj-form-card, .mizaj-kb-letters, .btn { display: none !important; }
    .mizaj-card { box-shadow: none; border: 1px solid #ddd; }
}

/* --- Видеодарслар (Тиб қонунлари) --- */
.footer-videodars-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    color: #fff !important;
    background: linear-gradient(120deg, #15803d, #22c55e, #86efac, #15803d);
    background-size: 280% 280%;
    animation: footerVideodarsGradient 4s ease infinite, footerVideodarsPulse 2.2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    overflow: hidden;
    vertical-align: middle;
}
.footer-videodars-btn__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.45) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: footerVideodarsShine 3.5s ease-in-out infinite;
}
.footer-videodars-btn__text {
    position: relative;
    z-index: 1;
    animation: footerVideodarsTextGlow 2.2s ease-in-out infinite;
}
.footer-videodars-btn:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.45);
}
.site-footer__meta .site-footer__dot {
    opacity: 0.55;
    user-select: none;
}
.footer-aloqa-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none !important;
    color: #fff !important;
    background: linear-gradient(120deg, #1d4ed8, #3b82f6);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.footer-aloqa-btn:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.45);
}
.contact-page__hero {
    padding: 0.25rem 0 0.5rem;
}
.contact-cards-grid .contact-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-cards-grid .contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.contact-cards-grid .contact-card .card-body {
    padding: 1.15rem 1.2rem;
    color: #fff;
}
.contact-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.65rem;
    background: rgba(255, 255, 255, 0.25);
}
.contact-card__title {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}
.contact-card__link {
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}
.contact-card__link:hover {
    color: #fff;
    text-decoration: underline;
}
.contact-card--phone { background: linear-gradient(145deg, #059669, #10b981); }
.contact-card--email { background: linear-gradient(145deg, #2563eb, #3b82f6); }
.contact-card--address { background: linear-gradient(145deg, #d97706, #f59e0b); }
.contact-card--hours { background: linear-gradient(145deg, #7c3aed, #8b5cf6); }
.contact-card--social { background: linear-gradient(145deg, #0d9488, #14b8a6); }
.contact-card--phone .contact-card__icon,
.contact-card--email .contact-card__icon,
.contact-card--address .contact-card__icon,
.contact-card--hours .contact-card__icon,
.contact-card--social .contact-card__icon { color: #fff; }
.contact-cards-grid .contact-card p,
.contact-cards-grid .contact-card .text-muted {
    color: rgba(255, 255, 255, 0.92) !important;
}
.contact-cards-grid .contact-card .btn-outline-success {
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}
.contact-cards-grid .contact-card .btn-outline-success:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.contact-cards-grid .contact-social .btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}
.contact-cards-grid .contact-social .btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}
.contact-page__note {
    border-radius: 12px;
}

/* ── Табиблар — компактная сетка ── */
.doctors-list-summary .badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
}
.doctor-card-compact {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.doctor-card-compact--hue-0 {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: rgba(21, 128, 61, 0.12);
}
.doctor-card-compact--hue-1 {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(29, 78, 216, 0.12);
}
.doctor-card-compact--hue-2 {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(180, 83, 9, 0.12);
}
.doctor-card-compact--hue-3 {
    background: linear-gradient(145deg, #fdf2f8 0%, #fce7f3 100%);
    border-color: rgba(190, 24, 93, 0.12);
}
.doctor-card-compact--hue-4 {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(109, 40, 217, 0.12);
}
.doctor-card-compact--hue-5 {
    background: linear-gradient(145deg, #f0fdfa 0%, #ccfbf1 100%);
    border-color: rgba(15, 118, 110, 0.12);
}
.doctor-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.doctor-card-compact__header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.doctor-card-compact__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}
.doctor-card-compact__avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
}
.doctor-card-compact__identity {
    flex: 1;
    min-width: 0;
}
.doctor-card-compact__name {
    font-size: 0.98rem;
    font-weight: 800;
    margin: 0 0 0.15rem;
    line-height: 1.3;
}
.doctor-card-compact__spec {
    font-size: 0.8rem;
    color: #198754;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}
.doctor-card-compact__badge {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.doctor-card-compact__badge--ok {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}
.doctor-card-compact__badge--wait {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}
.doctor-card-compact__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.doctor-card-compact__tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: #475569;
    font-weight: 600;
}
.doctor-card-compact__tag--exp {
    background: rgba(255, 255, 255, 0.65);
    color: #15803d;
}
.doctor-card-compact__tag--online {
    background: rgba(255, 255, 255, 0.65);
    color: #1d4ed8;
}
.doctor-card-compact__cert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.65);
    text-decoration: none;
    color: #475569;
    font-size: 0.78rem;
    transition: border-color 0.15s;
}
.doctor-card-compact__cert:hover {
    border-color: #22c55e;
    color: #15803d;
}
.doctor-card-compact__cert-img {
    width: 44px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.doctor-card-compact__cert-label {
    font-weight: 600;
}
.doctor-card-compact__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.15rem;
}
.doctor-card-compact__actions .btn {
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
}
.doctor-card-skeleton.skeleton {
    min-height: 180px;
    border-radius: 14px;
}
body.dark-theme .recipe-card {
    background: #1c2128;
    border-color: #30363d;
}
body.dark-theme .recipe-card__excerpt,
body.dark-theme .recipe-card__symptoms,
body.dark-theme .recipe-card__meta {
    color: #8b949e;
}
body.dark-theme .recipe-card__foot {
    background: rgba(0, 0, 0, 0.2);
    border-color: #30363d;
}
body.dark-theme .doctor-card-compact,
body.dark-theme .doctor-card-compact--hue-0,
body.dark-theme .doctor-card-compact--hue-1,
body.dark-theme .doctor-card-compact--hue-2,
body.dark-theme .doctor-card-compact--hue-3,
body.dark-theme .doctor-card-compact--hue-4,
body.dark-theme .doctor-card-compact--hue-5 {
    background: #1c2128;
    border-color: #30363d;
}
body.dark-theme .doctor-card-compact__name { color: #e6edf3; }
body.dark-theme .doctor-card-compact__tag {
    background: #21262d;
    color: #8b949e;
}
body.dark-theme .doctor-card-compact__cert {
    background: #21262d;
    border-color: #30363d;
    color: #8b949e;
}
@keyframes footerVideodarsGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes footerVideodarsPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
    50% { box-shadow: 0 0 14px 3px rgba(34, 197, 94, 0.55); }
}
@keyframes footerVideodarsShine {
    0%, 55%, 100% { transform: translateX(-120%); }
    70% { transform: translateX(120%); }
}
@keyframes footerVideodarsTextGlow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 10px rgba(255,255,255,0.85); }
}
.videodarslar-hero__icon {
    font-size: 3rem;
    color: var(--bs-primary, #15803d);
}
.videodarslar-hero__title {
    font-weight: 800;
}
.videodarslar-hero__subtitle {
    font-size: 1.15rem;
    color: var(--bs-primary, #15803d);
    font-weight: 600;
}
.videodarslar-hero__lead { max-width: 640px; }
.videodars-card {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.videodars-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}
.videodars-card__media { position: relative; }
.videodars-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.videodars-card__placeholder {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #15803d;
    font-size: 2.5rem;
}
.videodars-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.videodars-card:hover .videodars-card__play { opacity: 1; }
.videodars-card__body { padding: 1rem 1.1rem 1.15rem; }
.videodars-card__title a { color: inherit; }
.videodars-player__wrap {
    background: #000;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}
.videodars-player__video {
    width: 100%;
    display: block;
    max-height: 70vh;
    background: #000;
}
.videodars-sidebar {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.videodars-sidebar__link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: inherit;
}
.videodars-sidebar__item:last-child .videodars-sidebar__link { border-bottom: 0; }
.videodars-sidebar__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(21, 128, 61, 0.12);
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}
body.dark-theme .videodars-card,
body.dark-theme .videodars-player.card,
body.dark-theme .videodars-sidebar {
    background: #1e293b;
    color: #e2e8f0;
}

/* ── PWA: offline bar, update banner ── */
.pwa-offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10050;
    padding: 8px 14px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    background: #fde68a;
    border-bottom: 1px solid #f59e0b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.pwa-update-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10050;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #1f6412;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(31, 100, 18, 0.35);
}

.pwa-update-banner .btn-light {
    font-weight: 700;
    color: #1f6412;
}

body.pwa-is-offline {
    padding-top: 36px;
}

body.pwa-installed .navbar-brand::after {
    content: none;
}

body.dark-theme .pwa-offline-bar {
    background: #854d0e;
    color: #fef3c7;
    border-bottom-color: #b45309;
}
body.dark-theme .videodars-card__title a,
body.dark-theme .videodars-sidebar__link { color: #e2e8f0; }
body.dark-theme .footer-videodars-btn { color: #fff !important; }
