/* ================================================================
   Legal Enterprise v3 — Multi-agent analysis UI styles
   Prefix: .le-
   Theme: Dark (consistent with existing legal.css)
   ================================================================ */

/* ---- Container & Header ---- */
.le-container {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.le-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 212, 255, 0.02));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
}

.le-header-icon {
    font-size: 40px;
    line-height: 1;
}

.le-header-text h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: #e0e0e0;
}

.le-header-text p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

/* v3 tag */
.le-v3-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* backward compat for v2 tag class */
.le-v2-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ---- Pipeline Preview ---- */
.le-pipeline-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.le-pipe-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.le-pipe-step:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.2);
}

.le-pipe-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.12);
    border-radius: 50%;
}

.le-pipe-label {
    font-size: 11px;
    color: #aaa;
    font-weight: 500;
}

.le-pipe-arrow {
    color: rgba(0, 212, 255, 0.4);
    font-size: 14px;
    font-weight: 300;
}

/* ---- Input Area ---- */
/* Quick actions on landing */
.le-quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.le-quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    text-align: left;
}

.le-quick-action-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15);
}

.le-qa-icon {
    font-size: 28px;
    line-height: 1;
}

.le-qa-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.le-qa-text strong {
    font-size: 14px;
    color: #e4e4e7;
}

.le-qa-text small {
    font-size: 11px;
    color: #71717a;
}

.le-input-area {
    margin-bottom: 20px;
}

.le-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #b0b0b0;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.le-textarea {
    width: 100%;
    min-height: 180px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.le-textarea:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.le-textarea::placeholder {
    color: #555;
}

/* ---- Attachments ---- */
.le-attachments-area {
    margin-top: 16px;
}

.le-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.le-attachment-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
}

.le-attachment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.le-attachment-name {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: inherit;
}

.le-attachment-name:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.3);
}

.le-attachment-remove {
    background: none;
    border: 1px solid rgba(255, 80, 80, 0.3);
    color: #ff5050;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.le-attachment-remove:hover {
    background: rgba(255, 80, 80, 0.1);
}

.le-attachment-text {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
}

.le-attachment-text:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.3);
}

/* ---- Buttons ---- */
.le-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.le-btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.le-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.le-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.le-btn-secondary {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.06);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.le-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---- Progress ---- */
.le-progress-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
}

.le-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.le-progress-title {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
}

.le-progress-timer {
    font-size: 13px;
    color: #00d4ff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.le-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.le-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00ffcc);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.le-progress-stages {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.le-stage {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    transition: color 0.3s ease;
}

.le-stage-dot {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.le-stage-active {
    color: #00d4ff;
    font-weight: 600;
}

.le-stage-active .le-stage-dot {
    color: #00d4ff;
}

.le-stage-done {
    color: #4caf50;
}

.le-stage-done .le-stage-dot {
    color: #4caf50;
}

.le-progress-detail {
    margin-top: 12px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* ---- Results ---- */
.le-results {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.le-results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 212, 255, 0.02));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.le-results-title h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: #e0e0e0;
}

.le-results-meta {
    font-size: 12px;
    color: #888;
}

.le-results-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.le-download-btn {
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.le-download-btn:hover {
    background: rgba(0, 212, 255, 0.15);
}

/* ---- Sections (Collapsible) ---- */
.le-section {
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.le-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.le-section-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.le-section-arrow {
    font-size: 12px;
    color: #666;
    width: 16px;
    transition: transform 0.2s ease;
}

.le-section-icon {
    font-size: 18px;
}

.le-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    flex: 1;
}

.le-section-body {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.le-section-open .le-section-body {
    display: block;
}

/* ---- Badges ---- */
.le-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.le-badge-ok {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.25);
}

.le-badge-error {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.25);
}

.le-badge-warn {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.le-badge-info {
    background: rgba(0, 212, 255, 0.12);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.le-badge-high {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.25);
}

.le-badge-medium {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.le-badge-low {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.25);
}

.le-badge-acreditado {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.25);
}

.le-badge-alegado {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.le-badge-no-acreditado {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.25);
}

/* ---- Cards ---- */
.le-cards-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.le-card {
    flex: 1;
    min-width: 200px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.le-card h5 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.le-card p {
    margin: 4px 0;
    font-size: 13px;
    color: #ccc;
}

/* ---- Tables ---- */
.le-matrix {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}

.le-matrix thead th {
    text-align: left;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.le-matrix tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
    vertical-align: top;
}

.le-matrix tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.le-matrix code {
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.le-row-warn {
    background: rgba(255, 193, 7, 0.05);
}

.le-row-warn:hover {
    background: rgba(255, 193, 7, 0.08) !important;
}

.le-matrix-elements tbody td {
    font-size: 12px;
}

/* ---- Lists ---- */
.le-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.le-list li {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}

.le-list li:last-child {
    border-bottom: none;
}

.le-list-warn li {
    border-left: 3px solid rgba(255, 193, 7, 0.4);
    padding-left: 12px;
    margin-bottom: 4px;
}

.le-list-ok li {
    border-left: 3px solid rgba(76, 175, 80, 0.4);
    padding-left: 12px;
    margin-bottom: 4px;
}

.le-source {
    font-size: 11px;
    color: #666;
    margin-left: 6px;
}

/* ---- Info Boxes ---- */
.le-info-box {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: #ccc;
    margin-bottom: 10px;
    line-height: 1.5;
}

.le-info-warn {
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.15);
}

/* ---- Strategy Grid ---- */
.le-strategy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .le-strategy-grid {
        grid-template-columns: 1fr;
    }
}

.le-strategy-col {
    padding: 0;
}

.le-strategy-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
}

.le-strategy-action {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.le-strategy-item p {
    margin: 3px 0;
    font-size: 12px;
    color: #aaa;
}

.le-weakness-item {
    padding: 10px 12px;
    border-left: 3px solid rgba(255, 193, 7, 0.4);
    margin-bottom: 8px;
    font-size: 13px;
    color: #ccc;
}

.le-weakness-item p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #999;
}

/* ---- Scenarios ---- */
.le-scenarios {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.le-scenario-card {
    flex: 1;
    min-width: 180px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.le-scenario-header {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.le-scenario-prob {
    font-size: 13px;
    color: #00d4ff;
    font-weight: 700;
    margin-left: auto;
}

.le-scenario-card p {
    margin: 4px 0;
    font-size: 13px;
    color: #bbb;
}

.le-scenario-req {
    font-size: 12px !important;
    color: #888 !important;
}

/* ---- Negotiation ---- */
.le-negotiation-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #ccc;
}

.le-negotiation-item p {
    margin: 4px 0;
    font-size: 12px;
    color: #aaa;
}

/* ---- Recommendation Cards ---- */
.le-rec-card {
    flex: 1;
    padding: 16px;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: 10px;
}

.le-rec-card h5 {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    text-transform: uppercase;
}

.le-rec-card p {
    margin: 0;
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}

/* ---- Risk Scoring ---- */
.le-risk-global {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.le-risk-global h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #ccc;
}

.le-risk-components,
.le-risk-probs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.le-risk-component {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.le-risk-component:hover {
    border-color: rgba(0, 212, 255, 0.15);
}

.le-risk-comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
}

.le-risk-comp-score {
    font-size: 14px;
    color: #00d4ff;
    font-weight: 700;
}

.le-risk-comp-score em {
    font-size: 11px;
    color: #666;
    font-weight: 400;
}

.le-risk-fundamento {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    margin-bottom: 4px;
    line-height: 1.5;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.le-risk-prob-item {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

/* ---- Gauge ---- */
.le-gauge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.le-gauge-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.le-gauge-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.le-gauge-low {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.le-gauge-medium {
    background: linear-gradient(90deg, #ff9800, #ffc107);
}

.le-gauge-high {
    background: linear-gradient(90deg, #f44336, #ff5722);
}

.le-gauge-value {
    font-size: 14px;
    font-weight: 700;
    color: #e0e0e0;
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.le-gauge-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

/* ---- Traceability ---- */
.le-audit-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.le-audit-stat {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.le-audit-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.le-audit-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.le-audit-ok .le-audit-num { color: #4caf50; }
.le-audit-partial .le-audit-num { color: #ffc107; }
.le-audit-none .le-audit-num { color: #f44336; }
.le-audit-index .le-audit-num { color: #00d4ff; }

.le-trace-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 16px;
}

.le-trace-table thead th {
    text-align: left;
    padding: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.le-trace-table tbody td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #bbb;
    vertical-align: top;
}

.le-trace-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.le-trace-table code {
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}

/* ---- Logic Chain ---- */
.le-logic-chain {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.le-logic-premise {
    color: #aaa;
    margin-bottom: 4px;
    padding-left: 16px;
}

.le-logic-conclusion {
    color: #e0e0e0;
    font-weight: 600;
    padding-left: 16px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
}

/* ---- Report ---- */
.le-report {
    font-size: 14px;
    color: #ccc;
    line-height: 1.7;
}

.le-report h3 {
    font-size: 18px;
    color: #e0e0e0;
    margin: 20px 0 10px;
    font-weight: 700;
}

.le-report h4 {
    font-size: 15px;
    color: #e0e0e0;
    margin: 16px 0 8px;
    font-weight: 600;
}

.le-report h5 {
    font-size: 14px;
    color: #ccc;
    margin: 12px 0 6px;
    font-weight: 600;
}

.le-report strong {
    color: #e0e0e0;
}

.le-report ul {
    padding-left: 20px;
    margin: 8px 0;
}

.le-report li {
    margin: 4px 0;
}

.le-report code {
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.le-report tr td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

/* ---- Subsection Titles ---- */
.le-subsection-title {
    font-size: 15px;
    font-weight: 600;
    color: #ddd;
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.02em;
}

/* ---- Error / Empty ---- */
.le-error {
    padding: 14px;
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 8px;
    color: #f44336;
    font-size: 13px;
    margin-bottom: 12px;
}

.le-empty {
    color: #666;
    font-style: italic;
    font-size: 13px;
    padding: 10px 0;
}

.le-raw-text {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: #ccc;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* ================================================================
   v2 STYLES — Completeness, Omission, Subfactors, Robustness
   ================================================================ */

/* ---- Completeness Index (large gauge) ---- */
.le-completeness-index {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(0, 212, 255, 0.02));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 14px;
    margin-bottom: 20px;
}

.le-completeness-index h4 {
    margin: 0 0 14px;
    font-size: 16px;
    color: #e0e0e0;
    font-weight: 700;
}

.le-completeness-index .le-gauge {
    max-width: 400px;
    margin: 0 auto;
}

.le-completeness-index .le-gauge-track {
    height: 12px;
}

.le-completeness-index .le-gauge-value {
    font-size: 22px;
}

.le-completeness-index .le-risk-fundamento {
    margin-top: 10px;
    font-size: 13px;
    color: #aaa;
}

/* ---- Coverage Grid (4 columns) ---- */
.le-coverage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .le-coverage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .le-coverage-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Omission Card ---- */
.le-omission-card {
    flex: 1;
    min-width: 250px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 8px;
}

.le-omission-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.le-omission-card-header strong {
    color: #e0e0e0;
    font-size: 14px;
}

.le-omission-card p {
    margin: 4px 0;
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

/* ---- v2/v3 Scoring Section ---- */
.le-v2-scoring {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .le-v2-scoring {
        grid-template-columns: 1fr;
    }
}

.le-v2-dim {
    border-left: 3px solid rgba(0, 212, 255, 0.3);
    padding: 16px;
}

/* ---- v3: Riesgo Patrimonial dimension accent ---- */
.le-v2-dim.le-dim-patrimonial {
    border-left-color: rgba(255, 152, 0, 0.5);
}

/* ---- v3: Riesgo Reputacional dimension accent ---- */
.le-v2-dim.le-dim-reputacional {
    border-left-color: rgba(156, 39, 176, 0.5);
}

/* ---- Subfactors (mini gauges grid) ---- */
.le-subfactors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.le-subfactor-item {
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.le-subfactor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.le-subfactor-header span:last-child {
    font-weight: 700;
    color: #ccc;
    font-variant-numeric: tabular-nums;
}

.le-subfactor-item .le-gauge-track {
    height: 4px;
}

.le-subfactor-item .le-gauge-value {
    display: none;
}

/* ---- Robustness ---- */
.le-robustness {
    margin-bottom: 16px;
}

/* ---- Strengths & Weaknesses (two-column) ---- */
.le-strengths-weaknesses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .le-strengths-weaknesses {
        grid-template-columns: 1fr;
    }
}

.le-sw-col {
    padding: 14px;
    border-radius: 10px;
}

.le-sw-strengths {
    background: rgba(76, 175, 80, 0.04);
    border: 1px solid rgba(76, 175, 80, 0.12);
}

.le-sw-weaknesses {
    background: rgba(244, 67, 54, 0.04);
    border: 1px solid rgba(244, 67, 54, 0.12);
}

.le-sw-col .le-subsection-title {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* ---- Categorical Warnings (penalized conclusions) ---- */
.le-categorical-warn {
    padding: 12px 16px;
    background: rgba(255, 152, 0, 0.06);
    border: 1px solid rgba(255, 152, 0, 0.15);
    border-left: 3px solid rgba(255, 152, 0, 0.5);
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
}

.le-categorical-warn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.le-categorical-warn-header strong {
    color: #e0e0e0;
    font-size: 13px;
}

.le-categorical-warn p {
    margin: 3px 0;
    font-size: 12px;
    color: #bbb;
    line-height: 1.4;
}

.le-categorical-warn em {
    color: #999;
}

/* ---- Omission Matrix (prominent table) ---- */
.le-omission-matrix {
    border: 1px solid rgba(255, 152, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.le-omission-matrix thead th {
    background: rgba(255, 152, 0, 0.08);
    color: #ffc107;
}

.le-omission-matrix tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* ---- Responsive adjustments for 6-step pipeline ---- */
@media (max-width: 600px) {
    .le-pipe-step {
        padding: 4px 8px;
    }

    .le-pipe-label {
        font-size: 10px;
    }

    .le-pipe-num {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .le-pipe-arrow {
        font-size: 12px;
    }

    .le-pipeline-preview {
        gap: 3px;
    }
}

/* ================================================================
   v3 NEW STYLES — Dogmática Penal/Civil, Coherencia Interprocesal,
   Riesgo Patrimonial/Reputacional gauges
   ================================================================ */

/* ---- Dogmática Section (collapsible container) ---- */
.le-dogmatica-section {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.le-dogmatica-penal {
    border-left: 3px solid rgba(244, 67, 54, 0.4);
    background: rgba(244, 67, 54, 0.02);
}

.le-dogmatica-civil {
    border-left: 3px solid rgba(33, 150, 243, 0.4);
    background: rgba(33, 150, 243, 0.02);
}

.le-dogmatica-section .le-subsection-title {
    margin-top: 0;
}

.le-dogmatica-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Dogmática Card (tipicidad, antijuridicidad, culpabilidad, etc.) ---- */
.le-dogmatica-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.le-dogmatica-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.le-dogmatica-card-header strong {
    font-size: 14px;
    color: #e0e0e0;
}

.le-dogmatica-card p {
    margin: 4px 0;
    font-size: 12px;
    color: #bbb;
    line-height: 1.4;
}

.le-dogmatica-card em {
    color: #999;
}

/* ---- Dogmática Badges (row of status badges) ---- */
.le-dogmatica-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 8px;
}

.le-dogmatica-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ccc;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- v3 Scoring grid update for 6 dimensions (3 columns) ---- */
@media (min-width: 1024px) {
    .le-v2-scoring {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ================================================================
   VALIDATION SYSTEM
   ================================================================ */

/* Progress Bar */
.le-validation-bar {
    background: var(--le-surface, #1a1a2e);
    border: 1px solid var(--le-border, #2d2d4a);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.le-vbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.le-vbar-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--le-text, #e0e0e0);
}
.le-vbar-count {
    font-size: 0.8rem;
    color: var(--le-text-muted, #888);
}
.le-vbar-track {
    height: 6px;
    background: var(--le-bg, #0d0d1a);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.le-vbar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.le-vbar-stats {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
}
.le-vstat { color: var(--le-text-muted, #888); }

/* Validatable Points */
.le-validatable {
    position: relative;
    border-left: 3px solid transparent;
    padding-left: 8px;
    margin: 4px 0;
    transition: border-color 0.2s, background 0.2s;
}
.le-validatable:hover {
    background: rgba(255,255,255,0.02);
}
.le-v-correct { border-left-color: #4ade80; background: rgba(74,222,128,0.05) !important; }
.le-v-error { border-left-color: #f87171; background: rgba(248,113,113,0.05) !important; }
.le-v-doubt { border-left-color: #fbbf24; background: rgba(251,191,36,0.05) !important; }

/* For tr elements that are validatable */
tr.le-validatable {
    border-left: none;
    padding-left: 0;
}
tr.le-v-correct > td:first-child { box-shadow: inset 3px 0 0 #4ade80; }
tr.le-v-error > td:first-child { box-shadow: inset 3px 0 0 #f87171; }
tr.le-v-doubt > td:first-child { box-shadow: inset 3px 0 0 #fbbf24; }

/* Validation Controls */
.le-vcontrols {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
    vertical-align: middle;
}
.le-vbtn {
    background: none;
    border: 1px solid var(--le-border, #2d2d4a);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.1s, border-color 0.2s;
    line-height: 1;
}
.le-vbtn:hover {
    opacity: 1;
    transform: scale(1.1);
}
.le-vbtn.active {
    opacity: 1;
    border-color: currentColor;
}
.le-vbtn-ok.active { border-color: #4ade80; }
.le-vbtn-err.active { border-color: #f87171; }
.le-vbtn-doubt.active { border-color: #fbbf24; }
.le-vbtn-comment { font-size: 0.7rem; }
.le-vbtn-comment.has-comment {
    opacity: 1;
    background: rgba(99,102,241,0.2);
    border-color: #6366f1;
}

/* Comment Box */
.le-comment-box {
    margin-top: 6px;
    padding: 8px;
    background: var(--le-bg, #0d0d1a);
    border: 1px solid var(--le-border, #2d2d4a);
    border-radius: 6px;
}
.le-comment-box.hidden { display: none; }
.le-comment-input {
    width: 100%;
    min-height: 50px;
    background: var(--le-surface, #1a1a2e);
    border: 1px solid var(--le-border, #2d2d4a);
    border-radius: 4px;
    color: var(--le-text, #e0e0e0);
    padding: 6px 8px;
    font-size: 0.8rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.le-comment-input:focus {
    outline: none;
    border-color: #6366f1;
}
.le-comment-save {
    margin-top: 4px;
    padding: 4px 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}
.le-comment-save:hover { background: #4f46e5; }

/* Validation Summary */
.le-vsummary-agents {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.le-vsummary-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.le-vsummary-name {
    min-width: 140px;
    font-size: 0.8rem;
    color: var(--le-text, #e0e0e0);
}
.le-vsummary-track {
    flex: 1;
    height: 4px;
    background: var(--le-bg, #0d0d1a);
    border-radius: 2px;
    overflow: hidden;
}
.le-vsummary-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    border-radius: 2px;
    transition: width 0.3s;
}
.le-vsummary-stats {
    font-size: 0.75rem;
    color: var(--le-text-muted, #888);
    min-width: 40px;
    text-align: right;
}
.le-vsummary-errors h4,
.le-vsummary-doubts h4 {
    font-size: 0.85rem;
    margin: 12px 0 6px;
}
.le-vsummary-errors ul,
.le-vsummary-doubts ul {
    list-style: none;
    padding: 0;
    font-size: 0.8rem;
}
.le-vsummary-errors li,
.le-vsummary-doubts li {
    padding: 4px 0;
    border-bottom: 1px solid var(--le-border, #2d2d4a);
}
.le-vsummary-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}
.le-btn-export-validation {
    padding: 8px 16px;
    background: var(--le-surface, #1a1a2e);
    border: 1px solid var(--le-border, #2d2d4a);
    color: var(--le-text, #e0e0e0);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}
.le-btn-export-validation:hover {
    background: #6366f1;
    border-color: #6366f1;
}


/* ---- Enterprise History Panel ---- */
.le-history-panel {
    color: #ccc;
}

.le-history-panel h4 {
    margin: 0 0 16px;
    color: #e0e0e0;
    font-size: 16px;
}

.le-history-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.le-history-item {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    color: #ccc;
    font-size: 13px;
    transition: background 0.2s, border-color 0.2s;
}

.le-history-item:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.2);
}

.le-history-item strong {
    color: #00d4ff;
    font-size: 12px;
}

.le-history-item span {
    color: #999;
    font-size: 12px;
}

/* ---- Stop/Danger Button ---- */
.le-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.le-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ================================
   THINKING/REASONING PANELS
   ================================ */

.le-stage-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.le-thinking-toggle {
    background: none;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-left: auto;
    color: #a78bfa;
    line-height: 1;
}

.le-thinking-toggle:hover {
    opacity: 1;
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
}

.le-thinking-toggle.le-thinking-active {
    opacity: 1;
    background: rgba(139, 92, 246, 0.2);
    border-color: #a78bfa;
}

.le-thinking-panel {
    margin: 6px 0 8px 24px;
    animation: thinkingFadeIn 0.3s ease;
}

@keyframes thinkingFadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.le-thinking-text {
    background: rgba(139, 92, 246, 0.08);
    border-left: 3px solid #a78bfa;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #d4d4d8;
    font-style: italic;
}

.le-thinking-label {
    font-style: normal;
    font-weight: 600;
    color: #a78bfa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Adjust stage layout for new structure */
.le-stage {
    margin-bottom: 4px;
}

.le-stage-done .le-thinking-toggle {
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.le-stage-done .le-thinking-toggle:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
}

/* ================================
   PARTIAL RESULTS (timeout resilience)
   ================================ */

.le-partial-notice {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #fbbf24;
}

.le-partial-agent {
    background: rgba(30, 30, 40, 0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.le-partial-agent summary {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #e4e4e7;
    transition: background 0.2s;
}

.le-partial-agent summary:hover {
    background: rgba(255,255,255,0.05);
}

.le-partial-json {
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.5;
    color: #a1a1aa;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    white-space: pre-wrap;
    word-break: break-word;
}

.le-warning {
    background: rgba(234, 179, 8, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #fbbf24;
    margin-bottom: 12px;
}

/* ================================
   DOCUMENTS PROCESSED
   ================================ */

.le-docs-processed {
    background: rgba(30, 30, 50, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.le-docs-header {
    font-size: 14px;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 10px;
}

.le-doc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 4px;
    transition: background 0.2s;
}

.le-doc-row:hover {
    background: rgba(255,255,255,0.06);
}

.le-doc-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.le-doc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.le-doc-name {
    font-size: 13px;
    font-weight: 500;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.le-doc-desc {
    font-size: 11px;
    color: #71717a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.le-doc-part {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.le-doc-words {
    font-size: 11px;
    color: #52525b;
    flex-shrink: 0;
}

/* ================================
   FOLLOW-UP CHAT
   ================================ */

.le-followup-chat {
    background: rgba(20, 20, 35, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.le-followup-header {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #60a5fa;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(96, 165, 250, 0.05);
}

.le-followup-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 12px 14px;
    min-height: 20px;
}

.le-followup-messages:empty::before {
    content: "Pregunte sobre el análisis, aporte información adicional, o solicite enfoque en una parte específica...";
    color: #52525b;
    font-size: 12px;
    font-style: italic;
}

.le-chat-msg {
    margin-bottom: 10px;
    display: flex;
}

.le-chat-msg.le-chat-user {
    justify-content: flex-end;
}

.le-chat-msg.le-chat-bot {
    justify-content: flex-start;
}

.le-chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.le-chat-bubble-user {
    background: rgba(96, 165, 250, 0.15);
    color: #e4e4e7;
    border-bottom-right-radius: 4px;
}

.le-chat-bubble-bot {
    background: rgba(255, 255, 255, 0.05);
    color: #d4d4d8;
    border-bottom-left-radius: 4px;
}

.le-chat-bubble-bot p { margin: 0 0 8px; }
.le-chat-bubble-bot p:last-child { margin-bottom: 0; }
.le-chat-bubble-bot ul, .le-chat-bubble-bot ol { margin: 4px 0; padding-left: 18px; }
.le-chat-bubble-bot h3, .le-chat-bubble-bot h4 { margin: 8px 0 4px; color: #e4e4e7; font-size: 13px; }
.le-chat-bubble-bot strong { color: #93c5fd; }

.le-chat-error {
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5 !important;
}

.le-followup-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    align-items: flex-end;
}

.le-followup-textarea {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: #e4e4e7;
    font-size: 13px;
    resize: none;
    font-family: inherit;
    min-height: 36px;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s;
}

.le-followup-textarea:focus {
    border-color: rgba(96, 165, 250, 0.4);
}

.le-followup-textarea::placeholder {
    color: #52525b;
    font-size: 12px;
}

.le-followup-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.le-followup-file-btn {
    padding: 6px 10px !important;
    font-size: 16px !important;
    min-width: auto !important;
}

.le-followup-send {
    padding: 6px 16px !important;
    font-size: 13px !important;
    white-space: nowrap;
}

/* ================================
   TEXT FORMATTING FIXES ("achoclonado")
   ================================ */

/* Better spacing in report sections */
.le-report {
    line-height: 1.7;
    font-size: 14px;
}

.le-report h1, .le-report h2, .le-report h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.le-report h1 { font-size: 18px; color: #60a5fa; }
.le-report h2 { font-size: 16px; color: #93c5fd; }
.le-report h3 { font-size: 14px; color: #a5b4fc; }

.le-report p {
    margin: 8px 0;
}

.le-report ul, .le-report ol {
    margin: 8px 0;
    padding-left: 20px;
}

.le-report li {
    margin-bottom: 4px;
}

.le-report hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 16px 0;
}

/* Tables in report */
.le-report table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}

.le-report th {
    background: rgba(96, 165, 250, 0.1);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #93c5fd;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.le-report td {
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #d4d4d8;
}

.le-report tr:hover td {
    background: rgba(255,255,255,0.03);
}

/* Better spacing for section bodies */
.le-section-body {
    padding: 16px !important;
    line-height: 1.6;
}

/* Fix tables in agent sections */
.le-section-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.le-section-body th {
    background: rgba(255,255,255,0.05);
    padding: 6px 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.le-section-body td {
    padding: 6px 10px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: top;
}

/* Fix items/cards spacing */
.le-section-body .le-item,
.le-section-body details {
    margin-bottom: 8px;
}

/* Better badge spacing */
.le-badge {
    margin-left: 8px;
}

/* ================================
   CASES PANEL (Mis Casos)
   ================================ */

.le-cases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.le-case-card {
    padding: 12px 14px;
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.03);
}

.le-case-card:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateX(4px);
}

.le-case-title {
    font-size: 14px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 2px;
}

.le-case-parties {
    font-size: 12px;
    color: #93c5fd;
    margin-bottom: 4px;
}

.le-case-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.le-case-rename-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.4;
    transition: opacity 0.2s, background 0.2s;
    flex-shrink: 0;
}

.le-case-card:hover .le-case-rename-btn {
    opacity: 0.8;
}

.le-case-rename-btn:hover {
    opacity: 1 !important;
    background: rgba(96, 165, 250, 0.15);
}

.le-case-materia {
    font-size: 11px;
    color: #a78bfa;
    text-transform: capitalize;
    margin-bottom: 2px;
}

.le-case-date {
    font-size: 11px;
    color: #52525b;
}

.le-rename-btn {
    background: none;
    border: 1px solid rgba(96, 165, 250, 0.2);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0.6;
    transition: all 0.2s;
    margin-left: 8px;
}

.le-rename-btn:hover {
    opacity: 1;
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.4);
}

/* ================================
   EXPORT BUTTONS
   ================================ */

.le-results-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.le-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 6px;
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.le-download-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
}

.le-btn-secondary-small {
    background: rgba(255,255,255,0.03) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #71717a !important;
}

.le-btn-secondary-small:hover {
    background: rgba(255,255,255,0.06) !important;
    color: #a1a1aa !important;
}

/* Also rename Historial button */
#le-view-history {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
}

#le-view-history:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
}
