﻿/* ===============================
   GRILLA RESPONSIVE
================================= */

.grtabla {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

    .grtabla th,
    .grtabla td {
        padding: 8px;
        border: 1px solid #e0e0e0;
        font-size: 14px;
    }

.grcabeza {
    background: #1f2937;
    color: white;
    font-weight: 600;
    text-align: center;
}

.grtabla tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Hover PC */
@media (min-width: 769px) {
    .grtabla tbody tr:hover {
        background-color: #eef2ff;
        transition: 0.2s ease;
    }
}

/* ===============================
   MODO MOVIL
================================= */
@media (max-width: 768px) {

    .grtabla thead {
        display: none;
    }

    .grtabla,
    .grtabla tbody,
    .grtabla tr,
    .grtabla td {
        display: block;
        width: 100%;
    }
        .grtabla tr:first-child {
            display: none;
        }
        .grtabla tr {
            margin-bottom: 15px;
            border-radius: 10px;
            border: 1px solid #e5e7eb;
            padding: 10px;
            background: white;
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        }

        .grtabla td {
            text-align: right;
            padding-left: 50%;
            position: relative;
            border: none;
            border-bottom: 1px solid #f3f4f6;
        }

            .grtabla td:last-child {
                border-bottom: none;
            }

            .grtabla td::before {
                content: attr(data-label);
                position: absolute;
                left: 10px;
                width: 45%;
                font-weight: bold;
                text-align: left;
                color: #374151;
            }
}
/* Quitar estilo tipo botón dentro de la grilla */
.grtabla a,
.grtabla button,
.grtabla input[type="button"],
.grtabla input[type="submit"] {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: inherit !important;
    font-weight: normal !important;
    text-decoration: none !important;
}

    .grtabla button:hover,
    .grtabla a:hover {
        background: none !important;
    }

/* ESTILO FORMULARIO*/
/* =====================================
   CONTENEDOR FORMULARIO (FONDO GRIS)
===================================== */

.ia-grillatabla-form {
    width: 100%;
    max-width: 650px;
    margin: 40px auto;
    padding: 30px;
    background: #f3f4f6; /* solo fondo del formulario */
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

/* =====================================
   TÍTULO
===================================== */

.ia-form-title {
    font-size: 13px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 22px;
    text-align: left;
}

/* =====================================
   FILAS BASE (MÓVIL)
===================================== */

.ia-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.ia-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
    text-align: left;
}

.ia-form-control-wrapper {
    width: 100%;
}

/* =====================================
   CONTROLES UNIFORMES
===================================== */

.ia-control-responsive {
    width: 100% !important;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #ced4da;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    background: #ffffff;
    transition: all 0.2s ease;
}

    .ia-control-responsive:hover {
        border-color: #3b82f6;
    }

    .ia-control-responsive:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

/* SELECT mismo tamaño */
select.ia-control-responsive {
    appearance: none;
}

/* =====================================
   BOTÓN
===================================== */

.ia-btia {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    transition: all 0.2s ease;
}

    .ia-btia:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
    }

    .ia-btia:active {
        transform: scale(0.98);
    }

/* =====================================
   PANEL DELETE
===================================== */

.ia-panel-delete {
    width: 100%;
    text-align: right;
    margin-bottom: 10px;
}

/* =====================================
   MODO PC (LABEL AL FRENTE)
===================================== */

@media (min-width: 768px) {

    .ia-form-row {
        flex-direction: row;
        align-items: center;
        gap: 25px;
    }

    .ia-form-label {
        flex: 0 0 180px;
        margin-bottom: 0;
        text-align: left;
    }

    .ia-form-control-wrapper {
        flex: 1;
    }
}
/* =====================================
   CONTENEDOR SCROLL
===================================== */

.ia-scroll-section {
    overflow-y: auto;
    margin-top: 10px;
    border-radius: 12px;
}

/* PC altura */
@media (min-width: 992px) {
    .ia-scroll-section {
        max-height: 400px;
    }
}

/* Móvil altura */
@media (max-width: 991px) {
    .ia-scroll-section {
        max-height: 55vh;
    }
}

/* =====================================
   HEADER FIJO (STICKY)
===================================== */

.ia-sticky-table thead th,
.ia-sticky-table tr:first-child td {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #1f2937;
    color: white;
}

/* Si usas clase grcabeza */
.ia-sticky-table .grcabeza {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #1f2937;
}

/* Sombra ligera cuando se hace scroll */
.ia-scroll-section {
    box-shadow: inset 0 6px 6px -6px rgba(0,0,0,0.1);
}

    /* Scroll moderno */
    .ia-scroll-section::-webkit-scrollbar {
        width: 6px;
    }

    .ia-scroll-section::-webkit-scrollbar-thumb {
        background: #adb5bd;
        border-radius: 10px;
    }

        .ia-scroll-section::-webkit-scrollbar-thumb:hover {
            background: #6c757d;
        }
/* =====================================
   CONTENEDOR VISUAL GENERAL
===================================== */

.ia-visual-form {
    width: 100%;
}

.ia-visual-card {
    width: 100%;
    max-width: 500px;
    margin: 40px auto;
}

/* =====================================
   CARD PRINCIPAL
===================================== */

.ia-card-body {
    position: relative; /* CLAVE */
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px 22px 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

    .ia-card-body:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    }

/* =====================================
   TITULO CARD
===================================== */

.ia-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.4px;
}

/* =====================================
   ACCIONES CARD
===================================== */

.ia-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ia-card-actions-top {
    position: absolute;
    top: -14px;
    right: 16px;
    display: flex;
    gap: 8px;
}

/* =====================================
   ICONOS PEQUEÑOS
===================================== */

/* Iconos estilo flotante */
.ia-icon-edit,
.ia-icon-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Editar */
.ia-icon-edit {
    background: #2563eb;
    color: white;
}

    .ia-icon-edit:hover {
        transform: scale(1.1);
    }

/* Eliminar */
.ia-icon-delete {
    background: #dc2626;
    color: white;
}

    .ia-icon-delete:hover {
        transform: scale(1.1);
    }
/* =====================================
   RESPONSIVE CARD
===================================== */

@media (max-width: 576px) {

    .ia-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .ia-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
/* =====================================
   CARD CONTENIDO
===================================== */

.ia-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* FILAS INTERNAS */
.ia-card-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 13px;
}

.ia-card-label {
    width: 50%;
    font-weight: 600;
    color: #374151;
}

.ia-card-value {
    width: 500% !important;
    padding: 0;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px;
    text-align: right !important;
    box-sizing: border-box;
    color: #6b7280;
    pointer-events: none; /* DESACTIVA INTERACCION */
}

    /* Quitar flecha de select */
    .ia-card-value select,
    select.ia-card-value {
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        background-image: none !important;
    }

    /* Quitar resize textarea */
    .ia-card-value textarea,
    textarea.ia-card-value {
        resize: none !important;
    }

    /* Quitar estilos visuales input */
    .ia-card-value input,
    input.ia-card-value {
        border: none !important;
        background: transparent !important;
    }

/* ACCIONES */
.ia-card-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
/* =====================================
   CARD CORPORATIVA
===================================== */

.ia-corp-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 40px;
    max-width: 1000px;
    margin: 40px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* HEADER */
.ia-corp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

    /* Líneas laterales */
    .ia-corp-header::before,
    .ia-corp-header::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #d1d5db;
    }

/* Título */
.ia-corp-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #374151;
    white-space: nowrap;
}

/* GRID DOBLE COLUMNA */
.ia-corp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px 40px;
}

/* PC → 2 COLUMNAS */
@media (min-width: 992px) {
    .ia-corp-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* FIELD */
.ia-corp-field {
    display: flex;
    flex-direction: column;
}

/* LABEL ARRIBA */
.ia-corp-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* INPUT ESTILO CORPORATIVO */
.ia-corp-input {
    height: 46px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0 14px;
    font-size: 15px;
    background: #f9fafb;
    transition: all 0.2s ease;
}

    .ia-corp-input:focus {
        border-color: #2563eb;
        background: #ffffff;
        outline: none;
    }

/* FOOTER */
.ia-corp-footer {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

/* BOTONES BORDE MISMO COLOR */
.ia-corp-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid #2563eb;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .ia-corp-btn:hover {
        background: #2563eb;
        color: #ffffff;
    }
.ia-btn-pago {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background-color: #0d6efd;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
}

    .ia-btn-pago:hover {
        background-color: #0a58ca;
    }

