/* ============================================================
   Vibrancy Music — Themes
   Переопределяет переменные из dashboard.css / auth.css
   через html[data-theme="…"].
   ============================================================ */

/* ── Переключатель тем ── */
.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-right: 8px;
}

.theme-switcher__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
}

.theme-switcher__btn:hover {
    color: var(--text);
    background: var(--bg-2);
}

.theme-switcher__btn.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .theme-switcher { margin-right: 4px; padding: 2px; }
    .theme-switcher__btn { width: 24px; height: 24px; font-size: 12px; }
}

/* ────────────────────────────────────────────────────────────
   ТЕМА: СВЕТЛАЯ
   ──────────────────────────────────────────────────────────── */
html[data-theme="light"] {
    color-scheme: light;
    --bg: #fafafa;
    --bg-2: #ffffff;
    --bg-3: #f0f0f0;
    --text: #1a1a1a;
    --text-dim: #4a4a4a;
    --muted: #8a8a8a;
    --accent: #d92020;
    --accent-hover: #ff3333;
    --border: #e2e2e2;
    --border-strong: #c8c8c8;
}

html[data-theme="light"] body::after { opacity: 0.02; }
html[data-theme="light"] .poster::before { opacity: 0.15; }

/* ────────────────────────────────────────────────────────────
   ТЕМА: ВИНИЛ (vintage record sleeve)
   ──────────────────────────────────────────────────────────── */
html[data-theme="vinyl"] {
    color-scheme: light;
    /* Состаренная бумага */
    --bg: #e8dcc0;
    --bg-2: #f0e6d0;
    --bg-3: #d8c9a8;
    /* Глубокие чернила */
    --text: #1a0f0a;
    --text-dim: #4a3527;
    --muted: #8b7560;
    /* Бычья кровь — как у винтажных лейблов */
    --accent: #8b0000;
    --accent-hover: #a30000;
    /* Тёплые бежевые границы */
    --border: #c9b591;
    --border-strong: #a88a5c;
}

/* ── Фон: бумага с лёгкими винъетками ── */
html[data-theme="vinyl"] body {
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 12% 18%, rgba(139, 0, 0, 0.05) 0%, transparent 42%),
        radial-gradient(ellipse at 88% 82%, rgba(74, 53, 39, 0.05) 0%, transparent 42%);
    background-attachment: fixed;
}

/* Приглушаем шум — в печатной теме он не нужен */
html[data-theme="vinyl"] body::after { opacity: 0.012; }

/* ── Шапки — как верхний обрез конверта ── */
html[data-theme="vinyl"] .dash-header,
html[data-theme="vinyl"] .adm-header {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-strong);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 2px 6px rgba(74, 53, 39, 0.08);
}

/* ── Заголовки — «гравировка» на бумаге ── */
html[data-theme="vinyl"] .page-head h1,
html[data-theme="vinyl"] .poster-main h1,
html[data-theme="vinyl"] .adm-h1 {
    text-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.45),
        -1px -1px 0 rgba(74, 53, 39, 0.06);
    letter-spacing: 0.005em;
}

/* ── Метки-штампы на заголовках ── */
html[data-theme="vinyl"] .page-head .label,
html[data-theme="vinyl"] .form-head-label {
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent);
    color: var(--bg-2);
    letter-spacing: 0.18em;
    border-radius: 2px;
    box-shadow: 1px 1px 0 rgba(26, 15, 10, 0.25);
}

/* ── Карточки — как напечатанные обложки ── */
html[data-theme="vinyl"] .overview-card,
html[data-theme="vinyl"] .claim-item,
html[data-theme="vinyl"] .plan-card,
html[data-theme="vinyl"] .stats-card,
html[data-theme="vinyl"] .stats-table-wrap,
html[data-theme="vinyl"] .stats-chart-box,
html[data-theme="vinyl"] .adm-card,
html[data-theme="vinyl"] .add-box,
html[data-theme="vinyl"] .adm-stat,
html[data-theme="vinyl"] .adm-search {
    border-color: var(--border-strong);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        2px 2px 0 rgba(74, 53, 39, 0.06),
        0 1px 2px rgba(74, 53, 39, 0.04);
}

html[data-theme="vinyl"] .overview-card:hover {
    background: var(--bg-3);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        3px 3px 0 rgba(139, 0, 0, 0.14),
        0 2px 6px rgba(74, 53, 39, 0.08);
}

/* ── Кнопки — как этикетки на пластинках ── */
html[data-theme="vinyl"] .btn-primary,
html[data-theme="vinyl"] .adm-btn--primary {
    color: var(--bg-2);
    border-radius: 2px;
    letter-spacing: 0.1em;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(26, 15, 10, 0.25);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        2px 2px 0 rgba(26, 15, 10, 0.18);
}

html[data-theme="vinyl"] .btn-primary:hover,
html[data-theme="vinyl"] .adm-btn--primary:hover {
    transform: translate(-1px, -1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        3px 3px 0 rgba(26, 15, 10, 0.25);
}

html[data-theme="vinyl"] .btn,
html[data-theme="vinyl"] .adm-btn {
    border-radius: 2px;
}

html[data-theme="vinyl"] .btn-ghost {
    border-color: var(--border-strong);
}

/* ── Поля ввода — с лёгкой «вдавленностью» ── */
html[data-theme="vinyl"] .form-field input,
html[data-theme="vinyl"] .adm-field input,
html[data-theme="vinyl"] .adm-field select,
html[data-theme="vinyl"] .adm-field textarea,
html[data-theme="vinyl"] .adm-search input,
html[data-theme="vinyl"] .adm-search select,
html[data-theme="vinyl"] .stats-filters select {
    background: var(--bg-2);
    border-color: var(--border-strong);
    box-shadow: 0 1px 2px rgba(74, 53, 39, 0.08) inset;
}

html[data-theme="vinyl"] .form-field input:focus,
html[data-theme="vinyl"] .adm-field input:focus,
html[data-theme="vinyl"] .adm-field select:focus,
html[data-theme="vinyl"] .adm-field textarea:focus,
html[data-theme="vinyl"] .adm-search input:focus,
html[data-theme="vinyl"] .adm-search select:focus {
    background: var(--bg-2);
    border-color: var(--accent);
    box-shadow:
        0 0 0 2px rgba(139, 0, 0, 0.12),
        0 1px 2px rgba(74, 53, 39, 0.08) inset;
}

/* ── Таблицы — как страница учётной книги ── */
html[data-theme="vinyl"] .adm-table thead th,
html[data-theme="vinyl"] .stats-table th {
    background: var(--bg-3);
    color: var(--text-dim);
    border-bottom: 1px solid var(--border-strong);
}

html[data-theme="vinyl"] .adm-table tbody tr:hover,
html[data-theme="vinyl"] .stats-table tbody tr:hover {
    background: rgba(139, 0, 0, 0.045);
}

/* ── Активные пункты меню — как выбранный трек ── */
html[data-theme="vinyl"] .dash-nav a.is-active,
html[data-theme="vinyl"] .adm-nav a.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Планы — как мини-обложки ── */
html[data-theme="vinyl"] .plan-card--featured {
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        2px 2px 0 rgba(139, 0, 0, 0.16);
}

html[data-theme="vinyl"] .plan-card__badge {
    background: var(--accent);
    color: var(--bg-2);
    box-shadow: 1px 1px 0 rgba(26, 15, 10, 0.3);
}

/* ── Разделители — как линованная бумага ── */
html[data-theme="vinyl"] .group-title,
html[data-theme="vinyl"] .adm-h2 {
    border-bottom-color: var(--border-strong);
    position: relative;
}

html[data-theme="vinyl"] .group-title::after,
html[data-theme="vinyl"] .adm-h2::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--accent);
    opacity: 0.18;
}

/* ── Постер (auth-страница) — обложка + пластинка ── */
html[data-theme="vinyl"] .poster {
    background:
        radial-gradient(ellipse at 88% 22%, rgba(139, 0, 0, 0.07) 0%, transparent 55%),
        var(--bg);
}

html[data-theme="vinyl"] .poster::before { opacity: 0.14; }
html[data-theme="vinyl"] .poster-main { position: relative; z-index: 1; }

/* Декоративная виниловая пластинка в углу постера */
html[data-theme="vinyl"] .poster::after {
    content: '';
    position: absolute;
    right: -18%;
    bottom: -22%;
    width: 68%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle,
            #7a0000 0%, #7a0000 5.5%,
            #1a0f0a 5.5%, #1a0f0a 6.4%,
            transparent 6.4%, transparent 8%,
            rgba(26, 15, 10, 0.7) 8%, rgba(26, 15, 10, 0.7) 8.3%,
            transparent 8.3%, transparent 11%,
            rgba(26, 15, 10, 0.5) 11%, rgba(26, 15, 10, 0.5) 11.25%,
            transparent 11.25%, transparent 15%,
            rgba(26, 15, 10, 0.35) 15%, rgba(26, 15, 10, 0.35) 15.2%,
            transparent 15.2%, transparent 20%,
            rgba(26, 15, 10, 0.25) 20%, rgba(26, 15, 10, 0.25) 20.12%,
            transparent 20.12%, transparent 27%,
            rgba(26, 15, 10, 0.15) 27%, rgba(26, 15, 10, 0.15) 27.08%,
            transparent 27.08%, transparent 36%,
            rgba(26, 15, 10, 0.08) 36%, rgba(26, 15, 10, 0.08) 36.06%,
            transparent 36.06%);
    opacity: 0.42;
}

@media (max-width: 900px) {
    html[data-theme="vinyl"] .poster::after { display: none; }
}

/* ── Опционально: вращение пластинки ── */
@keyframes vinyl-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

html[data-theme="vinyl"] .poster::after {
    transform-origin: 50% 50%;
    animation: vinyl-spin 48s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="vinyl"] .poster::after { animation: none; }
}

//* ============================================================
   ЛОГОТИП — крупный, контрастный, читаемый во всех темах
   ============================================================ */

/* ── Auth-poster: контейнер ── */
.poster-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    background: rgba(0, 0, 0, 0.45);   /* тёмная плашка по умолчанию */
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    min-height: 96px;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 4px 16px rgba(0, 0, 0, 0.35);
}

.poster-logo:hover {
    background: rgba(0, 0, 0, 0.55);
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 4px 20px rgba(255, 46, 46, 0.18);
}

/* ── Auth-poster: сама картинка ── */
.poster-logo img {
    height: 96px;              /* было 64px (и 44px в auth.css) */
    width: auto;
    max-width: 420px;
    object-fit: contain;
    /* белый логотип + мягкая тень для контраста */
    filter: brightness(0) invert(1) drop-shadow(0 3px 12px rgba(0, 0, 0, 0.55));
}

/* ── Светлая тема: чёрный логотип на белой плашке ── */
html[data-theme="light"] .poster-logo {
    background: #ffffff;
    border-color: var(--border-strong);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 2px 12px rgba(0, 0, 0, 0.10);
}
html[data-theme="light"] .poster-logo:hover {
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 4px 16px rgba(217, 32, 32, 0.15);
}
html[data-theme="light"] .poster-logo img {
    filter: brightness(0) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

/* ── Виниловая тема: «чернильный» логотип-штамп на кремовой плашке ── */
html[data-theme="vinyl"] .poster-logo {
    background: var(--bg-2);
    border: 2px solid var(--accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        3px 3px 0 rgba(139, 0, 0, 0.20),
        0 2px 8px rgba(74, 53, 39, 0.10);
}
html[data-theme="vinyl"] .poster-logo:hover {
    border-color: var(--accent-hover);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        4px 4px 0 rgba(139, 0, 0, 0.28),
        0 3px 10px rgba(74, 53, 39, 0.14);
}
html[data-theme="vinyl"] .poster-logo img {
    /* тёмно-сепийный оттенок как чернила на винтажном конверте */
    filter: brightness(0) sepia(0.35) drop-shadow(1px 1px 0 rgba(139, 0, 0, 0.15));
}

/* ── Текстовые логотипы дашборда и админки ── */
.dash-logo,
.adm-logo {
    font-size: 1.5rem;         /* было 1.35rem (dash) / 1rem (adm) */
    padding: 4px 0;
    letter-spacing: 0.18em;
    text-shadow: 0 0 28px rgba(255, 46, 46, 0.45);
}

.dash-logo span,
.adm-logo span {
    font-size: 0.85rem;
    margin-left: 8px;
    opacity: 0.9;
}

/* ── Адаптив ── */
@media (max-width: 1024px) {
    .poster-logo { padding: 12px 18px; min-height: 84px; }
    .poster-logo img { height: 80px; max-width: 360px; }
    .dash-logo,
    .adm-logo { font-size: 1.35rem; }
}

@media (max-width: 768px) {
    .poster-logo { padding: 10px 14px; min-height: 72px; }
    .poster-logo img { height: 64px; max-width: 300px; }
    .dash-logo,
    .adm-logo { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .poster-logo { padding: 8px 12px; min-height: 60px; }
    .poster-logo img { height: 52px; max-width: 240px; }
    .dash-logo,
    .adm-logo { font-size: 1.05rem; letter-spacing: 0.12em; }
}

/* ── Текстовые логотипы в светлой теме — красная подсветка не так бросается ── */
html[data-theme="light"] .dash-logo,
html[data-theme="light"] .adm-logo {
    text-shadow: 0 0 20px rgba(217, 32, 32, 0.25);
}

/* ── Текстовые логотипы в виниловой теме — тиснение ── */
html[data-theme="vinyl"] .dash-logo,
html[data-theme="vinyl"] .adm-logo {
    text-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.45),
        -1px -1px 0 rgba(74, 53, 39, 0.08);
}