/* FileVista Web File Manager - Core Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Theme Colors (Light Theme - FileVista Modern Fluent Style) */
  --bg-app: #f3f3f3;
  --bg-surface: #ffffff;
  --bg-sidebar: #f9f9f9;
  --bg-hover: #eaeaea;
  --bg-active: #e2ecf7;
  --bg-selected: #cfe2fe;
  --border-color: #dcdcdc;
  --border-subtle: #ebebeb;

  --text-main: #202020;
  --text-muted: #666666;
  --text-subtle: #8a8a8a;

  --primary: #0067c0;
  --primary-hover: #005aab;
  --primary-light: #e0f0ff;
  --accent: #2563eb;
  --danger: #d9383a;
  --danger-hover: #b82b2d;
  --success: #107c41;
  --warning: #ca5010;

  --header-bg: #f8f9fa;
  --ribbon-bg: #fbfbfb;
  --ribbon-border: #e3e3e3;
  --ribbon-btn-hover: #e8e8e8;
  --ribbon-btn-active: #d6e8fb;

  --item-border-selected: #70a7df;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.18);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --tree-width: 270px;
}

[data-theme="dark"] {
  --bg-app: #1e1e1e;
  --bg-surface: #252526;
  --bg-sidebar: #1f1f20;
  --bg-hover: #2d2d30;
  --bg-active: #18334c;
  --bg-selected: #1f4268;
  --border-color: #383838;
  --border-subtle: #2d2d2d;

  --text-main: #e0e0e0;
  --text-muted: #aaaaaa;
  --text-subtle: #777777;

  --primary: #4cc2ff;
  --primary-hover: #3ca9e2;
  --primary-light: #16364d;
  --accent: #38bdf8;
  --danger: #ff5252;
  --danger-hover: #e03b3b;
  --success: #34d399;
  --warning: #fbbf24;

  --header-bg: #181818;
  --ribbon-bg: #222222;
  --ribbon-border: #333333;
  --ribbon-btn-hover: #323232;
  --ribbon-btn-active: #1d3d61;

  --item-border-selected: #3b82f6;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Base Reset */
* {
  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 {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--text-main);
  background-color: var(--bg-app);
}

/* App Wrapper */
.filevista-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-surface);
}

/* 1. Header Bar */
.fv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  height: 42px;
}

.fv-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fv-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0078d4, #005aab);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 5px rgba(0, 120, 212, 0.3);
}

.fv-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fv-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
}

.fv-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fv-btn-icon-sm {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.fv-btn-icon-sm:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

/* 2. Ribbon Toolbar */
.fv-ribbon {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--ribbon-bg);
  border-bottom: 1px solid var(--ribbon-border);
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  min-height: 48px;
}

.fv-ribbon-group {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}

.fv-ribbon-sep {
  width: 1px;
  height: 26px;
  background: var(--border-color);
  margin: 0 6px;
}

.fv-ribbon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  min-width: 52px;
  height: 40px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.fv-ribbon-btn svg {
  width: 18px;
  height: 18px;
  margin-bottom: 2px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.fv-ribbon-btn:hover:not(:disabled) {
  background: var(--ribbon-btn-hover);
  border-color: var(--border-color);
}

.fv-ribbon-btn:hover:not(:disabled) svg {
  color: var(--primary);
}

.fv-ribbon-btn:active:not(:disabled) {
  background: var(--ribbon-btn-active);
  border-color: var(--item-border-selected);
}

.fv-ribbon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fv-ribbon-btn.primary {
  color: var(--primary);
}

.fv-ribbon-btn.danger:hover:not(:disabled) svg {
  color: var(--danger);
}

.fv-ribbon-btn.active {
  background: var(--ribbon-btn-active);
  border-color: var(--item-border-selected);
  color: var(--primary);
}

.fv-ribbon-btn.active svg {
  color: var(--primary);
}

/* 3. Address Bar & Breadcrumbs */
.fv-address-bar {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  gap: 6px;
  height: 38px;
}

.fv-nav-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.fv-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.fv-nav-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-color);
}

.fv-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fv-breadcrumbs-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  height: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.fv-breadcrumbs-wrapper::-webkit-scrollbar {
  display: none;
}

.fv-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.fv-breadcrumb-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.fv-breadcrumb-sep {
  color: var(--text-subtle);
  font-size: 11px;
}

.fv-search-box {
  display: flex;
  align-items: center;
  width: 220px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  height: 28px;
  transition: border-color 0.15s;
}

.fv-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  background: var(--bg-surface);
}

.fv-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-main);
  width: 100%;
  margin-left: 6px;
}

.fv-search-clear {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.fv-search-clear.visible {
  display: block;
}

.fv-search-global-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  margin: 0 4px;
  transition: all 0.12s;
  flex-shrink: 0;
}

.fv-search-global-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.fv-search-global-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 4. Main Body Splitter Layout */
.fv-main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Sidebar (Left Folder Tree) */
.fv-sidebar {
  width: var(--tree-width);
  min-width: 180px;
  max-width: 500px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fv-sidebar-section {
  padding: 8px 12px 4px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-subtle);
}

.fv-quick-links {
  list-style: none;
  padding: 4px 8px;
}

.fv-quick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  font-size: 12px;
  transition: background 0.12s;
}

.fv-quick-item:hover {
  background: var(--bg-hover);
}

.fv-quick-item.active {
  background: var(--bg-selected);
  color: var(--primary);
  font-weight: 500;
}

.fv-quick-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.fv-quick-item.active svg {
  color: var(--primary);
}

.fv-tree-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px;
}

/* Tree Nodes */
.fv-tree-node {
  margin: 1px 0;
}

.fv-tree-row {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}

.fv-tree-row:hover {
  background: var(--bg-hover);
}

.fv-tree-row.active {
  background: var(--bg-selected);
  color: var(--primary);
  font-weight: 500;
}

.fv-tree-toggle {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.fv-tree-toggle.expanded svg {
  transform: rotate(90deg);
}

.fv-tree-toggle.leaf {
  visibility: hidden;
}

.fv-tree-icon {
  margin: 0 6px 0 2px;
  display: flex;
  align-items: center;
  color: #e8a838;
}

.fv-tree-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.fv-tree-children {
  padding-left: 18px;
  display: none;
}

.fv-tree-children.open {
  display: block;
}

/* Sidebar Bottom (Storage Widget) */
.fv-storage-widget {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-sidebar);
}

.fv-storage-header {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-main);
}

.fv-progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.fv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0078d4, #2b88d8);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.fv-storage-details {
  font-size: 11px;
  color: var(--text-muted);
}

/* Splitter Bar */
.fv-splitter {
  width: 4px;
  background: transparent;
  cursor: col-resize;
  position: relative;
  z-index: 10;
  transition: background 0.15s;
}

.fv-splitter:hover, .fv-splitter.dragging {
  background: var(--primary);
}

/* Explorer Main Pane */
.fv-content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  overflow: hidden;
  position: relative;
}

/* Selection Info Bar - Always visible to prevent layout shift & misclicks */
.fv-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fv-selection-bar.active {
  background: var(--primary-light);
  border-bottom: 1px solid var(--item-border-selected);
  color: var(--primary);
}

.fv-sel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fv-sel-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
}

.fv-sel-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.fv-sel-btn.danger {
  color: var(--danger);
  border-color: rgba(217, 56, 58, 0.3);
}

.fv-sel-btn.danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.fv-sel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
  color: #fff;
}

/* Explorer Canvas / File Container */
.fv-explorer-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: 8px;
}

/* Drag to select box */
.fv-selection-marquee {
  position: absolute;
  background: rgba(0, 120, 212, 0.15);
  border: 1px solid #0078d4;
  pointer-events: none;
  display: none;
  z-index: 50;
}

/* Empty State */
.fv-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 65%;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
}

.fv-empty-state.visible {
  display: flex;
}

.fv-empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-subtle);
  opacity: 0.6;
}

/* 5. View Modes */
/* Mode A: DETAILS (Table) */
.fv-view-details {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.fv-view-details thead th {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11.5px;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  z-index: 5;
}

.fv-view-details thead th:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.fv-view-details tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  cursor: default;
  transition: background 0.1s;
}

.fv-view-details tbody tr:hover {
  background: var(--bg-hover);
}

.fv-view-details tbody tr.selected {
  background: var(--bg-selected) !important;
  color: var(--text-main);
}

.fv-view-details td {
  padding: 5px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.fv-item-col-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fv-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.fv-file-icon-sm {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Mode B: LARGE ICONS (Grid) */
.fv-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  padding: 8px;
}

.fv-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: default;
  text-align: center;
  position: relative;
  transition: all 0.12s;
}

.fv-grid-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-color);
}

.fv-grid-item.selected {
  background: var(--bg-selected);
  border-color: var(--item-border-selected);
}

.fv-grid-item .fv-item-checkbox {
  position: absolute;
  top: 6px;
  left: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

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

.fv-grid-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}

.fv-grid-icon svg {
  width: 48px;
  height: 48px;
}

.fv-grid-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.fv-grid-name {
  font-size: 11.5px;
  line-height: 1.3;
  width: 100%;
  max-width: 100px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.fv-grid-size {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Mode C: MEDIUM ICONS */
.fv-view-medium {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 6px;
}

.fv-view-medium .fv-grid-icon svg {
  width: 36px;
  height: 36px;
}

/* Mode D: TILES (Horizontal Cards) */
.fv-view-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 6px;
}

.fv-tile-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: default;
  gap: 10px;
  position: relative;
  transition: all 0.12s;
}

.fv-tile-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-color);
}

.fv-tile-item.selected {
  background: var(--bg-selected);
  border-color: var(--item-border-selected);
}

.fv-tile-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fv-tile-info {
  flex: 1;
  overflow: hidden;
}

.fv-tile-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fv-tile-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* File Type SVG Color Coding */
.file-icon-folder { color: #f59e0b; fill: #fef3c7; }
.file-icon-doc { color: #2563eb; }
.file-icon-sheet { color: #16a34a; }
.file-icon-slide { color: #ea580c; }
.file-icon-pdf { color: #dc2626; }
.file-icon-image { color: #9333ea; }
.file-icon-audio { color: #db2777; }
.file-icon-video { color: #e11d48; }
.file-icon-zip { color: #d97706; }
.file-icon-code { color: #0284c7; }
.file-icon-text { color: #64748b; }
.file-icon-default { color: #6b7280; }

/* 6. Status Bar */
.fv-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  background: var(--header-bg);
  border-top: 1px solid var(--border-color);
  font-size: 11.5px;
  color: var(--text-muted);
  height: 26px;
}

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

.fv-status-sep {
  color: var(--border-color);
}

/* 7. Context Menu */
.fv-context-menu {
  position: fixed;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 4px 0;
  min-width: 190px;
  z-index: 1000;
  display: none;
}

.fv-menu-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 10px;
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.fv-menu-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.fv-menu-item.danger:hover {
  background: #fee2e2;
  color: var(--danger);
}

.fv-menu-item svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.fv-menu-item:hover svg {
  color: inherit;
}

.fv-menu-shortcut {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-subtle);
}

.fv-menu-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* 8. Modals & Dialogs */
.fv-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.fv-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.fv-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fv-modal-overlay.open .fv-modal {
  transform: translateY(0) scale(1);
}

.fv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--header-bg);
}

.fv-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fv-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.fv-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.fv-modal-body {
  padding: 18px;
  overflow-y: auto;
  font-size: 13px;
}

.fv-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  background: var(--header-bg);
}

.fv-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
}

.fv-btn:hover {
  background: var(--bg-hover);
}

.fv-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.fv-btn.primary:hover {
  background: var(--primary-hover);
}

.fv-btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.fv-btn.danger:hover {
  background: var(--danger-hover);
}

/* Upload Dropzone */
.fv-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px 16px;
  text-align: center;
  background: var(--bg-sidebar);
  cursor: pointer;
  transition: all 0.2s ease;
}

.fv-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.fv-dropzone-icon {
  width: 44px;
  height: 44px;
  color: var(--primary);
  margin-bottom: 8px;
}

.fv-upload-queue {
  margin-top: 14px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fv-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.fv-upload-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.fv-upload-item-size {
  color: var(--text-muted);
  font-size: 11px;
}

/* Fullscreen Media & Document Viewer */
.fv-viewer-modal {
  max-width: 90vw;
  width: 1000px;
  height: 85vh;
}

.fv-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  position: relative;
  overflow: hidden;
}

.fv-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.fv-viewer-pdf, .fv-viewer-office {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.fv-viewer-text {
  width: 100%;
  height: 100%;
  padding: 16px;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  border: none;
  outline: none;
  resize: none;
  overflow: auto;
}

.fv-viewer-media-player {
  max-width: 90%;
  max-height: 90%;
}

.fv-viewer-toolbar {
  position: absolute;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.fv-viewer-toolbtn {
  background: none;
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fv-viewer-toolbtn:hover {
  background: rgba(255,255,255,0.2);
}

/* Form Groups */
.fv-form-group {
  margin-bottom: 12px;
}

.fv-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-main);
}

.fv-form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
}

.fv-form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Toast Notifications */
.fv-toast-container {
  position: fixed;
  bottom: 35px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.fv-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px 14px;
  min-width: 260px;
  font-size: 12.5px;
  color: var(--text-main);
  animation: slideInRight 0.25s ease;
}

.fv-toast.success { border-left-color: var(--success); }
.fv-toast.error { border-left-color: var(--danger); }
.fv-toast.warning { border-left-color: var(--warning); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Drag Drop Overlay for entire page */
.fv-page-drop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 103, 192, 0.2);
  border: 3px dashed var(--primary);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  pointer-events: none;
}

.fv-page-drop-overlay.active {
  display: flex;
}

.fv-page-drop-content {
  background: var(--bg-surface);
  padding: 24px 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
}

/* ================= NEW FEATURES STYLES ================= */

/* 1. Star / Favorite Icon */
.fv-star-btn {
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fv-star-btn:hover {
  color: #f59e0b;
  transform: scale(1.15);
}

.fv-star-btn.is-starred {
  color: #f59e0b;
}

/* 2. Tag Badges */
.fv-tag-container {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: 6px;
}

.fv-tag-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* 3. Word (.docx) Paper Viewer */
.fv-docx-viewer {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: #525659;
  padding: 24px;
  display: flex;
  justify-content: center;
}

.docx-page-content {
  background: #ffffff;
  color: #202124;
  width: 100%;
  max-width: 820px;
  min-height: 900px;
  padding: 50px 60px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border-radius: 4px;
  font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  font-size: 14px;
  user-select: text;
}

.docx-page-content h1, .docx-page-content h2, .docx-page-content h3 {
  color: #1e3a8a;
  margin: 16px 0 8px 0;
}

.docx-page-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0;
}

.docx-page-content th, .docx-page-content td {
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
}

/* 4. Excel (.xlsx) Spreadsheet Viewer */
.fv-excel-viewer {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #f8fafc;
  padding: 16px;
  user-select: text;
}

.excel-table {
  border-collapse: collapse;
  background: #ffffff;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.excel-table th, .excel-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  white-space: nowrap;
}

.excel-table thead th {
  background: #107c41;
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.excel-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* 5. Image Editor & Cropper (Desktop-Grade) */
.fv-image-editor-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0f1013;
  overflow: hidden;
}

.fv-image-editor-canvas-wrap {
  flex: 1;
  min-height: 380px;
  max-height: calc(90vh - 170px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle, #1a1b20 0%, #0d0e12 100%);
  padding: 10px;
}

.fv-img-edit-target {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Cropper.js Custom Theming */
.cropper-view-box {
  outline: 2px solid #0078d4 !important;
  outline-color: rgba(0, 120, 212, 0.85) !important;
}

.cropper-line {
  background-color: #0078d4 !important;
}

.cropper-point {
  background-color: #0078d4 !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 2px;
}

.cropper-point.point-se {
  width: 10px !important;
  height: 10px !important;
}

/* Bottom Toolbar */
.fv-image-editor-toolbar {
  background: #18191e;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  border-top: 1px solid #2a2c35;
  flex-wrap: wrap;
  z-index: 10;
}

.fv-img-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fv-tool-group-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
  user-select: none;
}

.fv-btn-toggle-group {
  display: inline-flex;
  background: #242630;
  border-radius: 4px;
  padding: 2px;
  border: 1px solid #333642;
}

.fv-btn-pill {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fv-btn-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.fv-btn-pill.active {
  background: #0078d4;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 120, 212, 0.4);
}

.fv-btn-sm {
  background: #242630;
  border: 1px solid #333642;
  color: #cbd5e1;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fv-btn-sm:hover {
  background: #2d303c;
  color: #fff;
  border-color: #444756;
}

.fv-btn-sm.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.fv-btn-sm.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.fv-img-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 11.5px;
}

.fv-img-slider {
  width: 80px;
  height: 4px;
  accent-color: #0078d4;
  cursor: pointer;
}

.fv-slider-val {
  font-size: 10.5px;
  color: #cbd5e1;
  min-width: 32px;
  font-family: monospace;
}

/* 6. PDF.js Desktop Viewer */
.fv-pdf-viewer-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #383a3f;
  overflow: hidden;
}

.fv-pdf-toolbar {
  background: #1e1f23;
  color: #fff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 1px solid #121316;
  z-index: 10;
  flex-wrap: wrap;
}

.fv-pdf-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fv-pdf-divider {
  width: 1px;
  height: 20px;
  background: #474a52;
  margin: 0 4px;
}

.fv-pdf-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fv-pdf-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.fv-pdf-btn-text {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fv-pdf-btn-text:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.fv-pdf-page-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.fv-pdf-page-input {
  width: 44px;
  background: #111215;
  color: #fff;
  border: 1px solid #474b54;
  border-radius: 3px;
  text-align: center;
  font-size: 12px;
  padding: 2px 4px;
}

.fv-pdf-total-pages {
  font-size: 12px;
  color: #94a3b8;
}

.fv-pdf-zoom-val {
  font-size: 12px;
  color: #cbd5e1;
  min-width: 42px;
  text-align: center;
  font-family: monospace;
}

.fv-pdf-scroll-area {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.fv-pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #e2e8f0;
  font-size: 13px;
  margin-top: 40px;
}

.fv-pdf-canvas-card {
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  background: #fff;
  border-radius: 3px;
  line-height: 0;
  transition: transform 0.15s ease;
}

.fv-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #0078d4;
  border-radius: 50%;
  animation: fvSpin 0.8s linear infinite;
}

@keyframes fvSpin {
  to { transform: rotate(360deg); }
}

/* ======================================================
   MOBILE & RESPONSIVE DESIGN
   ====================================================== */

/* Mobile-only elements hidden on desktop */
.fv-mobile-only {
  display: none !important;
}

/* Sidebar overlay for mobile (backdrop when sidebar is open) */
.fv-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
}

/* ---- Tablet breakpoint (≤1024px) ---- */
@media (max-width: 1024px) {
  .fv-ribbon-btn span {
    display: none;
  }
  .fv-ribbon-btn {
    min-width: 36px;
    padding: 5px 6px;
    height: 36px;
  }
  .fv-ribbon-btn svg {
    margin-bottom: 0;
  }
  .fv-sidebar {
    width: 220px;
    min-width: 180px;
  }
  .fv-search-box {
    width: 160px;
  }
}

/* ---- Mobile breakpoint (≤768px) ---- */
@media (max-width: 768px) {
  .fv-mobile-only {
    display: inline-flex !important;
  }

  /* Topbar compact */
  .fv-topbar {
    height: 44px;
    padding: 4px 10px;
  }
  .fv-badge {
    display: none;
  }
  .fv-title {
    font-size: 13px;
  }
  .fv-logo {
    width: 24px;
    height: 24px;
  }
  .fv-logo svg {
    width: 14px;
    height: 14px;
  }

  /* Ribbon: horizontal scroll, icon-only */
  .fv-ribbon {
    padding: 4px 6px;
    gap: 2px;
    min-height: 42px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .fv-ribbon::-webkit-scrollbar {
    display: none;
  }
  .fv-ribbon-btn span {
    display: none;
  }
  .fv-ribbon-btn {
    min-width: 34px;
    padding: 4px 5px;
    height: 34px;
  }
  .fv-ribbon-btn svg {
    width: 16px;
    height: 16px;
    margin-bottom: 0;
  }
  .fv-ribbon-sep {
    height: 20px;
    margin: 0 3px;
  }

  /* Address bar compact */
  .fv-address-bar {
    padding: 3px 6px;
    height: 34px;
    gap: 4px;
  }
  .fv-nav-btn {
    width: 26px;
    height: 26px;
  }
  .fv-breadcrumbs-wrapper {
    height: 26px;
    padding: 2px 6px;
  }
  .fv-breadcrumb-item {
    font-size: 11px;
    padding: 2px 4px;
  }

  /* Search box: full-width on mobile */
  .fv-search-box {
    width: 100%;
    min-width: 100px;
    flex: 1;
  }

  /* Sidebar: off-canvas drawer */
  .fv-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    border-right: 1px solid var(--border-color);
  }
  .fv-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }
  .fv-sidebar-overlay.active {
    display: block;
  }

  /* Hide splitter on mobile */
  .fv-splitter {
    display: none;
  }

  /* Content pane takes full width */
  .fv-content-pane {
    min-width: 0;
  }

  /* Grid view: smaller tiles on mobile */
  .fv-view-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    padding: 6px;
  }
  .fv-grid-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
  }
  .fv-grid-icon svg {
    width: 36px;
    height: 36px;
  }
  .fv-grid-thumb {
    width: 44px;
    height: 44px;
  }
  .fv-grid-name {
    font-size: 10.5px;
    max-width: 80px;
  }

  /* Tiles view: single column on mobile */
  .fv-view-tiles {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* Details table: make scrollable and compact */
  .fv-explorer-container {
    padding: 4px;
  }
  .fv-view-details {
    font-size: 12px;
  }
  .fv-view-details td,
  .fv-view-details thead th {
    padding: 5px 6px;
  }

  /* Selection bar compact */
  .fv-selection-bar {
    padding: 4px 8px;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .fv-sel-btn {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  /* Statusbar compact */
  .fv-statusbar {
    font-size: 10.5px;
    padding: 3px 8px;
    height: 24px;
  }

  /* Modals: full-width on mobile */
  .fv-modal {
    width: 95%;
    max-width: none;
    max-height: 90vh;
    margin: 8px;
    border-radius: var(--radius-md);
  }
  .fv-modal-header {
    padding: 10px 14px;
  }
  .fv-modal-title {
    font-size: 13px;
  }
  .fv-modal-body {
    padding: 12px 14px;
  }
  .fv-modal-footer {
    padding: 10px 14px;
  }

  /* Viewer modal: near full-screen on mobile */
  .fv-viewer-modal {
    width: 100%;
    max-width: 100vw;
    height: 95vh;
    border-radius: var(--radius-sm);
    margin: 0;
  }

  /* Image editor: full-screen on mobile */
  #imageEditorModal .fv-modal {
    max-width: 100vw !important;
    width: 100% !important;
    height: 100vh !important;
    border-radius: 0 !important;
    margin: 0;
  }
  .fv-image-editor-toolbar {
    padding: 6px 8px;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .fv-img-tool-group {
    flex-shrink: 0;
  }
  .fv-tool-group-label {
    font-size: 10.5px;
  }
  .fv-btn-pill {
    font-size: 10px;
    padding: 3px 6px;
  }
  .fv-btn-sm {
    font-size: 10.5px;
    padding: 3px 8px;
  }

  /* PDF viewer toolbar: wrap + compact on mobile */
  .fv-pdf-toolbar {
    padding: 6px 8px;
    gap: 6px;
  }
  .fv-pdf-btn {
    width: 28px;
    height: 28px;
  }
  .fv-pdf-btn-text {
    font-size: 10.5px;
    padding: 3px 8px;
  }

  /* Context menu */
  .fv-context-menu {
    max-width: 85vw;
  }

  /* Toast: wider on mobile */
  .fv-toast-container {
    left: 10px;
    right: 10px;
    bottom: 30px;
  }
  .fv-toast {
    min-width: auto;
    width: 100%;
  }

  /* Upload dropzone: smaller */
  .fv-dropzone {
    padding: 20px 12px;
  }
  .fv-dropzone-icon {
    width: 36px;
    height: 36px;
  }

  /* Form inputs: larger touch targets */
  .fv-form-input {
    padding: 10px 10px;
    font-size: 14px;
  }
  .fv-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* ---- Small phone breakpoint (≤480px) ---- */
@media (max-width: 480px) {
  .fv-topbar {
    height: 40px;
    padding: 3px 8px;
  }
  .fv-title {
    font-size: 12px;
  }

  /* Hide some less critical ribbon buttons on small phones */
  #btnZip, #btnUnzip, #btnBatchRename, #btnEditImage, #btnManageTags,
  #btnViewMedium, #btnViewTiles {
    display: none;
  }

  /* Address bar: hide up/forward buttons to save space */
  #btnNavForward, #btnNavUp {
    display: none;
  }

  /* Grid view: even tighter */
  .fv-view-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 6px;
  }
  .fv-grid-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 4px;
  }
  .fv-grid-icon svg {
    width: 30px;
    height: 30px;
  }
  .fv-grid-thumb {
    width: 38px;
    height: 38px;
  }
  .fv-grid-name {
    font-size: 10px;
  }

  /* Medium icons: tighter */
  .fv-view-medium {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
  }

  /* Details view: hide date & size columns on very small phones */
  .fv-view-details .fv-col-date,
  .fv-view-details .fv-col-tags {
    display: none;
  }

  /* Sidebar drawer narrower */
  .fv-sidebar {
    width: 260px;
  }

  /* Viewer modal */
  .fv-viewer-modal {
    height: 100vh;
    border-radius: 0;
  }

  /* Storage widget compact */
  .fv-storage-widget {
    padding: 8px 10px;
  }
  .fv-storage-header {
    font-size: 10.5px;
  }

  /* Slider compact */
  .fv-img-slider {
    width: 60px;
  }
}

