/* ========================================
   DASHBOARD-CUSTOM.CSS
   Estilos para os cards e elementos da dashboard
======================================== */

/* ========================================
   1. GRID DE CARDS
======================================== */
.dashboard-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* ========================================
   2. CARD DE ESTATÍSTICA
======================================== */
.dashboard-card {
    min-width: 0;
    min-height: 142px;
    padding: 16px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    overflow: hidden;

    background: #ffffff;
    border-radius: 18px;

    box-shadow: 0 10px 24px rgba(91, 31, 36, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(145, 60, 50, 0.16);
}

/* ========================================
   3. CONTEÚDO DOS CARDS
======================================== */
.card-content {
    min-width: 0;
    flex: 1 1 auto;
}

.card-content .card-title {
    margin: 0 0 6px;

    color: #8c98a9;

    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.25;

    overflow-wrap: anywhere;
}

.card-content .card-number {
    margin: 0;

    color: var(--text-color, #351712);

    font-size: clamp(1.6rem, 2vw, 1.95rem);
    font-weight: 700;
    line-height: 1.15;

    overflow-wrap: anywhere;
}

/* ========================================
   4. ÍCONES DOS CARDS
======================================== */
.card-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 52px;

    border-radius: 50%;

    color: #ffffff;
    font-size: 20px;

    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.10);
}

/* ========================================
   5. CORES DOS CARDS
======================================== */
.card-agendamentos { border-top: 3px solid #913c32; }
.card-agendamentos .card-icon { background: #913c32; }
.card-clientes { border-top: 3px solid #c9a46a; }
.card-clientes .card-icon { background: #c9a46a; }
.card-faturamento { border-top: 3px solid #4f7942; }
.card-faturamento .card-icon { background: #4f7942; }
.card-total { border-top: 3px solid #1e3a8a; }
.card-total .card-icon { background: #1e3a8a; }
.card-blue .card-icon { background-color: #913c32; }
.card-green .card-icon { background-color: #c9a46a; }
.card-purple .card-icon { background-color: #4f7942; }
.card-orange .card-icon { background-color: #1e3a8a; }

/* ========================================
   6. TÍTULOS DAS SEÇÕES
======================================== */
.dashboard-section-title,
.dashboard-content h2,
.dashboard-content h3 { color: #351712; }

.dashboard-section-title,
.dashboard-content > h2 {
    margin: 24px 0 14px;
    padding-left: 12px;
    border-left: 5px solid #913c32;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ========================================
   7. CARD DE LISTAGEM
======================================== */
.dashboard-list-card {
    margin-top: 22px;
    padding: 20px;
    overflow: hidden;
    background-color: #ffffff;
    border-top: 3px solid #913c32;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.dashboard-list-card .list-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    color: #351712;
    border-bottom: 1px solid #eadfd8;
    font-size: 1.15rem;
    font-weight: 700;
}

/* ========================================
   8. TABELAS DO DASHBOARD
======================================== */
.dashboard-table,
.dashboard-content table {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dashboard-table thead th,
.dashboard-content table thead th {
    padding: 12px 14px;
    color: #5c1f19;
    background: #f8f2ec;
    border-right: 1px solid #e6d8cd;
    border-bottom: 2px solid #c9a46a;
    font-size: 0.94rem;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.dashboard-table thead th:last-child,
.dashboard-content table thead th:last-child { border-right: none; }

.dashboard-table tbody td,
.dashboard-content table tbody td {
    padding: 10px 12px;
    color: #4f403b;
    background: #ffffff;
    border-bottom: 1px solid #f0e8e3;
    font-size: 0.92rem;
    vertical-align: middle;
}

.dashboard-table tbody tr:nth-child(even) td,
.dashboard-content table tbody tr:nth-child(even) td { background: #fdfaf7; }

.dashboard-table tbody tr:hover td,
.dashboard-content table tbody tr:hover td { background: #faf3ef; }

.dashboard-table tbody tr:last-child td,
.dashboard-content table tbody tr:last-child td { border-bottom: none; }

/* ========================================
   9. LINHA SEM REGISTROS
======================================== */
.dashboard-table .table-empty td,
.dashboard-table .empty-row td,
.dashboard-content table .table-empty td,
.dashboard-content table .empty-row td,
.dashboard-content table tbody tr:only-child td[colspan] {
    padding: 13px !important;
    color: #7b6a58;
    background: #faf6f1 !important;
    font-style: italic;
    text-align: center;
}

/* ========================================
   10. LISTA DE AGENDAMENTOS
======================================== */
.appointments-list { margin: 0; padding: 0; list-style: none; }
.appointments-list li {
    padding: 12px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f5;
}
.appointments-list li:last-child { border-bottom: none; }
.appointment-time { flex-basis: 15%; color: var(--text-color, #351712); font-weight: 600; }
.appointment-client { flex-basis: 50%; color: #555555; }
.appointment-procedure { flex-basis: 35%; color: #888888; font-size: 0.9rem; text-align: right; }

/* ========================================
   11. CARD DO GRÁFICO
======================================== */
.dashboard-chart-card,
.chart-card {
    margin-top: 28px;
    overflow: hidden;
    background: #ffffff;
    border-top: 3px solid #4f7942;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.06);
}

.dashboard-chart-card .chart-header,
.chart-card .chart-header,
.dashboard-chart-card .card-header,
.chart-card .card-header {
    padding: 13px 16px;
    color: #5c1f19;
    background: #f8f2ec;
    border-bottom: 1px solid #e6d8cd;
    font-size: 0.98rem;
    font-weight: 700;
}

/* ========================================
   12. CABEÇALHO DA SIDEBAR
======================================== */
.sidebar-header {
    padding: 25px 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sidebar-logo-img {
    width: 120px;
    height: auto;
    display: block;
    object-fit: contain;
    margin-bottom: 15px;
    filter: none;
    opacity: 1;
}
.sidebar-logo-text { color: #ffffff; font-size: 18px; font-weight: 700; text-align: center; }
.sidebar-divider {
    height: 1px;
    margin: 0 20px 20px;
    background: rgba(255, 255, 255, 0.18);
    border: 0;
}

/* ========================================
   13. RESPONSIVIDADE
======================================== */
@media (min-width: 1600px) {
    .dashboard-cards-grid { gap: 20px; }
    .dashboard-card { min-height: 150px; padding: 20px 22px; }
    .card-icon { width: 58px; height: 58px; flex-basis: 58px; font-size: 23px; }
    .card-content .card-title { font-size: 1rem; }
    .card-content .card-number { font-size: 2.1rem; }
}

@media (min-width: 1100px) and (max-width: 1599.98px) {
    .dashboard-cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
    .dashboard-card { min-height: 136px; padding: 15px 16px; gap: 10px; }
    .card-content .card-title { font-size: 0.86rem; }
    .card-content .card-number { font-size: clamp(1.45rem, 2vw, 1.78rem); }
    .card-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 19px; }
}

@media (min-width: 769px) and (max-width: 1099.98px) {
    .dashboard-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .dashboard-card { min-height: 128px; padding: 16px 18px; }
}

@media (max-width: 768px) {
    .dashboard-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .dashboard-card { min-height: 124px; padding: 15px; border-radius: 16px; }
    .card-content .card-title { font-size: 0.84rem; }
    .card-content .card-number { font-size: 1.55rem; }
    .card-icon { width: 46px; height: 46px; flex-basis: 46px; font-size: 18px; }
    .dashboard-section-title,
    .dashboard-content > h2 { font-size: 1.18rem; }
    .dashboard-content table { min-width: 700px; }
    .dashboard-table-wrapper,
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 560px) {
    .dashboard-cards-grid { grid-template-columns: 1fr; gap: 12px; }
    .dashboard-card { min-height: 112px; padding: 14px 16px; }
    .card-content .card-title { font-size: 0.9rem; }
    .card-content .card-number { font-size: 1.65rem; }
    .card-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 19px; }
    .dashboard-list-card { padding: 16px; }
    .dashboard-table thead th,
    .dashboard-content table thead th { padding: 10px 12px; font-size: 0.86rem; }
    .dashboard-table tbody td,
    .dashboard-content table tbody td { padding: 9px 10px; font-size: 0.86rem; }
}

/* ========================================
   14. ACESSIBILIDADE
======================================== */
@media (prefers-reduced-motion: reduce) {
    .dashboard-card { transition: none; }
    .dashboard-card:hover { transform: none; }
}