/* Shared finishing pass for the cabinet section redesigns. */

.stats-dash,
.money-desk,
.profile-v2,
.sl2,
.tools-page--pro,
.tools-admin-page,
.auto-form-page,
.profile-edit-page,
.profile-password-page,
.news-v2,
.news-reader,
.news-editor,
.svc-updates-refine,
.documents-hub {
    --section-accent: var(--primary, #c3f000);
    --section-accent-soft: rgba(195, 240, 0, 0.12);
    --section-line: var(--border, #222833);
    --section-surface: var(--bg-secondary, #11141a);
}

.stats-dash__notice {
    border-color: color-mix(in srgb, var(--section-accent) 32%, transparent);
    background: var(--section-accent-soft);
}

.stats-dash__notice .material-icons {
    color: var(--section-accent);
}

.stats-dash__toolbar,
.stats-dash__hero,
.stats-dash__metric,
.stats-dash__card,
.stats-dash__table-card,
.stats-dash__page-empty {
    border-color: var(--section-line);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.stats-dash__hero {
    background:
        radial-gradient(520px 180px at 100% 0, var(--section-accent-soft), transparent 70%),
        var(--section-surface);
}

.stats-dash__metric {
    background: linear-gradient(145deg, var(--section-accent-soft), var(--section-surface) 72%);
}

.stats-dash__chip.is-active,
.stats-dash__tab.is-active {
    border-color: color-mix(in srgb, var(--section-accent) 55%, var(--section-line));
    background: var(--section-accent-soft);
    color: var(--text-primary);
}

.stats-dash__bar-fill {
    background: linear-gradient(90deg, var(--section-accent), var(--success, #1fd8a5));
}

.stats-dash--detail {
    max-width: 1040px;
}

.stats-dash__detail-nav,
.stats-dash__detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.stats-dash__detail-nav {
    justify-content: flex-start;
    color: var(--text-tertiary);
    font-size: 0.84rem;
}

.stats-dash__detail-nav a {
    color: var(--text-secondary);
    text-decoration: none;
}

.stats-dash__detail-nav .material-icons {
    font-size: 1.1rem;
}

.stats-dash__detail-head {
    margin: 0.75rem 0 1.25rem;
}

.stats-dash__detail-kicker {
    margin: 0 0 0.3rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.stats-dash--detail > .card {
    overflow: hidden;
    border: 1px solid var(--section-line);
    border-radius: 18px;
    background: var(--section-surface);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.stats-dash--detail > .card .card-content {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.stats-dash--detail > .card p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--section-line);
}

.stats-dash--detail > .card p:last-child {
    border-bottom: 0;
}

.money-desk {
    --md-accent: var(--primary, #c3f000);
    --md-accent-soft: var(--section-accent-soft);
    max-width: 1180px;
}

.money-desk__hero {
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.money-desk__hero-main {
    background:
        radial-gradient(500px 220px at 0 0, rgba(195, 240, 0, 0.18), transparent 72%),
        linear-gradient(145deg, #151a16, #0d1110);
}

.money-desk__hero-main .money-desk__eyebrow {
    color: #d4f533;
}

.money-desk__balance {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.045em;
}

.money-desk__schedule,
.money-desk__panel,
.money-desk-detail__head,
.finance-form-card {
    border-color: var(--section-line);
    border-radius: 18px;
}

.money-desk__panel,
.finance-form-card {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.money-desk__table tbody tr:hover {
    background: var(--section-accent-soft);
}

.money-desk__table tfoot th,
.money-desk__table tfoot td {
    border-top: 1px solid var(--section-line);
}

.money-desk__btn--primary {
    background: var(--section-accent);
    border-color: var(--section-accent);
    color: #101208;
}

.profile-v2 {
    max-width: 1120px;
}

.profile-v2__hero {
    border-color: var(--section-line);
    background:
        radial-gradient(ellipse at 0 0, var(--section-accent-soft), transparent 56%),
        var(--section-surface);
}

.profile-v2__avatar {
    border-color: color-mix(in srgb, var(--section-accent) 55%, transparent);
    box-shadow: 0 8px 22px rgba(195, 240, 0, 0.12);
}

.profile-v2__chip--role-artist,
.profile-v2__nav a:hover,
.profile-v2__card-title .material-icons {
    color: var(--section-accent);
}

.profile-v2__chip--role-artist {
    border-color: color-mix(in srgb, var(--section-accent) 42%, transparent);
    background: var(--section-accent-soft);
}

.profile-v2__card,
.profile-v2__field,
.profile-v2__connect-row,
.profile-v2__device {
    border-color: var(--section-line);
}

.profile-v2__nav a:hover {
    border-color: color-mix(in srgb, var(--section-accent) 45%, var(--section-line));
    background: var(--section-accent-soft);
}

.profile-v2-edit .profile-edit-form {
    max-width: 760px;
}

.profile-v2-edit .form-control,
.profile-tax-form-fields .form-control {
    min-height: 46px;
    border-radius: 12px;
}

.sl2 {
    --sl2-accent: var(--primary, #c3f000);
    --sl2-accent-soft: var(--section-accent-soft);
    --sl2-accent-mid: color-mix(in srgb, var(--section-accent) 35%, transparent);
    max-width: 1120px;
}

.sl2-btn--primary {
    color: #101208;
}

.sl2-btn--primary:hover {
    color: #101208;
}

.sl2-card,
.sl2-metric,
.sl2-detail,
.sl2-form-card {
    border-radius: 18px;
}

.sl2-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--section-accent) 45%, var(--section-line));
}

.rtv-page {
    max-width: 1120px;
    margin-inline: auto;
}

.app-container .rtv-page .rtv-card {
    border-color: var(--section-line);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.app-container .rtv-page .rtv-card__left {
    background:
        radial-gradient(circle at 85% 15%, rgba(195, 240, 0, 0.18), transparent 38%),
        linear-gradient(145deg, #171d17, #101411);
}

.app-container .rtv-page .rtv-card__badge {
    color: #d4f533;
}

.app-container .rtv-page .rtv-card__list .material-icons {
    color: var(--section-accent);
}

.app-container .rtv-page .rtv-service-option {
    border-radius: 12px;
}

.app-container .rtv-page .rtv-service-option.selected {
    border-color: var(--section-accent);
    background: var(--section-accent-soft);
}

.tools-page--pro {
    --tools-accent: var(--primary, #c3f000);
}

.app-container .tools-page--pro .tools-hero {
    border: 1px solid var(--section-line);
    border-radius: 22px;
    margin-bottom: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    background:
        radial-gradient(540px 250px at 90% 0, var(--section-accent-soft), transparent 72%),
        var(--section-surface);
}

.app-container .tools-page--pro .tools-hero-title,
.app-container .tools-page--pro .tools-hero-subtitle,
.app-container .tools-page--pro .tools-form-section-title,
.app-container .tools-page--pro .tools-list-title-pro {
    color: var(--text-primary);
}

.app-container .tools-page--pro .tools-hero-subtitle {
    opacity: 1;
}

.app-container .tools-page--pro .tools-hero-actions .btn {
    border: 1px solid var(--section-line);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.app-container .tools-page--pro .tools-hero-actions .btn:hover {
    border-color: color-mix(in srgb, var(--section-accent) 48%, var(--section-line));
    background: var(--section-accent-soft);
    box-shadow: none;
}

.app-container .tools-page--pro .tools-form-section,
.app-container .tools-page--pro .tools-pitch-card-pro,
.app-container .cover-gen-panel,
.app-container .auto-form-page > .card,
.app-container .tools-admin-page .tools-admin-card,
.app-container .tools-admin-page > .card,
.app-container .profile-edit-page .profile-tax-edit-card {
    border: 1px solid var(--section-line);
    border-radius: 18px;
    background: var(--section-surface);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.tools-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tools-list-filter-btn {
    min-height: 36px;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--section-line);
    border-radius: 999px;
    background: var(--section-surface);
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
}

.tools-list-filter-btn.active,
.tools-list-filter-btn:hover {
    border-color: color-mix(in srgb, var(--section-accent) 50%, var(--section-line));
    background: var(--section-accent-soft);
    color: var(--text-primary);
}

.tools-pitch-card-pro[hidden] {
    display: none !important;
}

.tools-pitch-reference {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.app-container .auto-form-page > .card {
    padding: clamp(1rem, 3vw, 2rem) !important;
}

.auto-form-page .form-control,
.app-container .tools-page--pro .form-control,
.app-container .cover-gen-page .form-control {
    min-height: 44px;
    border-radius: 12px;
}

.app-container .auto-form-page .auto-form-hint {
    border-radius: 12px;
}

.app-container .tools-admin-page {
    max-width: 1120px;
    margin-inline: auto;
}

.app-container .tools-admin-page .tools-admin-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.45rem;
    border: 1px solid var(--section-line);
    border-radius: 14px;
    background: var(--section-surface);
}

.app-container .tools-admin-page .tools-admin-tab {
    flex: 0 0 auto;
    border-radius: 10px;
}

.app-container .profile-edit-page .profile-tax-edit-card {
    overflow: hidden;
}

.app-container .profile-edit-page .profile-tax-edit-card .card-header {
    border-bottom: 1px solid var(--section-line);
}

.app-container .profile-edit-page .profile-tax-form .form-control {
    min-height: 44px;
    border-radius: 12px;
}

.app-container .profile-password-page {
    max-width: 680px;
    margin-inline: auto;
}

.app-container .profile-password-page .profile-password-card {
    overflow: hidden;
    border: 1px solid var(--section-line);
    border-radius: 18px;
    background: var(--section-surface);
}

.app-container .profile-password-form .form-control {
    min-height: 44px;
    border-radius: 12px;
}

.documents-hub__sheet {
    border-color: var(--section-line);
    border-radius: 20px;
}

.documents-hub__table tbody tr:hover {
    background: var(--section-accent-soft);
}

.documents-hub__upload-form {
    border: 1px solid var(--section-line);
    border-radius: 14px;
    background: var(--section-surface);
}

.news-v2__featured,
.news-v2__card,
.news-reader__article,
.news-reader__aside,
.news-editor__card,
.svc-updates-refine__form-card {
    border-radius: 20px;
}

.news-v2__card:hover {
    border-color: color-mix(in srgb, var(--news-accent) 40%, var(--news-line));
    transform: translateY(-3px);
}

.news-reader__content {
    overflow-wrap: anywhere;
}

.svc-updates-refine__form-card,
.svc-updates-refine__item {
    border-color: var(--section-line);
}

.svc-updates-refine .telegram-type-preview {
    max-width: 420px;
    margin: 0.5rem auto 1.25rem;
    overflow: hidden;
    border: 1px solid var(--section-line);
    border-radius: 16px;
    background: var(--section-surface);
}

.rl5-panel,
.rl5-hero,
.rl5-submit {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.rl5-track__summary:focus-visible,
.rl5-btn:focus-visible,
.money-desk__btn:focus-visible,
.sl2-btn:focus-visible,
.tools-list-filter-btn:focus-visible,
.profile-v2__nav a:focus-visible {
    outline: 2px solid var(--section-accent);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .stats-dash__toolbar,
    .stats-dash__toolbar--admin {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-dash__field--artist,
    .stats-dash__field--release,
    .stats-dash__admin-inline {
        grid-column: 1 / -1;
    }

    .money-desk__hero {
        grid-template-columns: 1fr;
    }

    .profile-v2__hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .profile-v2__actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .stats-dash__toolbar,
    .stats-dash__toolbar--admin {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.8rem;
    }

    .stats-dash__field--artist,
    .stats-dash__field--release,
    .stats-dash__admin-inline {
        grid-column: auto;
    }

    .stats-dash__hero {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .stats-dash__cover {
        width: 64px;
        height: 64px;
    }

    .money-desk__hero-main,
    .money-desk__hero-side {
        padding: 1.1rem;
    }

    .money-desk__table {
        min-width: 620px;
    }

    .profile-v2__hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-v2__avatar {
        margin-inline: auto;
    }

    .profile-v2__meta,
    .profile-v2__actions {
        justify-content: center;
    }

    .stats-dash__detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-dash--detail > .card p {
        display: block;
    }

    .profile-v2__fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .tools-list-header,
    .rtv-card__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .tools-list-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .tools-list-filter-btn {
        flex: 0 0 auto;
    }

    .news-v2__masthead {
        border-radius: 18px;
    }

    .news-reader__body {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl2,
    .news-v2__card,
    .sl2-card,
    .rl5-btn {
        animation: none !important;
        transition: none !important;
    }
}
