/* ================================================================
   ASHOUU MUSIC — DESIGN SYSTEM v3.0
   Estilo sóbrio, estruturado e profissional.
   Baseado em Public Sans + roxo primário #7367f0.
   ================================================================ */

/* ── 1. TOKENS ────────────────────────────────────────────────── */
:root {
    --ash-primary: #7367f0;
    --ash-primary-light: #eeecfd;
    --ash-primary-hover: #5f52e8;
    --ash-primary-muted: rgba(115, 103, 240, 0.10);
    --ash-surface: #ffffff;
    --ash-surface-alt: #f8f7fc;
    --ash-surface-hover: #f3f2fa;
    --ash-border: #e4e3ef;
    --ash-border-strong: #ccc9e3;
    --ash-text: #3a3952;
    --ash-text-muted: #8988a4;
    --ash-text-heading: #1a1836;
    --ash-radius-xs: 4px;
    --ash-radius-sm: 6px;
    --ash-radius-md: 10px;
    --ash-radius-lg: 12px;
    --ash-shadow-card: 0 2px 8px rgba(58, 53, 65, 0.08), 0 0 0 1px rgba(58,53,65,0.04);
    --ash-shadow-hover: 0 6px 18px rgba(115, 103, 240, 0.18);
    --ash-shadow-focus: 0 0 0 3px rgba(115, 103, 240, 0.16);
    --ash-transition: all 0.16s ease;
}

/* ── 2. PAGE HEADER ───────────────────────────────────────────── */
/*
   Padrão obrigatório para TODAS as páginas.
   Coloca ANTES do primeiro card: título da página, subtítulo e ação principal.

   <div class="page-header">
     <div>
       <h4 class="page-title">
         <span class="page-icon"><i class="ti ti-xxx"></i></span>
         Título
       </h4>
       <p class="page-subtitle">Descrição curta da seção</p>
     </div>
     <a href="..." class="btn btn-primary align-self-center">
       <i class="ti ti-plus me-1"></i>Novo
     </a>
   </div>
*/

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ash-text-heading);
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    line-height: 1.3;
}

.page-icon {
    width: 34px;
    height: 34px;
    background-color: var(--ash-primary-light);
    border-radius: var(--ash-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ash-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.page-subtitle {
    font-size: 0.8125rem;
    color: var(--ash-text-muted);
    margin: 0;
    padding-left: calc(34px + 0.625rem); /* alinha com texto do título */
}

/* ── 3. CARD ──────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--ash-border) !important;
    box-shadow: var(--ash-shadow-card) !important;
    border-radius: var(--ash-radius-lg) !important;
    background-color: var(--ash-surface);
}

.card-header {
    background-color: var(--ash-surface-alt) !important;
    border-bottom: 1px solid var(--ash-border) !important;
    padding: 0.875rem 1.375rem !important;
    border-radius: var(--ash-radius-lg) var(--ash-radius-lg) 0 0 !important;
}

    .card-header h5,
    .card-header h6 {
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        color: var(--ash-text-heading) !important;
        margin-bottom: 0 !important;
    }

    .card-header small {
        font-size: 0.8125rem;
        color: var(--ash-text-muted);
        display: block;
        margin-top: 2px;
    }

.card-body {
    padding: 2rem 1.375rem 1.375rem !important;
}

    .card-body > .row {
        margin-top: 10px !important;
    }

    form {
        padding-top: 10px !important;
    }

    .card-body > .alert {
        margin-top: 20px !important;
    }

/* Seção dentro de forms longos */
.form-section {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--ash-border);
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ash-text-muted);
    margin-bottom: 1rem;
}

/* ── 4. CARDS DE ESTATÍSTICA ──────────────────────────────────── */
/*
   Padrão para métricas/KPIs.
   Usar: card card-border-shadow-{primary|success|warning|danger|info}
   com avatar + bg-label-{cor} dentro.
*/
.stat-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .stat-card-body .stat-value {
        font-size: 1.625rem;
        font-weight: 700;
        color: var(--ash-text-heading);
        line-height: 1.1;
        margin: 0;
    }

    .stat-card-body .stat-label {
        font-size: 0.8125rem;
        color: var(--ash-text-muted);
        margin-top: 4px;
    }

/* ── 5. TABELA ────────────────────────────────────────────────── */
.table {
    margin-bottom: 0;
}

    .table thead th,
    .table thead td {
        background-color: #f4f3fb !important;
        font-size: 0.675rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.065em !important;
        color: var(--ash-text-muted) !important;
        border-bottom: 1px solid var(--ash-border) !important;
        border-top: none !important;
        padding: 0.65rem 1.25rem !important;
        white-space: nowrap;
    }

    .table tbody td {
        font-size: 0.875rem;
        color: var(--ash-text);
        vertical-align: middle;
        padding: 0.75rem 1.25rem;
        border-bottom: 1px solid #efeff8;
    }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background-color: var(--ash-surface-hover);
    }

/* ── 6. FORMULÁRIOS ───────────────────────────────────────────── */
.form-label,
label.form-label,
label.font-bold {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #464462 !important;
    margin-bottom: 0.35rem;
    display: block;
}

.form-control,
.form-select {
    font-size: 0.875rem;
    border: 1px solid var(--ash-border);
    border-radius: var(--ash-radius-sm);
    color: var(--ash-text);
    transition: var(--ash-transition);
    background-color: var(--ash-surface);
    padding: 0.5rem 0.75rem;
}


    .form-control:focus {
        padding: 0.5rem 0.75rem !important;
        /*border-width: 0px !important;*/
    }

    .form-control[readonly],
    .form-control[disabled] {
        background-color: var(--ash-surface-alt) !important;
        color: var(--ash-text-muted);
        border-color: var(--ash-border);
    }

    .form-control::placeholder {
        color: #b3b2c8;
        font-size: 0.8375rem;
    }

.input-group .input-group-text {
    background-color: var(--ash-surface-alt);
    border-color: var(--ash-border);
    color: var(--ash-text-muted);
    font-size: 0.875rem;
}

.form-check-input:checked {
    background-color: var(--ash-primary);
    border-color: var(--ash-primary);
}

/* ── 7. BOTÕES ────────────────────────────────────────────────── */
.btn {
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--ash-radius-sm);
    letter-spacing: 0.01em;
    transition: var(--ash-transition);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--ash-radius-xs);
}

.btn-primary {
    background-color: var(--ash-primary) !important;
    border-color: var(--ash-primary) !important;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--ash-primary-hover) !important;
        border-color: var(--ash-primary-hover) !important;
        box-shadow: var(--ash-shadow-hover) !important;
    }

.btn-outline-primary {
    color: var(--ash-primary) !important;
    border-color: var(--ash-primary) !important;
}

    .btn-outline-primary:hover {
        background-color: var(--ash-primary) !important;
        color: #fff !important;
        box-shadow: 0 2px 8px rgba(115, 103, 240, 0.28) !important;
    }

.btn-outline-secondary {
    color: var(--ash-text-muted) !important;
    border-color: var(--ash-border) !important;
    background-color: var(--ash-surface) !important;
}

    .btn-outline-secondary:hover {
        background-color: var(--ash-surface-hover) !important;
        border-color: var(--ash-border-strong) !important;
        color: var(--ash-text) !important;
    }

/* ── 8. BADGES ────────────────────────────────────────────────── */
.badge {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.3em 0.65em;
    border-radius: var(--ash-radius-xs);
    line-height: 1.4;
}

    /* Remove pill border-radius herdado do tema para manter consistência */
    .badge.rounded-pill {
        border-radius: 100px !important;
    }

/* ── 9. ALERTS ────────────────────────────────────────────────── */
.alert {
    font-size: 0.875rem;
    border-radius: var(--ash-radius-md);
    padding: 0.875rem 1.125rem;
}

.alert-solid-secondary {
    background-color: var(--ash-surface-alt);
    color: var(--ash-text-muted);
    border: 1px solid var(--ash-border);
    gap: 0.625rem;
}

    .alert-solid-secondary .alert-icon {
        color: var(--ash-primary);
        font-size: 1.1rem;
        flex-shrink: 0;
    }

/* ── 10. PAGINAÇÃO ────────────────────────────────────────────── */
.pagination {
    justify-content: flex-end;
    gap: 3px;
    margin-bottom: 0;
    padding: 0.875rem 1.375rem;
    border-top: 1px solid var(--ash-border);
}

    .pagination .page-link {
        border-radius: var(--ash-radius-sm) !important;
        padding: 5px 12px;
        border: 1px solid var(--ash-border);
        color: var(--ash-primary);
        font-size: 0.8125rem;
        font-weight: 500;
        background-color: var(--ash-surface);
        transition: var(--ash-transition);
        line-height: 1.5;
    }

        .pagination .page-link:hover {
            background-color: var(--ash-primary);
            border-color: var(--ash-primary);
            color: #fff;
            box-shadow: 0 2px 6px rgba(115, 103, 240, 0.3);
        }

    .pagination .page-item.active .page-link {
        background-color: var(--ash-primary);
        border-color: var(--ash-primary);
        color: #fff;
        box-shadow: 0 2px 8px rgba(115, 103, 240, 0.4);
    }

    .pagination .page-item.disabled .page-link {
        color: var(--ash-text-muted);
        background-color: var(--ash-surface-alt);
        border-color: var(--ash-border);
        cursor: not-allowed;
    }

.page-item:not(:first-child) .page-link {
    margin-left: 0 !important;
}

/* ── 11. EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--ash-text-muted);
}

.empty-state-icon {
    font-size: 2.5rem;
    display: block;
    margin: 0 auto 0.875rem;
    opacity: 0.22;
    color: var(--ash-primary);
}

.empty-state p {
    font-size: 0.875rem;
    margin: 0;
}

/* ── 12. LOADING OVERLAY ──────────────────────────────────────── */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 24, 48, 0.05);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(1px);
}

.spinner {
    border: 3px solid #edeaf8;
    border-top: 3px solid var(--ash-primary);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── 13. UTILITÁRIOS ──────────────────────────────────────────── */
.container-fluid {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.text-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    color: var(--ash-text-muted);
}

/* Separador horizontal de seção */
.section-divider {
    height: 1px;
    background-color: var(--ash-border);
    margin: 1.5rem 0;
}

/* ── 14. NAVBAR ───────────────────────────────────────────────── */
.layout-navbar {
    border-bottom: 1px solid var(--ash-border) !important;
    box-shadow: 0 1px 6px rgba(58, 53, 65, 0.06) !important;
}

    .layout-navbar .app-brand-logo {
        height: 46px !important;
    }

/* Menu horizontal */
.layout-menu-horizontal {
    border-bottom: 1px solid var(--ash-border) !important;
    box-shadow: none !important;
}

/* Item ativo no menu horizontal */
.menu-horizontal .menu-item.active > .menu-link,
.menu-horizontal .menu-item.open > .menu-link {
    color: var(--ash-primary) !important;
}

/* ── 15. FOOTER ───────────────────────────────────────────────── */
.content-footer {
    border-top: 1px solid var(--ash-border) !important;
    background-color: var(--ash-surface) !important;
}

    .content-footer .footer-container {
        font-size: 0.8125rem;
        color: var(--ash-text-muted);
    }

    .content-footer .footer-link {
        color: var(--ash-primary);
        text-decoration: none;
        font-weight: 500;
    }

        .content-footer .footer-link:hover {
            color: var(--ash-primary-hover);
            text-decoration: underline;
        }

/* ── 16. AUTH PAGE ────────────────────────────────────────────── */
body:has(.auth-page-wrapper) {
    background: linear-gradient(150deg, #f5f4fc 0%, #ede9fb 50%, #e8e5f7 100%);
    margin: 0;
    padding: 0;
}

.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--ash-border) !important;
    box-shadow: 0 8px 32px rgba(115, 103, 240, 0.10), 0 2px 8px rgba(58, 53, 65, 0.08) !important;
    border-radius: var(--ash-radius-lg) !important;
}

    .auth-card .card-body {
        padding: 2.5rem 2rem !important;
    }

.auth-logo {
    display: block;
    margin: 0 auto 1.5rem;
    height: 52px;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ash-text-heading);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--ash-text-muted);
    margin-bottom: 1.75rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    color: var(--ash-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: var(--ash-border);
    }

.auth-footer-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--ash-text-muted);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ash-border);
}
