/* --- Estilos para o Painel do Artista - Caixa de Ganhos --- */
.imz-artist-earnings-summary {
    background: linear-gradient(45deg, #10b981, #2dd4bf);
    color: #000000;
    padding: 20px 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(26, 211, 153, 0.3);
}

.imz-artist-earnings-summary h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.imz-artist-earnings-summary .imz-earnings-amount {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

/* --- Estilos para o Sistema de Pagamento (Payout) --- */
/* (Estilos antigos .imz-payout-section removidos ou substituídos abaixo) */

/* Estilos para o status no painel de admin e do artista */
span.imz-payout-status-pendente, span.imz-payout-status-concluido, span.imz-payout-status-cancelado {
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 12px;
    display: inline-block;
}
span.imz-payout-status-pendente {
    background-color: #fef3c7; /* Amarelo */
    color: #92400e;
}
span.imz-payout-status-concluido {
    background-color: #d1fae5; /* Verde */
    color: #065f46;
}
span.imz-payout-status-cancelado {
    background-color: #fee2e2; /* Vermelho */
    color: #991b1b;
}

/* --- Estilos para Mensagens de Notificação --- */
.imz-message {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 500;
}

.imz-message-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.imz-message-warning {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #2a2a2a;
    /* text-align: center; */ /* Removido para permitir alinhamento esquerdo */
}

.imz-message-error {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fecaca;
}

/* Estilos para a caixa de configuração inicial e Reivindicação */
.imz-setup-box, .claim-section {
    padding: 25px;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    margin-bottom: 40px;
    background-color: #1a1a1a;
}

.imz-setup-box h3, .claim-section h3 {
    margin-top: 0;
    color: #ffffff;
}

.imz-setup-box p, .claim-section p {
    color: #888888;
}

.claim-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #ffffff;
}

.claim-section input[type="url"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #333333;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.claim-section input[type="url"]:focus {
    border-color: #555555;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    outline: none;
}

.claim-section .imz-botao-principal {
    margin-top: 15px;
}

/* --- Estilos para o Uploader Moderno --- */
.imz-file-uploader {
    border: 2px dashed #333333;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    background-color: #141414;
    margin-top: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.imz-file-uploader:hover {
    border-color: #555555;
}

.imz-file-uploader-label {
    font-weight: 500;
    color: #ffffff;
    pointer-events: none;
}

.imz-file-uploader-label span {
    display: block;
    font-size: 12px;
    color: #888888;
    margin-top: 5px;
}

#claim_document_upload { /* Aplicado ao input file */
    display: none;
}

.imz-progress-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    height: 25px;
    margin-bottom: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imz-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.imz-progress-text {
    position: absolute;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.imz-file-notice {
    font-size: 12px;
    margin-top: 5px;
    min-height: 1em;
}

/* --- Estilo para a mensagem de conta bloqueada --- */
.imz-message.imz-account-blocked {
    text-align: center;
    padding: 20px !important;
    font-size: 16px;
    font-weight: bold;
}

/* --- Estilos para os Novos Acordeões Principais da Dashboard --- */
.imz-dashboard-section-accordion {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.imz-dashboard-section-accordion:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.imz-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
}

.imz-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.imz-accordion-toggle-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #222222;
    border-radius: 50%;
    color: #cccccc;
    font-size: 24px;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.2s ease;
}

.imz-accordion-toggle-icon::before {
    content: '+';
    line-height: 28px;
}

/* Estado ativo do botão/cabeçalho do acordeão */
.imz-section-header.active .imz-accordion-toggle-icon,
.imz-music-item-header.active .imz-accordion-toggle-icon /* Aplicar ao gestor de músicas também se necessário */
{
    transform: rotate(45deg);
    background-color: #ffffff;
    color: #000000;
}

.imz-section-content {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: #141414;
}

.imz-section-content.open {
    padding: 0 25px 25px 25px;
    border-top: 1px solid #2a2a2a;
}

/* --- Override de Cor para o Acordeão de Proteção --- */
.imz-dashboard-section-accordion.protection-accordion {
    background-color: #1a1a1a; /* Fundo amarelo suave */
    border-color: #2a2a2a; /* Borda amarela */
    border-left: 5px solid #555555;
}
.imz-dashboard-section-accordion.protection-accordion .imz-section-content.open {
    background-color: #1a1a1a; /* Garante que o interior também tem a cor */
    border-top-color: #2a2a2a;
}


/* --- Estilos para o Gestor de Músicas (Dentro de um acordeão) --- */
.imz-music-manager-section { /* Se usar este container */
    margin-top: 40px;
}

.imz-music-item {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.imz-music-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.imz-music-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
}

.imz-music-title {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

.imz-manage-button-fake-btn { /* Botão "Gerir" */
    background-color: #222222;
    color: #cccccc;
    border: 1px solid #2a2a2a;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover no cabeçalho inteiro muda o botão */
.imz-music-item-header.imz-manage-button:hover .imz-manage-button-fake-btn {
    background-color: #333333;
    border-color: #888888;
}

/* Estado ativo do botão quando o painel está aberto */
.imz-music-item-header.imz-manage-button.active .imz-manage-button-fake-btn {
    background-color: #ffffff;
    color: #000000;
    border-color: #cccccc;
}

/* Painel de configurações dentro de cada item de música */
.imz-music-item-settings {
    background-color: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 25px; /* Padding zero quando fechado */
}

.imz-music-item-settings.open {
    padding: 25px; /* Padding quando aberto */
}

.imz-music-item-settings .imz-form-group {
    margin-bottom: 20px;
}

.imz-music-item-settings .imz-form-group label {
    font-size: 14px;
    font-weight: 600;
}

.imz-music-item-settings .imz-form-group input[type="text"],
.imz-music-item-settings .imz-form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    box-sizing: border-box;
}

.imz-music-item-settings .imz-form-group input:disabled {
    background-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.7;
}

.imz-music-item-settings p.description {
    font-size: 13px;
    color: #888888;
    margin-top: 6px;
    margin-bottom: 0;
}

.imz-music-item-settings .imz-form-actions {
    margin-top: 25px;
    padding-bottom: 10px;
}

.imz-music-item-settings .imz-form-actions .imz-botao-principal {
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Aviso para funcionalidades PRO */
.imz-music-item-settings .pro-notice {
    text-align: center;
    font-weight: 500;
    color: var(--imz-color-danger, #ef4444);
    background-color: #fee2e2;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    border: 1px solid #2a2a2a;
}

/* --- Estilos para o Status de Distribuição (Ícones das Lojas) --- */
.imz-distribution-status {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.imz-distribution-status h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.imz-stores-icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.imz-stores-icon-list a {
    display: inline-block;
}

.imz-stores-icon-list img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.imz-stores-icon-list img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Estilos para o Painel de Estatísticas --- */
.imz-analytics-section { /* Container principal das tabelas */
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 25px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.imz-analytics-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.imz-analytics-table-container {
    overflow-x: auto; /* Permite scroll horizontal em telas pequenas */
}

.imz-analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.imz-analytics-table th,
.imz-analytics-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.imz-analytics-table thead th {
    background-color: #1a1a1a;
    font-weight: 600;
    color: #888888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.imz-analytics-table tbody tr:last-child td {
    border-bottom: none;
}

.imz-analytics-table tbody td {
    color: #ffffff;
}

.imz-analytics-table tbody td:first-child {
    font-weight: 600;
}

/* --- Estilos para a Secção de Proteção Digital --- */
.imz-protection-section { /* Usado dentro do acordeão de proteção */
    padding: 25px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-top: 40px;
    background-color: #1a1a1a; /* Fundo amarelo suave */
    border-left: 5px solid #555555;
}

.imz-protection-section h3 {
    margin-top: 0;
    color: #ffffff;
}

.imz-protection-section p {
    color: #888888;
}

.imz-takedown-form .imz-botao-principal {
    width: 100%;
    margin-top: 10px;
}

/* Tabela de histórico (se usada diretamente, não no acordeão) */
.imz-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.imz-history-table th,
.imz-history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #fde68a; /* Borda amarela */
}

.imz-history-table th {
    font-weight: 600;
}

/* Badges de Status (Takedown) */
.imz-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
    color: #000000;
}

.imz-status-badge.status-pendente { background-color: #f59e0b; } /* Amarelo */
.imz-status-badge.status-em-processo { background-color: #ffffff; } /* Azul */
.imz-status-badge.status-resolvido { background-color: #22c55e; } /* Verde */
.imz-status-badge.status-recusado { background-color: #ef4444; } /* Vermelho */


/* --- Estilos para o Histórico de Proteção Digital (Acordeão Takedown Item) --- */
.imz-takedown-item { /* Item individual no histórico */
    background-color: #141414;
    border: 1px solid #2a2a2a; /* Borda amarela */
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.imz-takedown-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.imz-takedown-item-header:hover {
    background-color: #fefcf5; /* Amarelo muito suave */
}

.imz-takedown-item-header .imz-status-badge {
    flex-shrink: 0;
    margin-left: 15px;
}

.imz-takedown-item-details { /* Conteúdo do histórico */
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: #141414;
}

.imz-takedown-item-details.open {
    padding: 20px 25px;
}

/* Linha do tempo visual para o log */
ul.imz-takedown-log-entries {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

ul.imz-takedown-log-entries::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: #2a2a2a;
}

ul.imz-takedown-log-entries li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}
ul.imz-takedown-log-entries li:last-child {
    margin-bottom: 0;
}

ul.imz-takedown-log-entries li::before { /* Bolinha da linha do tempo */
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #2a2a2a;
}

ul.imz-takedown-log-entries li:first-child::before { /* Primeira bolinha azul */
    background-color: #ffffff;
}

ul.imz-takedown-log-entries .log-date {
    font-size: 13px;
    font-weight: 600;
    color: #888888;
}

ul.imz-takedown-log-entries .log-note {
    font-size: 15px;
    color: #ffffff;
    margin: 4px 0 0 0;
}

/* --- Estilos para o Aviso Legal de Proteção Digital --- */
.imz-takedown-terms {
    background-color: #1a1a1a; /* Fundo vermelho suave */
    border: 1px solid #2a2a2a; /* Borda vermelha */
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.imz-takedown-terms p {
    margin-top: 0;
    margin-bottom: 10px;
    color: #888888;
}

.imz-takedown-terms .warning-text {
    color: #888888; /* Vermelho escuro */
    font-weight: 500;
}

label.imz-terms-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
}

label.imz-terms-checkbox-label input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


/* --- Estilos para as Tabs (Ativos / Concluídos) --- */
.imz-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #2a2a2a;
}

button.imz-tab-button {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: #888888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Para sobrepor a borda */
    transition: all 0.2s ease;
}

button.imz-tab-button:hover {
    color: #ffffff;
}

button.imz-tab-button.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.imz-tab-content {
    display: none;
}

.imz-tab-content.active {
    display: block;
}

/* Caixa de Destaque para o Pedido Recente (Takedown) */
.imz-featured-takedown {
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}


/* --- CÓDIGO PARA RESPONSIVIDADE MÓVEL --- */

/* Tablets e dispositivos médios */
@media (max-width: 768px) {
    /* Ajustes gerais de layout */
    .imz-artist-earnings-summary {
        padding: 16px 20px;
        margin-bottom: 20px;
    }
    
    .imz-artist-earnings-summary .imz-earnings-amount {
        font-size: 28px;
    }
    
    .imz-setup-box, .claim-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    /* Ajustes na secção de Finanças */
    .imz-payout-section {
        padding: 16px; /* Menos padding */
    }

    /* Tabelas de Estatísticas (ex: Analytics) */
    .imz-analytics-table thead {
        display: none; /* Esconde cabeçalho */
    }
    .imz-analytics-table, .imz-analytics-table tbody, .imz-analytics-table tr, .imz-analytics-table td {
        display: block; /* Transforma em blocos */
        width: 100%;
    }
    .imz-analytics-table tr {
        margin-bottom: 15px;
        border: 1px solid #2a2a2a;
        border-radius: 8px;
        overflow: hidden; /* Garante cantos arredondados */
    }
    .imz-analytics-table td {
        text-align: right; /* Alinha valor à direita */
        padding-left: 50%; /* Espaço para o label */
        position: relative;
        border-bottom: 1px solid #2a2a2a;
    }
    .imz-analytics-table td:last-child {
        border-bottom: none;
    }
    /* Adiciona o label (nome da coluna) antes do valor */
    .imz-analytics-table td::before {
        content: attr(data-label); /* Usa um atributo data-label (precisa ser adicionado no PHP) */
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        text-align: left;
        font-weight: 600;
        color: #888888;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* --- Painel de Estatísticas (Cards) --- */
.artist-dashboard h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 12px;
}
.artist-dashboard h2:first-of-type {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.imz-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.imz-stat-card {
    padding: 24px;
    border-radius: 10px;
    background: #141414;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s;
}

.imz-stat-card:hover { border-color: #444444; }
.imz-stat-card.downloads { border-top: 2px solid #60a5fa; }
.imz-stat-card.boosts    { border-top: 2px solid #a78bfa; }

.imz-stat-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.imz-stat-main .imz-stat-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    letter-spacing: -1px;
}

.imz-stat-main .imz-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #888888;
}

.imz-stat-details {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.imz-sub-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.imz-sub-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555555;
}

.imz-sub-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #cccccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* --- Painel Top Províncias --- */
.imz-locations-panel {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 32px;
    overflow: hidden;
}

.imz-locations-panel h3 {
    margin: 0;
    padding: 16px 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888888;
    border-bottom: 1px solid #2a2a2a;
    background: #0a0a0a;
    text-align: left;
}

.imz-locations-panel .imz-locations-list { display: flex; flex-direction: column; }

.imz-locations-panel .imz-location-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 24px;
    border-bottom: 1px solid #1f1f1f;
    transition: background 0.15s;
}

.imz-locations-panel .imz-location-item:last-child { border-bottom: none; }
.imz-locations-panel .imz-location-item:hover { background: #1a1a1a; }

.imz-locations-panel .imz-location-rank {
    font-size: 20px;
    width: 36px;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
}

.imz-locations-panel .imz-location-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    flex-grow: 1;
}

.imz-locations-panel .imz-location-count {
    font-size: 13px;
    font-weight: 500;
    color: #555555;
    white-space: nowrap;
}

.imz-locations-panel .imz-no-data {
    text-align: center;
    color: #555555;
    padding: 30px 24px;
    font-size: 14px;
}

/* Estilos para Estatísticas no Gestor de Músicas (Cabeçalho do item) */
.imz-music-item-header {
    align-items: center; /* Alinha verticalmente */
}

.imz-music-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1; /* Ocupa espaço */
    overflow: hidden; /* Evita quebra com título longo */
}

.imz-music-item-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0; /* Não encolhe */
}

.imz-item-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
}

.imz-item-stat svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Cores para stats por música */
.imz-item-stat.downloads {
    color: #60a5fa; /* Azul */
}
.imz-item-stat.downloads svg {
    fill: #60a5fa;
}

.imz-item-stat.boosts {
    color: #a78bfa; /* Roxo */
}
.imz-item-stat.boosts svg {
    fill: #a78bfa;
}

/* Estilo para o contador de vendas */
.imz-item-stat.sales {
    color: #4ade80; /* Verde (cor de sucesso) */
}
.imz-item-stat.sales svg {
    fill: #4ade80;
}

/* Smartphones e dispositivos pequenos */
@media (max-width: 480px) {
    /* Ajustes gerais */
    .imz-artist-earnings-summary {
        padding: 14px 16px;
        margin-bottom: 16px;
    }
    
    .imz-artist-earnings-summary .imz-earnings-amount {
        font-size: 24px;
    }
    
    .imz-artist-earnings-summary h4 {
        font-size: 14px;
    }
    
    .imz-setup-box, .claim-section {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .imz-message {
        padding: 12px;
        margin-bottom: 16px;
        font-size: 14px;
    }
    
    /* Responsividade para o gestor de músicas (cabeçalho) */
    .imz-music-item-header {
        flex-direction: column; /* Empilha elementos */
        align-items: flex-start; /* Alinha à esquerda */
        gap: 10px;
    }
    .imz-manage-button-fake-btn {
        margin-left: auto; /* Alinha o botão "Gerir" à direita */
    }
    .imz-music-item-stats {
        width: 100%; /* Ocupa largura */
        justify-content: flex-start; /* Alinha stats à esquerda */
    }
}

/* --- ESTILOS MELHORADOS PARA A SECÇÃO DE FINANÇAS --- */

.imz-payout-section {
    background-color: #1a1a1a; /* Fundo suave */
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 24px; /* Espaçamento interno */
    margin-bottom: 40px; /* Espaço abaixo */
    display: flex;
    flex-direction: column; /* Organiza os grupos um abaixo do outro */
    gap: 24px; /* Espaço entre os grupos */
}

/* Grupo do Saldo Principal e Botão */
.imz-balance-action-group {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar linha em telas pequenas */
    align-items: center; /* Alinha verticalmente */
    justify-content: space-between; /* Espaço entre saldo e botão */
    gap: 16px;
}

/* Saldo Principal */
.imz-artist-earnings-summary.main-balance {
    background: none;
    box-shadow: none;
    padding: 0;
    color: #ffffff;
    text-align: left;
    flex-grow: 1; /* Ocupa espaço disponível */
}

.imz-artist-earnings-summary.main-balance h4 {
    color: #888888;
    font-size: 14px; /* Tamanho menor */
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: none; /* Remove uppercase se houver */
    letter-spacing: normal; /* Remove letter-spacing se houver */
}

.imz-artist-earnings-summary.main-balance .imz-earnings-amount {
    font-size: 2.5rem; /* 40px - Tamanho bem destacado */
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff; /* Cor primária */
}

/* Container do Botão de Saque */
.imz-payout-button-container {
    text-align: right;
    flex-shrink: 0; /* Não encolhe */
}

.imz-payout-button {
    display: inline-flex; /* Para alinhar ícone e texto */
    align-items: center;
    gap: 8px; /* Espaço entre ícone e texto */
    background: #ffffff; /* Cor primária */
    color: #000000;
    border: none;
    padding: 12px 25px;
    font-size: 1rem; /* 16px */
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.imz-payout-button:hover:not(:disabled) {
    background: #cccccc; /* Cor mais escura no hover */
    transform: translateY(-1px);
}
.imz-payout-button:active:not(:disabled) {
    transform: translateY(0px);
}


.imz-payout-button:disabled {
    background: #2a2a2a;
    cursor: not-allowed;
    box-shadow: none;
}

.imz-payout-notice {
    font-size: 0.8rem; /* 12.8px */
    color: #888888;
    margin: 8px 0 0 0;
}

/* Grupo de Detalhe dos Ganhos */
.imz-earnings-breakdown {
    display: flex;
    gap: 24px; /* Espaço entre os detalhes */
    padding-top: 16px;
    border-top: 1px solid #2a2a2a; /* Linha divisória */
}

.imz-earnings-detail {
    flex: 1; /* Ocupa espaço igual */
}

.imz-earnings-detail h4 {
    color: #888888;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: none; /* Remove uppercase se houver */
    letter-spacing: normal; /* Remove letter-spacing se houver */
}

.imz-earnings-detail .imz-earnings-value {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Estilo para itens de venda concluída (opcional) */
.imz-completed-sale .imz-music-item-header {
    opacity: 0.8; /* Torna-os ligeiramente desvanecidos */
    cursor: default;
}
.imz-completed-sale .imz-music-item-header:hover {
    background-color: #1a1a1a; /* Fundo levemente diferente */
}


/* Responsividade para telas menores (Finanças) */
@media (max-width: 600px) {
    .imz-balance-action-group {
        flex-direction: column; /* Empilha saldo e botão */
        align-items: stretch; /* Ocupa largura total */
    }
    .imz-artist-earnings-summary.main-balance {
        text-align: center;
    }
    .imz-payout-button-container {
        text-align: center;
    }
    .imz-earnings-breakdown {
        flex-direction: column; /* Empilha detalhes */
        gap: 16px;
    }
    .imz-earnings-detail {
        text-align: center; /* Centraliza detalhes */
    }
}

/* Estilos para o Acordeão de Vendas */
.imz-dashboard-section-accordion.sales-accordion {
    border-left: 5px solid #555555; /* Borda esquerda azul (cor accent) */
    background-color: #141414; /* Fundo azul muito claro */
    border-color: #2a2a2a; /* Borda azul clara */
}


/* Garante que o conteúdo interno volta ao normal se necessário */
.imz-dashboard-section-accordion.sales-accordion .imz-section-content.open {
    background-color: #141414; /* Fundo branco normal para o conteúdo */
    border-top-color: #2a2a2a; /* Cor da borda superior do conteúdo */
}

/* Ajusta a cor do ícone no cabeçalho de vendas */
.imz-dashboard-section-accordion.sales-accordion .imz-section-header .imz-section-title svg {
    color: #60a5fa; /* Azul mais escuro para o ícone */
}

/* Opcional: Estilo para itens de venda concluída dentro do acordeão de vendas */
.imz-dashboard-section-accordion.sales-accordion .imz-completed-sale .imz-music-item-header {
    background-color: #1a1a1a; /* Mantém o fundo claro para itens concluídos */
}
/* =============================================================================
   DASHBOARD HEADER COM TOGGLE DE TEMA
   ============================================================================= */

.imz-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.imz-dashboard-header h2 {
    margin: 0;
}

.imz-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--imz-border-color);
    background: var(--imz-color-background-soft);
    color: var(--imz-color-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.imz-theme-toggle:hover {
    background: var(--imz-border-color);
    transform: rotate(15deg);
}

/* Dark mode: mostrar sol, esconder lua */
.artist-dashboard[data-theme="dark"] .imz-icon-sun { display: block; }
.artist-dashboard[data-theme="dark"] .imz-icon-moon { display: none; }

/* Light mode: mostrar lua, esconder sol */
.artist-dashboard[data-theme="light"] .imz-icon-sun { display: none; }
.artist-dashboard[data-theme="light"] .imz-icon-moon { display: block; }

/* =============================================================================
   GRÁFICO DE ATIVIDADE
   ============================================================================= */

.imz-chart-panel {
    background: var(--imz-color-background-soft);
    border: 1px solid var(--imz-border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.imz-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.imz-chart-header h3 {
    margin: 0;
    color: var(--imz-color-text);
    font-size: 18px;
    font-weight: 600;
}

.imz-chart-period-toggle {
    display: flex;
    gap: 0;
    background: var(--imz-color-background);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--imz-border-color);
}

.imz-period-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--imz-color-text-light);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.imz-period-btn.active {
    background: var(--imz-color-background-soft);
    color: var(--imz-color-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.imz-period-btn:hover:not(.active) {
    color: var(--imz-color-text);
}

.imz-chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.imz-chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--imz-color-text-light);
    font-size: 14px;
    background: var(--imz-color-background-soft);
    border-radius: 8px;
    z-index: 5;
}

.imz-chart-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--imz-border-color);
    border-top-color: var(--imz-color-text);
    border-radius: 50%;
    animation: imz-spin 0.8s linear infinite;
}

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

.imz-chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 16px;
}

.imz-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--imz-color-text-light);
}

.imz-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.imz-legend-dot.downloads {
    background: rgba(255, 255, 255, 0.9);
}

.imz-legend-dot.boosts {
    background: rgba(16, 185, 129, 0.9);
}

/* Light mode legend dots */
.artist-dashboard[data-theme="light"] .imz-legend-dot.downloads {
    background: rgba(37, 99, 235, 1);
}

/* =============================================================================
   LIGHT MODE OVERRIDES (Dashboard)
   ============================================================================= */

.artist-dashboard[data-theme="light"] {
    --imz-color-text: #111827;
    --imz-color-text-light: #6b7280;
    --imz-color-background: #f9fafb;
    --imz-color-background-soft: #ffffff;
    --imz-border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-stat-card {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.artist-dashboard[data-theme="light"] .imz-stat-value,
.artist-dashboard[data-theme="light"] .imz-stat-label,
.artist-dashboard[data-theme="light"] .imz-sub-stat-label,
.artist-dashboard[data-theme="light"] .imz-sub-stat-value {
    color: #111827;
}

.artist-dashboard[data-theme="light"] .imz-stat-label,
.artist-dashboard[data-theme="light"] .imz-sub-stat-label {
    color: #6b7280;
}

.artist-dashboard[data-theme="light"] .imz-chart-panel,
.artist-dashboard[data-theme="light"] .imz-locations-panel {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.artist-dashboard[data-theme="light"] .imz-setup-box,
.artist-dashboard[data-theme="light"] .claim-section {
    background: #ffffff;
    border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-setup-box h3,
.artist-dashboard[data-theme="light"] .claim-section h3 {
    color: #111827;
}

.artist-dashboard[data-theme="light"] .imz-setup-box p,
.artist-dashboard[data-theme="light"] .claim-section p {
    color: #6b7280;
}

.artist-dashboard[data-theme="light"] .imz-section-header {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-section-header:hover {
    background: #f3f4f6;
}

.artist-dashboard[data-theme="light"] .imz-section-title {
    color: #111827;
}

.artist-dashboard[data-theme="light"] .imz-music-item-settings {
    background: #ffffff;
    border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-music-item-header {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-payout-section {
    border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-earnings-breakdown {
    border-color: #e5e7eb;
}

.artist-dashboard[data-theme="light"] .imz-period-btn.active {
    background: #f3f4f6;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.artist-dashboard[data-theme="light"] h2,
.artist-dashboard[data-theme="light"] h3,
.artist-dashboard[data-theme="light"] h4 {
    color: #111827;
}

.artist-dashboard[data-theme="light"] .imz-location-name {
    color: #111827;
}

.artist-dashboard[data-theme="light"] .imz-location-count {
    color: #6b7280;
}

.artist-dashboard[data-theme="light"] table th,
.artist-dashboard[data-theme="light"] table td {
    color: #111827;
    border-bottom-color: #e5e7eb;
}

@media (max-width: 600px) {
    .imz-chart-container {
        height: 220px;
    }
    .imz-chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================================================
   UTILITÁRIOS (migração de estilos inline do artist-dashboard-display.php)
   ============================================================================= */

.imz-input {
    width: 100%;
    padding: 8px;
}

.imz-mt0 {
    margin-top: 0;
}

.imz-btn-compact {
    margin-top: 0;
    font-size: 16px;
    padding: 10px 20px;
}

.imz-btn-success {
    background: var(--imz-color-success);
}

.imz-btn-danger-soft {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.imz-form-messages {
    margin-top: 15px;
}

.imz-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Toasts: estilos movidos para frontend.css (partilhados com o painel de anúncios). */
