/* VirtFusion Direct Provisioning Module Styles */

/* Typography */
.vf-bold {
    font-weight: 800;
}
.vf-small {
    font-size: 0.9rem;
}

/* Buttons */
.vf-spinner-margin {
    margin-right: 7px;
}

/* Outline buttons — Lagom's own .btn-outline-danger/.btn-outline-secondary
   render essentially unstyled (no visible border, near-invisible text) in
   dark mode, so these give the same "quiet, not a primary action" outline
   look using tokens confirmed to adapt correctly instead (see "Dark mode"
   in CLAUDE.md). .btn still supplies sizing/padding/border-radius — these
   only replace the color treatment .btn-outline-* would have. */
.vf-btn-outline-danger {
    background: transparent;
    border: 1px solid var(--state-danger-text, #dc3545);
    color: var(--state-danger-text, #dc3545);
}
.vf-btn-outline-danger:hover {
    background: var(--state-danger-bg, rgba(220, 53, 69, 0.1));
    color: var(--state-danger-text, #dc3545);
}
.vf-btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--gray-lighter-3, #6c757d);
    color: var(--gray-base, #6c757d);
}
.vf-btn-outline-secondary:hover {
    background: var(--gray-lighter-4, rgba(108, 117, 125, 0.1));
    color: var(--gray-darker, #495057);
}

/* Status Badges */
.vf-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 6px;
    display: inline-block;
}
.vf-badge-active {
    background-color: var(--state-success-bg, rgba(32, 177, 0, 0.12));
    color: var(--state-success-text, #276900);
}
.vf-badge-awaiting {
    background-color: var(--state-warning-bg, rgba(177, 89, 0, 0.12));
    color: var(--state-warning-text, #692000);
}
.vf-badge-suspended {
    background-color: var(--state-danger-bg, rgba(220, 53, 69, 0.12));
    color: var(--state-danger-text, #721c24);
}
/* Provisioning/building — informational, not alarming. */
.vf-badge-info {
    background-color: var(--state-info-bg, rgba(37, 99, 235, 0.12));
    color: var(--state-info-text, #1d4ed8);
}
/* Powered off — a normal customer-initiated state, not a warning. */
.vf-badge-off {
    background-color: var(--badge-default-bg, rgba(108, 117, 125, 0.15));
    color: var(--gray-base, #495057);
}

/* Power Management */
.vf-power-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.vf-btn-power {
    min-width: 100px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Hidden elements (initial state) */
#vf-login-button-spinner {
    display: none;
}
#vf-password-reset-button-spinner {
    display: none;
}
#vf-password-reset-error {
    display: none;
}
#vf-password-reset-success {
    display: none;
}
#vf-login-error {
    display: none;
}
#vf-server-info {
    display: none;
}
#vf-server-info-error {
    display: none;
    margin: 10px;
}

/* Skeleton Loading */
.vf-skeleton {
    background: linear-gradient(90deg, var(--gray-lighter-4, #e9ecef) 25%, var(--gray-faded, #f4f4f4) 50%, var(--gray-lighter-4, #e9ecef) 75%);
    background-size: 200% 100%;
    animation: vf-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}
.vf-skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.vf-skeleton-line-short {
    width: 60%;
}
.vf-skeleton-line-medium {
    width: 80%;
}
@keyframes vf-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Action Progress Banner */
#vf-action-progress {
    background: #337ab7;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}
#vf-action-progress .spinner-border {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Loader */
#vf-server-info-loader {
    min-height: 136px;
}
#vf-loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(225, 224, 224, 0.3);
    border-radius: 50%;
    border-top-color: #0e151a;
    animation: vf-spin 1s ease-in-out infinite;
    -webkit-animation: vf-spin 1s ease-in-out infinite;
}
.vf-loader {
    margin: 30px;
}

@keyframes vf-spin {
    to {
        transform: rotate(360deg);
    }
}
@-webkit-keyframes vf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Network / IP Management */
.vf-ip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}
.vf-ip-address {
    font-family: monospace;
    font-size: 0.9rem;
}
/* SSH Keys (Manage tab) — card gallery matching the OS-family picker's
   visual language (.vf-os-grid/.vf-os-card), not the older row-list. */
.vf-sshkey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.vf-sshkey-card {
    position: relative;
    border: 2px solid var(--gray-lighter-3, #dee2e6);
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.vf-sshkey-card:hover {
    border-color: #337ab7;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.vf-sshkey-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(51,122,183,0.1);
    color: #337ab7;
    flex-shrink: 0;
}
.vf-sshkey-name {
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.25;
    word-break: break-word;
}
.vf-sshkey-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    color: var(--gray-lighter, #888);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.vf-sshkey-remove:hover {
    background: #dc3545;
    color: #fff;
}

/* Backup Timeline */
.vf-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--gray-lighter-3, #dee2e6);
    margin-left: 8px;
}
.vf-timeline-item {
    position: relative;
    padding: 8px 0 8px 12px;
}
.vf-timeline-dot {
    position: absolute;
    left: -27px;
    top: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}
.vf-timeline-dot-success {
    background: #28a745;
}
.vf-timeline-dot-pending {
    background: #ffc107;
}
.vf-timeline-content {
    font-size: 0.85rem;
}

/* Server Name Dropdown */
#vf-name-dropdown {
    position: relative;
    background: var(--dropdown-bg, #fff);
    border: 1px solid var(--dropdown-border, #dee2e6);
    border-radius: 6px;
    margin-top: 4px;
    max-width: 250px;
    box-shadow: var(--dropdown-box-shadow, 0 2px 8px rgba(0,0,0,0.1));
    z-index: 10;
}
.vf-name-option {
    padding: 6px 12px;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-lighter-4, #f0f0f0);
}
.vf-name-option:last-child {
    border-bottom: none;
}
.vf-name-option:hover {
    background: rgba(51,122,183,0.06);
}

/* Copy to Clipboard */
.vf-ip-copy {
    padding: 2px 5px;
    line-height: 1;
    color: var(--gray-lighter, #6c757d);
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: middle;
}
.vf-ip-copy:hover {
    color: #337ab7;
    background: rgba(51,122,183,0.08);
    border-color: rgba(51,122,183,0.2);
}
.vf-copy-tooltip {
    position: absolute;
    margin-left: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: #fff;
    background: #28a745;
    border-radius: 3px;
    white-space: nowrap;
    animation: vf-fade-in 0.2s ease;
}
@keyframes vf-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* OS Template Gallery */
.vf-os-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid var(--gray-lighter-3, #dee2e6);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    user-select: none;
    transition: background 0.15s;
}
.vf-os-category:first-child .vf-os-category-header {
    margin-top: 0;
}
.vf-os-category-header:hover {
    background: rgba(0,0,0,0.03);
}
.vf-os-category-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}
.vf-os-category-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.vf-os-category-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--gray-lighter, #888);
}
.vf-os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 4px;
}
.vf-os-card {
    border: 2px solid var(--gray-lighter-3, #dee2e6);
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.vf-os-card:hover {
    border-color: #337ab7;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.vf-os-card-selected {
    border-color: #337ab7;
    background: rgba(51,122,183,0.06);
    box-shadow: 0 0 0 1px rgba(51,122,183,0.3);
}
.vf-os-card-eol {
    opacity: 0.6;
}
.vf-os-icon {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    overflow: hidden;
    flex-shrink: 0;
}
.vf-os-icon img {
    max-width: 100%;
    max-height: 100%;
    width: 26px;
    height: 26px;
    object-fit: contain;
}
.vf-os-label {
    font-weight: 700;
    font-size: 14.5px;
    line-height: 1.25;
    margin-bottom: 8px;
}
.vf-os-version {
    font-size: 11.5px;
    color: var(--gray-lighter, #888);
    line-height: 1.2;
}
/* One version-selector per OS family card (see vfRenderOsGallery in
   module.js) — deliberately small/unobtrusive so the family identity (icon
   + name) stays the visual focus of the card; only families with more than
   one available version get one (a single-option select would be pointless
   UI, so those render a plain .vf-os-version label instead). */
.vf-os-version-select {
    font-size: 12px;
    padding: 3px 6px;
    height: auto;
    text-align: center;
    text-align-last: center;
}
.vf-os-eol-badge {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-top: 6px;
}
#vf-os-details {
    border-top: 1px solid var(--gray-lighter-3, #dee2e6);
    padding-top: 10px;
}
.vf-os-search {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .vf-os-grid {
        gap: 6px;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Resource panel */
/* Thin divider between rows within a column — was in the original mockup
   (each row separated by a hairline, not just margin) and got dropped when
   the markup was implemented. Last row in each column skips it so there's
   no trailing line right above the panel's bottom padding. */
.vf-resource-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-lighter-4, #eee);
}
.vf-resource-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.vf-resource-item .progress {
    background-color: var(--gray-lighter-4, rgba(0,0,0,0.08));
    border-radius: 4px;
}

/* Order form slider UI */
.vf-slider-container {
    padding: 8px 0;
}
.vf-slider-value {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    text-align: center;
}
.vf-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.vf-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #337ab7;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.vf-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #337ab7;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Toggle Switch */
.vf-toggle-input {
    display: none;
}
.vf-toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.vf-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.vf-toggle-input:checked + .vf-toggle-switch {
    background: #28a745;
}
.vf-toggle-input:checked + .vf-toggle-switch::after {
    transform: translateX(16px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vf-power-buttons {
        flex-direction: column;
    }
    .vf-btn-power {
        width: 100%;
    }
    .vf-ip-row {
        flex-wrap: wrap;
    }
}

/* =========================================================================
   Network tab — interface/IP detail panel
   ========================================================================= */
.vf-net-ipv6-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-lighter-3, rgba(0,0,0,.06));
}
.vf-net-ipv6-row:last-child {
    border-bottom: none;
}

/* =========================================================================
   Reverse DNS panel
   ========================================================================= */
.vf-rdns-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-lighter-3, rgba(0,0,0,.06));
}
.vf-rdns-row:last-child { border-bottom: none; }
.vf-rdns-ip {
    font-family: monospace;
    font-size: 13px;
    min-width: 180px;
    font-weight: 600;
}
.vf-rdns-edit,
.vf-rdns-view {
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    align-items: center;
    min-width: 240px;
}
.vf-rdns-input {
    flex: 1 1 auto;
    min-width: 180px;
    max-width: 420px;
    font-family: monospace;
    font-size: 13px;
}
.vf-rdns-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.4;
    white-space: nowrap;
}
.vf-rdns-msg {
    flex-basis: 100%;
    font-size: 12px;
    display: none;
    padding-left: 180px;
}
.vf-rdns-admin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    font-size: 13px;
}
.vf-rdns-ip-admin {
    font-family: monospace;
    font-weight: 600;
    min-width: 180px;
}
.vf-rdns-ptr-admin {
    font-family: monospace;
    color: #333;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
    .vf-rdns-row { flex-direction: column; align-items: stretch; }
    .vf-rdns-edit { flex-direction: column; align-items: stretch; }
    .vf-rdns-msg { padding-left: 0; }
}

/* Subnet-only rows (IPv6 /64 allocations). Distinct visual treatment so
   customers see "this is a subnet, not a host" without reading the badge. */
.vf-rdns-subnet-row {
    background: rgba(23, 162, 184, 0.04);
    border-left: 3px solid #17a2b8;
    padding-left: 8px;
}
.vf-rdns-subnet-form {
    flex-basis: 100%;
    padding: 10px 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vf-rdns-subnet-inputs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.vf-rdns-subnet-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
@media (max-width: 768px) {
    .vf-rdns-subnet-form { padding-left: 0; }
    .vf-rdns-subnet-inputs { flex-direction: column; }
}

/* ---------------- Server Overview meta bar ---------------- */
.vf-overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.vf-meta-chip {
    display: inline-block;
    padding: 3px 10px;
    background: var(--badge-bg, #fff);
    border: 1px solid var(--gray-lighter-3, #d6d8db);
    border-radius: 12px;
    font-size: 12px;
    color: var(--gray-darker, #333);
    line-height: 1.5;
}
.vf-meta-chip-muted {
    color: var(--gray-lighter, #6c757d);
    font-style: italic;
    background: transparent;
    border: none;
    padding: 3px 4px;
}
.vf-mask-ips-btn {
    font-size: 12px;
    padding: 3px 10px;
}
@media (max-width: 576px) {
    .vf-mask-ips-btn { width: 100%; }
}

/* ---------------- Live Stats panel ---------------- */
.vf-live-bar {
    width: 100%;
    height: 14px;
    background: var(--gray-lighter-4, #e9ecef);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}
.vf-live-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.5s ease, background 0.3s ease;
}
.vf-live-bar-fill.bg-warning {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}
.vf-live-bar-fill.bg-danger {
    background: linear-gradient(90deg, #dc3545, #c82333);
}
.vf-livestats-updated {
    color: var(--gray-lighter, #6c757d);
}

/* ---------------- Filesystem rows ---------------- */
.vf-fs-row .progress {
    background-color: var(--gray-lighter-4, #e9ecef);
}
.vf-fs-row .progress-bar {
    background-color: #337ab7;
    transition: width 0.5s ease;
}
.vf-fs-row .progress-bar.bg-warning { background-color: #ffc107 !important; }
.vf-fs-row .progress-bar.bg-danger  { background-color: #dc3545 !important; }

/* ---------------- Layout: side-by-side panel grid ---------------- */
/*
 * Used to lay out compact panels (Traffic + Live Stats) side-by-side on
 * wide screens. CSS Grid with auto-fit handles the case where one panel is
 * display:none (e.g. Live Stats hidden when remoteState is unavailable) —
 * the visible panel fills the row.
 */
.vf-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 1rem;
}
.vf-panel-grid > .panel,
.vf-panel-grid > .card {
    margin-bottom: 0 !important;
    height: 100%;
}

/* ---------------- Server Overview 2-column split ---------------- */
/*
 * Plain flexbox, not Bootstrap's .row/.col-md-6 — this theme doesn't
 * reliably render Bootstrap's grid classes as side-by-side columns (both
 * columns were observed stacking full-width instead), so the split is done
 * with a self-contained rule that doesn't depend on it.
 */
.vf-overview-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}
.vf-overview-col {
    flex: 1 1 240px;
    min-width: 240px;
}


/* ---------------- Row scan icons (Server Overview + Resources) ---------------- */
/*
 * Small muted icon before each row label — a scan aid, not decoration; kept
 * the same visual weight as the label text so the row is still led by the
 * word, not the glyph.
 */
.vf-row-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.vf-row-icon {
    color: var(--gray-lighter, #8a939c);
    flex-shrink: 0;
}

/* ---------------- Inline view/edit toggle ---------------- */
/*
 * Reusable pattern: a field shows as plain text + a small pencil button by
 * default (view mode) rather than an always-open input box, and only
 * switches to its edit row when the customer actually wants to change it.
 * Used by the Server Overview "Name" field and Reverse DNS PTR rows.
 */
.vf-inline-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
}
.vf-inline-edit-value {
    word-break: break-word;
}
.vf-inline-edit-value:empty::before {
    content: "-";
    color: #999;
}
.vf-inline-edit-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--gray-lighter, #888);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
}
.vf-inline-edit-btn:hover {
    background: rgba(51,122,183,0.1);
    color: #337ab7;
}

/* ---------------- Server Overview rename row ---------------- */
/*
 * Was previously a single flex row that squished the Save button on
 * narrower viewports. Wrap-on-overflow + min-widths keep buttons readable
 * regardless of cell width.
 */
.vf-rename-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.vf-rename-input-field {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 240px;
}
.vf-rename-btn-randomise,
.vf-rename-btn-save {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 38px;
}
.vf-rename-btn-save {
    min-width: 56px;
}

/* ---------------- IP cell rows (Server Overview) ---------------- */
/*
 * Each IPv4/IPv6 address renders as a compact row: address span + copy
 * button. Replaces the standalone Network panel; the per-address copy
 * affordance moved here.
 */
.vf-ip-cell-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    line-height: 1.5;
}
.vf-ip-cell-row .vf-ip-address {
    word-break: break-all;
}
.vf-ip-cell-row:last-child {
    margin-bottom: 0;
}

/* ---------------- Sensitive-input masking ---------------- */
/*
 * Companion to the JS-based IP text masking. When body.vf-mask-active is
 * set, render the value of any input.vf-sensitive as discs so the actual
 * characters don't leak into a screenshot. Hover/focus restores the real
 * value for editing — the customer can still see what they're typing.
 *
 * `text-security` is widely supported under the -webkit- prefix (Chrome,
 * Edge, Safari) and as the unprefixed property in modern Firefox. Falls
 * through to `-webkit-text-security: disc` everywhere else; if a browser
 * truly doesn't honour it the screenshot mask just isn't applied to the
 * input field — the IP cells still mask, so the customer's worst case is
 * an unmasked rDNS hostname (failsafe-soft, not security-critical).
 */
body.vf-mask-active input.vf-sensitive {
    -webkit-text-security: disc;
    text-security: disc;
    font-family: text-security-disc, sans-serif;
    transition: filter 0.15s ease;
}
body.vf-mask-active input.vf-sensitive:focus,
body.vf-mask-active input.vf-sensitive:hover {
    -webkit-text-security: none;
    text-security: none;
    font-family: inherit;
}

/* =========================================================================
   vfConfirm — in-page confirmation modal
   ========================================================================= */
.vf-confirm-backdrop{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,0);backdrop-filter:blur(0px);transition:background 0.2s ease,backdrop-filter 0.2s ease}
.vf-confirm-backdrop.vf-confirm-visible{background:rgba(15,23,42,0.45);backdrop-filter:blur(4px)}
.vf-confirm-dialog{background:var(--dropdown-bg,#ffffff);border-radius:18px;box-shadow:var(--modal-content-box-shadow,0 24px 60px rgba(15,23,42,0.18),0 4px 12px rgba(15,23,42,0.08));padding:28px 28px 24px;max-width:420px;width:calc(100% - 32px);display:flex;flex-direction:column;gap:16px;transform:translateY(12px) scale(0.97);opacity:0;transition:transform 0.22s cubic-bezier(0.34,1.56,0.64,1),opacity 0.18s ease}
.vf-confirm-backdrop.vf-confirm-visible .vf-confirm-dialog{transform:translateY(0) scale(1);opacity:1}
.vf-confirm-icon{width:44px;height:44px;border-radius:12px;background:var(--gray-lighter-4,#f1f5f9);display:flex;align-items:center;justify-content:center;color:var(--gray-lighter,#64748b);flex-shrink:0}
.vf-confirm-icon.vf-confirm-icon-danger{background:var(--state-danger-bg,#fff1f2);color:var(--state-danger-text,#e11d48)}
.vf-confirm-body{display:flex;flex-direction:column;gap:6px}
.vf-confirm-title{font-size:16px;font-weight:700;color:var(--gray-darker,#0f172a);line-height:1.3}
.vf-confirm-msg{font-size:13.5px;color:var(--gray-base,#475569);line-height:1.6}
.vf-confirm-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:4px}
.vf-confirm-btn{appearance:none;border-radius:999px;padding:9px 20px;font-size:13.5px;font-weight:600;cursor:pointer;border:none;transition:all 0.15s ease;line-height:1}
.vf-confirm-btn-cancel{background:var(--gray-lighter-4,#f1f5f9);color:var(--gray-base,#475569);border:1.5px solid var(--gray-lighter-3,#e2e8f0)}
.vf-confirm-btn-cancel:hover{background:var(--gray-lighter-3,#e2e8f0);color:var(--gray-darker,#0f172a)}
.vf-confirm-btn-danger{background:#e11d48;color:#ffffff;box-shadow:0 2px 8px rgba(225,29,72,0.30)}
.vf-confirm-btn-danger:hover{background:#be123c;box-shadow:0 4px 14px rgba(225,29,72,0.35)}
.vf-confirm-btn-danger:active{transform:translateY(1px)}
.vf-confirm-btn-primary{background:#2563eb;color:#ffffff;box-shadow:0 2px 8px rgba(37,99,235,0.28)}
.vf-confirm-btn-primary:hover{background:#1d4ed8}

/* =========================================================================
   Dashboard shell — header + tabs (client-area overview.tpl only)
   ========================================================================= */

.vf-dashboard {
    display: flex;
    flex-direction: column;
}

/* Header: identity, status, quick actions, meta chips. Reuses the theme's
   own .panel/.card chrome (BS3/4/5 dual class, set in overview.tpl) — only
   the internal layout below is new. */
.vf-dash-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.vf-dash-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.vf-dash-title h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vf-dash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
@media (max-width: 576px) {
    .vf-dash-header-row { flex-direction: column; align-items: stretch; }
    .vf-dash-quick-actions { width: 100%; }
    .vf-dash-quick-actions .btn { flex: 1 1 auto; }
}

/* Tab strip. Horizontal scroll on narrow viewports rather than wrapping —
   keeps the strip a single predictable row at any width. */
.vf-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-lighter-4, #e6e8eb);
    margin-bottom: 16px;
    overflow-x: auto;
    /* Setting only overflow-x leaves overflow-y at its default (visible),
       but per spec browsers then compute overflow-y to auto too — the strip
       has no vertical overflow, but a scrollbar track was reserving space
       anyway. Pin it to hidden explicitly so only horizontal scroll can ever
       appear. */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.vf-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gray-lighter, #6c757d);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.vf-tab:hover {
    /* --gray-darker is Lagom's adaptive emphasis-text token — light #17191C,
       dark #E0E0E0 — so this stays legible in both themes without a
       separate dark-mode rule. The old literal #212529 was invisible
       against a dark card. */
    color: var(--gray-darker, #212529);
}
.vf-tab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
    border-radius: 4px 4px 0 0;
}
.vf-tab.vf-tab-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Tab panes. JS drives the actual show/hide via inline style.display; these
   rules are the CSS-side source of truth so the page degrades sensibly even
   before module.js finishes initialising (first pane defaults visible). */
.vf-tab-pane {
    display: none;
}
.vf-tab-pane.vf-tab-pane-active {
    display: block;
}

/* =========================================================================
   Dark mode — native Lagom tokens, not a hand-rolled dark palette
   ========================================================================= */
/*
 * Lagom's own stylesheet is fully CSS-variable driven and already redefines
 * these exact custom properties under html.lagom-dark-mode (confirmed by
 * reading templates/lagom2/core/styles/depth/assets/css/vars/*.css) — so
 * rather than maintain a parallel dark-mode stylesheet here, every rule
 * below just points at Lagom's token with our original literal as the
 * fallback (for installs on a different/older theme where the variable
 * doesn't exist). Dark mode then falls out for free: no html.lagom-dark-mode
 * selector appears anywhere in this file.
 *
 *   --gray-lighter    mid-grey, same value in both themes (by design —
 *                      only the near-black/near-white extremes get re-tuned)
 *   --gray-lighter-3  border color, light #DEE0E3 / dark #424242
 *   --gray-lighter-4  divider/fill color, light #EFEFF1 / dark #303030
 *   --gray-darker     emphasis text, light #17191C / dark #E0E0E0 (flips!)
 *   --gray-base       secondary text, light #4B4F58 / dark #B3B3B3
 *   --state-success/warning/danger/info-bg/text  Lagom's own badge/alert
 *                      tint pairs — already tuned for both themes
 *   --dropdown-bg/border/box-shadow  Lagom's floating-menu surface tokens
 *
 * See "Dark mode" in CLAUDE.md for the full token list this was checked
 * against — re-derive from there rather than re-fetching the theme's CSS
 * if these need revisiting.
 */
