/* =========================================
   ERMI DATA — UNIFIED DESIGN SYSTEM
   Единая дизайн-система для лендинга и ЛК
   ========================================= */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - Dark theme */
    --ed-bg-primary: #0a0a0f;
    --ed-bg-secondary: #0f0f18;
    --ed-bg-card: #141420;
    --ed-bg-card-hover: #1a1a2e;
    --ed-bg-sidebar: #0d0d15;
    --ed-bg-navbar: rgba(13, 13, 21, 0.95);

    /* Text colors — WCAG 2.1 AA compliant on #0a0a0f background */
    --ed-text-primary: #e8eaed;      /* contrast ~15:1 ✅ */
    --ed-text-secondary: #a3a9ba;    /* contrast ~6.2:1 ✅ (was #9aa0b0 ~5.5:1) */
    --ed-text-muted: #7a8194;        /* contrast ~4.2:1 ✅ (was #6b7280 ~3:1 ❌) */

    /* Border colors */
    --ed-border-color: rgba(255, 255, 255, 0.06);
    --ed-border-light: rgba(255, 255, 255, 0.1);

    /* Accent colors */
    --ed-accent-blue: #3b82f6;
    --ed-accent-purple: #8b5cf6;
    --ed-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --ed-accent-gradient-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

    /* Status colors */
    --ed-success: #10b981;
    --ed-success-bg: rgba(16, 185, 129, 0.1);
    --ed-warning: #f59e0b;
    --ed-warning-bg: rgba(245, 158, 11, 0.1);
/* ===== STUB LINKS — B3: визуальная индикация заглушек ===== */

[data-stub="true"] {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none !important;
    position: relative;
}

[data-stub="true"]:hover {
    text-decoration: none;
}

/* CSS-only tooltip для stub-ссылок */
.ed-sidebar-link[data-stub="true"]::after {
    content: 'Скоро';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    color: var(--ed-text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.ed-sidebar-link[data-stub="true"]:hover::after {
    opacity: 1;
}

.ed-navbar-link[data-stub="true"]::after {
/* ===== NAVIGATION SPLIT — C1: Navbar упрощён, Sidebar — основная навигация ===== */

/* Скрыть центральную навигацию navbar (дублирует sidebar) */
.ed-navbar-nav {
    display: none !important;
}

/* На мобильных: гамбургер открывает sidebar, navbar содержит только лого + профиль */
@media (max-width: 768px) {
    .ed-navbar-nav {
        display: none !important;
    }
/* ===== PAYMENTS TABLE → CARDS — C2: мобильная адаптация ≤550px ===== */

@media (max-width: 550px) {
    .ed-payments-table-wrapper {
        overflow-x: visible;
    }

    .ed-payments-table,
    .ed-payments-table thead,
    .ed-payments-table tbody,
    .ed-payments-table th,
    .ed-payments-table td,
    .ed-payments-table tr {
        display: block;
    }

    .ed-payments-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .ed-payments-table tbody tr {
        background: var(--ed-bg-card);
        border: 1px solid var(--ed-border-color);
        border-radius: var(--ed-radius-lg);
        padding: 16px;
        margin-bottom: 12px;
    }

    .ed-payments-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid rgba(42, 53, 72, 0.3);
        text-align: right;
    }

    .ed-payments-table tbody td:last-child {
        border-bottom: none;
    }

    .ed-payments-table tbody td::before {
        content: attr(data-label);
        font-size: 12px;
        color: var(--ed-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        margin-right: 16px;
    }

    .ed-payments-table tbody tr:hover {
        background: var(--ed-bg-card-hover);
        border-color: var(--ed-border-light);
    }
}

}

    content: 'Скоро';
    display: inline-block;
    margin-left: 6px;
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    color: var(--ed-text-muted);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
}

    --ed-danger: #ef4444;
    --ed-danger-bg: rgba(239, 68, 68, 0.1);

    /* Spacing */
    --ed-spacing-xs: 0.25rem;
    --ed-spacing-sm: 0.5rem;
    --ed-spacing-md: 1rem;
    --ed-spacing-lg: 1.5rem;
    --ed-spacing-xl: 2rem;
    --ed-spacing-2xl: 3rem;

    /* Border radius */
    --ed-radius-sm: 0.375rem;
    --ed-radius-md: 0.5rem;
    --ed-radius-lg: 0.75rem;
    --ed-radius-xl: 1rem;
    --ed-radius-full: 9999px;

    /* Shadows */
    --ed-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --ed-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --ed-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --ed-shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

    /* Transitions */
    --ed-transition-fast: 150ms ease;
    --ed-transition-base: 250ms ease;
    --ed-transition-slow: 350ms ease;

    /* Z-index */
    --ed-z-navbar: 1000;
    --ed-z-sidebar: 1100;
    --ed-z-overlay: 1050;
    --ed-z-dropdown: 1100;
}

/* ===== GLOBAL RESETS ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ed-text-primary);
    background: var(--ed-bg-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
.ed-text-gradient {
    background: var(--ed-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BUTTONS ===== */
.ed-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--ed-accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--ed-radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ed-transition-fast);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.ed-btn-primary:hover {
    background: var(--ed-accent-gradient-hover);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.ed-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--ed-text-secondary);
    border: 1px solid var(--ed-border-light);
    border-radius: var(--ed-radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ed-transition-fast);
    text-decoration: none;
}

.ed-btn-outline:hover {
    border-color: var(--ed-accent-blue);
    color: var(--ed-accent-blue);
    background: rgba(59, 130, 246, 0.05);
    text-decoration: none;
}

/* ===== CARDS ===== */
.ed-card {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-xl);
    overflow: hidden;
    transition: all var(--ed-transition-base);
}

.ed-card:hover {
    border-color: var(--ed-border-light);
    box-shadow: var(--ed-shadow-md);
}

.ed-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: var(--ed-spacing-lg) var(--ed-spacing-xl);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-card-header i {
    font-size: 1.1rem;
    color: var(--ed-accent-blue);
}

.ed-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ed-text-primary);
}

.ed-card-body {
    padding: var(--ed-spacing-xl);
}

/* ===== FORMS ===== */
.ed-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-md);
    color: var(--ed-text-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--ed-transition-fast);
}

.ed-form-control::placeholder {
    color: var(--ed-text-muted);
}

.ed-form-control:focus {
    border-color: var(--ed-accent-blue);
    background: var(--ed-bg-card);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ===== FOCUS INDICATORS (Accessibility) ===== */
*:focus-visible {
    outline: 2px solid var(--ed-accent-blue);
    outline-offset: 2px;
}

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--ed-accent-blue);
    outline-offset: 2px;
    border-radius: var(--ed-radius-sm);
}

/* Remove outline for mouse users but keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
    outline: none;
}

.ed-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--ed-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== ALERTS ===== */
.ed-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: var(--ed-spacing-lg);
    border-radius: var(--ed-radius-lg);
    margin-bottom: var(--ed-spacing-lg);
}

.ed-alert-success {
    background: var(--ed-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--ed-success);
}

.ed-alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ed-alert-content {
    font-size: 0.9rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--ed-border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ed-text-muted);
}

/* ===== TAP TARGET UTILITY (min 44x44px for mobile) ===== */
.ed-tap-target {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    /* Mobile adjustments for navbar/sidebar */
}

@media (max-width: 768px) {
    :root {
        --ed-spacing-2xl: 2rem;
        --ed-spacing-xl: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --ed-spacing-xl: 1rem;
        --ed-spacing-lg: 0.75rem;
    }
}

/* =========================================
   ACCOUNT LAYOUT — Общие стили личного кабинета
   ========================================= */

.ed-account-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
    box-sizing: border-box;
}

.ed-account-header {
    margin-bottom: 32px;
    text-align: center;
}

.ed-account-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ed-text-primary);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ed-account-title i {
    color: var(--ed-accent-purple);
}

.ed-account-desc {
    font-size: 15px;
    color: var(--ed-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   DASHBOARD CARDS — Карточки дашборда
   ========================================= */

.ed-dashboard-card {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.ed-dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-dashboard-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ed-dashboard-card-title i {
    color: var(--ed-accent-purple);
}

.ed-dashboard-card-body {
    color: var(--ed-text-secondary);
}

/* Dashboard Stats Grid */
.ed-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.ed-stat-card {
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
    padding: 20px;
    transition: all var(--ed-transition-base);
}

.ed-stat-card:hover {
    border-color: var(--ed-border-light);
    transform: translateY(-2px);
}

.ed-stat-label {
    font-size: 12px;
    color: var(--ed-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ed-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ed-text-primary);
    line-height: 1.2;
}

.ed-stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.ed-stat-change.positive {
    color: var(--ed-success);
}

.ed-stat-change.negative {
    color: var(--ed-danger);
}

/* Progress Bar */
.ed-progress-bar {
    height: 8px;
    background: var(--ed-bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.ed-progress-bar-fill {
    height: 100%;
    background: var(--ed-accent-gradient);
    border-radius: 4px;
    transition: width var(--ed-transition-slow);
}

/* Quick Actions */
.ed-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.ed-quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
    text-decoration: none;
    color: var(--ed-text-primary);
    transition: all var(--ed-transition-base);
}

.ed-quick-action:hover {
    border-color: var(--ed-accent-purple);
    background: var(--ed-bg-card-hover);
    color: var(--ed-text-primary);
}

.ed-quick-action i {
    font-size: 20px;
    color: var(--ed-accent-purple);
}

.ed-quick-action span {
    font-size: 14px;
    font-weight: 500;
}

/* Retry Banner */
.ed-retry-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--ed-warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--ed-radius-lg);
    margin-bottom: 24px;
}

.ed-retry-banner-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 10px;
}

.ed-retry-banner-icon i {
    font-size: 20px;
    color: var(--ed-warning);
}

.ed-retry-banner-content {
    flex: 1;
    min-width: 0;
}

.ed-retry-banner-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ed-warning);
    margin: 0 0 4px 0;
}

.ed-retry-banner-desc {
    font-size: 13px;
    color: var(--ed-text-secondary);
    margin: 0;
}

/* =========================================
   SUBSCRIPTIONS — Страница подписки
   ========================================= */

/* Alert */
.ed-sub-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.ed-sub-alert i {
    font-size: 20px;
}

.ed-sub-alert-success {
    background: var(--ed-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--ed-success);
}

.ed-sub-alert-error {
    background: var(--ed-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--ed-danger);
}

/* Tabs навигации */
.ed-sub-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--ed-bg-secondary);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    border: 1px solid var(--ed-border-color);
}

.ed-sub-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--ed-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.ed-sub-tab:hover {
    color: var(--ed-text-primary);
    background: rgba(139, 92, 246, 0.08);
}

.ed-sub-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(139, 92, 246, 0.3);
}

.ed-sub-tab i {
    font-size: 14px;
}

/* =========================================
   SUBSCRIPTION CARDS — Card-Based Layout (Variant A)
   ========================================= */

/* Карточка подписки */
.ed-sub-card {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-xl);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all var(--ed-transition-base);
    scroll-margin-top: 80px;
}

.ed-sub-card:hover {
    border-color: var(--ed-border-light);
}

/* Warning variant для секции повторной оплаты */
.ed-sub-card-warning {
    border-color: rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, var(--ed-bg-card) 0%, rgba(245, 158, 11, 0.03) 100%);
}

/* Header карточки */
.ed-sub-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-sub-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0;
}

.ed-sub-card-title i {
    font-size: 17px;
    color: var(--ed-accent-purple);
}

/* Body карточки */
.ed-sub-card-body {
    padding: 24px;
}

/* Plan Info Rows */
.ed-plan-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ed-plan-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.ed-plan-label {
    color: var(--ed-text-secondary);
    min-width: 140px;
    flex-shrink: 0;
}

.ed-plan-row strong {
    color: var(--ed-text-primary);
}

/* Access Info Block */
.ed-sub-access-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--ed-radius-lg);
    margin-bottom: 20px;
}

.ed-sub-access-info i {
    font-size: 20px;
    color: var(--ed-success);
    margin-top: 2px;
    flex-shrink: 0;
}

.ed-sub-access-info p {
    margin: 0;
    font-size: 14px;
    color: var(--ed-text-secondary);
    line-height: 1.5;
}

.ed-sub-access-info strong {
    color: var(--ed-text-primary);
}

/* Management Actions */
.ed-sub-management-actions {
    margin-bottom: 20px;
}

/* Toggle Row */
.ed-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
}

.ed-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ed-text-primary);
    flex-shrink: 0;
}

/* Toggle Switch */
.ed-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--ed-transition-fast);
    flex-shrink: 0;
    background: var(--ed-border-light);
}

.ed-toggle-switch.ed-toggle-on {
    background: var(--ed-accent-purple);
}

.ed-toggle-switch:hover {
    opacity: 0.85;
}

.ed-toggle-switch:focus-visible {
    outline: 2px solid var(--ed-accent-blue);
    outline-offset: 2px;
}

.ed-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--ed-transition-fast);
}

.ed-toggle-switch.ed-toggle-on .ed-toggle-slider {
    transform: translateX(24px);
}

.ed-toggle-status {
    font-size: 13px;
    color: var(--ed-text-muted);
    margin-left: auto;
}

/* Cancel Link (вторичное действие) */
.ed-sub-cancel-link-wrapper {
    padding-top: 20px;
    border-top: 1px solid var(--ed-border-color);
}

.ed-sub-cancel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ed-text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--ed-transition-fast);
    min-height: 44px;
    padding: 8px 0;
}

.ed-sub-cancel-link:hover {
    color: var(--ed-danger);
    text-decoration: none;
}

.ed-sub-cancel-link i {
    font-size: 14px;
}

.ed-sub-cancel-hint {
    font-size: 12px;
    color: var(--ed-text-muted);
    margin: 6px 0 0 0;
    line-height: 1.4;
}

/* Resume Block */
.ed-sub-resume-block {
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed rgba(139, 92, 246, 0.2);
    border-radius: var(--ed-radius-lg);
    text-align: center;
}

.ed-sub-description {
    color: var(--ed-text-secondary);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* Кнопки подписки */
.ed-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--ed-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ed-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.ed-btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--ed-accent-purple), var(--ed-accent-blue));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ed-btn-primary-sm:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Retry Payment */
.ed-retry-description {
    margin-bottom: 24px;
    color: var(--ed-text-secondary);
    line-height: 1.6;
}

.ed-retry-description p {
    margin: 0 0 8px 0;
}

.ed-retry-amount {
    font-size: 18px !important;
    color: var(--ed-text-primary) !important;
    margin-top: 16px !important;
}

.ed-retry-form {
    margin: 0;
}

.ed-retry-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ed-btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a2235;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ed-btn-retry:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Payments Table */
.ed-payments-table-wrapper {
    overflow-x: auto;
}

.ed-payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ed-payments-table thead th {
    text-align: left;
    padding: 12px 16px;
    color: var(--ed-text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-payments-table tbody td {
    padding: 12px 16px;
    color: var(--ed-text-primary);
    border-bottom: 1px solid rgba(42, 53, 72, 0.5);
}

.ed-payments-table tbody tr:last-child td {
    border-bottom: none;
}

.ed-payments-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Error row highlight */
.ed-plan-row-error strong {
    color: var(--ed-danger);
}

/* =========================================
   SUBSCRIPTION CARD VARIANTS — Context-dependent states
   ========================================= */

/* Error card variant (payment_failed) */
.ed-sub-card-error {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(135deg, var(--ed-bg-card) 0%, rgba(239, 68, 68, 0.03) 100%);
}

/* Expired card variant */
.ed-sub-card-expired {
    border-color: rgba(107, 114, 128, 0.2);
    opacity: 0.9;
}

/* Payment Error Banner */
.ed-payment-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--ed-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--ed-radius-lg);
    margin-bottom: 24px;
}

.ed-payment-error-banner > i {
    font-size: 28px;
    color: var(--ed-danger);
    flex-shrink: 0;
    margin-top: 2px;
}

.ed-payment-error-content {
    flex: 1;
    min-width: 0;
}

.ed-payment-error-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ed-danger);
    margin: 0 0 6px 0;
}

.ed-payment-error-desc {
    font-size: 14px;
    color: var(--ed-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Expired Info Block */
.ed-expired-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(107, 114, 128, 0.06);
    border: 1px solid rgba(107, 114, 128, 0.15);
    border-radius: var(--ed-radius-lg);
    margin-bottom: 24px;
}

.ed-expired-info > i {
    font-size: 24px;
    color: var(--ed-text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.ed-expired-content {
    flex: 1;
    min-width: 0;
}

.ed-expired-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0 0 6px 0;
}

.ed-expired-desc {
    font-size: 14px;
    color: var(--ed-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Expired Actions */
.ed-expired-actions {
    text-align: center;
    padding-top: 8px;
}

/* Secondary button */
.ed-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--ed-text-secondary);
    border: 1px solid var(--ed-border-light);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ed-transition-fast);
    text-decoration: none;
}

.ed-btn-secondary:hover {
    border-color: var(--ed-accent-purple);
    color: var(--ed-accent-purple);
    background: rgba(139, 92, 246, 0.05);
    text-decoration: none;
}

/* No Subscription */
.ed-no-subscription {
    text-align: center;
    padding: 40px 20px;
}

.ed-no-subscription p {
    margin: 0 0 16px;
    color: var(--ed-text-secondary);
}

/* =========================================
   PLANS — Страница тарифов
   ========================================= */

/* Current Plan Banner */
.ed-current-plan-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 32px;
}

.ed-current-plan-label {
    color: var(--ed-text-secondary);
    font-size: 14px;
}

.ed-current-plan-name {
    color: var(--ed-accent-purple);
    font-size: 18px;
    margin-left: 8px;
}

.ed-current-plan-dates span {
    color: var(--ed-text-secondary);
    font-size: 14px;
}

/* Plans Grid */
.ed-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.ed-plan-card {
    position: relative;
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: 14px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.ed-plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--ed-accent-purple);
}

.ed-plan-popular {
    border-color: var(--ed-accent-purple);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.ed-plan-current {
    border-color: var(--ed-success);
    background: rgba(16, 185, 129, 0.05);
}

.ed-popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, var(--ed-accent-purple), var(--ed-accent-blue));
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ed-current-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--ed-success);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Plan Header */
.ed-plan-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-plan-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--ed-text-primary);
    margin: 0 0 12px;
}

.ed-plan-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--ed-accent-purple);
    margin-bottom: 4px;
}

.ed-plan-price-note {
    font-size: 13px;
    color: var(--ed-text-secondary);
}

/* Plan Specs */
.ed-plan-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.ed-spec-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    background: var(--ed-bg-secondary);
    border-radius: 8px;
}

.ed-spec-row i {
    color: var(--ed-accent-purple);
    font-size: 16px;
}

.ed-spec-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--ed-text-primary);
}

.ed-spec-label {
    font-size: 11px;
    color: var(--ed-text-secondary);
}

/* Plan Features */
.ed-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.ed-plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--ed-text-secondary);
}

.ed-plan-features li i {
    color: var(--ed-success);
    font-size: 12px;
}

/* Plan Actions */
.ed-plan-actions {
    text-align: center;
}

.ed-btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--ed-accent-purple), var(--ed-accent-blue));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.ed-btn-upgrade:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ed-btn-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--ed-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: default;
}

.ed-btn-disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    background: var(--ed-bg-secondary);
    color: var(--ed-text-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Comparison Table */
.ed-comparison-scroll {
    overflow-x: auto;
}

.ed-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.ed-comparison-table th {
    text-align: center;
    padding: 12px;
    color: var(--ed-text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--ed-border-color);
}

.ed-comparison-table td {
    text-align: center;
    padding: 12px;
    color: var(--ed-text-primary);
    border-bottom: 1px solid rgba(42, 53, 72, 0.5);
}

.ed-comparison-table td:first-child {
    text-align: left;
    color: var(--ed-text-secondary);
    font-weight: 500;
}

.ed-col-current {
    color: var(--ed-accent-purple) !important;
    font-weight: 600 !important;
    background: rgba(139, 92, 246, 0.05);
}

/* FAQ */
.ed-faq-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(42, 53, 72, 0.5);
}

.ed-faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ed-faq-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0 0 8px;
}

.ed-faq-item p {
    font-size: 14px;
    color: var(--ed-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   SIDEBAR STATUS BADGES — Динамические статусы
   ========================================= */

.ed-sidebar-trial-badge.ed-sidebar-status-trial {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.ed-sidebar-trial-badge.ed-sidebar-status-active {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--ed-success);
}

.ed-sidebar-trial-badge.ed-sidebar-status-pro {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

.ed-sidebar-trial-badge.ed-sidebar-status-none {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

.ed-sidebar-trial-badge.ed-sidebar-status-none .ed-pulse-small {
    background: #6b7280;
}

.ed-sidebar-trial-badge.ed-sidebar-status-failed {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--ed-danger);
}

.ed-sidebar-trial-badge.ed-sidebar-status-failed .ed-pulse-small {
    background: var(--ed-danger);
}

.ed-sidebar-link-retry {
    color: #fbbf24 !important;
}

.ed-sidebar-link-retry:hover {
    background: rgba(251, 191, 36, 0.1) !important;
}

.ed-retry-badge {
    background: var(--ed-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* =========================================
   ACCOUNT PAGES — RESPONSIVE (max-width: 550px)
   ========================================= */

@media (max-width: 550px) {
    .ed-account-page {
        padding: 16px 12px;
    }

    .ed-account-title {
        font-size: 20px;
    }

    .ed-stats-grid {
        grid-template-columns: 1fr;
    }

    .ed-quick-actions {
        grid-template-columns: 1fr;
    }

    .ed-sub-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ed-sub-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .ed-sub-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ed-sub-cancel-block {
        flex-direction: column;
        text-align: center;
    }

    .ed-sub-cancel-icon {
        margin: 0 auto;
    }

    .ed-sub-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ed-retry-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ed-btn-retry {
        justify-content: center;
    }

    .ed-payments-table {
        font-size: 12px;
    }

    .ed-payments-table thead th,
    .ed-payments-table tbody td {
        padding: 8px;
    }

    .ed-plans-grid {
        grid-template-columns: 1fr;
    }

    .ed-current-plan-banner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .ed-dashboard-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ed-retry-banner {
        flex-direction: column;
        text-align: center;
    }

    .ed-retry-banner-icon {
        margin: 0 auto;
    }

    /* Subscription Cards — Mobile overrides for Variant A */
    .ed-sub-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }

    .ed-sub-card-body {
        padding: 16px;
    }

    .ed-plan-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ed-plan-label {
        min-width: auto;
    }

    .ed-toggle-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }

    .ed-toggle-status {
        margin-left: 0;
    }

    .ed-sub-access-info {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    .ed-sub-cancel-link-wrapper {
        padding-top: 16px;
        text-align: center;
    }

    .ed-sub-cancel-link {
        justify-content: center;
        width: 100%;
    }

    .ed-retry-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ed-btn-retry,
    .ed-btn-danger,
    .ed-btn-primary-sm {
        justify-content: center;
        width: 100%;
    }

    /* Context-dependent card states — Mobile */
    .ed-payment-error-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }

    .ed-payment-error-banner > i {
        margin: 0 auto;
    }

    .ed-expired-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }

    .ed-expired-info > i {
        margin: 0 auto;
    }

    .ed-expired-actions {
        text-align: center;
    }

    .ed-expired-actions .ed-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .ed-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
    ERMI MODAL — Кастомное модальное окно
    ========================================= */

.ed-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--ed-z-overlay, 9999);
    opacity: 0;
    visibility: hidden;
    transition: all var(--ed-transition-base);
}

.ed-modal-overlay.ed-modal-visible {
    opacity: 1;
    visibility: visible;
}

.ed-modal {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-xl);
    padding: 0;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--ed-transition-base);
    box-shadow: var(--ed-shadow-lg);
}

.ed-modal-overlay.ed-modal-visible .ed-modal {
    transform: scale(1) translateY(0);
}

.ed-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0;
}

.ed-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ed-text-muted);
    cursor: pointer;
    border-radius: var(--ed-radius-sm);
    transition: all var(--ed-transition-fast);
    font-size: 18px;
}

.ed-modal-close:hover {
    background: var(--ed-bg-secondary);
    color: var(--ed-text-primary);
}

.ed-modal-body {
    padding: 24px;
    color: var(--ed-text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.ed-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--ed-border-color);
}

/* =========================================
   ERMI TOAST — Всплывающие уведомления
   ========================================= */

.ed-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.ed-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
    box-shadow: var(--ed-shadow-lg);
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform var(--ed-transition-base);
}

.ed-toast.ed-toast-visible {
    transform: translateX(0);
}

.ed-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.ed-toast-success .ed-toast-icon {
    background: var(--ed-success-bg);
    color: var(--ed-success);
}

.ed-toast-error .ed-toast-icon {
    background: var(--ed-danger-bg);
    color: var(--ed-danger);
}

.ed-toast-warning .ed-toast-icon {
    background: var(--ed-warning-bg);
    color: var(--ed-warning);
}

.ed-toast-info .ed-toast-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--ed-accent-blue);
}

.ed-toast-content {
    flex: 1;
    min-width: 0;
}

.ed-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0 0 4px 0;
}

.ed-toast-message {
    font-size: 13px;
    color: var(--ed-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.ed-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ed-text-muted);
    cursor: pointer;
    border-radius: var(--ed-radius-sm);
    transition: all var(--ed-transition-fast);
    font-size: 14px;
}

.ed-toast-close:hover {
    background: var(--ed-bg-secondary);
    color: var(--ed-text-primary);
}

.ed-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ed-accent-gradient);
    border-radius: 0 0 var(--ed-radius-lg) var(--ed-radius-lg);
    animation: ed-toast-progress linear forwards;
}

@keyframes ed-toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Toast variant borders */
.ed-toast-success {
    border-left: 3px solid var(--ed-success);
}

.ed-toast-error {
    border-left: 3px solid var(--ed-danger);
}

.ed-toast-warning {
    border-left: 3px solid var(--ed-warning);
}

.ed-toast-info {
    border-left: 3px solid var(--ed-accent-blue);
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
    .ed-toast-container {
        top: auto;
        bottom: 24px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }

    .ed-toast {
        transform: translateY(120%);
    }

    .ed-toast.ed-toast-visible {
        transform: translateY(0);
    }
}

/* =========================================
   DASHBOARD SPECIFIC — Элементы дашборда (index.php)
   ========================================= */

/* Plan Badge (dashboard card status) */
.ed-plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ed-status-trial {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.ed-status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ed-status-expired {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ed-status-none {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Plan Info Rows */
.ed-plan-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ed-plan-info .ed-plan-name {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.ed-plan-label {
    color: var(--ed-text-secondary);
    min-width: 100px;
}

.ed-plan-name strong {
    color: var(--ed-text-primary);
}

/* API Key Display */
.ed-api-key-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ed-api-key {
    background: var(--ed-bg-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--ed-accent-blue);
    word-break: break-all;
}

.ed-btn-copy {
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    color: var(--ed-text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--ed-transition-fast);
}

.ed-btn-copy:hover {
    border-color: var(--ed-accent-purple);
    color: var(--ed-accent-purple);
}

/* Requests Progress */
.ed-requests-count {
    font-size: 14px;
    color: var(--ed-text-secondary);
    font-weight: 600;
}

.ed-progress-wrapper {
    margin-top: 8px;
}

.ed-dashboard-card .ed-progress-bar {
    width: 100%;
    height: 24px;
    background: var(--ed-bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.ed-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ed-accent-purple), var(--ed-accent-blue));
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
}

.ed-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: ed-shimmer 2s infinite;
}

@keyframes ed-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ed-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: var(--ed-text-secondary);
}

/* Warning Box */
.ed-warning-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #fbbf24;
    font-size: 14px;
}

.ed-warning-box i {
    font-size: 18px;
}

/* Quick Action Cards (dashboard) */
.ed-dashboard-card .ed-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.ed-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--ed-text-secondary);
    transition: all var(--ed-transition-base);
}

.ed-action-card:hover {
    border-color: var(--ed-accent-purple);
    color: var(--ed-text-primary);
    transform: translateY(-2px);
}

.ed-action-card i {
    font-size: 24px;
    color: var(--ed-accent-purple);
}

.ed-action-card span {
    font-size: 14px;
    font-weight: 500;
}

/* No Subscription CTA */
.ed-dashboard-card .ed-no-subscription {
    text-align: center;
    padding: 40px 20px;
}

.ed-dashboard-card .ed-no-subscription p {
    margin: 0 0 16px;
    color: var(--ed-text-secondary);
}

/* Retry Banner (dashboard variant) */
.ed-retry-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ed-retry-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 200px;
}

.ed-retry-banner-content > i {
    font-size: 28px;
    color: #fbbf24;
}

.ed-retry-banner-content strong {
    display: block;
    color: #fbbf24;
    font-size: 15px;
    margin-bottom: 4px;
}

.ed-retry-banner-content p {
    margin: 0;
    color: var(--ed-text-secondary);
    font-size: 13px;
}

.ed-btn-retry-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a2235;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--ed-transition-fast);
    white-space: nowrap;
}

.ed-btn-retry-banner:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Stub Badge (sidebar) */
.ed-stub-badge {
    background: var(--ed-accent-purple);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* =========================================
   ACCOUNT PAGES — RESPONSIVE EXTENDED (max-width: 550px)
   ========================================= */

@media (max-width: 550px) {
    /* Dashboard-specific mobile overrides */
    .ed-account-page {
        width: 100%;
        max-width: 100%;
    }

    .ed-quick-actions,
    .ed-dashboard-card .ed-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .ed-api-key-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ed-retry-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .ed-retry-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .ed-btn-retry-banner {
        justify-content: center;
    }
}
/* ===== TAP TARGET FIXES — B2: минимальные зоны касания 44x44px ===== */

/* Кнопка копирования API-ключа */
.ed-btn-copy {
    min-height: 44px;
    padding: 12px 16px;
}

/* Sidebar links — гарантированная высота */
.ed-sidebar-link {
    min-height: 44px;
}

/* Sub tabs на мобильных */
@media (max-width: 550px) {
    .ed-sub-tab {
        min-height: 44px;
        padding: 12px 16px;
    }

    /* Payment table rows — увеличиваем строки */
    .ed-payments-table tbody td {
        padding: 14px 12px;
    }

    /* Plan badges — увеличиваем */
    .ed-plan-badge {
        min-height: 32px;
        padding: 6px 14px;
    }
}

/* =========================================
   SKELETON / LOADING STATES — C3: shimmer-плейсхолдеры
   ========================================= */

/* Базовый скелетон-блок */
.ed-skeleton {
    position: relative;
    background: var(--ed-bg-secondary);
    border-radius: var(--ed-radius-md);
    overflow: hidden;
}

.ed-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%,
        transparent 100%
    );
    animation: ed-skeleton-shimmer 1.8s ease-in-out infinite;
    transform: translateX(-100%);
}

@keyframes ed-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Размеры скелетонов */
.ed-skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    width: 100%;
}

.ed-skeleton-line-sm {
    height: 10px;
    margin-bottom: 8px;
}

.ed-skeleton-line-lg {
    height: 20px;
    margin-bottom: 12px;
}

.ed-skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.ed-skeleton-text {
    height: 14px;
    width: 90%;
    margin-bottom: 10px;
}

.ed-skeleton-text-short {
    height: 14px;
    width: 40%;
    margin-bottom: 10px;
}

.ed-skeleton-circle {
    border-radius: 50%;
}

.ed-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Скелетон карточки дашборда */
.ed-skeleton-card {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.ed-skeleton-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-skeleton-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Скелетон статистики */
.ed-skeleton-stat {
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
    padding: 20px;
}

/* Скелетон прогресс-бара */
.ed-skeleton-progress {
    height: 24px;
    background: var(--ed-bg-secondary);
    border-radius: 12px;
    margin-top: 8px;
}

/* Скелетон таблицы */
.ed-skeleton-table-row {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(42, 53, 72, 0.3);
}

.ed-skeleton-table-row:last-child {
    border-bottom: none;
}

/* Утилита для скрытия/показа контента при загрузке */
.ed-loading-content {
    display: none;
}

.ed-loading-skeleton {
    display: block;
}

[data-loaded="true"] .ed-loading-content {
    display: block;
}

[data-loaded="true"] .ed-loading-skeleton {
    display: none;
}

/* Spinner для AJAX-запросов */
.ed-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--ed-border-color);
    border-top-color: var(--ed-accent-purple);
    border-radius: 50%;
    animation: ed-spin 0.6s linear infinite;
}

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

.ed-spinner-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

/* =========================================
   TOOLTIP WRAPPER — C4: тултипы для терминов
   Чистый CSS, без JS-зависимостей
   ========================================= */

.ed-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dashed var(--ed-text-muted);
}

.ed-tooltip-wrapper .ed-tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-light);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: var(--ed-text-muted);
    margin-left: 4px;
    vertical-align: middle;
}

.ed-tooltip-wrapper .ed-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-light);
    color: var(--ed-text-primary);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: var(--ed-radius-md);
    white-space: normal;
    width: max-content;
    max-width: 240px;
    box-shadow: var(--ed-shadow-lg);
    z-index: 100;
    transition: all var(--ed-transition-fast);
    pointer-events: none;
}

/* Стрелка тултипа */
.ed-tooltip-wrapper .ed-tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--ed-border-light) transparent transparent transparent;
}

.ed-tooltip-wrapper:hover .ed-tooltip-text,
.ed-tooltip-wrapper:focus .ed-tooltip-text,
.ed-tooltip-wrapper:focus-within .ed-tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Мобильная адаптация: тултип по центру экрана */
@media (max-width: 550px) {
    .ed-tooltip-wrapper .ed-tooltip-text {
        bottom: auto;
        top: calc(100% + 8px);
        transform: translateX(-50%) translateY(4px);
        max-width: calc(100vw - 32px);
    }

    .ed-tooltip-wrapper:hover .ed-tooltip-text,
    .ed-tooltip-wrapper:focus .ed-tooltip-text,
    .ed-tooltip-wrapper:focus-within .ed-tooltip-text {
        transform: translateX(-50%) translateY(0);
    }

    .ed-tooltip-wrapper .ed-tooltip-text::after {
        top: auto;
        bottom: 100%;
        border-color: transparent transparent var(--ed-border-light) transparent;
    }
}

/* =========================================
   TARGETS — Страница выбора ML-скоров
   ========================================= */

/* Cooldown Box */
.ed-cooldown-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--ed-warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--ed-radius-lg);
    padding: 16px 20px;
    margin-bottom: var(--ed-spacing-lg);
    color: var(--ed-warning);
}

.ed-cooldown-box i {
    font-size: 24px;
    margin-top: 2px;
    flex-shrink: 0;
}

.ed-cooldown-box strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.ed-cooldown-box p {
    margin: 0 0 4px;
    font-size: 14px;
}

.ed-cooldown-box small {
    font-size: 12px;
    opacity: 0.8;
}

/* Default Hint */
.ed-default-hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--ed-radius-lg);
    padding: 14px 18px;
    margin-bottom: var(--ed-spacing-lg);
    color: var(--ed-accent-blue);
    font-size: 14px;
    line-height: 1.5;
}

.ed-default-hint i {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Info Row */
.ed-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ed-text-secondary);
    margin-bottom: var(--ed-spacing-md);
}

/* Selection Count */
.ed-selection-count {
    font-size: 14px;
    color: var(--ed-text-secondary);
}

.ed-selection-count strong {
    color: var(--ed-accent-purple);
}

/* Targets Grid */
.ed-targets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: var(--ed-spacing-xl);
}

.ed-target-card {
    position: relative;
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--ed-transition-fast);
    background: var(--ed-bg-secondary);
}

.ed-target-card:hover:not(.ed-target-disabled) {
    border-color: var(--ed-accent-purple);
}

.ed-target-selected {
    border-color: var(--ed-accent-purple) !important;
    background: rgba(139, 92, 246, 0.08) !important;
}

.ed-target-disabled {
    cursor: default;
    opacity: 0.7;
}

.ed-target-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ed-target-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.ed-target-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.15);
    border-radius: var(--ed-radius-md);
    color: var(--ed-accent-purple);
    flex-shrink: 0;
    font-size: 18px;
}

.ed-target-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ed-target-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ed-text-primary);
}

.ed-target-alias {
    font-size: 12px;
    color: var(--ed-accent-blue);
    font-family: 'Courier New', monospace;
}

.ed-target-desc {
    font-size: 11px;
    color: var(--ed-text-secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ed-target-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ed-accent-purple);
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}

/* Form Actions */
.ed-form-actions {
    text-align: center;
    padding-top: var(--ed-spacing-md);
    border-top: 1px solid var(--ed-border-color);
}

.ed-form-hint {
    display: block;
    margin-top: var(--ed-spacing-sm);
    color: var(--ed-text-secondary);
    font-size: 13px;
}

/* Limits Table */
.ed-limits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ed-limits-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--ed-text-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--ed-border-color);
}

.ed-limits-table td {
    padding: 10px 12px;
    color: var(--ed-text-primary);
    border-bottom: 1px solid rgba(42, 53, 72, 0.5);
}

.ed-row-current {
    background: rgba(139, 92, 246, 0.08);
}

.ed-row-current td {
    color: var(--ed-accent-purple);
    font-weight: 600;
}

/* Upgrade Hint */
.ed-upgrade-hint {
    text-align: center;
    margin-top: var(--ed-spacing-md);
}

.ed-btn-outline-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--ed-accent-purple);
    color: var(--ed-accent-purple);
    border-radius: var(--ed-radius-md);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--ed-transition-fast);
}

.ed-btn-outline-small:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--ed-accent-purple);
    text-decoration: none;
}

/* Targets Responsive */
@media (max-width: 550px) {
    .ed-targets-grid {
        grid-template-columns: 1fr;
    }

    .ed-limits-table {
        font-size: 12px;
    }

    .ed-limits-table th,
    .ed-limits-table td {
        padding: 8px 6px;
    }
}

/* =========================================
   MY-DATA — Страница личных данных
   ========================================= */

/* Section wrapper (общий блок-карточка секции) */
.ed-simple-strategy-section {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.ed-simple-strategy-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ed-simple-strategy-heading i {
    color: var(--ed-accent-purple);
}

/* Form group wrapper */
.ed-form-group {
    margin-bottom: 16px;
}

.ed-field-wrapper {
    margin-bottom: 0;
}

/* Field hint */
.ed-field-hint {
    font-size: 12px;
    color: var(--ed-text-secondary);
    margin-top: 6px;
}

.ed-field-hint a {
    color: var(--ed-accent-purple);
    text-decoration: none;
}

.ed-field-hint a:hover {
    text-decoration: underline;
}

/* Password toggle */
.ed-password-toggle {
    margin-top: 4px;
}

.ed-pwd-toggle-btn {
    color: var(--ed-text-secondary);
    font-size: 14px;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.ed-pwd-toggle-btn:hover {
    color: var(--ed-text-primary);
}

/* Button large variant */
.ed-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* Full-width button utility */
.ed-btn-fullwidth {
    width: 100%;
}

/* Success alert block (inline notification) */
.ed-alert-success-inline {
    background: var(--ed-success-bg);
    border-color: rgba(16, 185, 129, 0.3);
}

.ed-alert-success-inline .ed-alert-success-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ed-success);
}

.ed-alert-success-content i {
    font-size: 24px;
    flex-shrink: 0;
}

.ed-alert-success-content strong {
    font-size: 15px;
}

/* Form actions */
.ed-form-actions {
    margin-top: 20px;
}

/* My-data responsive overrides */
@media (max-width: 768px) {
    .ed-simple-strategy-section {
        padding: 16px;
    }
}

@media (max-width: 550px) {
    .ed-simple-strategy-section {
        padding: 14px 12px;
        margin-bottom: 16px;
    }

    .ed-simple-strategy-heading {
        font-size: 16px;
        margin-bottom: 14px;
    }
}

/* =========================================
   PAYMENTS PAGINATION — Пагинация истории платежей
   ========================================= */

.ed-payments-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.ed-payments-pagination .pagination {
    margin: 0;
}

.ed-payments-pagination .pagination li {
    margin: 0 4px;
}

.ed-payments-pagination .pagination li:first-child {
    margin-left: 0;
}

.ed-payments-pagination .pagination li:last-child {
    margin-right: 0;
}

.ed-payments-pagination .pagination li a,
.ed-payments-pagination .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-md);
    color: var(--ed-text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--ed-transition-fast);
}

.ed-payments-pagination .pagination li a:hover {
    background: var(--ed-bg-card-hover);
    border-color: var(--ed-accent-purple);
    color: var(--ed-accent-purple);
    text-decoration: none;
}

.ed-payments-pagination .pagination li.active a,
.ed-payments-pagination .pagination li.active span {
    background: linear-gradient(135deg, var(--ed-accent-purple), var(--ed-accent-blue));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.ed-payments-pagination .pagination li.disabled a,
.ed-payments-pagination .pagination li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.ed-payments-pagination .pagination li a i,
.ed-payments-pagination .pagination li span i {
    font-size: 12px;
}

/* Mobile pagination adjustments */
@media (max-width: 550px) {
    .ed-payments-pagination {
        margin-top: 16px;
    }

    .ed-payments-pagination .pagination li {
        margin: 0 2px;
    }

    .ed-payments-pagination .pagination li a,
    .ed-payments-pagination .pagination li span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* =========================================
   SIDEBAR BADGES & LINK MODIFIERS — Фаза 6
   ========================================= */

/* Badge: FREE */
.ed-sidebar-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.ed-sidebar-badge--free {
    background: var(--ed-success);
    color: #fff;
}

.ed-sidebar-badge--new {
    background: var(--ed-accent-purple);
    color: #fff;
}

.ed-sidebar-badge--external {
    background: var(--ed-bg-secondary);
    border: 1px solid var(--ed-border-light);
    color: var(--ed-text-muted);
}

/* Link modifier: accent (для Ermini AI) */
.ed-sidebar-link--accent {
    color: var(--ed-accent-purple) !important;
}

.ed-sidebar-link--accent i {
    color: var(--ed-accent-purple) !important;
}

.ed-sidebar-link--accent:hover {
    background: rgba(139, 92, 246, 0.1) !important;
}

/* Link modifier: external (для внешних ссылок) */
.ed-sidebar-link--external {
    position: relative;
}

.ed-sidebar-external-icon {
    font-size: 11px;
    color: var(--ed-text-muted);
    margin-left: auto;
    opacity: 0.6;
    transition: opacity var(--ed-transition-fast);
}

.ed-sidebar-link--external:hover .ed-sidebar-external-icon {
    opacity: 1;
    color: var(--ed-accent-blue);
}
/* =========================================
   DASHBOARD REDESIGN — Фаза 7
   Компоненты нового дашборда /account
   ========================================= */

/* ===== Welcome Header ===== */

.ed-welcome-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--ed-spacing-xl);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ed-border-color);
    flex-wrap: wrap;
}

.ed-welcome-greeting {
    flex: 1;
    min-width: 0;
}

.ed-welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ed-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.ed-welcome-subtitle {
    font-size: 15px;
    color: var(--ed-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ===== Stat Cards Grid ===== */

.ed-stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ed-stat-card {
    background: var(--ed-bg-card);
    border: 1px solid var(--ed-border-color);
    border-radius: var(--ed-radius-xl);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--ed-transition-base);
}

.ed-stat-card:hover {
    border-color: var(--ed-border-light);
    transform: translateY(-2px);
}

/* CTA variant */
.ed-stat-card--cta {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Warning variant */
.ed-stat-card--warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(239, 68, 68, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

/* Icon wrapper */
.ed-stat-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ed-radius-md);
    flex-shrink: 0;
}

.ed-stat-icon-wrapper i {
    font-size: 18px;
    color: #fff;
}

.ed-stat-icon--blue {
    background: linear-gradient(135deg, var(--ed-accent-blue), #2563eb);
}

.ed-stat-icon--purple {
    background: linear-gradient(135deg, var(--ed-accent-purple), #7c3aed);
}

.ed-stat-icon--green {
    background: linear-gradient(135deg, var(--ed-success), #059669);
}

/* Content area */
.ed-stat-content {
    flex: 1;
    min-width: 0;
}

.ed-stat-content--center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ed-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ed-text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.ed-stat-divider {
    font-weight: 400;
    color: var(--ed-text-muted);
    font-size: 18px;
    margin: 0 2px;
}

.ed-stat-hint {
    font-size: 12px;
    color: var(--ed-text-muted);
    margin-top: 2px;
}

/* ===== Chart Container ===== */

.ed-chart-container {
    position: relative;
    height: 260px;
    width: 100%;
}

/* ===== Empty / Expired States ===== */

.ed-dashboard-card--empty,
.ed-dashboard-card--expired {
    text-align: center;
}

.ed-empty-state,
.ed-expired-state {
    padding: 40px 20px;
}

.ed-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.ed-empty-icon i {
    font-size: 28px;
    color: var(--ed-accent-purple);
}

.ed-empty-icon--warning {
    background: rgba(245, 158, 11, 0.1);
}

.ed-empty-icon--warning i {
    color: var(--ed-warning);
}

.ed-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ed-text-primary);
    margin: 0 0 12px 0;
}

.ed-empty-desc {
    font-size: 14px;
    color: var(--ed-text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 24px;
}

.ed-empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== Retry Banner Large ===== */

.ed-retry-banner--large {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* ===== API Key Full (скрытый по умолчанию) ===== */

.ed-api-key--full {
    display: none;
}

/* ===== Action Card Accent ===== */

.ed-action-card--accent {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.ed-action-card--accent i {
    color: var(--ed-accent-purple);
}

.ed-action-card--accent:hover {
    border-color: var(--ed-accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

/* ===== Warning Box Large ===== */

.ed-warning-box--large {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ed-warning-box--large > i {
    font-size: 24px;
    flex-shrink: 0;
}

.ed-warning-box--large > div {
    flex: 1;
    min-width: 200px;
}

.ed-warning-box--large strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.ed-warning-box--large p {
    margin: 0;
    font-size: 13px;
    color: var(--ed-text-secondary);
}

/* ===== Dashboard Redesign — Mobile Responsive ===== */

@media (max-width: 1024px) {
    .ed-stat-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ed-welcome-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .ed-welcome-title {
        font-size: 22px;
    }

    .ed-stat-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 550px) {
    .ed-welcome-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .ed-welcome-title {
        font-size: 20px;
    }

    .ed-welcome-subtitle {
        font-size: 13px;
    }

    .ed-stat-card {
        padding: 16px;
    }

    .ed-stat-value {
        font-size: 20px;
    }

    .ed-chart-container {
        height: 200px;
    }

    .ed-empty-state,
    .ed-expired-state {
        padding: 24px 12px;
    }

    .ed-empty-actions {
        flex-direction: column;
    }

    .ed-empty-actions .ed-btn-primary,
    .ed-empty-actions .ed-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .ed-retry-banner--large {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .ed-retry-banner--large .ed-btn-retry-banner {
        width: 100%;
        justify-content: center;
    }

    .ed-warning-box--large {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .ed-warning-box--large .ed-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .ed-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}