.agentes-app {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.agentes-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
    gap: 24px;
    padding: 32px;
    border-radius: 22px;
    background: linear-gradient(135deg, #07101f, #0f2747 55%, #155d84);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.agentes-hero h1 {
    margin: 12px 0 10px;
    font-size: 38px;
    color: #ffffff;
}

.agentes-hero p {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.7;
}

.agentes-hero-meta {
    display: grid;
    gap: 12px;
    align-content: start;
}

.agentes-hero-chip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.agentes-hero-chip strong {
    color: #9edcff;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.agentes-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.agentes-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 10px;
}

.agentes-nav-btn {
    border: 1px solid #d7dce2;
    background: #ffffff;
    color: #0b1b3b;
    border-radius: 14px;
    padding: 14px 16px;
    text-align: left;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}

.agentes-nav-btn:hover,
.agentes-nav-btn.is-active {
    background: #0f2747;
    color: #ffffff;
    border-color: #0f2747;
}

.agentes-content {
    display: grid;
    gap: 20px;
}

.agentes-panel {
    display: none;
}

.agentes-panel.is-active {
    display: block;
}

.agentes-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.agentes-panel-header h2 {
    color: #0b1b3b;
    font-size: 28px;
    margin-bottom: 4px;
}

.agentes-panel-header p {
    color: #5d6878;
}

.agentes-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #dde3ea;
    padding: 22px;
    box-shadow: 0 8px 22px rgba(15, 39, 71, 0.08);
}

.agentes-grid {
    display: grid;
    gap: 18px;
}

.agentes-grid-summary {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.agentes-summary-card {
    padding: 24px;
    background: linear-gradient(180deg, #ffffff, #f4f7fb);
}

.agentes-summary-card h2 {
    font-size: 15px;
    color: #4b5970;
    margin-bottom: 8px;
}

.agentes-summary-card p {
    font-size: 34px;
    font-weight: bold;
    color: #0f2747;
}

.agentes-action-btn,
.agentes-secondary-btn,
.tabla-btn,
.agentes-boton {
    border: none;
    border-radius: 12px;
    min-height: 44px;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
}

.agentes-action-btn,
.agentes-boton {
    background: #2ea7e6;
    color: #ffffff;
}

.agentes-action-btn:hover,
.agentes-boton:hover {
    background: #0b1b3b;
}

#btn-cargar-config {
    background: #1f8ed8;
    color: #ffffff;
}

#btn-cargar-config:hover {
    background: #1679bd;
}

.tabla-btn.danger {
    background: #fde8e8;
    color: #992626;
}

.agentes-alert {
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: bold;
}

.agentes-alert.is-success {
    background: #e4f6ea;
    color: #17673a;
    border: 1px solid #b7e0c3;
}

.agentes-alert.is-error {
    background: #fde8e8;
    color: #962525;
    border: 1px solid #f0bbbb;
}

.agentes-table-wrap {
    overflow-x: auto;
}

.agentes-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.agentes-table th,
.agentes-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e8edf3;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.agentes-table th {
    color: #46556d;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tabla-vacia {
    color: #687487;
    text-align: center;
    padding: 22px;
}

.acciones-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.logs-resultado {
    max-width: 420px;
    white-space: pre-wrap;
    word-break: break-word;
}

.agentes-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.agentes-form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

.agentes-form-actions .agentes-secondary-btn,
.agentes-form-actions .agentes-action-btn {
    flex: 1 1 260px;
}

.agentes-field-small {
    max-width: 120px;
}

.agentes-field label,
.agentes-checks label {
    color: #12233f;
    font-weight: bold;
}

.agentes-field input,
.agentes-field select,
.agentes-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #cfd7e1;
    border-radius: 12px;
    font-size: 15px;
    background: #ffffff;
}

.agentes-field textarea {
    min-height: 120px;
    resize: vertical;
}

.agentes-field input:focus,
.agentes-field select:focus,
.agentes-field textarea:focus {
    border-color: #2ea7e6;
    box-shadow: 0 0 0 3px rgba(46, 167, 230, 0.14);
    outline: none;
}

.agentes-checks {
    justify-content: center;
}

.agentes-checks label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.agentes-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
    align-items: end;
}

.agentes-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 31, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.agentes-modal-dialog {
    width: min(980px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.agentes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.agentes-modal-header h2 {
    color: #0b1b3b;
    font-size: 28px;
}

.agentes-modal-close {
    border: none;
    background: transparent;
    color: #0b1b3b;
    font-weight: bold;
    cursor: pointer;
}

.agentes-rel-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.agentes-rel-block {
    padding: 16px;
    border-radius: 16px;
    background: #f7f9fc;
    border: 1px solid #dde4ee;
    display: grid;
    gap: 12px;
}

.agentes-rel-block h3 {
    color: #0f2747;
}

.agentes-rel-item {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 600;
}

.agentes-rel-capacidades .agentes-rel-item {
    width: fit-content;
    justify-self: start;
}

.agentes-rel-meta {
    color: #5d6878;
    font-size: 12px;
    font-weight: normal;
}

.agentes-rel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px;
    gap: 10px;
    align-items: center;
}

.agentes-login-wrap,
.agentes-bienvenida-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.agentes-login-card,
.agentes-bienvenida-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    padding: 32px;
}

.agentes-login-card h1,
.agentes-bienvenida-card h1 {
    color: #0b1b3b;
    margin-bottom: 14px;
    font-size: 34px;
}

.agentes-login-texto,
.agentes-bienvenida-card p {
    font-size: 16px;
    color: #444444;
    margin-bottom: 18px;
}

.agentes-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agentes-error {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffe3e3;
    color: #a11a1a;
    border: 1px solid #f1b7b7;
}

@media (max-width: 960px) {
    .agentes-hero,
    .agentes-layout,
    .agentes-rel-grid,
    .agentes-form-grid {
        grid-template-columns: 1fr;
    }

    .agentes-sidebar {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .agentes-panel-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.agentes-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    justify-content: initial;
}

.agentes-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: bold;
    color: #12233f;
}

.agentes-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.agentes-switch-ui {
    position: relative;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #c7ced8;
    transition: background .2s ease;
    flex: 0 0 54px;
}

.agentes-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    transition: transform .2s ease;
}

.agentes-switch input:checked + .agentes-switch-ui {
    background: #22c55e;
}

.agentes-switch input:checked + .agentes-switch-ui::after {
    transform: translateX(24px);
}

.agentes-switch input:focus + .agentes-switch-ui {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.agentes-switch-text {
    line-height: 1.35;
}

.agentes-upload-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.agentes-upload-btn {
    border: none;
    border-radius: 12px;
    min-height: 44px;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(135deg, #2ea7e6, #0f2747);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 39, 71, 0.18);
    transition: .2s ease;
}

.agentes-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 39, 71, 0.24);
}

.agentes-upload-name {
    color: #5d6878;
    font-size: 14px;
}

.agentes-image-preview-wrap {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #d7e0ea;
    border-radius: 16px;
    background: #f8fbff;
    display: inline-flex;
}

.agentes-image-preview-wrap img {
    display: block;
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.agente-presentacion {
    display: flex;
    align-items: center;
    gap: 16px;
}

.agente-avatar {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid #dce4ec;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 39, 71, 0.10);
}
/* SC-ZONA-AGENTES-PUBLICA-20260429: contenido publico e integracion web */
.agentes-publica-info {
    gap: 34px;
}

.agentes-info-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 26px;
    align-items: stretch;
    padding: 34px;
    border-radius: 22px;
    background: linear-gradient(135deg, #07101f, #0f2747 58%, #155d84);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.agentes-info-hero h1 {
    margin: 14px 0;
    color: #ffffff;
    font-size: 40px;
    line-height: 1.12;
}

.agentes-info-hero p,
.agentes-info-card p,
.agentes-capability-list p,
.agentes-param-list dd {
    line-height: 1.7;
}

.agentes-info-lead {
    font-size: 18px;
}

.agentes-info-actions {
    margin-top: 22px;
}

.cta-boton-secundario {
    background: #ffffff;
    color: #0b1b3b;
    border: 1px solid rgba(15, 23, 42, 0.15);
}

.agentes-info-hero__panel,
.agentes-info-card,
.agentes-capability-list article,
.agentes-param-list {
    background: #ffffff;
    color: #263241;
    border: 1px solid #dde3ea;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 22px rgba(15, 39, 71, 0.08);
}

.agentes-info-hero__panel {
    background: rgba(255, 255, 255, 0.96);
}

.agentes-info-hero__panel h2,
.agentes-info-section h2,
.agentes-info-section h3 {
    color: #0b1b3b;
}

.agentes-info-hero__panel ul,
.agentes-tech-copy ol {
    margin-left: 20px;
}

.agentes-info-hero__panel li,
.agentes-tech-copy li {
    margin-bottom: 10px;
}

.agentes-info-section {
    display: grid;
    gap: 20px;
}

.agentes-info-section__header {
    max-width: 850px;
}

.agentes-info-section__header h2 {
    margin: 10px 0;
    font-size: 32px;
}

.agentes-info-section__header p {
    color: #4c5a68;
    font-size: 17px;
    line-height: 1.7;
}

.agentes-info-grid,
.agentes-capability-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.agentes-info-band {
    padding: 28px;
    border-radius: 22px;
    background: #eef7fc;
    border: 1px solid #d5eaf5;
}

.agentes-tech-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: stretch;
}

.agentes-code {
    margin: 0;
    padding: 22px;
    overflow-x: auto;
    white-space: pre-wrap;
    border-radius: 16px;
    background: #0b1b3b;
    color: #eaf7ff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.45;
    box-shadow: 0 8px 22px rgba(15, 39, 71, 0.14);
}

.agentes-code code {
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
}

.agentes-param-list {
    display: grid;
    grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0;
}

.agentes-param-list dt {
    color: #0b1b3b;
    font-weight: bold;
}

.agentes-param-list dd {
    margin: 0;
}

@media (max-width: 960px) {
    .agentes-info-hero,
    .agentes-info-grid,
    .agentes-capability-list,
    .agentes-tech-layout,
    .agentes-param-list {
        grid-template-columns: 1fr;
    }

    .agentes-info-hero {
        padding: 26px;
    }

    .agentes-info-hero h1 {
        font-size: 32px;
    }
}
