﻿/* Estilos de las pantallas del panel (usuario logueado). Se carga desde _Layout.cshtml. */
/* =====================================================================
   PANEL (usuario logueado): más ancho y compacto para aprovechar la pantalla
   ===================================================================== */
.hyc-panel .ec-container {
    max-width: none;
    padding: 0 1.5rem;
}

.hyc-panel .hyc-hero__inner {
    max-width: none;
    padding: 6px 1.5rem;
}

.hyc-panel .hyc-hero__logo {
    height: 48px;
}

.hyc-panel .hyc-hero {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 576px) {
    .hyc-panel .ec-container {
        padding: 0 0.75rem;
    }

    .hyc-panel .hyc-hero__inner {
        padding: 6px 0.75rem;
    }
}

/* Pie compacto del panel */
.hyc-footer--compacto {
    padding: 0.6rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .hyc-footer--compacto a {
        color: #6c757d;
    }

/* ── Encabezado de las pantallas del panel ── */
.hyc-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.25rem 0 0.9rem;
}

.hyc-page-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2d3d;
}

    .hyc-page-title i {
        color: #1861ac;
    }

.hyc-page-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0.15rem 0 0;
}

.hyc-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* ── Tarjeta con buscador + tabla ── */
.hyc-panel-card {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
    overflow: hidden;
}

.hyc-panel-card__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e3e8ef;
    background: #f8fafc;
}

.hyc-search {
    position: relative;
    width: 100%;
    max-width: 340px;
}

    .hyc-search i {
        position: absolute;
        left: 0.65rem;
        top: 50%;
        transform: translateY(-50%);
        color: #98a2b3;
        font-size: 0.85rem;
        pointer-events: none;
    }

    .hyc-search input {
        padding-left: 2rem;
    }

.hyc-table-wrap {
    max-height: calc(100vh - 250px);
    overflow: auto;
}

.hyc-table {
    margin: 0;
    font-size: 0.875rem;
}

    .hyc-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #2f3b4a;
        color: #fff;
        font-weight: 500;
        white-space: nowrap;
        border: 0;
        padding: 0.55rem 0.75rem;
    }

    .hyc-table td {
        vertical-align: middle;
        padding: 0.5rem 0.75rem;
        border-color: #eef1f5;
    }

    .hyc-table tbody tr:hover {
        background-color: #f1f7fd;
    }

.hyc-col-acciones {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

    .hyc-col-acciones .btn,
    .hyc-col-acciones form {
        margin-left: 0.15rem;
    }

.hyc-empty {
    text-align: center;
    color: #6c757d;
    padding: 2rem !important;
}

.hyc-fila-inactiva td {
    color: #98a2b3;
}

/* ── Etiquetas de estado (Bootstrap 5.1 no trae las "subtle") ── */
.hyc-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    white-space: nowrap;
}

.hyc-badge--ok { background: #e7f6ec; color: #1e7a3c; }
.hyc-badge--off { background: #eef0f3; color: #5f6b7a; }
.hyc-badge--warn { background: #fff4e0; color: #9a5b00; }
.hyc-badge--danger { background: #fde8e8; color: #b42318; }
.hyc-badge--info { background: #e6f1fb; color: #1861ac; }

/* ── Ventanas de alta/edición ── */
#modalMantenimiento .modal-content {
    border-radius: 12px;
    border: 0;
}

#modalMantenimiento .modal-header {
    background: #f8fafc;
}

#modalMantenimiento .modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* El estilo global .card { z-index } no debe tapar los modales de Bootstrap */
.modal .card {
    z-index: auto;
}

/* El resumen de validación vacío no debe mostrarse como una alerta roja */
.validation-summary-valid {
    display: none;
}

/* ── Formularios por secciones (Crear / Editar cliente) ── */
/* Barra de pestañas en azul HyC: la pestaña activa queda clara y "se une" al contenido */
.hyc-tabs {
    padding: 0.5rem 0.75rem 0;
    background: linear-gradient(180deg, #1861ac 0%, #14528f 100%);
    border-bottom: 0;
    gap: 0.25rem;
}

    .hyc-tabs .nav-link {
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.35rem;
        border: 0;
        border-radius: 6px 6px 0 0;
        padding: 0.55rem 1rem;
    }

        .hyc-tabs .nav-link:hover,
        .hyc-tabs .nav-link:focus {
            color: #fff;
            background: rgba(255, 255, 255, 0.12);
            border: 0;
        }

        .hyc-tabs .nav-link.active {
            color: #14528f;
            background: #eef2f7;
            font-weight: 600;
            border: 0;
        }

/* Fondo gris suave en el contenido; cada sección es una tarjeta blanca */
.hyc-tab-content {
    padding: 1rem;
    background: #eef2f7;
}

    .hyc-tab-content .hyc-form-section,
    .hyc-tab-content .hyc-form-section:last-child {
        background: #fff;
        border: 1px solid #dfe5ee;
        border-radius: 8px;
        padding: 1rem 1.1rem;
        margin-bottom: 1rem;
        box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    }

        .hyc-tab-content .hyc-form-section:last-child {
            margin-bottom: 0;
        }

/* Sección de Facturación electrónica: color propio (verde azulado) para distinguirla */
.hyc-form-section--fe,
.hyc-tab-content .hyc-form-section--fe,
.hyc-tab-content .hyc-form-section--fe:last-child {
    background: #edf7f4;
    border: 1px solid #bfe3d6;
    border-left: 4px solid #12805c;
    border-radius: 8px;
    padding: 1rem 1.1rem;
}

    .hyc-form-section--fe .hyc-form-section__title,
    .hyc-form-section--fe .hyc-form-section__title i {
        color: #0e6b4c;
    }

    .hyc-form-section--fe .form-control,
    .hyc-form-section--fe .form-select {
        background-color: #fff;
        border-color: #c7dfd6;
    }

    .hyc-form-section--fe input[readonly] {
        background-color: #f3faf7;
    }

    .hyc-form-section--fe .form-check-input:checked {
        background-color: #12805c;
        border-color: #12805c;
    }

.hyc-form-section {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #eef1f5;
}

    .hyc-form-section:last-child {
        border-bottom: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.hyc-form-section__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475467;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

    .hyc-form-section__title i {
        color: #1861ac;
        font-size: 1rem;
    }

.hyc-form-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475467;
    margin: 1.25rem 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hyc-form-section .form-label,
.hyc-subcard .form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475467;
    margin-bottom: 0.25rem;
}

.hyc-form-section input[readonly],
.hyc-subcard input[readonly] {
    background-color: #f5f7fa;
}

/* Bloques dentro de una pestaña (Usuarios Android) */
.hyc-subcard {
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    padding: 0.9rem;
    background: #fff;
}

.hyc-subcard__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2d3d;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .hyc-subcard__title i {
        color: #1861ac;
    }

.hyc-table--seleccionable tbody tr {
    cursor: pointer;
}

    .hyc-table--seleccionable tbody tr.table-active td {
        background-color: #dceafa;
    }

/* ── Selector de aplicaciones (etiquetas) ── */
.hyc-chips-selector {
    position: relative;
}

.hyc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

    .hyc-chips:empty {
        display: none;
    }

.hyc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.35rem 0.2rem 0.65rem;
    border-radius: 999px;
    background: #e6f1fb;
    color: #1861ac;
    font-size: 0.8rem;
    font-weight: 500;
}

.hyc-chip__quitar {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.2rem;
    border-radius: 50%;
    cursor: pointer;
}

    .hyc-chip__quitar:hover {
        background: rgba(24, 97, 172, 0.15);
    }

.hyc-chips-sugerencias {
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0.25rem 0;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
}

    .hyc-chips-sugerencias li {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
        cursor: pointer;
    }

        .hyc-chips-sugerencias li:hover {
            background: #f1f7fd;
        }

/* El nombre del usuario se ve como un ítem más del menú */
.hyc-hero__dropdown .hyc-hero__username {
    font-size: 15px;
    font-weight: 500;
    color: #000;
    opacity: 0.9;
}

/* Etiquetas chicas dentro de las tablas (aplicaciones del cliente) */
.hyc-chip--sm {
    font-size: 0.72rem;
    padding: 0.1rem 0.5rem;
}

.hyc-table .hyc-chips {
    gap: 0.25rem;
    max-width: 320px;
}

/* ── Listado de clientes ── */
.hyc-col-cliente {
    min-width: 220px;
    max-width: 380px;
}

/* Observaciones visibles bajo el nombre (hasta 3 líneas) */
.hyc-obs {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: #6c757d;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dato con etiqueta: "CI 1234567", "Producción 01/02/2026" */
.hyc-dato {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.6;
}

.hyc-dato__etiqueta {
    display: inline-block;
    min-width: 5.2rem;
    color: #98a2b3;
    font-size: 0.75rem;
}

.hyc-dato .hyc-dato__etiqueta {
    min-width: 3.8rem;
}

/* Un clic selecciona el valor entero para copiarlo */
.hyc-copiable {
    user-select: all;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    color: #1f2d3d;
    background: #f5f7fa;
    border-radius: 4px;
    padding: 0 0.3rem;
}

.hyc-copiar {
    border: 0;
    background: transparent;
    color: #98a2b3;
    padding: 0 0.2rem;
    font-size: 0.8rem;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
}

    .hyc-copiar:hover {
        color: #1861ac;
        background: #e6f1fb;
    }

.hyc-copiar--ok,
.hyc-copiar--ok:hover {
    color: #1e7a3c;
}

/* ── Notas y observaciones en el listado de clientes ── */
.hyc-nota-btn {
    border: 0;
    background: transparent;
    padding: 0.15rem 0.3rem;
    border-radius: 6px;
    color: #1861ac;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

    .hyc-nota-btn:hover,
    .hyc-nota-btn.activo {
        background: #e6f1fb;
    }

.hyc-nota-btn--vacio {
    display: inline-block;
    color: #d0d5dd;
    cursor: default;
}

    .hyc-nota-btn--vacio:hover {
        background: transparent;
    }

.hyc-nota-popover {
    max-width: 420px;
    font-size: 0.85rem;
}

    .hyc-nota-popover .popover-header {
        font-size: 0.8rem;
        font-weight: 600;
    }

    /* Respeta los saltos de línea y deja seleccionar el texto */
    .hyc-nota-popover .popover-body {
        white-space: pre-line;
        user-select: text;
        max-height: 300px;
        overflow-y: auto;
    }

/* Indicador de solo lectura tipo casilla ("IVA mínimo", "Envía todo") */
.hyc-check {
    font-size: 0.8rem;
    line-height: 1.7;
    color: #98a2b3;
}

    .hyc-check i {
        margin-right: 0.2rem;
    }

.hyc-check--si {
    color: #1f2d3d;
}

    .hyc-check--si i {
        color: #1e7a3c;
    }

/* ── Licencias: barra de actualización masiva y filas seleccionadas ── */
.hyc-barra-seleccion {
    padding: 0.55rem 0.75rem;
    background: #e6f1fb;
    border-bottom: 1px solid #c9dff4;
    font-size: 0.875rem;
}

.hyc-table tbody tr.hyc-fila-seleccionada td {
    background-color: #eef5fc;
}
