/* ============================================================
   DASHBOARD STYLES — DosingressosTicket
   ============================================================ */

/* Welcome Header */
.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
    animation: slideDown 0.5s ease;
}

.welcome-inner h2 {
    margin: 0 0 6px 0;
    font-size: 1.6rem;
    font-weight: 400;
    color: #fff;
}

.welcome-inner p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.9rem;
}

.btn-refresh-dash {
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff;
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-refresh-dash:hover {
    background: rgba(255,255,255,0.35);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.4s ease both;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.kpi-label {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
}

/* Charts Row */
.charts-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.charts-row .panel-default {
    flex: 1;
    min-width: 280px;
    border-radius: 14px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07) !important;
    border: none !important;
    overflow: hidden;
    animation: fadeInUp 0.5s ease both;
}

.charts-row .panel-heading {
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-weight: 600;
    padding: 14px 20px !important;
    font-size: 0.95rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bottom-row {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar linha em telas menores */
    gap: 20px;       /* Espaçamento entre os cards */
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Garante que os painéis dentro do botton-row ocupem o espaço disponível */
.bottom-row .tpanelgroup {
    flex: 1; /* Permite que cada painel cresça e ocupe o espaço */
    min-width: 300px; /* Garante que não fiquem muito pequenos */
}

/* Ou se quiser larguras específicas */
/*
.bottom-row .tpanelgroup:nth-child(1) { flex: 1.2; }
.bottom-row .tpanelgroup:nth-child(2) { flex: 0.8; }
*/
/* Delay escalonado nos KPI cards */
.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.10s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.20s; }
.kpi-card:nth-child(5) { animation-delay: 0.25s; }
.kpi-card:nth-child(6) { animation-delay: 0.30s; }

/* Reports central */
.dashboard-report-central {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    padding: 18px;
}

.dashboard-report-central-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-report-central-header h3 {
    color: #111827;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 4px 0 3px;
}

.dashboard-report-central-header p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

.report-central-eyebrow,
.report-central-updated {
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.report-central-updated {
    background: #eff6ff;
    border-radius: 999px;
    padding: 7px 10px;
    white-space: nowrap;
}

.dashboard-report-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
}

.dashboard-report-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 206px;
    padding: 15px;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-report-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
}

.dashboard-report-card-top {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dashboard-report-icon {
    align-items: center;
    border-radius: 8px;
    display: flex;
    flex: 0 0 auto;
    font-size: 19px;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.dashboard-report-kpi {
    min-width: 0;
    text-align: right;
}

.dashboard-report-kpi span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-report-kpi strong {
    color: #111827;
    display: block;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 3px;
}

.dashboard-report-card h4 {
    color: #111827;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 8px;
}

.dashboard-report-card p {
    color: #64748b;
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.42;
    margin: 0;
}

.dashboard-report-footer {
    align-items: center;
    border-top: 1px solid #edf2f7;
    color: #334155;
    display: flex;
    font-size: 0.76rem;
    font-weight: 800;
    gap: 10px;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 11px;
}

.dashboard-client-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 430px;
    overflow-y: auto;
    padding: 12px;
}

.dashboard-client-event-row {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 12px;
    grid-template-columns: 54px minmax(0, 1fr) minmax(180px, auto) 32px;
    min-height: 82px;
    padding: 10px 12px;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-client-event-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}

.dashboard-client-event-permanent {
    border-left: 4px solid #0ea5e9;
}

.dashboard-client-event-thumb {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: inline-flex;
    height: 58px;
    justify-content: center;
    overflow: hidden;
    width: 54px;
}

.dashboard-client-event-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.dashboard-client-event-thumb-fallback {
    color: #64748b;
    font-size: 18px;
}

.dashboard-client-event-main {
    min-width: 0;
}

.dashboard-client-event-title {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-client-event-meta {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px;
    margin-top: 7px;
}

.dashboard-client-event-meta span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.dashboard-client-event-chip {
    background: #e0f2fe;
    border-radius: 999px;
    color: #075985;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 8px;
}

.dashboard-client-event-metrics {
    align-items: flex-end;
    color: #64748b;
    display: flex;
    flex-direction: column;
    font-size: 11px;
    gap: 4px;
    text-align: right;
    white-space: nowrap;
}

.dashboard-client-event-metrics strong {
    color: #111827;
    font-size: 12px;
}

.dashboard-client-event-action {
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    color: #2563eb;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.dashboard-client-events-footer {
    border-top: 1px solid #edf2f7;
    padding-top: 10px;
    text-align: right;
}

.dashboard-client-events-footer a {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 575px) {
    .dashboard-report-central-header {
        flex-direction: column;
    }

    .report-central-updated {
        white-space: normal;
    }

    .dashboard-client-event-row {
        grid-template-columns: 48px minmax(0, 1fr) 32px;
    }

    .dashboard-client-event-metrics {
        align-items: flex-start;
        grid-column: 2 / 4;
        text-align: left;
    }

    .dashboard-client-event-thumb {
        height: 52px;
        width: 48px;
    }
}
