﻿/* * SAMVA DESIGN SYSTEM v3.0 - TOTAL INTEGRATION
 * Consolidación de: Ficha de Llamada, Bitácora Técnica, Sistema de Comentarios, Editor Avanzado y Paginación.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- TOKENS DE DISEÑO --- */
:root {
    /* Radios, sombras y tipografía base */
    --sv-radius-xl: 20px;
    --sv-radius-lg: 14px;
    --sv-radius-md: 10px;
    --sv-radius-sm: 6px;
    --sv-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --sv-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --sv-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --sv-font: 'Inter', 'Segoe UI', Roboto, sans-serif;
    /* Business Colors (Semántica operativa constante) */
    --sv-color-interno: #d97706; /* Amber */
    --sv-color-pruebas: #9333ea; /* Purple */
    --sv-color-solucion: #16a34a; /* Green */
    --sv-color-danger: #ef4444; /* Red */
    --sv-color-warning: #f59e0b;
    /* Colores del Tema Principal (Agregados para Paginación y uso general) */
    --sv-primary: #006DEF;
    --sv-primary-alpha: rgba(0, 109, 239, 0.2);
    --sv-dark: #00013D;
    --sv-bg-main: #f8fafc;
    --sv-bg-soft: #f1f5f9;
    --sv-white: #ffffff;
    --sv-text-main: #1e293b;
    --sv-text-muted: #64748b;
    --sv-text-light: #94a3b8;
    --sv-border: #e2e8f0;
    --sv-border-light: #f1f5f9;
}

/* --- RESET & CORE --- */
.sv-modern, .samva-modern-container {
    font-family: var(--sv-font);
    color: var(--sv-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    max-width: 1200px;
    margin: 0 auto;
}

    .sv-modern *, .samva-modern-container * {
        box-sizing: border-box;
    }

/* --- LAYOUT SISTEMA --- */
.sv-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.sv-col-side {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
}

.sv-col-main {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding: 0 15px;
}

@media (max-width: 992px) {
    .sv-col-side, .sv-col-main {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* --- COMPONENTES DE SUPERFICIE --- */
.sv-card {
    background: var(--sv-white);
    border-radius: var(--sv-radius-xl);
    padding: 24px;
    border: 1px solid var(--sv-border);
    box-shadow: var(--sv-shadow-md);
    margin-bottom: 24px;
    position: relative;
}

.sv-sub-block {
    background: var(--sv-bg-soft);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    padding: 12px 16px;
    margin-bottom: 12px;
}

/* --- BOTONES Y ACCIONES --- */
.sv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--sv-radius-md);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

.sv-btn-primary {
    background: var(--sv-primary);
    color: white !important;
}

.sv-btn-accent {
    background: var(--sv-accent); /* Asegúrate de definir --sv-accent si lo usas */
    color: white !important;
}

.sv-btn-ghost {
    background: transparent;
    color: var(--sv-text-muted);
    border: 1px solid var(--sv-border);
}

/* Botones de Audio Player */
.sv-btn-play {
    width: 48px;
    height: 48px;
    background: var(--sv-primary);
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--sv-primary-alpha);
}

.sv-btn-pause {
    width: 48px;
    height: 48px;
    background: var(--sv-color-warning);
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* --- EDITOR UI (Reemplaza custom-editor-card y derivados) --- */
.sv-editor-card {
    background: var(--sv-white);
    border: 2px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow-md);
    margin-bottom: 40px;
    position: relative;
    transition: border-color 0.3s ease;
}

/* Modos del Editor */
.sv-editor-mode-interno {
    border-color: var(--sv-color-interno) !important;
}

.sv-editor-mode-cliente {
    border-color: var(--sv-primary) !important;
}

.sv-editor-mode-solucion {
    border-color: var(--sv-color-solucion) !important;
}

.sv-editor-mode-pruebas {
    border-color: var(--sv-color-pruebas) !important;
}

/* Cabecera del Editor (custom-type-selector-container) */
.sv-editor-header {
    background: var(--sv-bg-soft);
    padding: 10px 16px;
    border-bottom: 1px solid var(--sv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--sv-radius-lg) var(--sv-radius-lg) 0 0;
}

/* Pill Group Selector */
.sv-pill-group {
    display: flex;
    background: #eef2f6;
    padding: 4px;
    border-radius: 12px;
    gap: 2px;
}

.sv-btn-pill {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 9px;
    cursor: pointer;
    color: var(--sv-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .sv-btn-pill.active {
        background: var(--sv-white);
        color: var(--sv-text-main);
        box-shadow: var(--sv-shadow-sm);
    }

    .sv-btn-pill.active-interno {
        color: var(--sv-color-interno);
        background: var(--sv-white);
    }

    .sv-btn-pill.active-cliente {
        color: var(--sv-primary);
        background: var(--sv-white);
    }

/* Reply Preview */
.sv-reply-preview {
    margin: 12px 20px;
    background: var(--sv-bg-soft);
    border-left: 3px solid var(--sv-text-light);
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
}

/* --- HISTORIAL Y TIMELINE (Bitácora + Comentarios) --- */
.sv-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 15px;
}

    .sv-timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--sv-border);
    }

.sv-ev-item {
    position: relative;
    padding-left: 45px;
    margin-bottom: 20px;
}

.sv-ev-anchor {
    position: absolute;
    left: 4px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid white;
    z-index: 2;
    font-size: 10px;
}

/* Hilos de conversación (Thread lines) */
.sv-comment-thread {
    margin-left: 64px;
    position: relative;
}

    .sv-comment-thread::before {
        content: '';
        position: absolute;
        left: -41px;
        top: -30px;
        width: 24px;
        height: 52px;
        border-left: 2px solid var(--sv-border);
        border-bottom: 2px solid var(--sv-border);
        border-bottom-left-radius: 12px;
    }

/* --- TOOLBAR FLOTANTE (gc-toolbar) --- */
.sv-toolbar-container {
    position: absolute;
    top: 15px;
    right: 18px;
    z-index: 100;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.15s ease-out;
    pointer-events: none;
}

.sv-card:hover .sv-toolbar-container {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sv-toolbar {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--sv-border);
    border-radius: 24px;
    box-shadow: var(--sv-shadow-md);
    padding: 2px 4px;
    gap: 2px;
}

/* --- DATOS TÉCNICOS --- */
.sv-tech-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--sv-bg-soft);
}

.sv-tech-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--sv-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sv-tech-value {
    font-size: 11px;
    font-weight: 800;
    color: var(--sv-text-main);
    text-align: right;
}

/* --- FORMULARIOS (Controladores ASP.NET) --- */
.sv-form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--sv-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sv-form-control, .sv-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--sv-text-main);
    background-color: var(--sv-bg-soft);
    border: 1px solid var(--sv-border);
    border-radius: 12px;
    transition: all 0.2s;
}

    .sv-form-control:focus, .sv-input:focus {
        outline: none;
        border-color: var(--sv-primary);
        background-color: white;
        box-shadow: 0 0 0 3px var(--sv-primary-alpha);
    }

/* --- ANIMACIONES --- */
@keyframes sv-pulse-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.sv-unread-dot {
    width: 10px;
    height: 10px;
    background: var(--sv-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--sv-primary);
    animation: sv-pulse-red 2s infinite;
}

/* --- CONTENIDO DINÁMICO --- */
.sv-content-wrap {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

    .sv-content-wrap img {
        max-width: 100%;
        max-height: 350px;
        border-radius: 8px;
        object-fit: contain;
        margin: 10px 0;
    }

/* Select2/Syncfusion Overrides */
.e-rte-elements.e-popup {
    z-index: 100000 !important;
    border-radius: 12px !important;
    box-shadow: var(--sv-shadow-lg) !important;
}

/* ========================================================
   --- PAGINACIÓN Y TABLAS (ResultadoBusquedaPaginado) ---
   ======================================================== */

/* Fila superior (Selector y Exportación) - Corrección de layout para Bootstrap 3 */
.dataTables_wrapper:not(.view-pager) {
    display: flex !important;
    flex-direction: row-reverse; /* Mandamos los resultados a la derecha estrictamente */
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem !important; /* Reducimos el espacio excesivo abajo */
}

@media (min-width: 768px) {
    .dataTables_wrapper:not(.view-pager) {
        justify-content: space-between; /* Distribuye espacio si hay botón de exportación */
    }
}

.dataTables_wrapper:not(.view-pager)::before,
.dataTables_wrapper:not(.view-pager)::after {
    display: none !important; /* Limpiamos el clearfix que rompe Flexbox en Bootstrap 3 */
}

.dataTables_wrapper:not(.view-pager) > div {
    width: auto !important; /* Evita que la columna tome el 50% de la pantalla y quede flotando */
    float: none !important;
    padding: 0;
}

/* Contenedor del selector para quitar lo "burdo" */
.dataTables_wrapper .dataTables_length {
    float: none !important;
    display: flex;
    justify-content: flex-end;
    margin: 0 !important;
    padding: 0 !important; /* Quitamos paddings extra de arriba */
}

    /* Estilo del texto "Resultados por página" */
    .dataTables_wrapper .dataTables_length label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-weight: 500;
        color: var(--sv-text-muted);
        font-size: 0.95rem; /* AUMENTADO PARA MEJOR LECTURA */
        margin: 0;
    }

    /* Modernizando el DropDownList (<select>) */
    .dataTables_wrapper .dataTables_length select.form-control {
        display: inline-block;
        width: auto;
        padding: 0.375rem 2rem 0.375rem 1rem !important; /* Espacio para la flecha */
        font-size: 0.95rem; /* AUMENTADO */
        font-weight: 600;
        color: var(--sv-text-main);
        background-color: var(--sv-white) !important;
        border: 1px solid var(--sv-border) !important;
        border-radius: var(--sv-radius-md) !important; /* Usamos variable del sistema */
        box-shadow: var(--sv-shadow-sm); /* Usamos variable del sistema */
        height: 38px !important; /* Fija la altura a una medida moderna */
        line-height: 1.5;
        /* Quitar estilo por defecto y poner flecha moderna */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 0.75rem center !important;
        background-size: 16px 12px !important;
        cursor: pointer;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

        .dataTables_wrapper .dataTables_length select.form-control:focus {
            border-color: var(--sv-primary) !important;
            outline: 0;
            box-shadow: 0 0 0 3px var(--sv-primary-alpha) !important;
        }

/* Contenedor principal inferior (Reemplaza el text-center por flexbox) */
.dataTables_wrapper.view-pager .text-center {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem; /* Reducimos el espacio excesivo de 1.5 a 1 */
    padding-top: 1rem;
    border-top: 1px solid var(--sv-border);
    text-align: left !important;
}

@media (min-width: 768px) {
    .dataTables_wrapper.view-pager .text-center {
        flex-direction: row;
    }
}

/* Texto de "Mostrando 1 a 10 de 29" */
.dataTables_wrapper.view-pager .dataTables_info {
    font-size: 0.95rem; /* AUMENTADO PARA MEJOR LECTURA */
    color: var(--sv-text-muted);
    font-weight: 500;
}

/* El bloque de los botones */
.dataTables_wrapper.view-pager .dataTables_paginate {
    margin: 0;
}

/* Lista de paginación ul */
.dataTables_wrapper .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    border-radius: 0;
}

    /* Estilo individual de los botones li > a */
    .dataTables_wrapper .pagination > li > a,
    .dataTables_wrapper .pagination > li > span {
        position: relative;
        display: flex !important; /* Forzar flex siempre */
        align-items: center !important; /* Centrado vertical estricto */
        justify-content: center !important; /* Centrado horizontal estricto */
        min-width: 38px; /* Ligeramente más grande */
        height: 38px;
        padding: 0 0.5rem !important;
        margin: 0 !important;
        font-size: 0.95rem; /* NÚMERO MÁS GRANDE */
        font-weight: 600;
        line-height: 1 !important; /* Evita que el line-height empuje el número */
        color: var(--sv-text-muted);
        background-color: var(--sv-white);
        border: 1px solid var(--sv-border) !important;
        border-radius: var(--sv-radius-md) !important; /* Usamos variable del sistema */
        transition: all 0.2s ease;
        text-decoration: none;
        box-sizing: border-box; /* Previene deformaciones por paddings */
    }

        /* Hover de los botones */
        .dataTables_wrapper .pagination > li > a:hover:not(.disabled) {
            background-color: var(--sv-bg-soft);
            color: var(--sv-primary);
            border-color: #cbd5e1 !important;
            z-index: 2;
        }

    /* Botón Activo (Página actual) */
    .dataTables_wrapper .pagination > li.active > a,
    .dataTables_wrapper .pagination > li.active > a:hover {
        background-color: var(--sv-primary) !important;
        border-color: var(--sv-primary) !important;
        color: var(--sv-white) !important;
        box-shadow: 0 4px 6px -1px var(--sv-primary-alpha);
        z-index: 3;
    }

    /* Botones Deshabilitados (Anterior/Siguiente cuando no aplican) */
    .dataTables_wrapper .pagination > li.disabled > a,
    .dataTables_wrapper .pagination > li.disabled > a:hover {
        color: var(--sv-text-light);
        background-color: var(--sv-bg-soft);
        border-color: var(--sv-border) !important;
        cursor: not-allowed;
        box-shadow: none;
    }

    /* Ajuste para los iconos de flechas */
    .dataTables_wrapper .pagination > li > a i {
        font-size: 1rem;
        line-height: 1;
    }


/* ========================================================
   --- COMPONENTES REUSABLES (NAVEGACIÓN, LISTAS, DETALLES) ---
   Agrega esto al final de tu samva-design-system.css
   ======================================================== */

/* --- AVATARES --- */
.sv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--sv-bg-soft);
    border: 1px solid var(--sv-border);
}

.sv-avatar-sm {
    width: 28px;
    height: 28px;
}

/* --- MENÚ DE NAVEGACIÓN LATERAL (sv-nav-menu) --- */
.sv-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sv-nav-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--sv-text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 16px 0 8px 12px;
}

.sv-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--sv-radius-md);
    color: var(--sv-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    gap: 12px;
}

    .sv-nav-link i {
        font-size: 16px;
        width: 20px;
        text-align: center;
        color: var(--sv-text-light);
        transition: color 0.2s ease;
    }

    .sv-nav-link:hover {
        background-color: var(--sv-bg-soft);
        color: var(--sv-text-main);
    }

        .sv-nav-link:hover i {
            color: var(--sv-text-muted);
        }

    /* Estado Activo para enlaces de Samva .net (se inyecta via codebehind o js) */
    .sv-nav-link.active,
    .sv-nav-link.active:hover {
        background-color: var(--sv-primary-alpha);
        color: var(--sv-primary);
    }

        .sv-nav-link.active i {
            color: var(--sv-primary);
        }

/* --- LISTAS DE ÍTEMS (sv-list-group) --- */
.sv-list-group {
    display: flex;
    flex-direction: column;
}

.sv-list-item {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sv-border);
    background-color: var(--sv-white);
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

    .sv-list-item:hover {
        background-color: var(--sv-bg-main);
    }

    /* El elemento activo del repeater/lista */
    .sv-list-item.active {
        background-color: var(--sv-bg-soft);
        border-left-color: var(--sv-primary);
    }

.sv-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sv-list-item-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sv-list-item-title {
    font-weight: 700;
    color: var(--sv-text-main);
    font-size: 14px;
}

.sv-list-item-time {
    font-size: 11px;
    color: var(--sv-text-light);
    font-weight: 500;
}

.sv-list-item-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 18px; /* Alinear con el texto si hay icono circular */
}

.sv-list-item-subtitle {
    font-size: 13px;
    color: var(--sv-text-main);
    font-weight: 500;
}

.sv-list-item-text {
    font-size: 13px;
    color: var(--sv-text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- VISTAS DE DETALLE (sv-detail-view) --- */
.sv-detail-view {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.sv-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--sv-border);
    padding-bottom: 20px;
}

.sv-detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--sv-text-main);
    margin: 0;
    line-height: 1.2;
}

.sv-action-bar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sv-btn-icon {
    padding: 0 !important;
    width: 36px;
    height: 36px;
    border-radius: var(--sv-radius-sm);
}

.sv-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sv-meta-info {
    display: flex;
    flex-direction: column;
}

.sv-meta-name {
    font-size: 14px;
    color: var(--sv-text-main);
}

.sv-meta-date {
    font-size: 12px;
    color: var(--sv-text-muted);
}

/* --- ESTADOS VACÍOS (sv-empty-state) --- */
.sv-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
    color: var(--sv-text-muted);
}

.sv-empty-icon {
    font-size: 64px;
    color: var(--sv-border);
    margin-bottom: 20px;
}

.sv-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin: 0 0 8px 0;
}

.sv-empty-text {
    font-size: 14px;
    max-width: 300px;
    margin: 0;
}

/* ========================================================
--- SECCIÓN 11: CONSTRUCTOR DE FORMULARIOS (ADMIN) ---
Clases para la gestión de categorías y ordenamiento.
======================================================== */

/* Token adicional para campos huérfanos */
:root {
    --sv-color-orphans: #fdba74;
}

/* Bloque contenedor de categoría en el constructor */
.sv-category-block {
    background: var(--sv-bg-main);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Cabecera de la categoría administrativa */
.sv-category-header {
    background: var(--sv-bg-soft);
    padding: 12px 20px;
    border-bottom: 1px solid var(--sv-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Fila individual de campo (Draggable) */
.sv-field-row {
    background: var(--sv-white);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

    .sv-field-row:hover {
        border-color: var(--sv-primary);
        transform: translateX(4px);
        box-shadow: var(--sv-shadow-sm);
    }

/* Tira de color lateral que hereda el tema - SEPARACIÓN CORREGIDA */
.sv-indicator-strip {
    width: 4px;
    height: 32px;
    border-radius: 99px;
    background-color: var(--sv-primary);
    margin-right: 16px; /* Separación más grande */
    margin-left: 8px; /* Evitar que pegue a la izquierda */
}

/* Área para campos sin categoría (Dashed Orange) */
.sv-dashed-area {
    border: 2px dashed var(--sv-color-orphans);
    background: rgba(253, 186, 116, 0.05);
    border-radius: var(--sv-radius-lg);
    padding: 40px;
    text-align: center;
    color: var(--sv-color-orphans);
}

/* ========================================================
--- SECCIÓN 12: MOTOR DINÁMICO (LECTURA/EDICIÓN) ---
Clases para la modernización de la vista de consulta.
======================================================== */

/* Etiquetas en mayúsculas (Si no se heredan de sv-form-label) */
.sv-label-caps {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--sv-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Valor en modo consulta (Reemplaza los "---" del legacy) */
.sv-read-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--sv-text-main);
    padding: 4px 0;
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* Estado para valores vacíos en consulta */
.sv-read-empty {
    color: var(--sv-text-light);
    font-weight: 400;
    font-style: italic;
}

/* Contenedor para inputs con máscaras ($, %, etc) */
.sv-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sv-input-prefix {
    position: absolute;
    left: 14px;
    font-weight: 700;
    font-size: 13px;
    color: var(--sv-text-muted);
    pointer-events: none;
}

.sv-input-with-prefix {
    padding-left: 32px !important;
}

/* Badges de tipo de dato para el constructor - SEPARACIÓN CORREGIDA */
.sv-type-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    background: var(--sv-bg-soft);
    color: var(--sv-text-muted);
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 12px;
}

/* Acciones de campos visibles solo en hover (y siempre en móvil) */
.sv-field-actions {
    display: flex;
    gap: 4px;
    opacity: 1; /* Por defecto visible para móviles */
    transition: opacity 0.2s ease-in-out;
}

@media (min-width: 768px) {
    .sv-field-row .sv-field-actions {
        opacity: 0;
    }

    .sv-field-row:hover .sv-field-actions {
        opacity: 1;
    }
}
