/* ==========================================================================
   VECTIHOST DEDICATED FULLSCREEN WEB FILE MANAGER (NATIVE DESKTOP THEME)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fira+Code:wght@500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --vh-primary: hsl(210, 65%, 36%);
    --vh-primary-hover: hsl(210, 65%, 29%);
    --vh-primary-active: hsl(210, 65%, 24%);
    --vh-primary-light: hsl(210, 65%, 95%);
    --vh-primary-muted: hsl(210, 30%, 84%);

    --vh-bg-app: #0A192F;
    --vh-bg-shell: #F8FAFC;
    --vh-bg-surface: #FFFFFF;
    --vh-bg-subtle: #F1F5F9;
    --vh-bg-sidebar: #0F172A;
    --vh-bg-sidebar-hover: #1E293B;

    --vh-text-main: #0B0E14;
    --vh-text-muted: #475467;
    --vh-text-dim: #667085;
    --vh-text-sidebar: #94A3B8;
    --vh-text-sidebar-active: #FFFFFF;

    --vh-border: rgba(0, 0, 0, 0.08);
    --vh-border-light: #E2E8F0;
    --vh-border-dark: #334155;

    --vh-success: #059669;
    --vh-danger: #EF4444;
    --vh-warning: #D97706;

    --vh-radius-sm: 6px;
    --vh-radius-md: 8px;
    --vh-radius-lg: 12px;

    --vh-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --vh-font-mono: 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

input, textarea, [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--vh-font-sans);
    background-color: var(--vh-bg-shell);
    color: var(--vh-text-main);
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   APP HEADER & TOOLBAR
   ========================================================================== */
.nfm-header {
    height: 54px;
    background: var(--vh-bg-app);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #1E293B;
    z-index: 20;
}

.nfm-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nfm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nfm-brand i {
    color: #60A5FA;
    font-size: 1.25rem;
}

.nfm-site-selector-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: var(--vh-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.nfm-site-selector-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nfm-site-select {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.86rem;
    outline: none;
    cursor: pointer;
    max-width: 220px;
}

.nfm-site-select option {
    background: #0F172A;
    color: #FFFFFF;
}

.nfm-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nfm-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--vh-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.nfm-header-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

.nfm-header-btn.primary {
    background: #2563EB;
    border-color: #3B82F6;
    color: #FFFFFF;
}

.nfm-header-btn.primary:hover {
    background: #1D4ED8;
}

/* Secondary Action Bar (Breadcrumbs, Actions, Search, View Mode) */
.nfm-action-bar {
    height: 48px;
    background: var(--vh-bg-surface);
    border-bottom: 1px solid var(--vh-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 16px;
    z-index: 10;
}

.nfm-breadcrumbs-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.85rem;
    scrollbar-width: none;
}

.nfm-breadcrumbs-wrap::-webkit-scrollbar {
    display: none;
}

.nfm-crumb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--vh-primary);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease;
}

.nfm-crumb:hover {
    background: var(--vh-bg-subtle);
}

.nfm-crumb.active {
    color: var(--vh-text-main);
    font-weight: 700;
    cursor: default;
    background: transparent;
}

.nfm-crumb-sep {
    color: var(--vh-text-dim);
    font-size: 0.72rem;
}

.nfm-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nfm-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--vh-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--vh-border-light);
    background: var(--vh-bg-surface);
    color: var(--vh-text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.nfm-tool-btn:hover:not(:disabled) {
    background: var(--vh-bg-subtle);
    border-color: #CBD5E1;
}

.nfm-tool-btn.primary {
    background: var(--vh-primary);
    color: #FFFFFF;
    border-color: var(--vh-primary);
}

.nfm-tool-btn.primary:hover:not(:disabled) {
    background: var(--vh-primary-hover);
}

.nfm-tool-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.nfm-search-wrap {
    position: relative;
    width: 200px;
}

.nfm-search-input {
    width: 100%;
    height: 32px;
    border-radius: var(--vh-radius-sm);
    border: 1px solid var(--vh-border-light);
    padding: 0 10px 0 30px;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.nfm-search-input:focus {
    border-color: var(--vh-primary);
}

.nfm-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vh-text-dim);
    font-size: 0.78rem;
    pointer-events: none;
}

.nfm-view-toggle {
    display: flex;
    border: 1px solid var(--vh-border-light);
    border-radius: var(--vh-radius-sm);
    overflow: hidden;
}

.nfm-view-btn {
    width: 32px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vh-bg-surface);
    border: none;
    cursor: pointer;
    color: var(--vh-text-muted);
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.nfm-view-btn.active {
    background: var(--vh-bg-subtle);
    color: var(--vh-primary);
    font-weight: bold;
}

/* ==========================================================================
   MAIN TWO-PANE EXPLORER BODY
   ========================================================================== */
.nfm-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Left Sidebar (Places & Directory Tree) */
.nfm-sidebar {
    width: 260px;
    min-width: 200px;
    max-width: 420px;
    background: #0F172A;
    color: #94A3B8;
    border-right: 1px solid #1E293B;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.nfm-sidebar-section {
    padding: 14px 12px 6px;
}

.nfm-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748B;
    padding: 0 8px 6px;
}

.nfm-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #CBD5E1;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.nfm-sidebar-item i {
    width: 16px;
    text-align: center;
    color: #60A5FA;
    font-size: 0.95rem;
}

.nfm-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}

.nfm-sidebar-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #FFFFFF;
}

.nfm-sidebar-item.active i {
    color: #38BDF8;
}

/* Persistent Hierarchical Tree View */
.nfm-tree-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 16px;
}

.nfm-tree-branch {
    display: flex;
    flex-direction: column;
}

.nfm-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.12s ease;
}

.nfm-tree-row:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}

.nfm-tree-row.active {
    background: rgba(59, 130, 246, 0.25);
    color: #60A5FA;
    font-weight: 700;
}

.nfm-tree-toggle-btn {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #64748B;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.12s ease;
}

.nfm-tree-toggle-btn:hover {
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.08);
}

.nfm-tree-toggle-btn.expanded {
    transform: rotate(90deg);
}

.nfm-tree-toggle-btn.empty {
    visibility: hidden;
}

.nfm-tree-icon {
    color: #60A5FA;
    font-size: 0.88rem;
    width: 16px;
    text-align: center;
}

.nfm-tree-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nfm-tree-children {
    display: flex;
    flex-direction: column;
    padding-left: 12px;
    border-left: 1px dashed rgba(255, 255, 255, 0.12);
    margin-left: 14px;
    margin-top: 2px;
}

/* Right Explorer Canvas */
.nfm-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    overflow: hidden;
    position: relative;
}

.nfm-dropzone-indicator {
    display: none;
    position: absolute;
    inset: 12px;
    border: 2px dashed var(--vh-primary);
    border-radius: var(--vh-radius-lg);
    background: rgba(79, 142, 247, 0.06);
    z-index: 50;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--vh-primary);
}

.nfm-canvas.drag-over .nfm-dropzone-indicator {
    display: flex;
}

.nfm-file-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 16px;
}

/* Details / Table View */
.nfm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.nfm-table thead th {
    position: sticky;
    top: 0;
    background: #FFFFFF;
    padding: 10px 12px;
    font-weight: 700;
    color: var(--vh-text-dim);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--vh-border-light);
    z-index: 5;
    cursor: pointer;
}

.nfm-table thead th:hover {
    color: var(--vh-primary);
}

.nfm-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background 0.12s ease;
}

.nfm-table tbody tr:hover {
    background: rgba(79, 142, 247, 0.04);
}

.nfm-table tbody tr.selected {
    background: rgba(79, 142, 247, 0.12) !important;
}

.nfm-table td {
    padding: 8px 12px;
    white-space: nowrap;
}

.nfm-table-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--vh-text-main);
}

.nfm-table-name i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
    color: var(--vh-primary) !important;
}

.nfm-table-size, .nfm-table-perms {
    font-family: var(--vh-font-mono);
    font-size: 0.8rem;
    color: var(--vh-text-muted);
}

.nfm-table-mtime {
    color: var(--vh-text-dim);
    font-size: 0.8rem;
}

/* Grid / Large Icons View */
.nfm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding-top: 12px;
}

.nfm-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px 12px;
    border-radius: var(--vh-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.nfm-grid-item:hover {
    background: var(--vh-bg-subtle);
    border-color: var(--vh-border-light);
}

.nfm-grid-item.selected {
    background: rgba(79, 142, 247, 0.12);
    border-color: var(--vh-primary);
}

.nfm-grid-icon {
    font-size: 2.4rem;
    margin-bottom: 8px;
    color: var(--vh-primary) !important;
}

.nfm-grid-icon i {
    color: var(--vh-primary) !important;
}

/* Unified Brand Icon Palette: No random rainbow colors */
.nfm-table-name i,
.nfm-grid-icon i,
.nfm-empty-icon {
    color: var(--vh-primary) !important;
}

.nfm-tree-icon,
.nfm-sidebar-item i,
.nfm-place-item i {
    color: #60A5FA !important;
}

.nfm-context-item i {
    color: #60A5FA !important;
    width: 16px;
    text-align: center;
}

.nfm-context-item.danger i {
    color: #EF4444 !important;
}

.nfm-context-item:hover i {
    color: #FFFFFF !important;
}

.nfm-grid-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--vh-text-main);
    word-break: break-all;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nfm-grid-meta {
    font-size: 0.7rem;
    color: var(--vh-text-dim);
    margin-top: 4px;
    font-family: var(--vh-font-mono);
}

/* Empty State */
.nfm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 24px;
    text-align: center;
    color: var(--vh-text-dim);
    width: 100%;
    grid-column: 1 / -1;
}

.nfm-empty-icon {
    font-size: 3rem;
    color: #CBD5E1;
    margin-bottom: 16px;
}

.nfm-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vh-text-main);
    margin-bottom: 6px;
}

.nfm-empty-desc {
    font-size: 0.85rem;
    max-width: 400px;
}

/* ==========================================================================
   BOTTOM STATUS BAR
   ========================================================================== */
.nfm-status-bar {
    height: 30px;
    background: #0B1120;
    color: #94A3B8;
    border-top: 1px solid #1E293B;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 0.74rem;
    font-family: var(--vh-font-mono);
    z-index: 10;
}

.nfm-status-left, .nfm-status-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nfm-shortcut-badge {
    background: #1E293B;
    color: #CBD5E1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* ==========================================================================
   CUSTOM RIGHT-CLICK CONTEXT MENU
   ========================================================================== */
.nfm-context-menu {
    position: fixed;
    background: #0F172A;
    color: #F8FAFC;
    border: 1px solid #334155;
    border-radius: var(--vh-radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    min-width: 190px;
    padding: 6px;
    z-index: 1000;
    display: none;
}

.nfm-context-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s ease;
}

.nfm-context-item:hover {
    background: #2563EB;
    color: #FFFFFF;
}

.nfm-context-item.danger:hover {
    background: #EF4444;
}

.nfm-context-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nfm-context-item-left i {
    width: 16px;
    text-align: center;
    font-size: 0.88rem;
}

.nfm-context-shortcut {
    font-size: 0.7rem;
    color: #64748B;
    font-family: var(--vh-font-mono);
}

.nfm-context-item:hover .nfm-context-shortcut {
    color: rgba(255, 255, 255, 0.8);
}

.nfm-context-divider {
    height: 1px;
    background: #1E293B;
    margin: 4px 0;
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */
.nfm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.nfm-modal-backdrop.hidden {
    display: none !important;
}

.nfm-modal-card {
    background: #FFFFFF;
    border-radius: var(--vh-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 440px;
    overflow: hidden;
    animation: nfmFadeIn 0.15s ease-out;
}

@keyframes nfmFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.nfm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--vh-border-light);
}

.nfm-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vh-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfm-modal-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--vh-text-dim);
    cursor: pointer;
}

.nfm-modal-close:hover {
    color: var(--vh-text-main);
}

.nfm-modal-body {
    padding: 18px;
}

.nfm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    background: var(--vh-bg-subtle);
    border-top: 1px solid var(--vh-border-light);
}

/* ==========================================================================
   GLOBAL / API.JS MODAL DIALOG STYLES (window.showAlert & window.showConfirm)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: nfmFadeIn 0.15s ease-out;
}

.modal-backdrop.hidden {
    display: none !important;
}

.modal-card {
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--vh-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 95%;
    max-width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #F8FAFC;
    animation: nfmFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.max-w-480 {
    max-width: 480px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.95);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: #94A3B8;
    font-size: 1.15rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 22px 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #CBD5E1;
    background: #0F172A;
}

.modal-body p {
    margin: 0;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    background: #0B1120;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Modal Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--vh-font-sans);
    border-radius: var(--vh-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--vh-primary);
    color: #0A192F;
}

.btn-primary:hover {
    background: var(--vh-primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
}

.btn-danger {
    background: #EF4444;
    color: #FFFFFF;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

.text-danger { color: #EF4444 !important; }
.text-warning { color: #F59E0B !important; }
.text-success { color: #10B981 !important; }
.text-main { color: #F8FAFC !important; }
.font-semibold { font-weight: 600 !important; }
.leading-relaxed { line-height: 1.625 !important; }
.m-0 { margin: 0 !important; }

.nfm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.nfm-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--vh-text-muted);
}

.nfm-form-input {
    padding: 8px 12px;
    border-radius: var(--vh-radius-sm);
    border: 1px solid var(--vh-border-light);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.nfm-form-input:focus {
    border-color: var(--vh-primary);
}

/* Fullscreen In-Browser Code Editor */
.nfm-editor-container {
    width: 96vw;
    height: 94vh;
    max-width: 1400px;
    background: #0F172A;
    border-radius: var(--vh-radius-lg);
    border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nfm-editor-topbar {
    height: 48px;
    background: #0F172A;
    border-bottom: 1px solid #1E293B;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: #FFFFFF;
}

.nfm-editor-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.nfm-editor-path {
    font-family: var(--vh-font-mono);
    font-size: 0.78rem;
    color: #94A3B8;
}

.nfm-editor-workspace {
    flex: 1;
    display: flex;
    background: #0B1120;
    overflow: hidden;
    position: relative;
}

.nfm-editor-gutter {
    width: 60px;
    min-width: 60px;
    background: #070A12;
    color: #475569;
    font-family: var(--vh-font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 16px 12px 16px 0;
    text-align: right;
    user-select: none;
    overflow: hidden;
    border-right: 1px solid #1E293B;
    white-space: pre;
}

.nfm-editor-textarea {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #E2E8F0;
    font-family: var(--vh-font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 16px;
    resize: none;
    tab-size: 4;
    white-space: pre;
    overflow-x: auto;
    overflow-y: scroll;
}

.nfm-editor-statusbar {
    height: 32px;
    background: #070A12;
    border-top: 1px solid #1E293B;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 0.75rem;
    font-family: var(--vh-font-mono);
    color: #94A3B8;
}

/* ==========================================================================
   SELECTION CHECKBOXES
   ========================================================================== */
.nfm-checkbox-col {
    width: 36px;
    text-align: center;
    padding: 8px 6px !important;
}

.nfm-row-checkbox {
    cursor: pointer;
    accent-color: var(--vh-primary);
    width: 15px;
    height: 15px;
}

.nfm-grid-item {
    position: relative;
}

.nfm-grid-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    cursor: pointer;
    accent-color: var(--vh-primary);
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.nfm-grid-item:hover .nfm-grid-checkbox,
.nfm-grid-item.selected .nfm-grid-checkbox {
    opacity: 1;
}

/* ==========================================================================
   UPLOAD PROGRESS FLOATING POPUP
   ========================================================================== */
.nfm-upload-progress {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    background: var(--vh-bg-app);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    padding: 14px 16px;
    z-index: 1900;
    color: #FFFFFF;
    animation: nfmFadeIn 0.2s ease-out;
}

.nfm-upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.nfm-upload-close {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px;
}

.nfm-upload-close:hover {
    color: #FFFFFF;
}

.nfm-upload-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.nfm-upload-bar-fill {
    height: 100%;
    background: var(--vh-primary);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.nfm-upload-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--vh-text-dim);
    font-family: var(--vh-font-mono);
}

.portal-auth-shield {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0A192F;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-auth-shield.shield-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.portal-shield-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
    font-family: var(--vh-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.portal-shield-brand i {
    color: hsl(210, 85%, 60%);
    font-size: 1.35rem;
}

.portal-shield-brand span {
    color: hsl(210, 85%, 60%);
}

.portal-shield-loader {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: hsl(210, 85%, 60%);
    border-radius: 50%;
    animation: portal-shield-spin 0.75s linear infinite;
}

.portal-shield-text {
    font-size: 0.82rem;
    font-weight: 500;
    color: #94A3B8;
    letter-spacing: 0.02em;
    font-family: var(--vh-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

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

