/* Admin AI Chat */
.tnv-ai-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    background:
        radial-gradient(circle at 50% 32%, rgba(0, 184, 212, 0.08), transparent 30%),
        linear-gradient(180deg, #f7fbfc 0%, #ffffff 42%, #f8fafc 100%);
    font-family: 'Inter', 'Roboto', sans-serif;
    position: relative;
    overflow: hidden;
}

.tnv-ai-toolbar {
    display: flex;
    justify-content: flex-start;
    flex-shrink: 0;
    padding: 0 0 10px;
}

.tnv-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
    scroll-behavior: smooth;
}

.tnv-ai-messages-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tnv-ai-messages::-webkit-scrollbar { width: 6px; }
.tnv-ai-messages::-webkit-scrollbar-track { background: transparent; }
.tnv-ai-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
.tnv-ai-messages::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

.tnv-ai-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 26px 20px 20px;
    animation: tnv-fadeIn 0.5s ease-out;
}

.tnv-ai-welcome-logo {
    width: 150px;
    height: 124px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.tnv-ai-welcome-logo:before {
    content: "";
    position: absolute;
    width: 128px;
    height: 54px;
    border-radius: 999px;
    background: rgba(0, 194, 168, 0.15);
    filter: blur(18px);
    bottom: 18px;
}

.tnv-ai-cloud-svg {
    width: 142px;
    height: 96px;
    position: relative;
    z-index: 2;
    overflow: visible;
    filter: drop-shadow(0 18px 28px rgba(0, 104, 127, 0.22));
}

.tnv-ai-cloud-svg path {
    fill: url(#tnv-ai-cloud-gradient);
    stroke: #008ea1;
    stroke-width: 13;
    stroke-linecap: round;
    stroke-linejoin: round;
    paint-order: stroke fill;
}

.tnv-ai-cloud-node {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00c2a8;
    box-shadow: 0 0 0 5px rgba(0, 194, 168, 0.14), 0 0 24px rgba(0, 194, 168, 0.75);
    z-index: 3;
    animation: tnv-ai-node-pulse 2.4s ease-in-out infinite;
}

.tnv-ai-cloud-node-one {
    left: 14px;
    top: 62px;
}

.tnv-ai-cloud-node-two {
    right: 12px;
    top: 42px;
}

.tnv-ai-cloud-node-three {
    left: 72px;
    bottom: 4px;
}

.tnv-ai-logo-ring {
    position: absolute;
    width: 132px;
    height: 94px;
    border-radius: 50%;
    border: 1px solid rgba(0, 194, 168, 0.34);
    transform: rotate(-13deg);
    z-index: 1;
    animation: tnv-ai-ring 8s linear infinite;
}

.tnv-ai-logo-ring:before,
.tnv-ai-logo-ring:after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #eafffb;
    box-shadow: 0 0 18px rgba(0, 194, 168, 0.95);
}

.tnv-ai-logo-ring:before {
    left: 12px;
    top: 47px;
}

.tnv-ai-logo-ring:after {
    right: 18px;
    top: 18px;
}

.tnv-ai-logo-scan {
    position: absolute;
    width: 104px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(234,255,251,0.95), transparent);
    top: 68px;
    z-index: 4;
    box-shadow: 0 0 18px rgba(0, 194, 168, 0.55);
    animation: tnv-ai-scan 2.8s ease-in-out infinite;
}

.tnv-ai-logo-pulse {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(0, 104, 127, 0.18);
    z-index: 0;
}

.tnv-ai-logo-pulse-one {
    width: 148px;
    height: 82px;
    animation: tnv-ai-pulse 3.2s ease-in-out infinite;
}

.tnv-ai-logo-pulse-two {
    width: 118px;
    height: 118px;
    border-color: rgba(0, 194, 168, 0.16);
    transform: rotate(34deg);
    animation: tnv-ai-pulse 3.2s ease-in-out infinite 0.8s;
}

@keyframes tnv-ai-ring {
    from { transform: rotate(-13deg); }
    to { transform: rotate(347deg); }
}

@keyframes tnv-ai-scan {
    0%, 100% { opacity: 0.2; transform: translateY(-10px) scaleX(0.72); }
    50% { opacity: 1; transform: translateY(10px) scaleX(1); }
}

@keyframes tnv-ai-pulse {
    0%, 100% { opacity: 0.28; transform: scale(0.96); }
    50% { opacity: 0.75; transform: scale(1.04); }
}

@keyframes tnv-ai-node-pulse {
    0%, 100% { opacity: 0.72; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.12); }
}

.tnv-ai-welcome-title {
    font-size: 34px;
    font-weight: 800;
    color: #07151d;
    margin: 0 0 10px;
    letter-spacing: 0;
}

.tnv-ai-welcome-sub {
    font-size: 16px;
    color: #43515c;
    margin: 0 0 28px;
    max-width: 650px;
    line-height: 1.55;
}

.tnv-ai-welcome-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    background: #f0f7f9;
    border: 1px solid #dcebef;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 24px auto 0;
    max-width: 600px;
    line-height: 1.5;
    text-align: left;
}

.tnv-ai-welcome-disclaimer i {
    color: #00687f;
    margin-top: 2px;
    flex-shrink: 0;
}

.tnv-ai-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.tnv-ai-chip {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tnv-ai-chip-ico {
    color: #00687f;
    font-size: 18px;
    line-height: 1.3;
    flex-shrink: 0;
}

.tnv-ai-chip-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tnv-ai-chip-title {
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.tnv-ai-chip-desc {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.3;
}

.tnv-ai-chip-go {
    margin-left: auto;
    align-self: center;
    font-size: 14px;
    color: #9ca3af;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.tnv-ai-chip:hover {
    background: #f9fafb;
    border-color: #00687f;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 104, 127, 0.05);
}

.tnv-ai-chip:hover .tnv-ai-chip-go {
    opacity: 1;
    transform: translateX(0);
}

.tnv-ai-turn {
    display: flex;
    gap: 20px;
    padding: 30px 0;
    border-bottom: 1px solid #f3f4f6;
    animation: tnv-fadeIn 0.3s ease-out;
}

.tnv-ai-turn:last-child { border-bottom: none; }

.tnv-ai-turn-user {
    justify-content: flex-end;
}

.tnv-ai-user-text {
    background: #f3f4f6;
    color: #111827;
    font-size: 15px;
    padding: 14px 20px;
    border-radius: 20px 20px 4px 20px;
    max-width: 80%;
    line-height: 1.6;
}

.tnv-ai-turn-ai {
    justify-content: flex-start;
}

.tnv-ai-bot-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    color: #00687f;
    font-size: 26px;
    line-height: 1;
}

.tnv-ai-response {
    flex: 1;
    min-width: 0;
    color: #1f2937;
}

.tnv-ai-response-body {
    font-size: 15px;
    line-height: 1.7;
}

.tnv-ai-response-body p { margin: 0 0 16px; }
.tnv-ai-response-body p:last-child { margin-bottom: 0; }
.tnv-ai-response-body strong { color: #111827; font-weight: 600; }

.tnv-ai-response-body ul {
    margin: 12px 0 16px;
    padding-left: 24px;
}

.tnv-ai-response-body li { margin-bottom: 6px; }

.tnv-ai-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.tnv-ai-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
}

.tnv-ai-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.tnv-ai-table tr:last-child td { border-bottom: none; }
.tnv-ai-table tr:hover td { background: #f9fafb; }

.tnv-ai-sql {
    margin-top: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.tnv-ai-sql summary {
    cursor: pointer;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
}

.tnv-ai-sql summary:hover { color: #00687f; }

.tnv-ai-sql pre {
    margin: 0;
    padding: 16px;
    font-size: 13px;
    color: #1f2937;
    overflow-x: auto;
    border-top: 1px solid #e5e7eb;
    font-family: 'Consolas', 'Monaco', monospace;
}

.tnv-ai-typing-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.tnv-ai-typing-msg {
    font-size: 1.05rem;
    color: #4b5563;
    font-style: italic;
    min-width: 220px;
}

.tnv-ai-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

.tnv-ai-typing span {
    width: 13px;
    height: 13px;
    background: #9ca3af;
    border-radius: 50%;
    animation: tnv-bounce 1.4s infinite ease-in-out both;
}

.tnv-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.tnv-ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes tnv-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); background: #00687f; }
}

@keyframes tnv-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tnv-ai-input-area {
    background: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,0.94) 24%, rgba(248,250,252,1) 100%);
    padding: 10px 20px 14px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.tnv-ai-input-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px;
}

.tnv-ai-input-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #00687f;
    border-radius: 18px;
    padding: 8px 8px 8px 18px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.9);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tnv-ai-input-box:before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 194, 168, 0.02), transparent 35%, rgba(0, 104, 127, 0.015));
}

.tnv-ai-input-box:focus-within {
    border-color: rgba(0, 194, 168, 0.75);
    box-shadow: 0 0 0 4px rgba(0, 194, 168, 0.12), 0 22px 52px rgba(0, 104, 127, 0.16);
}

.tnv-ai-textarea {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    min-height: 0;
    resize: none;
    font-size: 15px;
    line-height: 1.45;
    color: #111827;
    max-height: 120px;
    padding: 8px 0;
    margin-right: 12px;
    position: relative;
    z-index: 1;
}

.tnv-ai-textarea::placeholder { color: #77838f; }

.tnv-ai-attach-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 1;
    background: transparent;
    color: #4b5563;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 26px;
    margin-right: 8px;
    transition: all 0.18s ease;
    position: relative;
    top: -1px;
    z-index: 1;
}

.tnv-ai-attach-btn:hover {
    color: #00687f;
}

.tnv-ai-send,
.tnv-ai-stop {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #00687f;
    border-radius: 50%;
    background: #00687f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 17px;
    position: relative;
    z-index: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tnv-ai-send:hover:not(:disabled),
.tnv-ai-stop:hover {
    background: #005467;
}

.tnv-ai-send:focus-visible,
.tnv-ai-stop:focus-visible {
    outline: 2px solid #00687f;
    outline-offset: 3px;
}

.tnv-ai-send:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border-color: transparent;
    cursor: not-allowed;
}

.tnv-ai-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    margin-bottom: 25px;
    padding: 0 8px;
    font-size: 12px;
}

.tnv-ai-hint {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tnv-ai-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tnv-ai-footer-right {
    margin-left: auto;
    text-align: right;
}

.tnv-ai-modo-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .6);
    backdrop-filter: blur(4px);
    animation: tnv-ai-modo-fade .18s ease;
}

@keyframes tnv-ai-modo-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tnv-ai-modo-modal {
    background: linear-gradient(145deg, #f2f8fa, #fff 42%);
    border-radius: 22px;
    padding: 32px;
    width: 640px;
    max-width: calc(100% - 32px);
    text-align: left;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    border: 1px solid #dbe5e8;
    box-shadow: 0 12px 36px rgba(25, 60, 75, .12);
    animation: tnv-ai-modo-pop .22s cubic-bezier(.34,1.56,.64,1);
}

@keyframes tnv-ai-modo-pop {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tnv-ai-modo-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 26px;
    border-bottom: 1px solid #e1ebee;
    color: #00687f;
    font-size: 20px;
    letter-spacing: -.5px;
}

.tnv-ai-modo-brand > span:last-child {
    font-size: 12px;
    letter-spacing: 0;
    color: #71869a;
}

.tnv-ai-modo-modal-title {
    font-size: 25px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}

.tnv-ai-modo-modal-title-2 {
    margin-top: 32px;
}

.tnv-ai-modo-modal-sub {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 22px;
}

.tnv-ai-modo-cards {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.tnv-ai-modo-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 190px;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all .15s ease;
}


.tnv-ai-modo-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.tnv-ai-modo-card-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.tnv-ai-modo-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 6px;
    color: #00687f;
    font-size: 24px;
}

.tnv-ai-modo-card-icon span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #71869a;
}

.tnv-ai-modo-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e1ebee;
    font-size: 12px;
    font-weight: 600;
    color: #00687f;
}

.tnv-ai-modo-card:focus-visible,
.tnv-ai-modo-continuar-btn:focus-visible {
    outline: 2px solid #00687f;
    outline-offset: 3px;
}

.tnv-ai-modo-card:hover {
    border-color: #00687f;
    background: #f0f7f9;
    box-shadow: 0 2px 8px rgba(0,104,127,.08);
}

.tnv-ai-modo-card.is-selected {
    border-color: #00687f;
    background: #eaf5f7;
    box-shadow: 0 0 0 2px rgba(0,104,127,.28);
}

.tnv-ai-modo-continuar-btn {
    margin-top: 20px;
    background: #00687f;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.tnv-ai-modo-continuar-btn:hover { background: #005267; }

.tnv-ai-modo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #00687f;
    background: #eaf5f7;
    border-radius: 12px;
    padding: 2px 10px;
}

.tnv-ai-new-btn {
    background: none;
    border: none;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.tnv-ai-new-btn:hover { color: #00687f; }

@media (max-width: 767px) {
    .tnv-ai-welcome-title { font-size: 26px; }
    .tnv-ai-welcome-sub { font-size: 14px; }
    .tnv-ai-input-wrapper { padding: 0; }
    .tnv-ai-footer-row { flex-direction: column; gap: 8px; align-items: flex-start; }
}

.tnv-ai-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.tnv-ai-action-btn {
    background: #f0f7f9;
    border: 1.5px solid #00687f;
    border-radius: 6px;
    color: #00687f;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tnv-ai-action-btn:hover {
    background: #00687f;
    color: #ffffff;
    border-color: #00687f;
}

.tnv-ai-download-btn {
    background: #00687f;
    color: #ffffff;
    border-color: #00687f;
}

.tnv-ai-download-btn:hover {
    background: #005068;
    border-color: #005068;
    color: #ffffff;
}

.tnv-ai-stop {
    font-size: 13px;
}

@media (max-width: 479px) {
    .tnv-ai-modo-modal { padding: 22px; }
    .tnv-ai-modo-modal-title { font-size: 21px; }
    .tnv-ai-modo-brand { margin-bottom: 20px; }
}

.tnv-ai-stop .fa-stop {
    width: 12px;
    height: 12px;
    margin: 0;
    background: currentColor;
    border-radius: 2px;
}

.tnv-ai-stop .fa-stop::before {
    content: none;
}

/* ── Adjuntar archivo ─────────────────────────────────────────────────────── */

.tnv-ai-attach {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px 10px 6px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.tnv-ai-attach:hover { color: #00687f; }

.tnv-ai-file-badge {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f0f7f9;
    border: 1px solid #b2d8e2;
    border-radius: 8px;
    padding: 6px 12px;
    margin-top: 6px;
    font-size: 13px;
    color: #00687f;
}

.tnv-ai-file-badge-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    font-weight: 500;
}

.tnv-ai-file-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0 2px;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.tnv-ai-file-remove:hover { color: #ef4444; }

/* ══ Panel de Uso IA ══════════════════════════════════════════════════════════ */

.tnv-uso-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    font-family: 'Inter', 'Roboto', sans-serif;
}

/* Filtros */
.tnv-uso-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    background: #f7fbfc;
    border: 1px solid #d1eaf0;
    border-radius: 10px;
    padding: 16px 20px;
}
.tnv-uso-filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tnv-uso-filtro-grupo label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tnv-uso-filtro-grupo input[type="date"],
.tnv-uso-filtro-grupo select {
    border: 1.5px solid #b2d8e2;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .15s;
}
.tnv-uso-filtro-grupo input[type="date"]:focus,
.tnv-uso-filtro-grupo select:focus {
    border-color: #00687f;
}
.tnv-uso-btn-filtrar {
    padding: 8px 18px;
    background: #00687f;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    align-self: flex-end;
}
.tnv-uso-btn-filtrar:hover { background: #005068; }

/* Cards resumen */
.tnv-uso-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.tnv-uso-card {
    background: #fff;
    border: 1.5px solid #d1eaf0;
    border-radius: 12px;
    padding: 20px 22px 16px;
    box-shadow: 0 1px 4px rgba(0,104,127,0.06);
    text-align: center;
}
.tnv-uso-card-coste { border-color: #00687f; background: #f0f7f9; }
.tnv-uso-card-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 6px;
}
.tnv-uso-card-coste .tnv-uso-card-val { color: #00687f; }
.tnv-uso-card-label {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 500;
}

/* Tabla */
.tnv-uso-tabla-wrap { overflow-x: auto; }
.tnv-uso-estado {
    text-align: center;
    color: #6b7280;
    padding: 32px;
    font-size: 0.95rem;
}
.tnv-uso-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.tnv-uso-tabla thead tr {
    background: #f0f7f9;
    border-bottom: 2px solid #b2d8e2;
}
.tnv-uso-tabla th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.tnv-uso-tabla td {
    padding: 9px 14px;
    border-bottom: 1px solid #e5f1f5;
    color: #1e293b;
}
.tnv-uso-tabla tbody tr:hover { background: #f7fbfc; }
.tnv-uso-num { text-align: right; font-variant-numeric: tabular-nums; }
.tnv-uso-coste-cell { font-weight: 700; color: #00687f; }

/* Badges */
.tnv-uso-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tnv-uso-badge-admin  { background: #e0f2fe; color: #0369a1; }
.tnv-uso-badge-asesor { background: #dcfce7; color: #166534; }

/* ══ Panel de Costes OCR IA ═══════════════════════════════════════════════════ */

.tnv-ocr-costes-cabecera {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 36px 0 16px;
    padding-top: 24px;
    border-top: 2px solid #d1eaf0;
}
.tnv-ocr-costes-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.tnv-ocr-costes-bloque { margin-bottom: 28px; }
.tnv-ocr-costes-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 4px;
    min-height: 1em;
}
