/* ================================= */
/* WRAPPER FULL WIDTH */
/* ================================= */

.vf-full-width-wrapper {
    width: 100%;
    max-width: none;
    margin: 20px 0;
    padding: 0;
    grid-column: 1 / -1;
    clear: both;
    display: block;
    position: relative;
}

.form-group:has(.vf-full-width-wrapper),
.field:has(.vf-full-width-wrapper),
.row > div:has(.vf-full-width-wrapper) {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
    flex: 0 0 100%;
}

/* ================================= */
/* BASE STYLES */
/* ================================= */

.vf-bold { font-weight: 800; }
.vf-small { font-size: .9rem; }
.vf-button { font-size: .8rem; padding: .95rem 1.5rem; font-weight: 600; }
.vf-button-small { font-size: .8rem; padding: .75rem 1.3rem; font-weight: 500; }
.vf-spinner-margin { margin-right: 7px; }
.vf-badge { font-size: .8rem; padding: .5rem .9rem; text-transform: uppercase; font-weight: 800; }
.vf-badge-active { background-color: rgba(32,177,0,.12); color: #276900; border-radius: 6px; }
.vf-badge-awaiting { background-color: rgba(177,89,0,.12); color: #692000; border-radius: 6px; }

#vf-login-button-spinner,
#vf-password-reset-button-spinner,
#vf-password-reset-error,
#vf-password-reset-success,
#vf-login-error,
#vf-server-info,
#vf-server-info-error { display: none; }

#vf-server-info-error { margin: 10px; }
#vf-server-info-loader { min-height: 136px; }

#vf-loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(225,224,224,.3);
    border-radius: 50%;
    border-top-color: #0e151a;
    animation: vf-spin 1s ease-in-out infinite;
}
.vf-loader { margin: 30px; }

@keyframes vf-spin { to { transform: rotate(360deg); } }

/* ================================= */
/* 🎨 PREMIUM UI - SECTION TITLE */
/* ================================= */

.vf-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vf-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.vf-section-subtitle {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 28px;
}

/* ================================= */
/* 🔥 OS CATEGORY TABS - GLASSMORPHISM */
/* ================================= */

.vf-os-category-tabs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: vf-fade-in-up 0.4s ease-out both;
}

.vf-os-category-tab {
    flex: 0 1 auto;
    min-width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.vf-os-category-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vf-os-category-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}
.vf-os-category-tab:hover::before { opacity: 1; }

.vf-os-category-tab.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-color: #667eea;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.vf-os-category-tab i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    transition: transform 0.2s ease;
}
.vf-os-category-tab:hover i { transform: scale(1.15); }

/* ================================= */
/* 💎 OS TEMPLATES GRID - PREMIUM CARDS */
/* ================================= */

.vf-os-templates-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
    animation: vf-fade-in-up 0.5s ease-out both;
}

.vf-os-template-card {
    position: relative;
    min-height: 90px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: transform;
}

/* hover overlay */
.vf-os-template-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.vf-os-template-card:hover::before { opacity: 1; }

.vf-os-template-card:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.05));
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(102,126,234,0.3);
}
.vf-os-template-card:active { transform: translateY(-2px) scale(0.98); }

.vf-os-template-card.selected {
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.15));
    border-color: #667eea;
    box-shadow: 0 12px 32px rgba(102,126,234,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.vf-os-template-card.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102,126,234,0.5);
    animation: vf-checkmark-pop 0.3s cubic-bezier(0.68,-0.55,0.265,1.55);
}

.vf-os-template-card:hover .vf-os-template-icon {
    transform: scale(1.1) rotate(-5deg);
    transition: transform 0.3s ease;
}

.vf-os-template-radio {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.vf-os-template-card.selected .vf-os-template-radio {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.2);
}
.vf-os-template-card.selected .vf-os-template-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.vf-os-template-info { flex: 1; min-width: 0; }
.vf-os-template-name { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-os-template-version { font-size: 14px; color: #9ca3af; }

.vf-os-template-icon {
    font-size: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================= */
/* 🎛️ TOGGLE SWITCH PREMIUM - VNC */
/* ================================= */

.vf-toggle-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    will-change: transform;
}
.vf-toggle-container:hover {
    border-color: #667eea;
    background: rgba(102,126,234,0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.15);
}

.vf-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}
.vf-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.vf-toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 28px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.vf-toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
input[type="checkbox"]:checked + .vf-toggle-slider {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.2);
}
input[type="checkbox"]:checked + .vf-toggle-slider::before {
    transform: translateX(24px);
}

.vf-toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}
.vf-toggle-label i {
    font-size: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ================================= */
/* 📝 INPUT FIELD PREMIUM - HOSTNAME */
/* ================================= */

.vf-input-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.vf-input-label {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vf-input-optional {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}

.vf-input-field {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
}
.vf-input-field::placeholder { color: #6b7280; }
.vf-input-field:hover {
    border-color: #667eea;
    background: rgba(102,126,234,0.05);
}
.vf-input-field:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(102,126,234,0.08);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
}

/* ================================= */
/* ⚡ LOADING STATES */
/* ================================= */

.vf-loading-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    background-size: 200% 100%;
    animation: vf-skeleton-loading 1.5s ease-in-out infinite;
}
@keyframes vf-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================= */
/* 🎭 MICRO-INTERACTIONS */
/* ================================= */

.vf-os-category-tab,
.vf-os-template-card,
.vf-toggle-container,
.vf-input-field { will-change: transform; }

/* ================================= */
/* 🌈 GRADIENT ACCENTS */
/* ================================= */

.vf-gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vf-gradient-border {
    position: relative;
}
.vf-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ================================= */
/* 🎪 ACCESSIBILITY */
/* ================================= */

.vf-os-category-tab:focus,
.vf-os-template-card:focus,
.vf-toggle-slider:focus,
.vf-input-field:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
.vf-toggle-slider:focus-visible {
    box-shadow: 0 0 0 4px rgba(102,126,234,0.3);
}

/* ================================= */
/* 🎨 DARK MODE ENHANCEMENTS */
/* ================================= */

@media (prefers-color-scheme: dark) {
    .vf-os-category-tab,
    .vf-os-template-card,
    .vf-toggle-container,
    .vf-input-field {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* ================================= */
/* ✨ ANIMATIONS */
/* ================================= */

@keyframes vf-fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes vf-checkmark-pop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
