/* ============================================================
   1MZ Admin — Backend Styles (admin.css) v3.0
   Estilo: Moderno, limpo, compatível com o WordPress Admin
   Não força dark mode — complementa a interface nativa do WP
   ============================================================ */

/* ----------------------------------------------------------
   1. Badges de Status — pills coloridos
   ---------------------------------------------------------- */
.imz-admin-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    line-height: 1.6;
    white-space: nowrap;
}

.imz-admin-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .75;
}

.imz-admin-status.status-pendente { background: #fef9c3; color: #854d0e; }
.imz-admin-status.status-aprovado { background: #dcfce7; color: #166534; }
.imz-admin-status.status-recusado { background: #fee2e2; color: #991b1b; }

span[class^="imz-payout-status-"] {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    border: 1px solid;
}

span.imz-payout-status-pendente  { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
span.imz-payout-status-concluido { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
span.imz-payout-status-cancelado { background: #fee2e2; color: #991b1b; border-color: #fecaca; }


/* ----------------------------------------------------------
   2. Meta Boxes — borda superior colorida + cabeçalho suave
   ---------------------------------------------------------- */
#imz_info,
#imz_extras,
#imz_download_details_box,
#imz_digital_stores_box,
#imz_disable_boost_box,
#imz_monetization_management,
#imz_youtube_link_box,
#imz_claim_details,
#imz_claim_actions,
#imz_takedown_details,
#imz_takedown_log,
#imz_takedown_status,
#imz_subscription_details,
#imz_subscription_status {
    border-top: 3px solid #2271b1 !important;
}

#imz_info .hndle,
#imz_extras .hndle,
#imz_download_details_box .hndle,
#imz_digital_stores_box .hndle,
#imz_disable_boost_box .hndle,
#imz_monetization_management .hndle,
#imz_youtube_link_box .hndle,
#imz_claim_details .hndle,
#imz_claim_actions .hndle,
#imz_takedown_details .hndle,
#imz_takedown_log .hndle,
#imz_takedown_status .hndle,
#imz_subscription_details .hndle,
#imz_subscription_status .hndle {
    background: #f6f7f7 !important;
    border-bottom: 1px solid #dcdcde !important;
}

#imz_info .hndle h2,
#imz_extras .hndle h2,
#imz_download_details_box .hndle h2,
#imz_digital_stores_box .hndle h2,
#imz_disable_boost_box .hndle h2,
#imz_monetization_management .hndle h2,
#imz_youtube_link_box .hndle h2,
#imz_claim_details .hndle h2,
#imz_claim_actions .hndle h2,
#imz_takedown_details .hndle h2,
#imz_takedown_log .hndle h2,
#imz_takedown_status .hndle h2,
#imz_subscription_details .hndle h2,
#imz_subscription_status .hndle h2 {
    color: #1d2327 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* form-table dentro das meta boxes */
.postbox .form-table th {
    font-size: 13px;
    color: #50575e;
    font-weight: 600;
    padding: 12px 10px 12px 0;
    vertical-align: top;
    width: 180px;
}

.postbox .form-table td {
    padding: 10px 0;
    vertical-align: top;
}


/* ----------------------------------------------------------
   3. Grid de info (imz_render_info_box)
   ---------------------------------------------------------- */
.imz-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}

.imz-info-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.imz-info-field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8c8f94;
}

.imz-info-field-value {
    font-size: 14px;
    color: #1d2327;
    font-weight: 500;
}

.imz-comprovativo-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    margin-top: 6px;
    display: block;
}

.imz-status-select-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #dcdcde;
}

.imz-status-select-wrap label {
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    color: #8c8f94 !important;
    margin-bottom: 6px !important;
}

.imz-status-select-wrap select {
    width: 100% !important;
    max-width: 240px;
}


/* ----------------------------------------------------------
   4. Caixa de Proteção 1MZ For Artists
   ---------------------------------------------------------- */
.imz-protection-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.imz-protection-box-icon { font-size: 20px; flex-shrink: 0; line-height: 1.3; }
.imz-protection-box-body { flex: 1; }

.imz-protection-box-body strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #166534 !important;
    margin-bottom: 5px;
}

.imz-protection-box-body label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    color: #1d2327 !important;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
}

.imz-protection-box-body .description {
    margin-top: 6px !important;
    font-size: 12px !important;
    color: #50575e !important;
}


/* ----------------------------------------------------------
   5. Caixa de Ação Perigosa (Desmonetizar)
   ---------------------------------------------------------- */
.imz-danger-box {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    border-left: 3px solid #dc2626;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
}

.imz-danger-box strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #991b1b;
    margin-bottom: 8px;
}

.imz-danger-box label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    color: #1d2327 !important;
    cursor: pointer;
    text-transform: none !important;
    font-weight: 400 !important;
}

.imz-danger-box .description {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: #991b1b !important;
}


/* ----------------------------------------------------------
   6. Download Pago — aviso amarelo
   ---------------------------------------------------------- */
#imz_paid_download_details_wrapper {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}


/* ----------------------------------------------------------
   7. Configurações — Lojas & Pacotes
   ---------------------------------------------------------- */
.store-admin-row {
    display: grid;
    grid-template-columns: 130px 180px 180px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.store-admin-row:hover {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.icon-uploader-wrapper { display: flex; align-items: center; gap: 10px; }

.icon-preview {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: #f0f0f1;
    object-fit: cover;
    border: 1px solid #dcdcde;
}

.package-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 8px;
}

.level-row { background: #fff; }
.api-field-wrapper { max-width: 600px; }
.api-field-wrapper input, .api-field-wrapper textarea, .api-field-wrapper select { width: 100%; }


/* ----------------------------------------------------------
   8. Lojas Digitais por post
   ---------------------------------------------------------- */
.imz-store-row {
    display: grid;
    grid-template-columns: 200px 1fr 140px auto;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    align-items: center;
    transition: border-color .15s;
}

.imz-store-row:hover { border-color: #8c8f94; }
.imz-store-row input, .imz-store-row select { width: 100%; }


/* ----------------------------------------------------------
   9. Log de Takedowns
   ---------------------------------------------------------- */
.imz-takedown-log-wrapper {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}

.imz-takedown-log-list { margin: 0; padding: 0; list-style: none; }

.imz-takedown-log-list li {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f1;
    transition: background .12s;
}

.imz-takedown-log-list li:last-child { border-bottom: none; }
.imz-takedown-log-list li:hover { background: #f6f7f7; }

.imz-takedown-log-list .log-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #8c8f94;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}

.imz-takedown-log-list .log-date::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #2271b1;
    border-radius: 50%;
}

.imz-takedown-log-list .log-note {
    margin: 0;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.5;
}


/* ----------------------------------------------------------
   10. Mensagens e Alertas
   ---------------------------------------------------------- */
.imz-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    border-left: 4px solid;
    font-size: 13px;
}

.imz-message-success { border-color: #00a32a; background: #f0fdf4; color: #166534; }
.imz-message-error   { border-color: #d63638; background: #fff5f5; color: #991b1b; }
.imz-message-warning { border-color: #dba617; background: #fffbeb; color: #854d0e; }


/* ----------------------------------------------------------
   11. Datepicker (jQuery UI)
   ---------------------------------------------------------- */
.ui-datepicker {
    width: 270px;
    padding: 0;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 9999 !important;
    overflow: hidden;
}

.ui-datepicker-header {
    background: #f6f7f7;
    border: none;
    border-bottom: 1px solid #dcdcde;
    padding: 12px;
}

.ui-datepicker-title { font-weight: 700; font-size: 13px; color: #1d2327; }

.ui-datepicker-prev,
.ui-datepicker-next { cursor: pointer; top: 10px !important; border-radius: 4px; transition: background .15s; }

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover { background: #e6e6e6; }

.ui-datepicker-calendar { width: 100%; border-collapse: collapse; padding: 8px; margin: 0; }

.ui-datepicker-calendar th {
    color: #8c8f94;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 4px;
    text-transform: uppercase;
    text-align: center;
}

.ui-datepicker-calendar td { padding: 2px; }

.ui-datepicker-calendar td a {
    display: block;
    padding: 6px;
    text-align: center;
    text-decoration: none;
    color: #1d2327;
    border-radius: 4px;
    font-size: 13px;
    transition: background .12s;
}

.ui-datepicker-calendar td a:hover { background: #f0f0f1; }

.ui-datepicker-current-day a,
.ui-datepicker-calendar td a.ui-state-active {
    background: #2271b1 !important;
    color: #fff !important;
    font-weight: 700;
}


/* ----------------------------------------------------------
   12. Estatísticas de Download
   ---------------------------------------------------------- */
.imz-stats-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 10px 16px;
}

.imz-stats-card .imz-stats-number {
    font-size: 22px;
    font-weight: 800;
    color: #2271b1;
    line-height: 1;
}

.imz-stats-card .imz-stats-label {
    font-size: 12px;
    color: #8c8f94;
    text-transform: uppercase;
    letter-spacing: .4px;
}


/* ----------------------------------------------------------
   13. Responsividade
   ---------------------------------------------------------- */
@media screen and (max-width: 1024px) {
    .store-admin-row { grid-template-columns: 100px 1fr 1fr auto; }
}

@media screen and (max-width: 782px) {
    .store-admin-row, .imz-store-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
    .icon-uploader-wrapper { justify-content: flex-start; }
    .imz-info-grid { grid-template-columns: 1fr; }
}
