/* ══════════════════════════════════════════════════════════════════
   Main Screen — Modern Menu Components
   (relies on :root variables from styles.css)
   ══════════════════════════════════════════════════════════════════ */

/* ── Glass card primitive ── */
.glass-card {
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.25s, background 0.25s;
}
.glass-card:hover { border-color: var(--border-strong); }

/* ── Profile Carousel (свайп-карта профиля в стилистике glass-card) ── */
.profile-carousel-wrap {
    margin-bottom: 4px;
    animation: slideDown 0.35s ease-out;
}
.profile-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* отрицательный margin + padding позволяет соседним карточкам слегка
       выглядывать по краям, но не выезжать за пределы экрана */
    margin: 0 -2px;
    padding: 2px 2px 2px;
    cursor: grab;
    user-select: none;
    touch-action: pan-x;
}
.profile-carousel::-webkit-scrollbar { display: none; }
.profile-carousel.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}
.profile-carousel.is-dragging.has-drag-moved .profile-card {
    pointer-events: none;
}

.profile-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    transition: border-color 0.25s, background 0.25s, transform 0.15s;
    min-height: 72px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    contain: layout paint;
}
.profile-carousel.is-dragging .profile-card { cursor: grabbing; }
.profile-card.is-active {
    border-color: var(--border-accent);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.06));
}
.profile-card__avatar {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    text-transform: uppercase;
    line-height: 1;
}
.profile-card__main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.profile-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-card__meta {
    font-size: 12px;
    color: var(--muted);
    max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-card__menu {
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 22px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    font-family: inherit;
}
.profile-card__menu:hover  { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.profile-card__menu:active { transform: scale(0.9); }

/* «Добавить профиль» — последняя карточка-плейсхолдер */
.profile-card--add {
    cursor: pointer;
    border-style: dashed;
    justify-content: center;
    color: var(--muted);
    text-align: center;
}
.profile-card--add:hover { color: var(--text); border-color: var(--border-strong); }
.profile-card--add:active { transform: scale(0.99); }
.profile-card__plus {
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}
.profile-card__add-label {
    font-size: 14px;
    font-weight: 600;
}

/* Точки-индикаторы под карусель */
.profile-dots {
    display: flex; gap: 6px;
    justify-content: center;
    margin-top: 8px;
    min-height: 6px;
}
.profile-dot {
    width: 6px; height: 6px;
    border-radius: 999px;
    background: var(--border-strong);
    transition: width 0.2s, background 0.2s;
}
.profile-dot.is-active {
    width: 18px;
    background: var(--accent);
}

/* Auth-кнопка под каруселью — видна только когда current профиль не привязан к hh.ru */
.profile-auth-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 13px 16px;
    margin-top: 10px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(245, 87, 108, 0.45);
    background: rgba(245, 87, 108, 0.08);
    color: #f5576c;
    font-size: 14px; font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.1s, color 0.18s;
}
.profile-auth-btn:hover  { background: rgba(245, 87, 108, 0.16); border-color: rgba(245, 87, 108, 0.7); color: #ff7a8d; }
.profile-auth-btn:active { transform: scale(0.99); }
.profile-auth-btn__icon  { font-size: 18px; line-height: 1; flex-shrink: 0; }
.profile-auth-btn__label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-auth-btn__arrow { font-size: 18px; color: inherit; opacity: 0.7; flex-shrink: 0; transition: transform 0.18s; }
.profile-auth-btn:hover .profile-auth-btn__arrow { transform: translateX(3px); opacity: 1; }

/* legacy strip / chip / selector — оставлены no-op на случай отката */
.profile-strip,
.profile-chip,
.profile-chip--icon-only,
.profile-chip__check,
.profile-chip__name,
.profile-selector-card,
.profile-selector-content,
.profile-selector-left,
.profile-icon,
.profile-selector-info,
.profile-selector-label,
.profile-current-name,
.profile-selector-chevron { /* no-op */ }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Profiles list in sheet modal ─────────────────────────────── */
.profiles-list {
    display: flex; flex-direction: column; gap: 6px;
}
.profile-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.profile-item:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-strong); }
.profile-item.is-active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.10), rgba(118, 75, 162, 0.06));
}
.profile-item__name {
    flex: 1; min-width: 0;
    font-size: 15px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-item__check {
    color: var(--accent); font-size: 18px; font-weight: 700;
    flex-shrink: 0;
}
.profile-item__menu {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 22px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    font-family: inherit;
}
.profile-item__menu:hover  { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.profile-item__menu:active { transform: scale(0.9); }

/* ── Action row (в action-sheet модалке) ── */
.action-row {
    width: 100%;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 15px; font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    text-align: left;
}
.action-row:hover  { background: rgba(255, 255, 255, 0.06); border-color: var(--border-strong); }
.action-row:active { transform: scale(0.99); }
.action-row__icon  { font-size: 20px; line-height: 1; flex-shrink: 0; }
.action-row__label { flex: 1; }
.action-row--danger {
    color: #f5576c;
    border-color: rgba(245, 87, 108, 0.25);
    background: rgba(245, 87, 108, 0.06);
}
.action-row--danger:hover { background: rgba(245, 87, 108, 0.12); border-color: rgba(245, 87, 108, 0.4); }


.btn-add-profile {
    /* legacy — кнопка удалена из шаблона, стиль оставлен на случай обратной совместимости */
    display: none;
}
.btn-delete-profile { display: none; }

/* ── Status Banner ── */
.status-banner {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    overflow: hidden;
    animation: slideDown 0.4s ease-out 0.05s both;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    background: var(--card);
}
.status-banner-bg {
    position: absolute; inset: 0;
    background: var(--gradient-primary);
    opacity: 0.08;
}
.status-banner-content {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.status-banner-left {
    display: flex; align-items: center; gap: 12px;
    flex: 1; min-width: 0;
}
.status-avatar {
    position: relative;
    width: 48px; height: 48px;
    flex-shrink: 0;
}
.status-avatar-inner {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 16px;
    position: relative; z-index: 2;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}
.status-pulse {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: pulse 2.2s ease-out infinite;
    z-index: 1;
}
@keyframes pulse {
    0%   { transform: scale(1);   opacity: 0.5; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

.status-info { flex: 1; min-width: 0; }
.status-title {
    font-size: 15px; font-weight: 600;
    color: var(--text); margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-subtitle {
    font-size: 13px; color: var(--muted);
}

.status-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(105, 240, 174, 0.12);
    border: 1px solid rgba(105, 240, 174, 0.25);
    font-size: 12px; font-weight: 600;
    color: var(--success);
    flex-shrink: 0;
}
.status-badge .status-dot {
    width: 6px; height: 6px;
    background: var(--success);
    animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ── Auto Apply Card ── */
.auto-apply-card {
    position: relative;
    padding: 16px;
    display: flex; align-items: center; gap: 14px;
    animation: slideDown 0.4s ease-out 0.1s both;
    transition: border-color 0.25s, background 0.25s;
    overflow: visible;
}
.auto-apply-card.active {
    border-color: var(--border-accent);
    background: rgba(102, 126, 234, 0.07);
}
.auto-apply-icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 26px; line-height: 1;
}
.auto-apply-card.active .auto-apply-icon-wrapper {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--border-accent);
}
.auto-apply-icon  { display: none; }
.auto-apply-info  { flex: 1; min-width: 0; }
.auto-apply-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.auto-apply-status {
    font-size: 13px; color: var(--muted);
    transition: color 0.2s;
}
.auto-apply-card.active .auto-apply-status { color: var(--success); }

/* ── Modern Toggle ── */
.modern-toggle {
    position: relative;
    display: inline-block;
    width: 52px; height: 30px;
    cursor: pointer;
    flex-shrink: 0;
}
.modern-toggle input { display: none; }
.modern-toggle-slider {
    position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: background 0.25s, border-color 0.25s;
}
.modern-toggle-thumb {
    position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.modern-toggle input:checked + .modern-toggle-slider {
    background: var(--gradient-primary);
    border-color: transparent;
}
.modern-toggle input:checked + .modern-toggle-slider .modern-toggle-thumb {
    transform: translateX(22px);
}

/* ── Quick Actions ── */
.quick-actions-section { margin-top: 4px; }

.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding: 0 2px;
}
.section-title {
    font-size: 17px; font-weight: 700;
    color: var(--text);
    margin: 0; letter-spacing: -0.1px;
}
.section-badge {
    background: var(--gradient-primary);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.quick-actions-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}

.action-card {
    position: relative;
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 14px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out both;
    font-family: inherit;
}
.action-card--disabled,
.action-card:disabled {
    opacity: 0.74;
    cursor: not-allowed;
}
.action-card-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.14);
    color: #946200;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.action-card:nth-child(1) { animation-delay: 0.15s; }
.action-card:nth-child(2) { animation-delay: 0.2s;  }
.action-card:nth-child(3) { animation-delay: 0.25s; }
.action-card:nth-child(4) { animation-delay: 0.3s;  }
.action-card:nth-child(5) { animation-delay: 0.35s; }
.action-card:nth-child(6) { animation-delay: 0.4s;  }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.action-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    background: var(--card-hover);
}
.action-card:active { transform: translateY(-1px) scale(0.98); }

.action-card-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    transition: transform 0.25s, background 0.25s, border-color 0.25s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.action-card:hover .action-card-icon {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-strong);
}

/* Legacy gradient variants — no longer used with emoji, kept for compat */
.action-card-icon.filters,
.action-card-icon.resume,
.action-card-icon.stats,
.action-card-icon.settings { /* inherit base */ }

@media (hover: none), (pointer: coarse) {
    .action-card {
        touch-action: manipulation;
    }

    .action-card:hover {
        transform: none;
        border-color: var(--border);
        background: var(--card);
        box-shadow: none;
    }

    .action-card:hover .action-card-icon {
        transform: none;
        background: rgba(255, 255, 255, 0.04);
        border-color: var(--border);
    }

    .action-card--accent:hover {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.18));
        border-color: var(--border-accent);
    }
}

.action-card-label {
    max-width: 100%;
    font-size: 14px; font-weight: 600;
    color: var(--text);
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Removed the noisy .action-card-shine; visual noise > value */
.action-card-shine { display: none; }

/* ── Primary Action Button ── */
.primary-action-btn {
    position: relative;
    width: 100%;
    padding: 17px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px; font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.4s ease-out 0.35s both;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-accent);
    font-family: inherit;
}
.primary-action-bg    { display: none; }
.primary-action-shine { display: none; }

.primary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(102, 126, 234, 0.45);
}
.primary-action-btn:active { transform: translateY(0); }

.primary-action-btn:disabled,
.primary-action-btn.is-locked {
    cursor: default;
    background: rgba(102, 126, 234, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.24);
    color: #c5caff;
    box-shadow: none;
    opacity: 1;
}
.primary-action-btn:disabled:hover,
.primary-action-btn.is-locked:hover {
    transform: none;
    box-shadow: none;
}

.primary-action-btn.is-busy {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.82), rgba(118, 75, 162, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.22);
}

.primary-action-btn.is-locked::after,
.primary-action-btn.is-busy::after {
    display: none;
}

#raise-resume-btn:disabled,
#raise-resume-btn.is-locked {
    background: rgba(102, 126, 234, 0.12) !important;
    border: 1px solid rgba(102, 126, 234, 0.24) !important;
    color: #c5caff !important;
    box-shadow: none !important;
}

#raise-resume-btn:disabled:hover,
#raise-resume-btn.is-locked:hover {
    transform: none !important;
    box-shadow: none !important;
}

.primary-action-icon, .primary-action-text {
    position: relative; z-index: 2;
}
.primary-action-icon { font-size: 19px; }

/* ── Secondary Actions ── */
.secondary-actions {
    display: flex; flex-direction: column; gap: 8px;
    animation: fadeInUp 0.4s ease-out 0.4s both;
}

.secondary-action-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px;
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    font-family: inherit;
    text-align: left;
    color: var(--text);
}
.secondary-action-btn:hover {
    background: var(--card-hover);
    border-color: var(--border-strong);
    transform: translateX(3px);
}

.secondary-action-icon {
    font-size: 22px;
    line-height: 1;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.secondary-action-text {
    flex: 1;
    font-size: 15px; font-weight: 600;
    color: var(--text);
}

.secondary-action-arrow {
    color: var(--muted);
    flex-shrink: 0;
    font-size: 18px; line-height: 1;
    display: inline-flex; align-items: center;
    transition: transform 0.25s, color 0.25s;
}
.secondary-action-btn:hover .secondary-action-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════
   AI-ассистент screen — dashboard
   ══════════════════════════════════════════════════════════════════ */

/* ── Status pill ── */
.ai-status-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    animation: fadeInUp 0.3s ease-out both;
}
.ai-status-pill-left {
    display: flex; align-items: center; gap: 12px;
    flex: 1; min-width: 0;
}
.ai-status-pill-text { min-width: 0; }
.ai-status-pill-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin-bottom: 1px;
}
.ai-status-pill-sub {
    font-size: 12px; color: var(--muted);
    line-height: 1.3;
}
.ai-status-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.ai-status-pill--ok {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.09), rgba(56, 249, 215, 0.05));
    border-color: rgba(67, 233, 123, 0.3);
}
.ai-status-pill--ok .ai-status-dot {
    background: #43e97b;
    box-shadow: 0 0 0 4px rgba(67, 233, 123, 0.2);
}
.ai-status-pill--warn {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.09), rgba(255, 184, 77, 0.05));
    border-color: rgba(245, 166, 35, 0.3);
}
.ai-status-pill--warn .ai-status-dot {
    background: #f5a623;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.2);
}
.ai-status-pill--down {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.14), rgba(255, 71, 87, 0.06));
    border-color: rgba(255, 71, 87, 0.38);
}
.ai-status-pill--down .ai-status-dot {
    background: #ff4757;
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.18);
}

/* ── Feature card ── */
.ai-feature {
    position: relative;
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 14px 12px;
    animation: fadeInUp 0.3s ease-out both;
}
.ai-feature-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ai-feature-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.ai-feature-meta { flex: 1; min-width: 0; }
.ai-feature-title {
    font-size: 15px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.ai-feature-desc {
    font-size: 12.5px; color: var(--muted);
    line-height: 1.4;
}

.ai-badge-dev {
    display: inline-block;
    font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.14);
    color: #f5a623;
    border: 1px solid rgba(245, 166, 35, 0.3);
    line-height: 1.3;
}

.ai-feature-preview {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(102, 126, 234, 0.07);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px; font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
    width: 100%;
}
.ai-feature-preview:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.35);
}
.ai-feature-preview-arrow {
    font-size: 15px;
    transition: transform 0.2s;
}
.ai-feature-preview:hover .ai-feature-preview-arrow { transform: translateX(3px); }

/* ── Context card ── */
.ai-context-card { padding: 14px; }
.ai-context-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 4px;
    min-height: 20px;
}
.ai-context-title {
    font-size: 15px; font-weight: 700; color: var(--text);
}
.ai-context-hint {
    font-size: 12px; color: var(--muted);
    margin-bottom: 10px;
    line-height: 1.4;
}
.ai-context-textarea { min-height: 100px; }

.ai-save-indicator {
    font-size: 11.5px; font-weight: 600;
    color: var(--muted);
    transition: color 0.2s, opacity 0.2s;
    min-height: 16px;
}
.ai-save-indicator.is-saving { color: var(--muted); }
.ai-save-indicator.is-saved  { color: #43e97b; }
.ai-save-indicator.is-error  { color: var(--danger); }

.ai-context-progress { margin-top: 10px; }
.ai-context-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}
.ai-context-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.3s ease, background 0.25s;
    background: var(--muted);
}
.ai-context-progress-fill.is-weak   { background: #f5a623; }
.ai-context-progress-fill.is-ok     { background: var(--accent); }
.ai-context-progress-fill.is-strong { background: #43e97b; }

.ai-context-progress-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 6px;
    font-size: 11.5px; color: var(--muted);
}
.ai-context-progress-counter { font-variant-numeric: tabular-nums; }

/* ── Stats ── */
.ai-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.ai-stat-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.ai-stat-card--muted { opacity: 0.7; }
.ai-stat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.ai-stat-info { min-width: 0; }
.ai-stat-value {
    font-size: 20px; font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.ai-stat-label {
    font-size: 11.5px; color: var(--muted);
    margin-top: 2px;
}
.ai-stat-tag {
    display: inline-block;
    margin-left: 4px;
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.14);
    color: #f5a623;
    border: 1px solid rgba(245, 166, 35, 0.3);
    vertical-align: 1px;
}

.field-label-hint {
    font-weight: 400; color: var(--muted); font-size: 12px;
}

/* ── Mobile tweaks для AI-экрана ────────────────────────────────── */
@media (max-width: 480px) {
    .ai-status-pill {
        padding: 10px 12px;
    }
    .ai-status-pill-title { font-size: 13.5px; }
    .ai-status-pill-sub   { font-size: 11.5px; }

    .ai-feature { padding: 12px 12px 10px; }
    .ai-feature-icon {
        width: 40px; height: 40px;
        font-size: 22px;
        border-radius: 10px;
    }
    .ai-feature-title { font-size: 14px; gap: 6px; }
    .ai-feature-desc  { font-size: 11.5px; }
    .ai-feature-preview {
        font-size: 12.5px;
        padding: 9px 11px;
        margin-top: 10px;
    }

    .ai-context-card { padding: 12px; }
    .ai-context-title { font-size: 14px; }
    .ai-context-hint  { font-size: 11.5px; }

    .ai-stat-card { padding: 10px 12px; gap: 10px; }
    .ai-stat-icon {
        width: 32px; height: 32px;
        font-size: 18px;
    }
    .ai-stat-value { font-size: 18px; }
    .ai-stat-label { font-size: 11px; }
}
