.vpn-client-log-panel__subtitle {
    font-size: 0.78rem;
    color: var(--md-on-surface-variant);
}
.vpn-client-log-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(63, 63, 70, 0.35);
    background: rgba(2, 6, 23, 0.35);
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}
.vpn-client-log-panel__head {
    flex-shrink: 0;
}
.vpn-client-log-nav__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
}
.vpn-client-log-nav__client {
    font-size: 0.8rem;
    font-weight: 600;
    color: #93c5fd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.vpn-client-status-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 16px;
    margin-bottom: var(--space-3);
}

.vpn-client-status-toolbar .vpn-client-view-select-host {
    flex: 0 1 auto;
    min-width: min(100%, 220px);
    max-width: 320px;
}

.vpn-client-view-select-host {
    flex: 0 1 auto;
    min-width: min(100%, 220px);
    max-width: 320px;
}

#view-vpn .vpn-client-view-select,
#view-vpn select.vpn-server-view-select {
    width: 100%;
    min-height: 34px;
    padding: 6px 32px 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    font-size: 0.875rem;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23f8fafc'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#view-vpn .vpn-client-view-select:focus,
#view-vpn select.vpn-server-view-select:focus {
    outline: none;
    border-color: var(--color-primary, #f97316);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
}

.vpn-client-log-nav .vpn-client-log-refresh {
    flex: 0 0 auto;
    font-size: 0.8rem;
    padding: 5px 14px;
}
.vpn-client-log-nav .vpn-client-log-clear {
    flex: 0 0 auto;
    font-size: 0.8rem;
    padding: 5px 12px;
}
.vpn-client-log-nav__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    justify-content: flex-end;
}
.vpn-client-log-nav__status {
    font-size: 0.76rem;
    color: var(--md-on-surface-variant);
    white-space: nowrap;
}
.vpn-client-log-nav .btn {
    font-size: 0.78rem;
    padding: 4px 10px;
}
/* Tablas de datos unificadas (VPN, LAN, Interfaces, Usuarios, Clúster) */
.lgrt-data-table,
.lan-iface-table,
.vpn-client-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    margin-bottom: var(--space-4);
}
.lgrt-data-table th,
.lgrt-data-table td,
.lan-iface-table th,
.lan-iface-table td,
.vpn-client-table th,
.vpn-client-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(63, 63, 70, 0.55);
    border-left: 0;
    border-right: 0;
    text-align: left;
    vertical-align: top;
}
.lgrt-data-table th,
.lan-iface-table th,
.vpn-client-table th {
    color: var(--md-on-surface-variant);
    font-weight: 600;
    background: transparent;
    white-space: nowrap;
}
/* §7.6 DISENO_UI.md — Cabecera fija al scroll del contenedor (todas las tablas de datos).
   Excluye .firewall-rules-table-body (thead en tabla hermana fuera del scroll; §7.5). */
.lgrt-data-table thead th,
.lan-iface-table:not(.firewall-rules-table-body):not(.firewall-rules-table-head) thead th,
.vpn-client-table thead th,
.mon-vrrp-table thead th,
.dhcp-relay-table thead th,
.vpn-allowed-table thead th {
    position: sticky;
    top: var(--lgrt-table-head-sticky-top, 0);
    z-index: var(--lgrt-table-head-sticky-z, 3);
    background: var(--lgrt-view-chrome-bg, #0b0b12);
    box-shadow: 0 1px 0 rgba(63, 63, 70, 0.55);
}
.lan-iface-table-scroll,
.lgrt-table-scroll {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.lgrt-row-actions,
.vpn-client-row-actions,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.vpn-client-table td:last-child .vpn-client-row-actions {
    flex-wrap: nowrap;
}
.vpn-client-table td:last-child {
    white-space: nowrap;
}
.lgrt-row-actions .btn,
.vpn-client-row-actions .btn,
.row-actions .btn,
.lan-iface-table .btn-sm,
.lan-iface-table .lgrt-row-actions .btn {
    font-size: 0.72rem;
    padding: 4px 8px;
    min-height: auto;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}
.lgrt-row-actions .btn[disabled],
.vpn-client-row-actions .btn[disabled],
.row-actions .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}
.iface-admin-subsection .lan-iface-table .btn,
.iface-admin-subsection .lgrt-row-actions .btn,
.iface-admin-root .lan-iface-table .btn,
.iface-admin-root .lgrt-row-actions .btn {
    min-height: auto;
}
.lan-iface-table tbody tr:hover td,
.lgrt-data-table tbody tr:hover td,
.vpn-client-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.06);
}
/* Rayas alternadas (filas pares) — tablas de datos unificadas */
.lgrt-data-table tbody tr:nth-child(even) td,
.lan-iface-table:not(.firewall-rules-table-head):not(.firewall-rules-table-body) tbody tr:nth-child(even) td,
.vpn-client-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.035);
}
.lgrt-data-table tbody tr:nth-child(even):hover td,
.lan-iface-table:not(.firewall-rules-table-head):not(.firewall-rules-table-body) tbody tr:nth-child(even):hover td,
.vpn-client-table tbody tr:nth-child(even):hover td {
    background: rgba(255, 255, 255, 0.06);
}
/* Listas multi-valor: tags dentro del box (sin tipeo) + abre modal */
.lgrt-tags-input {
    display: block;
    width: 100%;
}
.lgrt-tags-input__box.form-control {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-height: 2.5rem;
    height: auto;
    padding: 0.35rem 0.4rem 0.35rem 0.5rem;
    cursor: default;
    user-select: none;
}
.lgrt-tags-input__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 1.6rem;
}
.lgrt-tags-input__empty {
    color: var(--md-on-surface-variant, #a1a1aa);
    font-size: 0.84rem;
    font-style: italic;
}
.lgrt-tags-input__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #7c2d12;
    color: #fed7aa;
    background: #431407;
    border-radius: 999px;
    padding: 2px 4px 2px 10px;
    font-size: var(--font-size-caption, 0.75rem);
    line-height: 1.3;
    max-width: 100%;
}
.lgrt-tags-input__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lgrt-tags-input__x {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    color: #fed7aa;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
}
.lgrt-tags-input__x:hover {
    background: rgba(127, 29, 29, 0.85);
    color: #fff;
}
.lgrt-tags-input__plus {
    flex: 0 0 auto;
    align-self: center;
    min-width: 2rem;
    font-weight: 700;
}
/* Filas hijas (RR DNS / reservas DHCP) dentro de la misma tabla canónica. */
.lgrt-data-table tbody tr.dns-zone-rr-row td {
    color: var(--md-on-surface-variant);
    font-size: 0.8rem;
    padding-left: 1.25rem;
}
.lgrt-data-table tbody tr.dns-zone-rr-row td:first-child {
    padding-left: 1.75rem;
}
.vpn-client-row--active td:first-child {
    color: #86efac;
    font-weight: 600;
}
.vpn-client-row--viewing td:first-child {
    font-weight: 600;
}
.vpn-client-row--viewing .vpn-client-view-select {
    color: #93c5fd;
}
.vpn-client-view-select {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    text-align: left;
}
.vpn-client-view-select:hover {
    text-decoration: underline;
}
.vpn-clients-view-hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--md-on-surface-variant);
}
.vpn-client-node-card__tag {
    font-size: 0.75rem;
    color: #86efac;
    font-weight: 500;
}
.vpn-client-node-card__line--muted {
    color: var(--md-on-surface-variant);
    font-size: 0.85rem;
}
.app-modal__panel--wide {
    max-width: min(56rem, 100%);
    max-height: min(85vh, calc(100dvh - 40px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.app-modal__panel--wide .app-modal__title {
    flex-shrink: 0;
}
.app-modal__panel--wide .vpn-details-body,
.app-modal__panel--wide .vpn-allowed-body,
.app-modal__panel--wide .app-modal__panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.app-modal__panel--wide .app-modal__actions {
    flex-shrink: 0;
    padding-top: var(--space-3);
    margin-top: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Modales de formulario (lgrt-inm-modal): cuerpo scroll + pie fijo */
.lgrt-inm-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 10050;
    padding: max(12px, env(safe-area-inset-bottom, 0px)) 20px;
    box-sizing: border-box;
    max-height: 100dvh;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
}
.lgrt-inm-modal__card {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, calc(100dvh - 40px));
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    min-height: 0;
}
.lgrt-inm-modal .cluster-node-card.lgrt-inm-modal__card {
    margin-bottom: 0;
}
.lgrt-inm-modal .cluster-node-card.lgrt-inm-modal__card:hover {
    transform: none;
    box-shadow: var(--md-elevation-1);
    border-color: var(--md-outline);
}
.lgrt-inm-modal__card > .iface-admin-subsection__title,
.lgrt-inm-modal__card > h2,
.lgrt-inm-modal__card > h3 {
    flex-shrink: 0;
}
.lgrt-inm-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.lgrt-inm-modal__host {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.lgrt-inm-modal__footer,
.lgrt-inm-modal__actions-row {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 2px;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: inherit;
}
.lgrt-inm-modal__card > .lgrt-inm-modal__actions-row:not(.lgrt-inm-modal__footer) {
    flex-shrink: 0;
    margin-top: auto;
}
.lgrt-inm-modal__card > form,
.lgrt-inm-modal__card form.lgrt-inm-modal__form,
.lgrt-inm-modal__host > form.lgrt-inm-modal__form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.lgrt-inm-modal__card > .lgrt-inm-modal__body,
.lgrt-inm-modal__card form .lgrt-inm-modal__body,
.lgrt-inm-modal__host .lgrt-inm-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.lgrt-inm-modal__card > form.form-stack.lgrt-inm-modal__form,
.lgrt-inm-modal__host > form.form-stack.lgrt-inm-modal__form {
    margin-top: 0;
}
/* Modal Ver zona DNS: chrome fijo (+ Registro + thead), solo tbody scrollea (§7.5 DISENO_UI) */
.dns-zone-records-modal.lgrt-inm-modal .lgrt-inm-modal__card {
    height: min(90vh, calc(100dvh - 40px));
    max-height: min(90vh, calc(100dvh - 40px));
    max-width: min(96vw, 1180px);
    width: 100%;
}
.dns-zone-records-modal.lgrt-inm-modal .lgrt-inm-modal__card > form.lgrt-inm-modal__form {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.dns-zone-records-modal.lgrt-inm-modal .lgrt-inm-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}
.dns-zone-records-modal .dns-zone-records-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.dns-zone-records-modal .dns-zone-records-chrome {
    flex-shrink: 0;
    background: var(--lgrt-view-chrome-bg, #0b0b12);
}
.dns-zone-records-modal .dns-zone-records-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.dns-zone-records-modal .dns-zone-records-table {
    margin-bottom: 0;
    width: 100%;
    min-width: 880px;
    table-layout: fixed;
    border-collapse: collapse;
}
.dns-zone-records-modal .dns-zone-records-layout--wide .dns-zone-records-table {
    min-width: 1080px;
}

/* Modal DNS logs usuario VPN: filtros + paginado fijos; solo la tabla scrollea */
#vpn-server-user-dnslog-modal .app-modal__panel--wide {
    height: min(85vh, calc(100dvh - 40px));
}
#vpn-server-user-dnslog-modal #vpn-server-user-dnslog-host {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#vpn-server-user-dnslog-modal .vsu-dnslog-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#vpn-server-user-dnslog-modal .vsu-dnslog-chrome {
    flex-shrink: 0;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--lgrt-view-chrome-bg, #0b0b12);
}
#vpn-server-user-dnslog-modal .vsu-dnslog-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    margin-top: var(--space-2);
}
#vpn-server-user-dnslog-modal .vsu-dnslog-table {
    width: 100%;
    margin-bottom: 0;
}
#vpn-server-user-dnslog-modal .vsu-dnslog-body-scroll .vsu-dnslog-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--lgrt-view-chrome-bg, #0b0b12);
    box-shadow: 0 1px 0 rgba(63, 63, 70, 0.55);
}

.dns-zone-records-modal .dns-zone-records-body-scroll .dns-zone-records-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--lgrt-view-chrome-bg, #0b0b12);
    box-shadow: 0 1px 0 rgba(63, 63, 70, 0.55);
}
.dns-zone-records-modal .dns-zr-col--name { width: 9%; }
.dns-zone-records-modal .dns-zr-col--type { width: 6%; }
.dns-zone-records-modal .dns-zr-col--ttl { width: 5%; }
.dns-zone-records-modal .dns-zr-col--rdata { width: 22%; }
.dns-zone-records-modal .dns-zone-records-layout--wide .dns-zr-col--ptype { width: 7%; }
.dns-zone-records-modal .dns-zone-records-layout--wide .dns-zr-col--prdata { width: 22%; }
.dns-zone-records-modal .dns-zr-col--act { width: 10.5rem; }
.dns-zone-records-modal .dns-zone-records-layout:not(.dns-zone-records-layout--wide) .dns-zr-col--rdata { width: 42%; }
.dns-zone-records-modal .dns-zone-records-table th,
.dns-zone-records-modal .dns-zone-records-table td {
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dns-zone-records-modal .dns-zr-col--rdata,
.dns-zone-records-modal .dns-zr-col--prdata {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.dns-zone-records-modal .dns-zr-col--name,
.dns-zone-records-modal .dns-zr-col--type,
.dns-zone-records-modal .dns-zr-col--ttl,
.dns-zone-records-modal .dns-zr-col--ptype,
.dns-zone-records-modal .dns-zr-col--act {
    white-space: nowrap;
}
.dns-zone-records-modal .lgrt-row-actions {
    flex-wrap: nowrap;
}
.vpn-client-form-dns-forwarders {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-top: var(--space-3);
}
#vpn-client-form .lgrt-inm-modal__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-1) 0 var(--space-2);
}
#vpn-client-form .lgrt-field-stack {
    max-width: none;
    margin-bottom: 0;
    gap: var(--space-2);
}
#vpn-client-form .vpn-file-row {
    margin-bottom: 0;
}
#vpn-client-form .form-row-inline,
#vpn-client-form .vpn-tun-row {
    margin-top: 0;
}
#vpn-client-form .vpn-form-section {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
#vpn-client-form .vpn-form-section[hidden],
.vpn-form-section[hidden] {
    display: none !important;
}
#vpn-client-form .vpn-form-section .lgrt-field-stack {
    margin-bottom: 0;
    max-width: none;
}
#vpn-client-form .vpn-client-form-dns-forwarders {
    margin-top: 0;
}
/* Configurar red: grilla de campos prolija */
.lgrt-inm-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lgrt-inm-section:first-of-type {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0;
}
.lgrt-inm-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-end;
}
.lgrt-inm-field {
    flex: 1 1 180px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lgrt-inm-field > label.small {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lgrt-inm-field > .form-control {
    width: 100%;
    box-sizing: border-box;
}
.lgrt-inm-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px 0;
}
.lgrt-inm-check:last-child {
    margin-bottom: 0;
}
.lgrt-inm-check > input[type="checkbox"] {
    margin: 0;
    flex: 0 0 auto;
}
.vpn-details-node {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(251, 146, 60, 0.2);
}
.vpn-details-node:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}
.vpn-details-node__title {
    margin: 0 0 var(--space-2);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fdba74;
}
.vpn-details-section {
    margin-bottom: var(--space-3);
}
.vpn-details-section h4 {
    margin: 0 0 var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: #e7e5e4;
}
.vpn-details-pre {
    margin: 0;
    padding: var(--space-2) var(--space-3);
    background: #0c0a09;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #d6d3d1;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 14rem;
    overflow: auto;
}
.vpn-details-meta {
    font-size: 0.82rem;
    color: #a8a29e;
    margin-bottom: var(--space-2);
}
.vpn-details-config {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.vpn-details-config__title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e7e5e4;
}
.vpn-details-dl {
    display: grid;
    grid-template-columns: minmax(5rem, auto) 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 0.86rem;
}
.vpn-details-dl dt {
    margin: 0;
    color: #a8a29e;
}
.vpn-details-dl dd {
    margin: 0;
    color: #e7e5e4;
}
.vpn-details-empty {
    color: #78716c;
    font-size: 0.82rem;
    font-style: italic;
}
.vpn-file-input {
    padding: 6px 8px;
}
.vpn-file-input::file-selector-button {
    margin-right: 10px;
    padding: 4px 10px;
    border: 1px solid rgba(63, 63, 70, 0.75);
    border-radius: var(--radius-sm);
    background: rgba(39, 39, 42, 0.9);
    color: var(--md-on-surface);
    cursor: pointer;
}
.vpn-file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.vpn-file-row__name {
    font-size: 0.88rem;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(39, 39, 42, 0.65);
    color: var(--md-on-surface);
}
.vpn-file-row__browse {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-min);
    padding: var(--space-2) var(--space-3);
    border: 1px solid rgba(63, 63, 70, 0.75);
    border-radius: var(--radius-sm);
    background: rgba(39, 39, 42, 0.9);
    color: var(--md-on-surface);
    font-family: inherit;
    font-size: var(--font-size-small);
    font-weight: 600;
    cursor: pointer;
}
.vpn-file-row__browse:hover {
    background: rgba(63, 63, 70, 0.9);
}
.vpn-file-row__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.vpn-file-row__picked {
    font-size: 0.82rem;
    color: var(--md-on-surface-variant);
    font-style: italic;
}
.vpn-form-section {
    margin: var(--space-3) 0;
    padding: var(--space-3);
    border: 1px solid rgba(63, 63, 70, 0.55);
    border-radius: var(--radius-md);
    background: rgba(24, 24, 27, 0.45);
}
.vpn-form-section__title {
    margin: 0 0 var(--space-2);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--md-on-surface);
}
.vpn-tun-row {
    margin-top: 0;
    margin-bottom: var(--space-3);
    align-items: center;
}
.vpn-tun-auto-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}
.vpn-tun-input {
    flex: 1 1 8rem;
    min-width: 6rem;
    max-width: 14rem;
}
.vpn-tun-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.vpn-upload-current {
    margin: 0 0 var(--space-3);
    font-size: 0.82rem;
    color: var(--md-on-surface-variant);
}
.vpn-clients-refresh-hint {
    margin: 0 0 var(--space-3);
    font-size: 0.8rem;
    color: var(--md-on-surface-variant);
    font-style: italic;
}
.vpn-clients-intro {
    margin: 0 0 var(--space-4);
    color: var(--md-on-surface-variant);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 52rem;
}
.vpn-clients-intro code {
    font-size: 0.82em;
}
.vpn-clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.vpn-client-node-card {
    padding: var(--space-4);
    border: 1px solid rgba(63, 63, 70, 0.55);
    border-radius: var(--radius-md);
    background: rgba(24, 24, 27, 0.55);
}
.vpn-client-node-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.vpn-client-node-card__head h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.vpn-client-node-card__ip {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--md-on-surface-variant);
}
.vpn-client-node-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.vpn-client-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.vpn-client-badge--ok {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}
.vpn-client-badge--warn {
    background: rgba(234, 179, 8, 0.18);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.35);
}
.vpn-client-badge--bad {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.vpn-client-badge--muted {
    background: rgba(113, 113, 122, 0.18);
    color: #d4d4d8;
    border: 1px solid rgba(113, 113, 122, 0.35);
}
.vpn-client-node-card__meta {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--md-on-surface-variant);
}
.vpn-client-node-card__summary {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--md-on-surface-variant);
    margin-bottom: var(--space-3);
}
.vpn-client-node-card__line + .vpn-client-node-card__line {
    margin-top: 0.15rem;
}
.vpn-client-node-card__ifaces {
    display: grid;
    gap: var(--space-3);
}
.vpn-client-node-iface {
    padding: var(--space-3);
    border: 1px solid rgba(63, 63, 70, 0.45);
    border-radius: var(--radius-sm);
    background: rgba(9, 9, 11, 0.35);
}
.vpn-client-node-iface__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}
.vpn-client-node-iface__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--md-on-surface-variant);
    width: 100%;
}
.vpn-client-node-iface__name {
    font-family: ui-monospace, monospace;
    font-size: 0.92rem;
    color: var(--md-on-surface);
}
.vpn-client-node-iface__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--md-on-surface);
}
.vpn-client-node-iface__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-1) 0 var(--space-2);
}
.vpn-client-node-iface__state {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    border-radius: 999px;
}
.vpn-client-node-iface__state--up {
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.35);
}
.vpn-client-node-iface__state--down {
    color: #d4d4d8;
    background: rgba(113, 113, 122, 0.15);
    border: 1px solid rgba(113, 113, 122, 0.35);
}
.vpn-client-node-iface__detail {
    font-size: 0.78rem;
    color: var(--md-on-surface-variant);
    margin-bottom: var(--space-1);
    word-break: break-word;
}
.vpn-client-node-iface .traffic-entry__metrics {
    margin-top: var(--space-2);
}
.vpn-client-node-iface__kpi {
    margin: var(--space-2) 0 0 0;
}
.vpn-client-controls {
    margin-bottom: var(--space-4);
    max-width: 42rem;
}
.vpn-client-controls__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    margin-top: var(--space-2);
}
.vpn-client-controls__row select.form-control {
    min-width: 220px;
    flex: 1 1 220px;
}
.vpn-client-log__body {
    flex: 1 1 auto;
    margin: 0;
    padding: 10px 12px;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #d6d3d1;
    overflow: auto;
    min-height: 0;
}
#view-interfaces .cluster-node-card__title {
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.cluster-node-card__title {
    margin: 0 0 14px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--md-primary-dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--md-outline);
}
.cluster-node-card__meta {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--md-on-surface-variant);
    font-family: ui-monospace, monospace;
    margin-left: 8px;
}
.cluster-overview-intro {
    background: #292524;
    border: 1px solid #c2410c;
    border-radius: var(--md-radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #fdba74;
    line-height: 1.5;
}
.cluster-overview-intro strong { font-weight: 600; }
.cluster-node-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.cluster-node-summary {
    background: var(--md-surface);
    border: 1px solid var(--md-outline);
    border-radius: var(--md-radius-md);
    padding: 16px 18px;
    box-shadow: var(--md-elevation-1);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.cluster-node-summary:hover {
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.cluster-node-summary__title {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-primary-dark);
}
.cluster-node-summary__ip {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    color: var(--md-on-surface-variant);
    margin-bottom: 12px;
}
.cluster-node-summary__role {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.cluster-node-summary__role--active {
    background: #22c55e1a;
    color: #bbf7d0;
    border: 1px solid #22c55e;
}
.cluster-node-summary__role--standby {
    background: #4b55631a;
    color: #e5e7eb;
    border: 1px solid #4b5563;
}
.cluster-node-summary__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cluster-jump-btn,
md-outlined-button.cluster-jump-btn {
    min-height: var(--touch-min);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--md-primary);
    background: var(--md-surface);
    color: var(--md-primary);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-small);
    transition: background .15s;
}
.cluster-jump-btn:hover,
md-outlined-button.cluster-jump-btn:hover { background: #431407; color: #fdba74; }
.cluster-jump-btn:active,
md-outlined-button.cluster-jump-btn:active { transform: scale(0.98); }
.router-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.md-panel {
    background: var(--md-surface-variant);
    border-radius: var(--md-radius-md);
    border: 1px solid var(--md-outline);
    padding: 14px 16px;
    height: 100%;
}
.md-panel__title {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--md-on-surface-variant);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--md-outline);
}
.status-list {
    margin-top: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-3);
}
.traffic-list {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: stretch;
}
.traffic-list > .traffic-entry {
    flex: 1 1 320px;
    min-width: min(100%, 300px);
    max-width: 100%;
}
#view-interfaces .traffic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 320px));
    gap: var(--space-3);
    align-items: start;
    justify-content: start;
}
#view-interfaces .traffic-list > .traffic-entry {
    width: 100%;
    max-width: 320px;
    min-width: 0;
    flex: unset;
    box-sizing: border-box;
}

/* LAN: filas dinámicas dentro de .lan-iface-table (estilo base unificado arriba) */
#view-interfaces .lan-iface-table-scroll {
    margin-top: 4px;
}
#view-interfaces .lan-iface-table {
    table-layout: fixed;
}
#view-interfaces .lan-iface-table th:nth-child(1),
#view-interfaces .lan-iface-table td:nth-child(1) {
    width: 34%;
}
#view-interfaces .lan-iface-table th:nth-child(2),
#view-interfaces .lan-iface-table td:nth-child(2) {
    width: 26%;
}
#view-interfaces .lan-iface-table th:nth-child(3),
#view-interfaces .lan-iface-table td:nth-child(3) {
    width: 40%;
}
#view-interfaces .lan-iface-table tbody tr.traffic-entry {
    display: table-row;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}
#view-interfaces .lan-iface-table tbody tr.traffic-entry[hidden] {
    display: none !important;
}
#view-interfaces .lan-iface-table tbody tr.traffic-entry:hover {
    box-shadow: none;
    border-color: transparent;
}
#view-interfaces .lan-iface-table tbody tr.traffic-entry td {
    background: transparent;
}

/* VPN server wizard (alta/edición) */
#vpn-server-form .lgrt-inm-modal__body,
#vpn-server-user-form .lgrt-inm-modal__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-1) 0 var(--space-2);
}
#vpn-server-form .vs-wizard-step,
#vpn-server-user-form .vs-wizard-step {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
}
#vpn-server-form .lgrt-field-stack,
#vpn-server-user-form .lgrt-field-stack {
    max-width: none;
    margin-bottom: 0;
    gap: var(--space-2);
}
#vpn-server-form .vpn-file-row {
    margin-bottom: 0;
}
#vpn-server-form .vpn-server-wizard-toggles,
#vpn-client-form .vpn-client-form-toggles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}
.vpn-form-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    font-size: var(--font-size-body);
    font-weight: 400;
    color: var(--color-text);
    cursor: pointer;
}
.vpn-server-pool-custom {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.vpn-server-shared-select-all {
    margin-bottom: var(--space-2);
}
.vpn-server-shared-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 14rem;
    overflow-y: auto;
    padding: var(--space-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.15);
}
.vpn-server-shared-item code {
    font-size: 0.9em;
}
.vs-wizard-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}
.vs-wizard-dot {
    flex: 1 1 0;
    font-size: 0.68rem;
    line-height: 1.2;
    color: var(--color-text-secondary, #a8a29e);
    border-top: 3px solid rgba(255, 255, 255, 0.15);
    padding-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.vs-wizard-dot span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 700;
    flex: 0 0 auto;
    font-size: 0.65rem;
}
.vs-wizard-dot.is-active {
    color: #fff;
    border-top-color: #fb923c;
}
.vs-wizard-dot.is-active span {
    background: #fb923c;
    color: #1c1917;
}
.vs-wizard-dot.is-done {
    border-top-color: #22c55e;
}
.vs-wizard-dot.is-done span {
    background: #22c55e;
    color: #1c1917;
}
.vs-wizard-dot--jump .vs-wizard-dot__btn {
    all: unset;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    cursor: pointer;
    color: inherit;
    font: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: left;
}
.vs-wizard-dot--jump .vs-wizard-dot__btn:hover,
.vs-wizard-dot--jump .vs-wizard-dot__btn:focus-visible {
    color: #fff;
}
.vs-wizard-dot--jump.is-active .vs-wizard-dot__btn {
    cursor: default;
}
.vs-wizard-step[hidden] {
    display: none !important;
}
.vpn-server-wizard-summary {
    display: grid;
    grid-template-columns: minmax(8rem, 38%) 1fr;
    gap: 6px 12px;
    margin: 0;
    font-size: 0.9rem;
}
.vpn-server-wizard-summary dt {
    margin: 0;
    color: var(--color-text-secondary, #a8a29e);
}
.vpn-server-wizard-summary dd {
    margin: 0;
    word-break: break-word;
}
#vpn_server_form_modal .vs-wizard-footer,
#vpn-server-user-wizard-modal .vs-wizard-footer {
    justify-content: flex-end;
    gap: 8px;
}

/* Wizards VPN: stepper fijo + cuerpo scroll en modal (alta y edición) */
#vpn_server_form_modal #vpn-server-form,
#vpn-server-user-wizard-modal #vpn-server-user-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
#vpn_server_form_modal #vpn-server-form > .vs-wizard-steps,
#vpn-server-user-wizard-modal #vpn-server-user-form > .vs-wizard-steps {
    flex-shrink: 0;
}
#vpn_server_form_modal #vpn-server-form .lgrt-inm-modal__body,
#vpn-server-user-wizard-modal #vpn-server-user-form .lgrt-inm-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#vpn_server_form_modal #vpn-server-form-host {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#vpn_server_form_modal #vpn-server-form .vs-wizard-footer,
#vpn-server-user-wizard-modal #vpn-server-user-form .vs-wizard-footer {
    flex-shrink: 0;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: var(--space-3);
}

/* VPN user wizard: panel ancho */
#vpn-server-user-wizard-modal .app-modal__panel--wide {
    min-height: 0;
}
#vpn-server-user-wizard-modal #vpn-server-user-wizard-host {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* VPN server user — contraseña (modal tabla + paso wizard) */
#vpn-server-user-password-modal .lgrt-inm-modal__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
#vpn-server-user-password-modal .lgrt-user-password-form {
    margin-bottom: 0;
}
#vpn-server-user-password-modal .vsu-modal-password-toggle,
#vpn-server-user-wizard-modal .vsu-wizard-password-toggle {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin: var(--space-2) 0 0;
    line-height: 1.4;
}
#vpn-server-user-wizard-modal .vsu-wizard-password-actions {
    margin-top: var(--space-2);
}
#vpn-server-user-password-modal .lgrt-inm-modal__footer .btn,
#vpn-server-user-wizard-modal .vsu-wizard-password-actions .btn {
    min-width: 7.5rem;
}

/* VPN server user wizard — paso DNS */
.vsu-dns-mode-group {
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.vsu-dns-mode-group > .form-label {
    margin-bottom: var(--space-1);
}
.vsu-dns-mode-option[hidden] {
    display: none !important;
}
.vsu-dns-mode-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin: 0;
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.vsu-dns-mode-option:hover {
    border-color: rgba(255, 140, 0, 0.35);
}
.vsu-dns-mode-option.is-selected {
    border-color: var(--color-accent, #ff8c00);
    background: rgba(255, 140, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 140, 0, 0.25);
}
.vsu-dns-mode-option input[type="radio"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.vsu-dns-mode-option__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.vsu-dns-mode-option__title {
    font-weight: 600;
    color: var(--color-text);
}
.vsu-dns-mode-option__hint {
    font-size: 0.85em;
    color: var(--color-text-secondary, #a8a29e);
    line-height: 1.35;
}
.vsu-dns-system-preview {
    padding: var(--space-3);
    border: 1px solid rgba(255, 140, 0, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
}
.vsu-dns-system-preview__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent, #ff8c00);
    margin-bottom: var(--space-2);
}
.vsu-dns-system-preview__body {
    margin: 0 0 var(--space-2);
    color: var(--color-text);
    line-height: 1.45;
    word-break: break-word;
}
.vsu-dns-system-preview[hidden],
.vsu-dns-custom-panel[hidden] {
    display: none !important;
}
.vsu-dns-custom-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.15);
}
.vsu-dns-resolver-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}
@media (max-width: 520px) {
    .vsu-dns-resolver-grid {
        grid-template-columns: 1fr;
    }
}
.vsu-dns-select {
    width: 100%;
}
.vsu-dns-allow-add {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.vsu-dns-allow-add__field {
    flex: 1 1 12rem;
    margin-bottom: 0;
}
.vsu-dns-allow-add-btn {
    flex-shrink: 0;
    margin-bottom: 0;
}

.vsu-custom-dest-field .vsu-custom-dest-table .form-control {
    min-width: 0;
}
.vsu-custom-dest-field .vsu-dest-col-port {
    width: 5.5rem;
}
.vsu-custom-dest-field .vsu-dest-col-proto {
    width: 5.5rem;
}
.vsu-custom-dest-field .vsu-dest-col-network,
.vsu-custom-dest-field .vsu-dest-col-host {
    min-width: 10rem;
}
