.portal-body {
    background: var(--surface);
    color: var(--text);
}

.portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1102;
}

.portal-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--btn-bg);
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.portal-menu-toggle__icon--close {
    display: none;
}

.portal-menu-toggle[aria-expanded="true"] .portal-menu-toggle__icon--open {
    display: none;
}

.portal-menu-toggle[aria-expanded="true"] .portal-menu-toggle__icon--close {
    display: inline-block;
}

.portal-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1099;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.portal-nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

body.portal-nav-open {
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
}

@media (max-width: 720px) {
    body.portal-nav-open {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
    }
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.portal-brand__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
}

.portal-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--btn-primary-bg);
    color: #fff;
}

.portal-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-brand__text small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.portal-header__tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.portal-user {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem 1rem;
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border);
}

.portal-nav__title {
    display: none;
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.portal-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
}

.portal-nav__link i {
    width: 1.1rem;
    text-align: center;
}

.portal-nav__link.is-active,
.portal-nav__link:hover {
    background: rgba(14, 165, 233, 0.12);
    color: var(--brand-accent);
}

.portal-nav__actions {
    display: none;
}

.portal-main {
    flex: 1;
    padding: 1.25rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.portal-footer {
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: stretch;
}

.portal-card-stat {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    box-sizing: border-box;
    padding: 1rem 1.1rem;
}

.portal-card-stat__label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.portal-card-stat__value {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 0.25rem;
    color: var(--text-heading);
}

.portal-dispositivos {
    display: grid;
    gap: 1rem;
}

.portal-dispositivo-card {
    border-left: 3px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-dispositivo-card--destacado {
    box-shadow: 0 0 0 1px var(--brand-accent);
}

.portal-dispositivo-card--online {
    border-left-color: #22c55e;
}

.portal-dispositivo-card--offline {
    border-left-color: #ef4444;
}

.portal-dispositivo-card--loading {
    opacity: 0.92;
}

.portal-dispositivo-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.portal-dispositivo-card__identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}

.portal-dispositivo-card__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand-accent) 14%, var(--surface));
    color: var(--brand-accent);
    flex-shrink: 0;
}

.portal-dispositivo-card__title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.portal-dispositivo-card__title strong {
    font-size: 0.95rem;
    color: var(--text-heading);
}

.portal-dispositivo-card__title code {
    font-size: 0.82rem;
    color: var(--brand-accent);
}

.portal-dispositivo-card__tipo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--text-heading);
}

.portal-dispositivo-card__tipo i {
    color: var(--brand-accent);
}

.portal-dispositivo-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.portal-dispositivo-card__estado-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.portal-dispositivo-card__details {
    margin-bottom: 0.85rem;
}

.portal-page-head {
    display: block;
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    border-bottom: none;
    gap: 0;
}

.portal-page-head__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-page-head__top h1 {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 1.25rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

.portal-page-head__top h1 code {
    font-size: inherit;
}

.portal-page-head__top .btn,
.portal-page-head__top .portal-refresh-btn {
    flex-shrink: 0;
}

.portal-page-head__top .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin: 0;
    width: auto;
}

.portal-page-head__meta {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.portal-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.portal-refresh-btn:hover,
.portal-refresh-btn:focus-visible {
    background: var(--btn-bg-hover);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.portal-refresh-btn:disabled,
.portal-refresh-btn.is-spinning {
    opacity: 0.7;
    pointer-events: none;
}

.portal-refresh-btn.is-spinning i {
    animation: portal-spin 0.8s linear infinite;
}

@keyframes portal-spin {
    to { transform: rotate(360deg); }
}

.portal-dispositivo-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.portal-dispositivo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    padding: 0.65rem 0.4rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand-accent) 6%, var(--surface));
    border: 1px solid var(--border);
}

.portal-dispositivo-stat > i {
    font-size: 0.9rem;
    color: var(--brand-accent);
}

.portal-dispositivo-stat__label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.portal-dispositivo-stat__value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-heading);
    word-break: break-word;
    line-height: 1.25;
}

.portal-dispositivo-stat__value[data-stat-plan] {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    word-break: normal;
    line-height: 1.2;
}

.portal-dispositivo-stat__value--activo {
    color: #16a34a;
}

.portal-dispositivo-details {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.portal-dispositivo-detail {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--border);
}

.portal-dispositivo-detail:last-child {
    border-bottom: 0;
}

.portal-dispositivo-detail__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.portal-dispositivo-detail__icon--mac {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.portal-dispositivo-detail__icon--nodo {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}

.portal-dispositivo-detail__icon--ip {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.portal-dispositivo-detail__body {
    flex: 1;
    min-width: 0;
}

.portal-dispositivo-detail__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.portal-dispositivo-detail__value {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-heading);
    word-break: break-all;
}

.portal-dispositivo-more {
    margin-bottom: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.portal-dispositivo-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--brand-accent);
    cursor: pointer;
    list-style: none;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.portal-dispositivo-more summary::-webkit-details-marker {
    display: none;
}

.portal-dispositivo-more summary::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.portal-dispositivo-more[open] summary::after {
    transform: rotate(90deg);
}

.portal-dispositivo-more__grid {
    margin: 0;
    padding: 0 0.85rem 0.85rem;
}

.portal-dispositivo-more__row {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--border);
}

.portal-dispositivo-more__row dt {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.portal-dispositivo-more__row dd {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: var(--text);
}

.portal-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--btn-bg);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.portal-copy-btn--sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.portal-copy-btn--inline {
    width: 32px;
    height: 32px;
}

.portal-copy-btn:hover,
.portal-copy-btn:focus-visible {
    background: var(--btn-bg-hover);
    color: var(--brand-accent);
    border-color: var(--brand-accent);
}

.portal-copy-btn:active {
    transform: scale(0.96);
}

.portal-copy-btn.is-copied {
    color: #16a34a;
    border-color: #86efac;
    background: #dcfce7;
}

.portal-header__avatar {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--btn-primary-bg);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.portal-bottom-nav {
    display: none;
}

.portal-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portal-detail-actions {
    margin-top: 1rem;
}

.portal-body .table-card table,
.portal-body .table-card .table,
.portal-body .card table.table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.portal-toast {
    position: fixed;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(12px);
    z-index: 1200;
    max-width: calc(100vw - 2rem);
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: #1e293b;
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.portal-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 721px) {
    .portal-toast {
        bottom: 1.5rem;
    }
}

body.portal-wifi-overlay-open {
    overflow: hidden;
}

.portal-wifi-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.portal-wifi-overlay[hidden] {
    display: none !important;
}

.portal-wifi-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}

.portal-wifi-overlay__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 360px);
    padding: 1.75rem 1.35rem;
    border-radius: 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.35);
    text-align: center;
}

.portal-wifi-overlay__spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(14, 165, 233, 0.2);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: portal-wifi-spin 0.85s linear infinite;
}

.portal-wifi-overlay__spinner[hidden],
.portal-wifi-overlay__icon[hidden],
.portal-wifi-overlay__btn[hidden] {
    display: none !important;
}

.portal-wifi-overlay__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.65rem;
}

.portal-wifi-overlay--success .portal-wifi-overlay__icon {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.portal-wifi-overlay--error .portal-wifi-overlay__icon {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.portal-wifi-overlay--reconnect .portal-wifi-overlay__icon {
    background: rgba(14, 165, 233, 0.15);
    color: var(--brand-accent);
}

.portal-wifi-overlay__message {
    margin: 0 0 1.15rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-line;
}

.portal-wifi-overlay__btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

@keyframes portal-wifi-spin {
    to {
        transform: rotate(360deg);
    }
}

html[data-theme="dark"] .portal-wifi-overlay__backdrop {
    background: rgba(0, 0, 0, 0.78);
}

html[data-theme="dark"] .portal-wifi-overlay--success .portal-wifi-overlay__icon {
    color: #4ade80;
}

html[data-theme="dark"] .portal-wifi-overlay--error .portal-wifi-overlay__icon {
    color: #f87171;
}

.portal-wifi-manage {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.portal-wifi-manage[hidden] {
    display: none !important;
}

.portal-dispositivo-wifi__manage-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    margin-top: 0.65rem;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    border-radius: 12px;
}

.portal-dispositivo-wifi__manage-btn.is-active {
    background: var(--btn-bg-hover);
    color: var(--brand-accent);
    border: 1px solid var(--brand-accent);
}

.portal-dispositivo-card {
    border-radius: 16px;
}

.portal-dispositivo-wifi {
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.portal-dispositivo-wifi:not(.portal-dispositivo-wifi--disabled) {
    border-color: #bae6fd;
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.65) 0%, var(--surface) 100%);
}

.portal-dispositivo-wifi__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-heading);
}

.portal-dispositivo-wifi__marca {
    font-size: 0.75rem;
}

.portal-dispositivo-wifi__hint {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.portal-dispositivo-wifi__actions {
    margin-bottom: 0.75rem;
}

.portal-wifi-bands {
    margin: 10px 0 0.85rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    background: var(--surface, #fff);
}

.portal-wifi-band-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.4rem;
}

.portal-wifi-band-option,
.portal-wifi-ambas {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    cursor: pointer;
    margin: 0;
}

.portal-wifi-band-option.is-disabled,
.portal-wifi-ambas.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.portal-wifi-band-summary {
    margin: 0.35rem 0 0;
}

.portal-dispositivo-wifi--offline [data-wifi-bands] {
    display: none;
}

.portal-dispositivo-wifi--offline [data-wifi-manage-toggle],
.portal-dispositivo-wifi--offline [data-wifi-hosts] {
    display: none;
}

.portal-wifi-hosts {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--portal-border, rgba(148, 163, 184, 0.35));
}

.portal-wifi-hosts__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.portal-wifi-hosts__title {
    margin: 0;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.portal-wifi-hosts__body {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.55rem;
}

.portal-wifi-hosts__body[hidden] {
    display: none !important;
}

.portal-wifi-host {
    border: 1px solid var(--portal-border, rgba(148, 163, 184, 0.35));
    border-radius: 0.65rem;
    padding: 0.6rem 0.75rem;
    background: rgba(148, 163, 184, 0.06);
}

.portal-wifi-host__main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
}

.portal-wifi-host__nombre {
    font-weight: 600;
}

.portal-wifi-host__datos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.portal-dispositivo-wifi--offline [data-wifi-offline-hint] {
    display: block;
}

.portal-dispositivo-wifi[data-wifi-capable="1"]:not(.portal-dispositivo-wifi--offline) [data-wifi-offline-hint] {
    display: none;
}

.portal-wifi-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    row-gap: 6px;
    margin-top: 0.75rem;
}

.portal-wifi-row__field {
    display: contents;
    margin: 0;
}

.portal-wifi-row__field label {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
}

.portal-wifi-row__field input:not([type="checkbox"]) {
    grid-column: 1;
    grid-row: 2;
    min-height: 42px;
    box-sizing: border-box;
}

.portal-wifi-row__field .form__hint {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
}

.portal-wifi-row__action {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    width: 220px;
}

.portal-wifi-btn {
    display: flex;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.portal-wifi-row--visibilidad .portal-wifi-row__field .form__hint {
    grid-row: 2;
    align-self: center;
}

.portal-wifi-visibilidad-btn {
    gap: 0.45rem;
}

.portal-wifi-visibilidad-btn.is-oculto {
    background: #f59e0b;
    border-color: #d97706;
    color: #1f2937;
}

.portal-wifi-visibilidad-btn.is-oculto:hover:not(:disabled) {
    background: #d97706;
    border-color: #b45309;
    color: #fff;
}

.portal-wifi-status {
    margin-top: 0.85rem;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    border: 1px solid transparent;
}

.portal-wifi-status:empty {
    display: none;
}

.portal-wifi-status--info {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.portal-wifi-status--success {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.portal-wifi-status--error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

html[data-theme="dark"] .portal-dispositivo-wifi:not(.portal-dispositivo-wifi--disabled) {
    background: linear-gradient(180deg, rgba(3, 105, 161, 0.15) 0%, var(--surface) 100%);
    border-color: rgba(56, 189, 248, 0.35);
}

html[data-theme="dark"] .portal-wifi-status--info {
    background: rgba(3, 105, 161, 0.35);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.35);
}

html[data-theme="dark"] .portal-wifi-status--success {
    background: rgba(22, 101, 52, 0.35);
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.35);
}

html[data-theme="dark"] .portal-wifi-status--error {
    background: rgba(127, 29, 29, 0.35);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
}

html[data-theme="dark"] .portal-dispositivo-card--online {
    border-left-color: #4ade80;
}

html[data-theme="dark"] .portal-dispositivo-card--offline {
    border-left-color: #f87171;
}

.login-page.portal-login-page {
    min-height: 100vh;
    background: var(--surface);
}

.login-form__install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 46px;
    margin-top: 0.85rem;
    padding: 0 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--btn-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.login-form__install:hover,
.login-form__install:focus-visible {
    background: var(--btn-bg-hover);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.login-form__install[hidden],
.login-form__pwa-hint[hidden] {
    display: none !important;
}

.login-form__pwa-hint {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--brand-accent) 10%, var(--surface-elevated));
    border: 1px solid color-mix(in srgb, var(--brand-accent) 25%, var(--border));
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
    text-align: center;
}

.login-form__pwa-hint strong {
    color: var(--text);
}

.portal-body .page-head h1 {
    color: var(--text-heading);
}

.portal-header__tools .theme-toggle {
    border-color: var(--border-strong);
    background: var(--btn-bg);
    color: var(--text);
}

.portal-header__tools .theme-toggle:hover,
.portal-header__tools .theme-toggle:focus-visible {
    background: var(--btn-bg-hover);
    border-color: var(--border-strong);
}

/* Modo oscuro — ajustes del portal */
html[data-theme="dark"] .portal-nav-backdrop {
    background: rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .portal-body .card,
html[data-theme="dark"] .portal-body .table-card {
    background: var(--surface-elevated);
    border-color: var(--border);
}

html[data-theme="dark"] .portal-body .detail-row {
    border-bottom-color: var(--border);
}

html[data-theme="dark"] .portal-body .detail-row dd {
    color: var(--text);
}

html[data-theme="dark"] .portal-body code {
    color: var(--brand-accent);
}

html[data-theme="dark"] .portal-nav__link.is-active,
html[data-theme="dark"] .portal-nav__link:hover {
    background: rgba(56, 189, 248, 0.16);
    color: var(--brand-accent-hover);
}

html[data-theme="dark"] .portal-nav__logout {
    color: #f87171;
}

html[data-theme="dark"] .portal-nav__logout:hover,
html[data-theme="dark"] .portal-nav__logout:focus-visible {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

html[data-theme="dark"] .portal-dispositivo-stat {
    background: rgba(56, 189, 248, 0.08);
    border-color: var(--border);
}

html[data-theme="dark"] .portal-dispositivo-stat__value--activo {
    color: #4ade80;
}

html[data-theme="dark"] .portal-dispositivo-detail__icon--mac {
    background: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}

html[data-theme="dark"] .portal-dispositivo-detail__icon--nodo {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

html[data-theme="dark"] .portal-dispositivo-detail__icon--ip {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

html[data-theme="dark"] .portal-copy-btn.is-copied {
    background: rgba(22, 101, 52, 0.35);
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.35);
}

html[data-theme="dark"] .portal-bottom-nav {
    background: var(--surface-elevated);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .portal-toast {
    background: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .portal-dispositivo-card__icon {
    background: rgba(56, 189, 248, 0.15);
}

html[data-theme="dark"] .portal-dispositivo-more summary {
    background: transparent;
}

/* Tablas del portal: filas apiladas en móvil (sin scroll horizontal) */
@media (max-width: 720px) {
    .portal-main {
        padding: 0.75rem;
        max-width: none;
        box-sizing: border-box;
    }

    .portal-wifi-hosts__head {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-wifi-hosts__btn {
        width: 100%;
        justify-content: center;
    }

    .portal-wifi-host__datos {
        flex-direction: column;
        gap: 0.2rem;
    }

    .portal-body .page-head {
        margin-bottom: 0.85rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem;
    }

    .portal-body .page-head > .btn,
    .portal-body .page-head > a.btn {
        width: 100%;
        justify-content: center;
    }

    .portal-body .page-head h1 {
        font-size: 1.2rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .portal-body .card {
        padding: 0.85rem;
    }

    .portal-body .card__title {
        font-size: 1rem;
        margin-bottom: 0.65rem;
        line-height: 1.3;
    }

    .portal-body .card + .card {
        margin-top: 0.85rem;
    }

    .portal-cards .card + .card {
        margin-top: 0;
    }

    .portal-body .card.table-card,
    .portal-body .table-card {
        padding: 0.65rem;
        overflow-x: visible;
    }

    .portal-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        margin-bottom: 1rem;
        align-items: stretch;
    }

    .portal-cards .portal-card-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .portal-card-stat {
        height: 100%;
        min-height: 4.5rem;
        padding: 0.7rem 0.8rem;
    }

    .portal-card-stat__label {
        font-size: 0.75rem;
    }

    .portal-card-stat__value {
        font-size: 1.05rem;
        word-break: break-word;
        line-height: 1.2;
    }

    .portal-body .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .portal-body .toolbar .btn {
        width: 100%;
        justify-content: center;
    }

    .portal-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .portal-quick-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .portal-body .form__grid {
        grid-template-columns: 1fr;
    }

    .portal-body .form__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-body .form__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .portal-body .detail-row {
        padding: 0.55rem 0;
    }

    .portal-body .detail-row dt {
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 0.15rem;
    }

    .portal-body .detail-row dd {
        font-size: 0.92rem;
        line-height: 1.4;
        word-break: break-word;
    }

    .portal-detail-actions {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .portal-detail-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .portal-wifi-row {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .portal-wifi-row__field {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
        margin: 0;
    }

    .portal-wifi-row__field label,
    .portal-wifi-row__field input:not([type="checkbox"]),
    .portal-wifi-row__field .form__hint,
    .portal-wifi-row--visibilidad .portal-wifi-row__field .form__hint {
        grid-column: unset;
        grid-row: unset;
        width: 100%;
    }

    .portal-wifi-row__field input:not([type="checkbox"]) {
        min-height: 44px;
    }

    .portal-wifi-row__action {
        grid-column: unset;
        grid-row: unset;
        width: 100%;
        align-self: stretch;
    }

    .portal-wifi-btn {
        width: 100%;
        min-height: 44px;
    }

    .portal-dispositivo-wifi__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .portal-dispositivo-stats {
        gap: 0.4rem;
    }

    .portal-dispositivo-stat {
        padding: 0.55rem 0.3rem;
    }

    .portal-dispositivo-stat__value {
        font-size: 0.78rem;
    }

    .portal-page-head__top {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .portal-page-head__top h1 {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .portal-refresh-btn span {
        display: none;
    }

    .portal-refresh-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 12px;
    }

    .portal-body .page-head.portal-page-head {
        display: block !important;
        margin-bottom: 0.75rem !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
        flex-direction: unset !important;
        align-items: unset !important;
        gap: 0 !important;
    }

    .portal-page-head__top > .btn:not(.portal-refresh-btn),
    .portal-page-head__top > a.btn {
        flex: 0 0 auto;
        width: auto;
        min-height: 40px;
        justify-content: center;
        white-space: nowrap;
    }

    .portal-page-head__top .toolbar {
        flex: 1 1 100%;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        justify-content: stretch;
    }

    .portal-page-head__top .toolbar .btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }

    .portal-body code {
        word-break: break-word;
    }

    .portal-main .table-card table,
    .portal-main .table-card .table,
    .portal-main .card table.table {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100%;
    }

    .portal-main .table {
        display: block;
        width: 100% !important;
        max-width: 100%;
        border: 0;
        table-layout: fixed;
    }

    .portal-main .table thead {
        display: none;
    }

    .portal-main .table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        width: 100%;
    }

    .portal-main .table tbody tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 0.65rem 0.8rem;
        background: var(--surface-elevated);
    }

    .portal-main .table tbody tr:nth-child(odd),
    .portal-main .table tbody tr:hover {
        background: var(--surface-elevated);
    }

    .portal-main .table td {
        display: grid;
        grid-template-columns: minmax(5.25rem, 34%) minmax(0, 1fr);
        gap: 0.35rem 0.55rem;
        align-items: start;
        width: 100%;
        box-sizing: border-box;
        border: 0;
        padding: 0.4rem 0;
        font-size: 0.9rem;
        color: var(--text);
        min-width: 0;
    }

    .portal-main .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.7rem;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        line-height: 1.35;
    }

    .portal-main .table td > * {
        min-width: 0;
        text-align: right;
        justify-self: end;
        word-break: break-word;
    }

    .portal-main .table td .portal-table__value {
        display: block;
        width: 100%;
        text-align: right;
        color: inherit;
    }

    .portal-main .table td[data-label=""] {
        display: block;
    }

    .portal-main .table td[data-label=""]::before {
        display: none;
    }

    .portal-main .table td.portal-table__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 0.4rem;
        padding-top: 0.55rem;
        margin-top: 0.35rem;
        border-top: 1px solid var(--border);
    }

    .portal-main .table td.portal-table__actions .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
        min-height: 40px;
    }

    .portal-brand__text strong {
        font-size: 0.92rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 46vw;
    }

    .portal-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0.65rem 0.75rem;
        box-sizing: border-box;
    }

    .portal-shell {
        padding-top: var(--portal-header-h, 64px);
    }

    .portal-header__tools .btn--sm {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}

@media (max-width: 400px) {
    .portal-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-cards .portal-card-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .portal-brand__text strong {
        max-width: 38vw;
    }
}

@media (max-width: 720px) {
    .portal-menu-toggle {
        display: inline-flex;
    }

    .portal-header__tools {
        gap: 0.5rem;
    }

    .portal-user {
        display: none;
    }

    .portal-nav-backdrop {
        top: var(--portal-header-h, 64px);
    }

    .portal-nav {
        position: fixed;
        top: var(--portal-header-h, 64px);
        left: 0;
        bottom: 0;
        z-index: 1100;
        width: min(300px, 88vw);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        border-bottom: 0;
        border-right: 1px solid var(--border);
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .portal-nav.is-open {
        transform: translateX(0);
    }

    .portal-nav__title {
        display: block;
    }

    .portal-nav__link {
        width: 100%;
        border-radius: 10px;
        padding: 0.75rem 0.85rem;
        min-height: 44px;
    }

    .portal-nav__actions {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }

    .portal-nav__theme {
        width: 100%;
        border: 0;
        background: transparent;
        font: inherit;
        text-align: left;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .portal-nav__theme .theme-toggle__icon {
        width: 1.1rem;
        text-align: center;
    }

    .portal-nav__theme-label {
        display: none;
    }

    html[data-theme="light"] .portal-nav__theme-label--to-dark {
        display: inline;
    }

    html[data-theme="dark"] .portal-nav__theme-label--to-light {
        display: inline;
    }

    .portal-nav__logout {
        color: #dc2626;
    }

    .portal-nav__logout:hover,
    .portal-nav__logout:focus-visible {
        background: rgba(220, 38, 38, 0.1);
        color: #b91c1c;
    }

    .portal-footer {
        display: none;
    }

    .portal-main {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .portal-header__avatar {
        display: inline-flex;
    }

    .portal-header__logout,
    .portal-header__theme {
        display: none;
    }

    .portal-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1101;
        align-items: stretch;
        justify-content: space-around;
        gap: 0;
        min-height: 64px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--surface-elevated);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.12);
    }

    .portal-bottom-nav__item {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        min-width: 0;
        min-height: 56px;
        padding: 0.35rem 0.1rem;
        border: 0;
        background: transparent;
        color: var(--text-muted);
        font-family: inherit;
        font-size: 0.7rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: color 0.15s ease;
    }

    .portal-bottom-nav__item span {
        max-width: 100%;
        line-height: 1.15;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .portal-bottom-nav__item i {
        font-size: 1.15rem;
    }

    .portal-bottom-nav__item.is-active {
        color: var(--brand-accent);
    }

    .portal-bottom-nav__item:active {
        background: color-mix(in srgb, var(--brand-accent) 8%, transparent);
    }

    .portal-nav-backdrop {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .portal-nav {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
}

/* Saludo compacto del inicio */
.portal-home-greeting {
    margin: 0 0 0.85rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.portal-home-greeting__moment {
    margin: 0 0 0.1rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.2;
}

.portal-home-greeting__name {
    margin: 0;
    font-size: clamp(1.25rem, 3.8vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--text-heading);
    word-break: break-word;
}

@media (max-width: 720px) {
    .portal-home-greeting {
        margin-bottom: 0.7rem;
    }

    .portal-home-greeting__name {
        font-size: 1.2rem;
    }
}

/* Alertas del portal (inicio) */
.portal-alertas {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.portal-alerta {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.portal-alerta--mensaje {
    border-left: 4px solid #0ea5e9;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.08) 0%, var(--surface-elevated) 28%);
}

.portal-alerta--vencimiento {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, var(--surface-elevated) 28%);
}

.portal-alerta--promocion {
    border-left: 4px solid #8b5cf6;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, var(--surface-elevated) 28%);
}

.portal-alerta__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.portal-alerta--mensaje .portal-alerta__icon {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
}

.portal-alerta--vencimiento .portal-alerta__icon {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
}

.portal-alerta--promocion .portal-alerta__icon {
    background: rgba(139, 92, 246, 0.18);
    color: #7c3aed;
}

.portal-alerta__body {
    min-width: 0;
}

.portal-alerta__title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}

.portal-alerta__message {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
}

.portal-alerta__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-accent);
    text-decoration: none;
}

.portal-alerta__link:hover,
.portal-alerta__link:focus-visible {
    text-decoration: underline;
}

.portal-alerta__dismiss {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.portal-alerta__dismiss:hover,
.portal-alerta__dismiss:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
}

html[data-theme="dark"] .portal-alerta--mensaje .portal-alerta__icon {
    color: #7dd3fc;
}

html[data-theme="dark"] .portal-alerta--vencimiento .portal-alerta__icon {
    color: #fcd34d;
}

html[data-theme="dark"] .portal-alerta--promocion .portal-alerta__icon {
    color: #c4b5fd;
}

html[data-theme="dark"] .portal-alerta__dismiss:hover,
html[data-theme="dark"] .portal-alerta__dismiss:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 720px) {
    .portal-alerta {
        grid-template-columns: auto 1fr;
        padding-right: 2.75rem;
    }

    .portal-alerta__dismiss {
        position: absolute;
        top: 0.55rem;
        right: 0.45rem;
    }
}

/* WebAuthn / biometría */
.login-webauthn[hidden],
[data-webauthn-unsupported][hidden],
[data-webauthn-panel][hidden],
[data-webauthn-status][hidden],
[data-webauthn-empty][hidden],
[data-webauthn-login-status][hidden] {
    display: none !important;
}

.login-webauthn {
    margin-top: 0.35rem;
}

.login-webauthn__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.85rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-webauthn__divider::before,
.login-webauthn__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-webauthn__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 48px;
    padding: 0 1rem;
    border: 1px solid var(--border-strong, var(--border));
    border-radius: var(--radius-md, 10px);
    background: var(--surface-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.login-webauthn__btn:hover,
.login-webauthn__btn:focus-visible {
    border-color: var(--brand-accent, #0284c7);
    color: var(--brand-accent, #0284c7);
}

.login-webauthn__btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.login-webauthn__hint {
    margin: 0.65rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.webauthn-device-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.webauthn-device {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    background: var(--surface-elevated);
}

.webauthn-device__info {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.webauthn-device__info .form__hint {
    margin: 0;
}
