/* FILE MANAGER STYLES (Clean Minimal Dark, 0 Radius)       */
    /* ======================================================== */
    #view-files {
      display: none;
      flex-direction: column;
      min-height: calc(100vh - 135px);
    }
    #view-files.active {
      display: flex;
    }
    .file-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      background: var(--card-bg);
      border: 1px solid var(--border);
      padding: 0.75rem 1rem;
      margin-bottom: 0.75rem;
    }
    .file-toolbar-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
    }
    .file-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      background: var(--bg);
      color: var(--text);
      border: 1px solid var(--border);
      padding: 0.45rem 0.85rem;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      border-radius: 0 !important;
      transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    }
    .file-btn:hover {
      background: var(--header-bg);
      border-color: var(--primary);
      color: #ffffff;
    }
    .file-btn-primary {
      background: var(--primary-solid);
      border-color: var(--primary-solid);
      color: #ffffff;
    }
    .file-btn-primary:hover {
      background: var(--primary-hover);
      border-color: var(--primary-hover);
    }
    .file-btn-danger {
      color: #f87171;
      border-color: rgba(248, 113, 113, 0.3);
    }
    .file-btn-danger:hover {
      background: rgba(248, 113, 113, 0.12);
      border-color: #f87171;
    }
    .file-btn:disabled {
      opacity: 0.38;
      cursor: not-allowed !important;
      pointer-events: none;
    }
    .file-toolbar-divider {
      width: 1px;
      height: 22px;
      background-color: var(--border);
      margin: 0 0.35rem;
      align-self: center;
    }
    .file-search-box {
      position: relative;
      min-width: 220px;
    }
    .file-search-input {
      background: var(--bg);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 0.45rem 0.75rem 0.45rem 2rem;
      font-size: 0.82rem;
      border-radius: 0 !important;
      outline: none;
      width: 100%;
    }
    .file-search-input:focus {
      border-color: var(--primary);
    }
    .file-search-icon {
      position: absolute;
      left: 0.6rem;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      pointer-events: none;
    }
    .file-nav-bar {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      background: var(--card-bg);
      border: 1px solid var(--border);
      padding: 0.5rem 0.85rem;
      margin-bottom: 0.75rem;
    }
    .file-history-actions {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      flex-shrink: 0;
    }
    .file-nav-icon-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      background: var(--bg);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 0 !important;
      cursor: pointer;
      transition: background-color 0.15s, border-color 0.15s, color 0.15s;
      padding: 0;
    }
    .file-nav-icon-btn:hover:not(:disabled) {
      background: var(--header-bg);
      border-color: var(--primary);
      color: #ffffff;
    }
    .file-nav-icon-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
      pointer-events: none;
    }
    .file-breadcrumbs {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.25rem;
      font-family: var(--font-mono);
      font-size: 0.82rem;
      flex: 1;
    }
    .file-crumb-segment {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      padding: 0.2rem 0.45rem;
      color: var(--text);
      cursor: pointer;
      border: 1px solid transparent;
      user-select: none;
    }
    .file-crumb-segment:hover {
      background: var(--bg);
      border-color: var(--border);
      color: var(--primary);
    }
    .file-crumb-separator {
      color: var(--text-muted);
      user-select: none;
    }
    .file-path-input-group {
      display: none;
      align-items: center;
      gap: 0.5rem;
      flex: 1;
    }
    .file-path-input-group.active {
      display: flex;
    }
    .file-explorer-container {
      position: relative;
      background: var(--card-bg);
      border: 1px solid var(--border);
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: calc(100vh - 240px);
    }
    .file-drop-overlay {
      display: none;
      position: absolute;
      inset: 0;
      background: rgba(13, 17, 23, 0.94);
      border: 2px dashed var(--primary);
      z-index: 50;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 0.75rem;
      pointer-events: none;
    }
    .file-drop-overlay.active {
      display: flex;
    }
    .file-drop-overlay svg {
      color: var(--primary);
      animation: pulseDrop 1.2s infinite ease-in-out;
    }
    @keyframes pulseDrop {
      0%, 100% { transform: translateY(0); opacity: 0.8; }
      50% { transform: translateY(-8px); opacity: 1; }
    }
    .file-table-wrapper {
      width: 100%;
      flex: 1;
      overflow-x: auto;
      overflow-y: auto;
    }
    .file-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.84rem;
      text-align: left;
    }
    .file-table th {
      background: var(--bg);
      color: var(--text-muted);
      font-weight: 600;
      padding: 0.65rem 0.85rem;
      border-bottom: 1px solid var(--border);
      text-transform: uppercase;
      font-size: 0.72rem;
      letter-spacing: 0.05em;
      white-space: nowrap;
      position: sticky;
      top: 0;
      z-index: 5;
    }
    .file-table td {
      padding: 0.55rem 0.85rem;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      white-space: nowrap;
    }
    .file-row:hover {
      background-color: rgba(255, 255, 255, 0.02);
    }
    .file-row.selected {
      background-color: rgba(59, 130, 246, 0.08);
    }
    .file-name-cell {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      cursor: pointer;
      font-weight: 500;
      color: var(--text);
      max-width: 380px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .file-name-cell:hover {
      color: var(--primary);
    }
    .file-name-cell svg {
      flex-shrink: 0;
    }
    .file-perm-pill {
      font-family: var(--font-mono);
      font-size: 0.74rem;
      padding: 0.15rem 0.45rem;
      background: var(--bg);
      border: 1px solid var(--border);
      color: var(--text-muted);
      cursor: pointer;
    }
    .file-perm-pill:hover {
      border-color: var(--primary);
      color: var(--primary);
    }
    .file-action-btn {
      background: transparent;
      border: 1px solid transparent;
      color: var(--text-muted);
      padding: 0.25rem 0.45rem;
      cursor: pointer;
      border-radius: 0 !important;
      font-size: 0.76rem;
      display: inline-flex;
      align-items: center;
      gap: 0.2rem;
    }
    .file-action-btn:hover {
      background: var(--bg);
      border-color: var(--border);
      color: var(--text);
    }
    .file-action-btn.danger:hover {
      color: #f87171;
      border-color: rgba(248, 113, 113, 0.4);
    }
    .file-statusbar {
      margin-top: auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 0.65rem 1rem;
      background: var(--header-bg);
      border-top: 1px solid var(--border);
      font-size: 0.78rem;
      color: var(--text-muted);
    }
    /* CUSTOM MINIMALIST CHECKBOX (Zero Border Radius, Solid Dark) */
    .file-table input[type="checkbox"],
    #file-chmod-modal input[type="checkbox"],
    input[type="checkbox"].custom-checkbox,
    .chmod-checkbox {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      width: 17px;
      height: 17px;
      background-color: var(--bg);
      border: 1px solid var(--border-accent, #333333);
      border-radius: 0 !important;
      cursor: pointer;
      display: inline-grid;
      place-content: center;
      vertical-align: middle;
      margin: 0;
      transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
      position: relative;
      outline: none;
      box-sizing: border-box;
    }
    .file-table input[type="checkbox"]:hover,
    input[type="checkbox"].custom-checkbox:hover,
    .chmod-checkbox:hover {
      border-color: var(--primary, #3b82f6);
      background-color: rgba(59, 130, 246, 0.08);
    }
    .file-table input[type="checkbox"]:focus,
    input[type="checkbox"].custom-checkbox:focus,
    .chmod-checkbox:focus {
      border-color: var(--primary, #3b82f6);
      box-shadow: 0 0 0 1px var(--primary, #3b82f6);
    }
    .file-table input[type="checkbox"]:checked,
    input[type="checkbox"].custom-checkbox:checked,
    .chmod-checkbox:checked {
      background-color: var(--primary-solid, #2563eb);
      border-color: var(--primary-solid, #2563eb);
    }
    .file-table input[type="checkbox"]:checked::after,
    input[type="checkbox"].custom-checkbox:checked::after,
    .chmod-checkbox:checked::after {
      content: "";
      width: 9px;
      height: 5px;
      border-left: 2px solid #ffffff;
      border-bottom: 2px solid #ffffff;
      transform: rotate(-45deg) translate(0.5px, -0.5px);
      display: block;
    }
    .file-table input[type="checkbox"]:indeterminate,
    input[type="checkbox"].custom-checkbox:indeterminate {
      background-color: var(--primary-solid, #2563eb);
      border-color: var(--primary-solid, #2563eb);
    }
    .file-table input[type="checkbox"]:indeterminate::after,
    input[type="checkbox"].custom-checkbox:indeterminate::after {
      content: "";
      width: 8px;
      height: 2px;
      background-color: #ffffff;
      display: block;
    }
    .editor-modal {
      max-width: 1100px;
      width: 95%;
      height: 85vh;
      display: flex;
      flex-direction: column;
      padding: 0;
      background: #0d1117;
      border: 1px solid var(--border-accent);
    }
    .editor-header {
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid var(--border);
      background: var(--header-bg);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }
    .editor-body {
      flex: 1;
      position: relative;
      display: flex;
      overflow: hidden;
      background: #090d13;
    }
    .editor-linenums {
      width: 52px;
      padding: 0.75rem 0.5rem;
      background: #06090e;
      border-right: 1px solid var(--border);
      color: #4b5563;
      font-family: var(--font-mono);
      font-size: 0.82rem;
      line-height: 1.45rem;
      text-align: right;
      user-select: none;
      overflow: hidden;
    }
    .editor-textarea {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      color: #e6edf3;
      font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
      font-size: 0.82rem;
      line-height: 1.45rem;
      padding: 0.75rem 1rem;
      resize: none;
      tab-size: 4;
      white-space: pre;
      overflow: auto;
      scrollbar-width: thin;
    }
    .editor-footer {
      padding: 0.45rem 1.25rem;
      border-top: 1px solid var(--border);
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.76rem;
      color: var(--text-muted);
    }
    .file-upload-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: var(--card-bg);
      border: 1px solid var(--primary);
      box-shadow: 0 10px 25px rgba(0,0,0,0.5);
      padding: 1rem 1.25rem;
      min-width: 320px;
      max-width: 400px;
      z-index: 1000;
      display: none;
      flex-direction: column;
      gap: 0.5rem;
    }
    .file-upload-toast.active {
      display: flex;
    }
    .file-progress-track {
      width: 100%;
      height: 6px;
      background: var(--bg);
      border: 1px solid var(--border);
      overflow: hidden;
    }
    .file-progress-bar {
      height: 100%;
      width: 0%;
      background: var(--primary-solid);
      transition: width 0.15s ease;
    }
