
/* ==========================================================================
   Themes (Premium)
   ========================================================================== */

/* Dark / Midnight Theme */
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-light: rgba(56, 189, 248, 0.16);
    --primary-border: rgba(56, 189, 248, 0.35);

    --emerald: #34d399;
    --emerald-hover: #10b981;
    --emerald-light: rgba(52, 211, 153, 0.15);
    --emerald-border: rgba(52, 211, 153, 0.35);

    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-light: rgba(251, 191, 36, 0.15);
    --accent-border: rgba(251, 191, 36, 0.35);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #090e17;
    --bg-sidebar: #0f172a;
    --bg-editor: #131d31;
    --bg-card: #19243a;
    --bg-hover: #22304d;
    --bg-active: rgba(56, 189, 248, 0.22);

    --border-subtle: #1e293b;
    --border-medium: #334155;
    --border-strong: #475569;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --text-inverse: #090e17;

    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.35);
}

/* Emerald Forest Theme */
[data-theme="emerald"] {
    --primary: #34d399;
    --primary-hover: #10b981;
    --primary-light: rgba(52, 211, 153, 0.16);
    --primary-border: rgba(52, 211, 153, 0.38);

    --emerald: #34d399;
    --emerald-hover: #10b981;
    --emerald-light: rgba(52, 211, 153, 0.15);
    --emerald-border: rgba(52, 211, 153, 0.35);

    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-light: rgba(251, 191, 36, 0.15);
    --accent-border: rgba(251, 191, 36, 0.35);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #031811;
    --bg-sidebar: #06251b;
    --bg-editor: #083325;
    --bg-card: #0d4231;
    --bg-hover: #14533e;
    --bg-active: rgba(52, 211, 153, 0.22);

    --border-subtle: #0f4936;
    --border-medium: #17654b;
    --border-strong: #2fae80;

    --text-main: #f0fdf4;
    --text-muted: #a7f3d0;
    --text-light: #6ee7b7;
    --text-inverse: #031811;

    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.35);
}

/* Sepia / Warm Paper Theme */
[data-theme="sepia"] {
    --primary: #b45309;
    --primary-hover: #92400e;
    --primary-light: rgba(180, 83, 9, 0.12);
    --primary-border: rgba(180, 83, 9, 0.3);

    --emerald: #059669;
    --emerald-hover: #047857;
    --emerald-light: rgba(5, 150, 105, 0.12);
    --emerald-border: rgba(5, 150, 105, 0.3);

    --accent: #d97706;
    --accent-hover: #b45309;
    --accent-light: rgba(217, 119, 6, 0.12);
    --accent-border: rgba(217, 119, 6, 0.3);

    --bg-app: #f4eee3;
    --bg-sidebar: #eae0d0;
    --bg-editor: #fcf9f2;
    --bg-card: #ffffff;
    --bg-hover: #e4d8c5;
    --bg-active: rgba(180, 83, 9, 0.15);

    --border-subtle: #e2d6c3;
    --border-medium: #cfc1aa;
    --border-strong: #9e8a73;

    --text-main: #2e2215;
    --text-muted: #6e5c49;
    --text-light: #94806a;
    --text-inverse: #ffffff;

    --danger-light: #fee2e2;
    --danger-border: #fca5a5;
}

/* Purple / Amethyst Theme */
[data-theme="purple"] {
    --primary: #c084fc;
    --primary-hover: #a855f7;
    --primary-light: rgba(192, 132, 252, 0.18);
    --primary-border: rgba(192, 132, 252, 0.4);

    --emerald: #34d399;
    --emerald-hover: #10b981;
    --emerald-light: rgba(52, 211, 153, 0.15);
    --emerald-border: rgba(52, 211, 153, 0.35);

    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-light: rgba(251, 191, 36, 0.15);
    --accent-border: rgba(251, 191, 36, 0.35);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #0d071a;
    --bg-sidebar: #170d2e;
    --bg-editor: #1d113a;
    --bg-card: #25164a;
    --bg-hover: #331f63;
    --bg-active: rgba(192, 132, 252, 0.22);

    --border-subtle: #2d1b54;
    --border-medium: #45287e;
    --border-strong: #6c3dbf;

    --text-main: #faf5ff;
    --text-muted: #d8b4fe;
    --text-light: #a855f7;
    --text-inverse: #0d071a;

    --danger-light: rgba(239, 68, 68, 0.18);
    --danger-border: rgba(239, 68, 68, 0.4);
}

/* Cyberpunk / Neon Theme (Яркая, броская) */
[data-theme="cyberpunk"] {
    --primary: #ff2a85;
    --primary-hover: #ff0066;
    --primary-light: rgba(255, 42, 133, 0.18);
    --primary-border: rgba(255, 42, 133, 0.45);

    --emerald: #00f5d4;
    --emerald-hover: #00d4b8;
    --emerald-light: rgba(0, 245, 212, 0.18);
    --emerald-border: rgba(0, 245, 212, 0.42);

    --accent: #fcee0a;
    --accent-hover: #e5d705;
    --accent-light: rgba(252, 238, 10, 0.16);
    --accent-border: rgba(252, 238, 10, 0.4);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #090514;
    --bg-sidebar: #120a26;
    --bg-editor: #160d2e;
    --bg-card: #201340;
    --bg-hover: #2e1b5b;
    --bg-active: rgba(255, 42, 133, 0.25);

    --border-subtle: #291852;
    --border-medium: #45248a;
    --border-strong: #ff2a85;

    --text-main: #fff0f7;
    --text-muted: #e0b3d6;
    --text-light: #ad7fa3;
    --text-inverse: #090514;

    --danger-light: rgba(255, 42, 133, 0.2);
    --danger-border: rgba(255, 42, 133, 0.45);
}

/* Minimal / Monochromatic Theme (Минималистичная-простая) */
[data-theme="minimal"] {
    --primary: #18181b;
    --primary-hover: #09090b;
    --primary-light: #f4f4f5;
    --primary-border: #d4d4d8;

    --emerald: #10b981;
    --emerald-hover: #059669;
    --emerald-light: #ecfdf5;
    --emerald-border: #a7f3d0;

    --accent: #71717a;
    --accent-hover: #52525b;
    --accent-light: #f4f4f5;
    --accent-border: #e4e4e7;

    --bg-app: #fcfcfc;
    --bg-sidebar: #f4f4f5;
    --bg-editor: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #e4e4e7;
    --bg-active: #e4e4e7;

    --border-subtle: #f0f0f2;
    --border-medium: #e4e4e7;
    --border-strong: #a1a1aa;

    --text-main: #09090b;
    --text-muted: #71717a;
    --text-light: #a1a1aa;
    --text-inverse: #ffffff;

    --danger-light: #fef2f2;
    --danger-border: #fecaca;
}

/* Nord / Arctic Frost Theme (Популярная) */
[data-theme="nord"] {
    --primary: #88c0d0;
    --primary-hover: #81a1c1;
    --primary-light: rgba(136, 192, 208, 0.16);
    --primary-border: rgba(136, 192, 208, 0.38);

    --emerald: #a3be8c;
    --emerald-hover: #8fae77;
    --emerald-light: rgba(163, 190, 140, 0.16);
    --emerald-border: rgba(163, 190, 140, 0.38);

    --accent: #ebcb8b;
    --accent-hover: #d8b776;
    --accent-light: rgba(235, 203, 139, 0.16);
    --accent-border: rgba(235, 203, 139, 0.38);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #20242c;
    --bg-sidebar: #2e3440;
    --bg-editor: #292e39;
    --bg-card: #3b4252;
    --bg-hover: #434c5e;
    --bg-active: rgba(136, 192, 208, 0.22);

    --border-subtle: #3b4252;
    --border-medium: #4c566a;
    --border-strong: #88c0d0;

    --text-main: #eceff4;
    --text-muted: #d8dee9;
    --text-light: #81a1c1;
    --text-inverse: #242933;

    --danger-light: rgba(191, 97, 106, 0.18);
    --danger-border: rgba(191, 97, 106, 0.4);
}

/* Sunset / Warm Coral Theme (Яркий закат) */
[data-theme="sunset"] {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-light: rgba(249, 115, 22, 0.16);
    --primary-border: rgba(249, 115, 22, 0.38);

    --emerald: #10b981;
    --emerald-hover: #059669;
    --emerald-light: rgba(16, 185, 129, 0.15);
    --emerald-border: rgba(16, 185, 129, 0.35);

    --accent: #facc15;
    --accent-hover: #eab308;
    --accent-light: rgba(250, 204, 21, 0.15);
    --accent-border: rgba(250, 204, 21, 0.35);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #140d09;
    --bg-sidebar: #1e130d;
    --bg-editor: #241710;
    --bg-card: #2e1d15;
    --bg-hover: #3d281e;
    --bg-active: rgba(249, 115, 22, 0.22);

    --border-subtle: #332117;
    --border-medium: #4d3324;
    --border-strong: #f97316;

    --text-main: #fff7ed;
    --text-muted: #fdba74;
    --text-light: #fb923c;
    --text-inverse: #140d09;

    --danger-light: rgba(239, 68, 68, 0.18);
    --danger-border: rgba(239, 68, 68, 0.4);
}

/* Dracula / Dark Gothic Theme (Популярная) */
[data-theme="dracula"] {
    --primary: #ff79c6;
    --primary-hover: #bd93f9;
    --primary-light: rgba(255, 121, 198, 0.16);
    --primary-border: rgba(255, 121, 198, 0.38);

    --emerald: #50fa7b;
    --emerald-hover: #38e063;
    --emerald-light: rgba(80, 250, 123, 0.15);
    --emerald-border: rgba(80, 250, 123, 0.35);

    --accent: #f1fa8c;
    --accent-hover: #dbe476;
    --accent-light: rgba(241, 250, 140, 0.15);
    --accent-border: rgba(241, 250, 140, 0.35);
    --accent-bg: rgba(254, 240, 138, 0.3);

    --bg-app: #191a21;
    --bg-sidebar: #21222c;
    --bg-editor: #282a36;
    --bg-card: #343746;
    --bg-hover: #44475a;
    --bg-active: rgba(189, 147, 249, 0.25);

    --border-subtle: #343746;
    --border-medium: #6272a4;
    --border-strong: #bd93f9;

    --text-main: #f8f8f2;
    --text-muted: #bd93f9;
    --text-light: #6272a4;
    --text-inverse: #282a36;

    --danger-light: rgba(255, 85, 85, 0.18);
    --danger-border: rgba(255, 85, 85, 0.4);
}

/* Space / Ocean Blue */
[data-theme="ocean"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;

    --emerald: #06b6d4;
    --emerald-hover: #0891b2;
    --emerald-light: #ecfeff;
    --emerald-border: #a5f3fc;

    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-light: #fffbeb;
    --accent-border: #fde68a;
    --accent-bg: #fef3c7;

    --bg-app: #f1f5f9;
    --bg-sidebar: #e8eef6;
    --bg-editor: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #dbeafe;
    --bg-active: #dbeafe;

    --border-subtle: #dbe4f0;
    --border-medium: #bdcde0;
    --border-strong: #8da5c2;

    --text-main: #172554;
    --text-muted: #526782;
    --text-light: #8497b1;
    --text-inverse: #ffffff;
}

/* Sakura / Pink Lavender */
[data-theme="sakura"] {
    --primary: #c05291;
    --primary-hover: #a63d7a;
    --primary-light: #fce7f3;
    --primary-border: #f3c4df;

    --emerald: #10b981;
    --emerald-hover: #059669;
    --emerald-light: #ecfdf5;
    --emerald-border: #a7f3d0;

    --accent: #a78bfa;
    --accent-hover: #8b5cf6;
    --accent-light: #f3e8ff;
    --accent-border: #ddd6fe;
    --accent-bg: #ede9fe;

    --bg-app: #fff7fb;
    --bg-sidebar: #fceef6;
    --bg-editor: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #fce7f3;
    --bg-active: #f5d5e9;

    --border-subtle: #f2dce9;
    --border-medium: #e8c5db;
    --border-strong: #d4a3c4;

    --text-main: #43243c;
    --text-muted: #88677f;
    --text-light: #b398ae;
    --text-inverse: #ffffff;
}

/* ==========================================================================
   User Menu Premium & Theme Picker Styles
   ========================================================================== */

.menu-premium-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 4px 8px 8px 8px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 179, 8, 0.25));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-premium-badge:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 179, 8, 0.35));
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
}

.menu-premium-badge.expired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.15));
    border-color: rgba(239, 68, 68, 0.3);
}

.premium-star {
    font-size: 16px;
    line-height: 1;
}

.premium-label {
    font-weight: 600;
    font-size: 12px;
    color: #d97706;
    flex: 1;
}

[data-theme="dark"] .premium-label,
[data-theme="emerald"] .premium-label,
[data-theme="purple"] .premium-label,
[data-theme="cyberpunk"] .premium-label,
[data-theme="nord"] .premium-label,
[data-theme="sunset"] .premium-label,
[data-theme="dracula"] .premium-label {
    color: #fbbf24;
}

.menu-premium-badge.expired .premium-label {
    color: var(--text-muted);
}

.premium-days {
    font-size: 11px;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.25);
    color: #b45309;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

[data-theme="dark"] .premium-days,
[data-theme="emerald"] .premium-days,
[data-theme="purple"] .premium-days,
[data-theme="cyberpunk"] .premium-days,
[data-theme="nord"] .premium-days,
[data-theme="sunset"] .premium-days,
[data-theme="dracula"] .premium-days {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-bg);
}

.premium-btn-action {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.menu-item-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.menu-item-theme .menu-item-title-text {
    flex: 1;
    text-align: left;
}

.menu-theme-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-border);
    white-space: nowrap;
}

/* ==========================================================================
   Модальное окно выбора темы
   ========================================================================== */

.theme-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.theme-popup {
    background: var(--bg-card);
    color: var(--text-main);
    width: 740px;
    max-width: calc(100% - 24px);
    max-height: 90vh;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-medium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popupSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
}

.theme-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-header-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.theme-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.theme-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.theme-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.theme-close:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.theme-body {
    padding: 20px 24px 30px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.theme-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(50% - 6px);
    max-width: 250px;
    padding: 26px 16px 16px 16px;
    background: var(--bg-app);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.theme-card:hover {
    background: var(--bg-card);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-card.active {
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 4px 12px var(--primary-light);
}

.theme-card.locked {
    opacity: 0.85;
}

.theme-card.locked:hover {
    border-color: var(--accent);
}

.theme-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.theme-card-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.theme-card-info {
    flex: 1;
    min-width: 0;
}

.theme-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.theme-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.35;
}

.theme-status-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    line-height: 1;
}

.theme-status-tag.active {
    background: var(--primary);
    color: #ffffff;
}

.theme-status-tag.locked {
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid var(--accent-border);
}

.theme-preview-palette {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.palette-swatch {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.palette-swatch.swatch-accent {
    width: 34px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.palette-swatch.swatch-accent::after {
    content: '★';
    font-size: 10px;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

.theme-footer-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-footer-hint:hover {
    filter: brightness(0.97);
}

.theme-footer-hint .hint-text {
    font-size: 12px;
    font-weight: 500;
    color: #92400e;
}

[data-theme="dark"] .theme-footer-hint .hint-text,
[data-theme="emerald"] .theme-footer-hint .hint-text,
[data-theme="purple"] .theme-footer-hint .hint-text,
[data-theme="cyberpunk"] .theme-footer-hint .hint-text,
[data-theme="nord"] .theme-footer-hint .hint-text,
[data-theme="sunset"] .theme-footer-hint .hint-text,
[data-theme="dracula"] .theme-footer-hint .hint-text {
    color: var(--accent-bg);
}

.btn-theme-unlock {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
}

/* Кнопка поиска с блокировкой */
.btn-square.btn-pro-locked {
    position: relative;
}

.toolbar-lock-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 9px;
    line-height: 1;
}

/* ==========================================================================
   Модальное окно Premium
   ========================================================================== */

.premium-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.premium-popup {
    background: var(--bg-card);
    color: var(--text-main);
    width: 580px;
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent);
}

.premium-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-sparkle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 0.9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.premium-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.premium-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.premium-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.premium-close:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* Статус-карточка */
.premium-status-card {
    margin: 16px 24px 8px 24px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.premium-status-card.status-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.premium-status-card.status-expired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.premium-status-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: #10b981;
    color: #fff;
    margin-bottom: 4px;
}

.premium-status-pill.expired {
    background: #ef4444;
}

.premium-status-dates {
    font-size: 13px;
    color: var(--text-main);
}

.premium-gift-tag {
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    background: rgba(16, 185, 129, 0.18);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

[data-theme="dark"] .premium-gift-tag,
[data-theme="emerald"] .premium-gift-tag,
[data-theme="purple"] .premium-gift-tag,
[data-theme="cyberpunk"] .premium-gift-tag,
[data-theme="nord"] .premium-gift-tag,
[data-theme="sunset"] .premium-gift-tag,
[data-theme="dracula"] .premium-gift-tag {
    color: #6ee7b7;
}

.premium-status-right {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
}

.btn-status-buy {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 13px 13px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-status-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
}

/* Сетка преимуществ */
.premium-features-grid {
    display: flex;
    /*flex-direction: column;*/
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
    overflow-y: auto;
    max-height: 350px;
}

.premium-feature-card {
    display: flex;
    align-items: flex-start;
    width: calc(50% - 4px);
    box-sizing: border-box;
    gap: 12px;
    padding: 14px 14px;
    background: var(--bg-app);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.premium-feature-card.highlight {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

.feature-icon {
    min-width: 26px;
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.feature-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* Блок активации */
.premium-activation-box {
    margin: 8px 24px 20px 24px;
    padding: 14px 18px;
    background: var(--bg-app);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-lg);
}

.activation-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.activation-row {
    display: flex;
    gap: 8px;
}

.activation-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
}

.activation-input:disabled {
    background: var(--bg-hover);
    color: var(--text-light);
    cursor: not-allowed;
}

.activation-btn {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.15s;
}

.activation-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.activation-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

.activation-msg {
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.4;
    font-weight: 500;
}

.activation-msg.error {
    color: #ef4444;
}

.activation-msg.success {
    color: #10b981;
}

/* Баннер выбора тарифа на странице /price */
.premium-buy-box {
    margin: 8px 24px 14px 24px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.premium-buy-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.premium-buy-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

.btn-premium-open-pricing {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-premium-open-pricing:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
}