/* ============================================================================
 * dashboard_origem.css — visual dos dashboards igual à base de origem
 * (cards "flat" + gráficos c3). Carregado em libraries_user.html.
 * ========================================================================== */

/* ---- cards de indicadores (BIndicator) no estilo flat da origem ---- */
html body .info-box {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06) !important;
    transform: none !important;
    transition: box-shadow .3s ease !important;
    overflow: hidden;
    display: flex !important;
    align-items: center !important;
    min-height: 0 !important;
}
html body .info-box:hover {
    border: 1px solid #e0e0e0 !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(60,64,67,.08) !important;
}
/* ícone: quadrado arredondado (não mais a faixa lateral cheia) */
html body .info-box .info-box-icon {
    width: 46px !important; min-width: 46px !important;
    height: 46px !important; line-height: 46px !important;
    border-radius: 8px !important;
    margin: 0 4px 0 16px !important;
    font-size: 20px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.12);
}
html body .info-box .info-box-content {
    height: auto !important;
    display: flex; flex-direction: column; justify-content: center;
    padding: 12px 14px !important;
}
html body .info-box .info-box-text {
    text-transform: uppercase; letter-spacing: .08em; font-size: 12px !important;
}
html body .info-box .info-box-number { line-height: 1.25 !important; margin: 2px 0 !important; }
html body .info-box .progress { height: 6px !important; background: #e8eaed !important; border-radius: 3px !important; }
html body .info-box .progress .progress-bar { border-radius: 3px !important; }

/* ---- cards GRANDES (altura 2xx/3xx px: Dados, Páginas...) — ícone em destaque ---- */
html body .info-box[style*="height: 2"] .info-box-icon,
html body .info-box[style*="height: 3"] .info-box-icon {
    width: 92px !important; min-width: 92px !important;
    height: 92px !important; line-height: 92px !important;
    border-radius: 20px !important;
    margin: 0 8px 0 36px !important;
    font-size: 42px !important;
    box-shadow: 0 10px 20px -6px rgba(0,0,0,.28), inset 0 -4px 0 rgba(0,0,0,.08) !important;
}
html body .info-box[style*="height: 2"] .info-box-icon i,
html body .info-box[style*="height: 3"] .info-box-icon i { font-size: 42px !important; }
html body .info-box[style*="height: 2"] .info-box-content,
html body .info-box[style*="height: 3"] .info-box-content { padding: 18px 28px !important; }
html body .info-box[style*="height: 2"] .info-box-text,
html body .info-box[style*="height: 3"] .info-box-text { font-size: 14px !important; letter-spacing: .14em; }

/* ---- moldura dos GRÁFICOS no estilo da origem (.chart-container / .chart-title) ---- */
html body .panel.panel-default:has(.c3) {
    border-radius: 12px !important; overflow: hidden;
    border: 1px solid #e2e8f0 !important; background: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06) !important;
    transition: box-shadow .3s ease, transform .3s ease !important;
}
html body .panel.panel-default:has(.c3):hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04) !important;
    transform: translateY(-2px);
}
html body .panel.panel-default:has(.c3) > .panel-heading {
    background: #ffffff !important; border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important; padding: 12px 22px !important;
}
html body .panel.panel-default:has(.c3) > .panel-heading .panel-title {
    font-size: 17px !important; font-weight: 600 !important; color: #1e293b !important;
}
html body .panel.panel-default:has(.c3) > .panel-body { padding: 10px !important; }

/* ---- painéis dos gráficos ---- */
[page-name='DashboardGed'] .panel.panel-default,
[page-name='DashboardGed'] .card {
    border: 1px solid #e0e0e0 !important; border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05) !important;
    background-image: none !important;
}

/* ---- gráficos c3 (copiado da base de origem: lib/mad/include/bchart/bchart.css) ---- */
.ultra-bar-chart[data-count-field-group="1"] .c3-tooltip td > span {
    display: none !important;
}
.c3-legend-item-tile {
    stroke-width: 3;
}
.chart-subtitle {
    margin: 0px 0 0 0px;
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}
.c3-axis path {
    stroke: #cbd5e1;
    stroke-width: 1px;
}
.c3-axis line {
    stroke: #cbd5e1;
    stroke-width: 1px;
}
.c3-axis-x path {
    stroke: #94a3b8;
    stroke-width: 2px;
}
.c3-axis-x line {
    stroke: #94a3b8;
    stroke-width: 1.5px;
    stroke-opacity: 0.8;
}
.c3-axis text {
    fill: #1e293b;
    font-size: 11px;
    font-weight: 500;
}
.c3-axis-x text {
    fill: #1e293b;
    font-size: 11px;
}
.c3-axis-x-label, .c3-axis-y-label {
    fill: #1e293b;
    font-size: 13px;
}
.c3-grid line {
    stroke: #cbd5e1;
    stroke-width: 1px;
    stroke-opacity: 0.7;
}
.c3-xgrid line {
    stroke: #94a3b8;
    stroke-width: 1px;
    stroke-dasharray: 2,2;
    stroke-opacity: 0.8;
}
.c3-ygrid line {
    stroke: #cbd5e1;
    stroke-width: 1px;
    stroke-dasharray: 3,2;
    stroke-opacity: 0.7;
}
.c3-legend-item {
    font-size: 12px;
    fill: #1e293b;
    font-weight: 500;
}
.c3-legend-item-hidden {
    opacity: 0.3;
}
.c3-legend-background {
    fill: #ffffff;
    stroke: #e2e8f0;
    stroke-width: 1px;
    rx: 4px;
    ry: 4px;
}
.c3-tooltip-container {
    z-index: 10;
}
.c3-tooltip {
    border-collapse: separate;
    border-spacing: 0;
    background-color: #ffffff;
    empty-cells: show;
    opacity: 1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.c3-tooltip th {
    background-color: #2563eb;
    font-size: 12px;
    padding: 10px 14px;
    text-align: left;
    color: white;
    border: none;
}
.c3-tooltip td {
    font-size: 12px;
    padding: 10px 14px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.c3-tooltip td > span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 4px;
}
.c3-tooltip td.name {
    font-weight: 500;
}
.c3-tooltip td.value {
    text-align: right;
}
.c3-tooltip tr:last-child td {
    border-bottom: none;
}
.ultra-line-chart .c3-line {
    stroke-width: 3px;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.ultra-line-chart .c3-circle {
    r: 5;
    stroke-width: 2px;
    stroke: #ffffff;
    fill-opacity: 1;
    transition: all 0.2s ease;
}
.ultra-line-chart .c3-area {
    opacity: 0.07;
    stroke-width: 0;
}
.ultra-line-chart .c3-target:hover .c3-line {
    stroke-width: 4px;
}
.ultra-line-chart .c3-circle._expanded_ {
    r: 7;
    stroke-width: 2.5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.ultra-bar-chart .c3-chart-bars .c3-shape {
    rx: 5px;
    ry: 5px;
    stroke-width: 3px !important;
    transition: all 0.3s ease;
}
.ultra-bar-chart .c3-chart-bar:hover .c3-shape {
    filter: brightness(1.1);
}
.c3-chart-arcs .c3-chart-arc path {
    opacity: 0.7 !important;
}
.ultra-pie-chart .c3-arc:hover,
.ultra-donut-chart .c3-arc:hover {
    transform: scale(1.03);
}
.ultra-pie-chart .c3-chart-arc text,
.ultra-donut-chart .c3-chart-arc text {
    fill: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.ultra-donut-chart .c3-chart-arcs-title {
    font-size: 16px;
    font-weight: 600;
    fill: #1e293b;
}
.chart-title .card-title, .chart-title .chart-subtitle{
    width: 100%;
}
