/* Sinaleiro Table */
.sinaleiro-table {
    width: 100%;
    border-collapse: collapse;
}

.sinaleiro-table th {
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
}

.sinaleiro-table th:nth-child(2) {
    text-align: left;
}

.sinaleiro-table td {
    padding: 14px 8px;
    font-size: 13px;
    border-bottom: 1px solid #1f1f1f;
    color: #ccc;
    text-align: center;
}

.sinaleiro-table td:nth-child(2) {
    text-align: left;
}

.sinaleiro-table tr:hover {
    background: #1a1a1a;
}

.sinaleiro-name {
    color: #fff;
    font-weight: 500;
}

/* Alert Summary */
.alert-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 6px;
    background: #1a1a1a;
}

.alert-item.critical {
    border-left: 3px solid #ef4444;
}

.alert-item.warning {
    border-left: 3px solid #fbbf24;
}

.alert-item.success {
    border-left: 3px solid #22c55e;
}

.alert-count {
    font-size: 26px;
    font-weight: 700;
    min-width: 40px;
}

.alert-count.red {
    color: #ef4444;
}

.alert-count.yellow {
    color: #fbbf24;
}

.alert-count.green {
    color: #22c55e;
}

.alert-text {
    font-size: 11px;
    color: #888;
}

.alert-text strong {
    color: #fff;
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

/* BANT Styles */
.bant-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.bant-card {
    background: #1a1a1a;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    border: 2px solid #2a2a2a;
}

.bant-card.bant-4 {
    border-color: #22c55e;
}

.bant-card.bant-3 {
    border-color: #3b82f6;
}

.bant-card.bant-2 {
    border-color: #fbbf24;
}

.bant-card.bant-1 {
    border-color: #ef4444;
}

.bant-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bant-value {
    font-size: 36px;
    font-weight: 700;
    margin: 8px 0;
}

.bant-value.b4 {
    color: #22c55e;
}

.bant-value.b3 {
    color: #3b82f6;
}

.bant-value.b2 {
    color: #fbbf24;
}

.bant-value.b1 {
    color: #ef4444;
}

.bant-conversion {
    font-size: 12px;
    color: #666;
}

.bant-table {
    width: 100%;
    border-collapse: collapse;
}

.bant-table th {
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
}

.bant-table th:first-child {
    text-align: left;
}

.bant-table td {
    padding: 12px 8px;
    font-size: 13px;
    border-bottom: 1px solid #1f1f1f;
    color: #ccc;
    text-align: center;
}

.bant-table td:first-child {
    text-align: left;
    color: #fff;
    font-weight: 500;
}

.bant-table tr:hover {
    background: #1a1a1a;
}

.bant-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: visible;
    background: #1a1a1a;
    position: relative;
}

.bant-bar-segment {
    height: 100%;
    cursor: pointer;
    min-width: 2px;
    transition: opacity 0.2s;
    position: relative;
}

.bant-bar-segment:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.bant-bar-segment:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.bant-bar-segment:hover {
    opacity: 0.8;
}

.bant-bar-segment::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f1f1f;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 2px;
    transition: opacity 0.2s;
    z-index: 1001;
}

.bant-bar-segment::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f1f1f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 10px;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s;
    z-index: 1000;
}

.bant-bar-segment:hover::before,
.bant-bar-segment:hover::after {
    opacity: 1;
}

.bant-bar-segment.b4 {
    background: #22c55e;
}

.bant-bar-segment.b3 {
    background: #3b82f6;
}

.bant-bar-segment.b2 {
    background: #fbbf24;
}

.bant-bar-segment.b1 {
    background: #ef4444;
}

/* Channel Styles */
.channel-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.channel-name {
    font-size: 13px;
    color: #ccc;
    width: 120px;
    flex-shrink: 0;
    font-weight: 500;
}

.channel-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* WRAPPER PARA ALINHAR BARRA E PERCENTUAL EXTERNO */
.channel-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.channel-bar-track {
    flex: 1;
    height: 32px;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.channel-bar-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    position: relative;
    min-width: 4px;
}

.channel-bar-fill.high {
    background: #22c55e;
}

.channel-bar-fill.medium {
    background: #3b82f6;
}

.channel-bar-fill.low {
    background: #fbbf24;
}

.channel-bar-fill.very-low {
    background: #ef4444;
}

/* TEXTO DE PERCENTUAL EXTERNO (Padronizado com Visão do Funil) */
.channel-bar-conversion {
    font-size: 13px;
    color: #fff;
    width: 55px;
    text-align: right;
    font-weight: 600;
}

.channel-stats {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: #666;
}

.channel-stats .value {
    color: #ccc;
    font-weight: 600;
}

.channel-matrix {
    width: 100%;
    border-collapse: collapse;
}

.channel-matrix th {
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
}

.channel-matrix th:first-child {
    text-align: left;
}

.channel-matrix td {
    padding: 12px 8px;
    font-size: 12px;
    border-bottom: 1px solid #1f1f1f;
    color: #ccc;
    text-align: center;
}

.channel-matrix td:first-child {
    text-align: left;
    color: #fff;
    font-weight: 500;
}

.channel-matrix tr:hover {
    background: #1a1a1a;
}

.matrix-cell-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mini-bar {
    display: inline-block;
    height: 8px;
    border-radius: 4px;
    min-width: 4px;
    max-width: 100%;
}

.mini-bar.green { background: #22c55e; }
.mini-bar.yellow { background: #fbbf24; }
.mini-bar.red { background: #ef4444; }

.matrix-value { font-weight: 600; color: #fff; font-size: 13px; }
.matrix-perc { color: #666; font-size: 11px; }

/* Funnel Styles - BARRAS VERMELHAS COM % DENTRO */
.funnel-bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.funnel-bar-label {
    font-size: 12px;
    color: #fff;
    width: 120px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 500;
}

.funnel-bar-track {
    flex: 1;
    height: 32px;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.funnel-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    min-width: 35px;
}

.funnel-bar-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.funnel-bar-conversion {
    font-size: 13px;
    color: #fff;
    width: 55px;
    text-align: right;
    font-weight: 600;
}

.summary-box {
    margin-top: 20px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-box .label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-box .value {
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
}

.summary-box .meta {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.data-table td {
    padding: 12px 8px;
    font-size: 13px;
    border-bottom: 1px solid #1f1f1f;
    color: #ccc;
}

.data-table tr:hover {
    background: #1a1a1a;
}

.text-center {
    text-align: center !important;
}

.value-green {
    color: #22c55e;
    font-weight: 600;
}

.value-red {
    color: #ef4444;
    font-weight: 600;
}

.value-yellow {
    color: #fbbf24;
    font-weight: 600;
}

.stage-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.stage-dot.s1 {
    background: #ef4444;
}

.stage-dot.s2 {
    background: #f97316;
}

.stage-dot.s3 {
    background: #fbbf24;
}

.stage-dot.s4 {
    background: #22c55e;
}

/* Loss Styles */
.loss-table {
    width: 100%;
    border-collapse: collapse;
}

.loss-table th {
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.loss-table th:first-child {
    width: 50px;
    text-align: center;
}

.loss-table td {
    padding: 12px;
    font-size: 12px;
    border-bottom: 1px solid #1f1f1f;
    color: #ccc;
    vertical-align: top;
}

.loss-table td:first-child {
    text-align: center;
    font-weight: 700;
    color: #ff0000;
    font-size: 15px;
}

.loss-table tr:hover {
    background: #1a1a1a;
}

.loss-reason {
    color: #fff;
    font-weight: 500;
    font-size: 13px;
}

.loss-cause {
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.loss-action {
    color: #fbbf24;
}

.loss-bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.loss-bar-name {
    font-size: 12px;
    color: #ccc;
    width: 100px;
    flex-shrink: 0;
    font-weight: 500;
}

.loss-bar-track {
    flex: 1;
    height: 12px;
    background: #1a1a1a;
    border-radius: 6px;
    overflow: visible;
    position: relative;
}

.loss-bar-fill {
    height: 100%;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s, width 0.5s ease;
    position: relative;
    min-width: 4px;
}

.loss-bar-fill:hover {
    opacity: 0.8;
}

.loss-bar-fill::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f1f1f;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 2px;
    transition: opacity 0.2s;
    z-index: 1001;
}

.loss-bar-fill::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f1f1f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 10px;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s;
    z-index: 1000;
}

.loss-bar-fill:hover::before,
.loss-bar-fill:hover::after {
    opacity: 1;
}

.loss-bar-fill.high {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.loss-bar-fill.medium {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.loss-bar-fill.low {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.loss-bar-value {
    font-size: 12px;
    color: #ccc;
    min-width: 45px;
    text-align: right;
    font-weight: 600;
}