@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Shadcn Zinc Theme - Light */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;

  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;

  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;

  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;

  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;

  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;

  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 10% 3.9%;

  --radius: 0.5rem;

  /* Additional Premium Colors */
  --folder: 35 100% 50%;
  /* Modern Amber */
  --file-blue: 217 91% 60%;
  --file-green: 142 71% 45%;
  --file-purple: 262 83% 58%;
}

[data-theme="dark"] {
  /* Shadcn Zinc Theme - Dark */
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;

  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;

  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;

  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;

  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;

  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;

  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

body {
  font-family: 'Inter', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
}

/* Layout Structure */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

body.sidebar-open {
  overflow: hidden;
}

/* Utility Classes */
.h-full {
  height: 100%;
}

.w-full {
  width: 100%;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.p-4 {
  padding: 1rem;
}

.border-b {
  border-bottom: 1px solid hsl(var(--border));
}

.border-r {
  border-right: 1px solid hsl(var(--border));
}

/* Header */
.header {
  min-height: 56px;
  background-color: hsl(var(--background) / 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.9rem;
  z-index: 50;
  gap: 0.75rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.sidebar-toggle {
  display: none;
}

/* Search Input - Shadcn Style */
.search-wrapper {
  position: relative;
  width: min(100%, 420px);
  flex: 1 1 420px;
  max-width: 520px;
}

.search-input {
  width: 100%;
  height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0 1rem 0 2.5rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.search-input:focus {
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18);
  border-color: hsl(var(--ring));
}

.search-icon-abs {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  width: 1rem;
  height: 1rem;
}

/* Sidebar */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}

.sidebar {
  width: 270px;
  flex: 0 0 270px;
  min-width: 270px;
  background-color: hsl(var(--secondary) / 0.28);
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  gap: 1.5rem;
  overflow: auto;
  transition: width 0.22s ease, min-width 0.22s ease, flex-basis 0.22s ease, padding 0.22s ease, border-color 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

body:not(.sidebar-open) .sidebar {
  width: 0;
  min-width: 0;
  flex-basis: 0;
  padding-left: 0;
  padding-right: 0;
  border-right-width: 0;
  border-right-color: transparent;
  overflow: hidden;
  opacity: 0;
}

.sidebar-card {
  background: hsl(var(--background) / 0.6);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  padding: 0.9rem;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-item:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.nav-item.active {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font-weight: 600;
}

.nav-item svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* File Panel */
.file-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--background));
  min-width: 0;
  min-height: 0;
}

/* Toolbar & Breadcrumbs */
.toolbar {
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
  gap: 0.35rem;
  background-color: hsl(var(--background));
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  width: 100%;
}

.toolbar-row-primary {
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-single-row .toolbar-row-primary {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
}

.toolbar-single-row .toolbar-caption {
  flex: 0 1 12rem;
  min-width: 0;
  display: flex;
  align-items: center;
}

.toolbar-single-row .toolbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.4rem;
  white-space: nowrap;
}

.toolbar-single-row .toolbar-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin-left: auto;
  white-space: nowrap;
}

.toolbar-single-row .breadcrumb {
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}

.toolbar-single-row .toolbar-kicker,
.toolbar-single-row .toolbar-subtitle {
  display: none;
}

.toolbar .btn {
  height: 2.25rem;
  padding: 0 0.85rem;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.toolbar .btn-icon {
  width: 2.2rem;
  height: 2.2rem;
}


.toolbar .btn svg,
.toolbar .btn i[data-lucide],
.toolbar .view-toggle svg {
  width: 1.45rem !important;
  height: 1.45rem !important;
  stroke-width: 3.25 !important;
  flex-shrink: 0;
  transform: none;
  transform-origin: center;
}

.toolbar .btn svg *,
.toolbar .view-toggle svg * {
  stroke-width: 3.25 !important;
}

.toolbar-select {
  height: 2rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0 0.65rem;
  font-size: 0.8125rem;
}

/* Merged header + toolbar bar. The .header styles provide the chrome (backdrop, border,
   sticky positioning), and we explicitly set the toolbar row to flow horizontally with
   sensible spacing for the unified bar. */
.header.toolbar.toolbar-single-row {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  gap: 0.5rem;
  min-height: 56px;
  background-color: hsl(var(--background) / 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
  z-index: 50;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-direction: row;
  /* Toolbar would have set flex-direction: column; undo it for the merged bar. */
}

.header.toolbar.toolbar-single-row > .header-toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.header.toolbar.toolbar-single-row .logo {
  flex: 0 0 auto;
}

.header.toolbar.toolbar-single-row .header-search {
  flex: 0 1 220px;
  min-width: 140px;
  max-width: 260px;
}

.header.toolbar.toolbar-single-row .breadcrumb {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.header.toolbar.toolbar-single-row .toolbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.header.toolbar.toolbar-single-row .toolbar-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-left: 0;
  white-space: nowrap;
}

.header.toolbar.toolbar-single-row .header-end {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.2rem;
  margin-left: auto;
  padding-left: 0.4rem;
  border-left: 1px solid hsl(var(--border));
}

/* Tighten the search input inside the merged bar so it doesn't dominate. */
.header.toolbar.toolbar-single-row .search-input {
  height: 2.1rem;
  font-size: 0.84rem;
}

@media (max-width: 1100px) {
  /* Drop the header search on medium screens to free up space for the file controls. */
  .header.toolbar.toolbar-single-row .header-search {
    display: none;
  }
}

@media (max-width: 820px) {
  /* Stack controls more aggressively: hide the kicker/subtitle (already hidden) and
     collapse the breadcrumb text on very small viewports. */
  .header.toolbar.toolbar-single-row .breadcrumb {
    max-width: 30vw;
  }
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  background: hsl(var(--muted));
  border-radius: calc(var(--radius) + 2px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s;
}

.breadcrumb-item:hover {
  color: hsl(var(--foreground));
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Buttons - Shadcn Variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.25rem;
  padding: 0 1rem;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  cursor: pointer;
  gap: 0.5rem;
  border: 1px solid transparent;
  background: none;
  color: hsl(var(--foreground));
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-destructive:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-destructive:disabled {
  background-color: hsl(var(--destructive) / 0.42);
  color: hsl(var(--destructive-foreground) / 0.78);
}

.btn-outline {
  border-color: hsl(var(--border));
  background-color: hsl(var(--background) / 0.72);
  color: hsl(var(--foreground));
}

[data-theme="dark"] .btn-outline {
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  color: hsl(var(--foreground));
  background-color: transparent;
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.header .btn-ghost svg {
  opacity: 0.95;
}

.btn-icon {
  width: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled,
.btn[disabled] {
  opacity: 1;
  cursor: not-allowed;
  color: hsl(var(--muted-foreground));
  border-color: hsl(var(--border));
  background-color: hsl(var(--muted) / 0.38);
  box-shadow: none;
  transform: none;
}

.btn-primary:disabled {
  background-color: hsl(var(--primary) / 0.42);
  color: hsl(var(--primary-foreground) / 0.78);
}

.btn-outline:disabled,
.btn-ghost:disabled {
  background-color: hsl(var(--muted) / 0.28);
}

[data-theme="dark"] .header .btn-ghost {
  color: hsl(var(--foreground));
}

[data-theme="dark"] .header .btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

/* File Grid */
.file-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 1.1rem;
  overflow-y: auto;
  min-height: 0;
  width: 100%;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.file-grid.virtualized,
.file-list.virtualized {
  display: block;
}

.virtual-spacer {
  width: 100%;
  pointer-events: none;
}

.virtual-grid-window {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.95rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
  position: relative;
  background: hsl(var(--card));
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.file-item:hover {
  background-color: hsl(var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.25);
}

.file-item.selected {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.65), 0 4px 14px -6px hsl(var(--primary) / 0.5);
}

/* Unmistakable “picked” badge in the corner of selected items (grid view). */
body[data-view="grid"] .file-item.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.35);
}

/* List view: a solid left accent bar so the selected row stands out at a glance. */
body[data-view="list"] .file-item.selected {
  border-left: 3px solid hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.55);
  padding-left: calc(1rem - 2px);
}

.file-icon svg {
  width: 46px;
  height: 46px;
  stroke-width: 1.75;
}

.file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  word-break: break-word;
  max-width: 100%;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-meta-sub {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* List View */
.list-header {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(8px);
}

body[data-view="list"] .list-header,
.list-header.is-visible {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 110px 90px 110px;
}

.list-header-name {
  min-width: 0;
}

.list-header-type,
.list-header-size,
.list-header-date {
  text-align: right;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-list .file-item,
.virtual-list-window .file-item {
  flex-direction: row;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid hsl(var(--border));
  align-items: center;
  text-align: left;
  background: hsl(var(--card));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.file-list .file-item:hover,
.virtual-list-window .file-item:hover {
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.22);
}

.file-list .file-info-main,
.virtual-list-window .file-info-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.file-text-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.file-path {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(48vw, 420px);
}

.file-list .file-icon,
.virtual-list-window .file-icon {
  margin-bottom: 0;
}

.file-list .file-icon svg,
.virtual-list-window .file-icon svg {
  width: 22px;
  height: 22px;
}

.file-list-meta {
  display: grid;
  grid-template-columns: 110px 90px 110px;
  gap: 0.75rem;
  align-items: center;
  justify-items: end;
  min-width: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.file-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.file-type-folder {
  background: hsl(var(--folder) / 0.14);
  border-color: hsl(var(--folder) / 0.35);
  color: hsl(var(--folder));
}

.file-type-image {
  background: hsl(var(--file-blue) / 0.14);
  border-color: hsl(var(--file-blue) / 0.35);
  color: hsl(var(--file-blue));
}

.file-type-video {
  background: hsl(var(--file-purple) / 0.14);
  border-color: hsl(var(--file-purple) / 0.35);
  color: hsl(var(--file-purple));
}

.file-type-audio {
  background: hsl(330 81% 60% / 0.14);
  border-color: hsl(330 81% 60% / 0.35);
  color: hsl(330 81% 55%);
}

.file-type-document {
  background: hsl(var(--muted) / 0.22);
  color: hsl(var(--muted-foreground));
}

.file-type-code {
  background: hsl(var(--file-green) / 0.14);
  border-color: hsl(var(--file-green) / 0.35);
  color: hsl(var(--file-green));
}

.file-type-archive {
  background: hsl(35 100% 50% / 0.14);
  border-color: hsl(35 100% 50% / 0.35);
  color: hsl(35 100% 50%);
}

.file-size-col,
.file-date-col {
  min-width: 0;
  text-align: right;
}

.virtual-list-window {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Footer (Status Bar) */
.footer {
  min-height: 34px;
  background-color: hsl(var(--secondary));
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  gap: 1.25rem;
  flex-wrap: wrap;
}


.preview-loading {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid hsl(var(--border));
}

.preview-header-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.preview-header-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--foreground));
  flex: 0 0 auto;
}

.preview-header-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.preview-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.preview-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.preview-subtitle,
.preview-footnote,
.preview-meta-label {
  color: hsl(var(--muted-foreground));
}

.preview-subtitle,
.preview-footnote {
  font-size: 0.85rem;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.preview-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.preview-meta-item {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  border-radius: calc(var(--radius) + 2px);
  padding: 0.7rem 0.85rem;
  min-width: 0;
}

.preview-meta-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.preview-meta-value {
  display: block;
  font-size: 0.9rem;
  word-break: break-word;
}

.preview-media-shell,
.preview-code-shell {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--background));
  overflow: hidden;
}

.preview-media-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  margin-bottom: 0.9rem;
}

.preview-audio-shell {
  padding: 1rem;
}

.preview-frame {
  width: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.preview-frame-pdf {
  min-height: 70vh;
}

.preview-media {
  display: block;
  max-width: 100%;
  max-height: 70vh;
}

.preview-image {
  border-radius: calc(var(--radius) + 2px);
  object-fit: contain;
}

.preview-video {
  width: 100%;
  max-height: 70vh;
  border-radius: calc(var(--radius) + 2px);
  background: #000;
}

.preview-audio {
  width: 100%;
}

.preview-code-shell {
  margin-bottom: 0.9rem;
  max-height: 65vh;
  overflow: auto;
  background: hsl(var(--muted) / 0.35);
}

.preview-code {
  margin: 0;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre;
  color: hsl(var(--foreground));
}

.preview-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  border: 1px dashed hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--muted) / 0.28);
}

.preview-empty svg {
  width: 2rem;
  height: 2rem;
  opacity: 0.75;
}

.preview-footnote {
  line-height: 1.5;
}


/* Upload Drop Zone in Modal */
.drop-zone {
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.2s;
  background-color: hsl(var(--background));
}

.drop-zone.drag-over {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--secondary));
}

.drop-icon-large {
  width: 64px;
  height: 64px;
  color: hsl(var(--muted-foreground));
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.modal.show {
  pointer-events: auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.modal-content {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(100vw - 1.5rem, 560px);
  max-width: 560px;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 10px);
  padding: 1.25rem;
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s ease;
  z-index: 101;
}

.modal.show .modal-overlay {
  opacity: 1;
  pointer-events: auto;
}

.modal.show .modal-content {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background-color: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.25rem;
  min-width: 200px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 200;
}

.context-menu.show {
  display: block;
  animation: scaleIn 0.1s ease-out;
}

.context-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 4px;
  /* Local radius for menu items */
  cursor: pointer;
  transition: background-color 0.1s;
}

.context-item:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.context-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.context-separator {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 0.25rem 0;
}

/* Animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Progress Bar */
.progress-track {
  height: 6px;
  width: 100%;
  background-color: hsl(var(--secondary));
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: hsl(var(--primary));
  transition: width 0.3s ease;
}

/* Type Colors */
.folder-icon {
  color: hsl(var(--folder));
  fill: currentColor;
}

.image-icon {
  color: hsl(var(--file-blue));
}

.video-icon {
  color: hsl(var(--file-purple));
}

.doc-icon {
  color: hsl(var(--muted-foreground));
}

.code-icon {
  color: hsl(var(--file-green));
}

.zip-icon {
  color: #f59e0b;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

/* Responsive & mobile shell */
@media (max-width: 980px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 30px 0 60px -30px rgba(0,0,0,0.35);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .toolbar-row-primary {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
  }

  .toolbar-caption {
    display: none;
  }

  .toolbar-actions,
  .toolbar-controls {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
    white-space: nowrap;
  }

  .toolbar-controls {
    width: auto;
    margin-left: auto;
  }

  .toolbar .btn,
  .toolbar-select {
    height: 1.85rem;
  }

  .toolbar .btn {
    padding: 0 0.55rem;
  }

  .toolbar .btn-icon {
    width: 1.85rem;
    height: 1.85rem;
  }
}

@media (max-width: 680px) {
  .header {
    min-height: 52px;
    padding: 0 0.65rem;
    gap: 0.5rem;
  }

  .search-wrapper {
    width: min(100%, 240px);
    flex: 1 1 240px;
  }

  .toolbar {
    padding: 0.75rem;
  }

  .toolbar-row-primary {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .toolbar-caption {
    display: none;
  }

  .toolbar-actions,
  .toolbar-controls {
    gap: 0.25rem;
    flex-wrap: nowrap;
  }

  .toolbar .btn,
  .toolbar-select {
    height: 1.9rem;
  }

  .toolbar .btn {
    padding: 0 0.6rem;
  }

  .toolbar .btn-icon {
    width: 1.9rem;
  }

  body[data-view="list"] .list-header,
  .list-header.is-visible {
    grid-template-columns: minmax(0, 1.4fr) 72px 62px 76px;
    padding: 0.65rem 0.8rem;
    gap: 0.5rem;
  }

  .file-path {
    display: none;
  }

  .file-list-meta {
    grid-template-columns: 72px 62px 76px;
    gap: 0.5rem;
    font-size: 0.75rem;
  }

  .file-list .file-item,
  .virtual-list-window .file-item {
    padding: 0.75rem 0.85rem;
  }

  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
  }

  .file-container {
    padding: 0.85rem;
  }

  .footer {
    padding: 0 0.75rem;
    gap: 0.75rem;
    font-size: 0.7rem;
  }
}

@media (max-height: 820px) {
  .header {
    min-height: 56px;
    padding: 0 1.25rem;
  }

  .toolbar {
    padding: 0.45rem 0.75rem;
    gap: 0.3rem;
  }

  .toolbar-row-primary {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .toolbar-caption {
    display: none;
  }

  .toolbar-actions,
  .toolbar-controls {
    gap: 0.25rem;
    flex-wrap: nowrap;
  }

  .toolbar .btn,
  .toolbar-select {
    height: 1.9rem;
  }

  .toolbar .btn {
    padding: 0 0.6rem;
  }

  .toolbar .btn-icon {
    width: 1.9rem;
  }

  .toolbar-row-secondary {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .file-container {
    padding-top: 0.85rem;
    padding-bottom: 0.9rem;
  }

  .footer {
    min-height: 30px;
    padding: 0 1rem;
  }
}

@media (min-width: 981px) {
  .sidebar-backdrop {
    display: none !important;
  }
}

/* ===== Clean navbar: slim breadcrumb + collapsible toolbar drawer ===== */
.navbar-clean-header {
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  gap: 0 !important;
}

.navbar-clean {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 0.6rem;
}

.logo-compact {
  flex: 0 0 auto;
  font-size: 0.95rem;
}

.logo-compact svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Breadcrumb: keep only Home / path, horizontally scrollable when long */
.breadcrumb-scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.35) transparent;
  padding: 0.35rem 0.15rem;
  mask-image: linear-gradient(to right, black 92%, transparent 100%);
}

.breadcrumb-scroll::-webkit-scrollbar {
  height: 4px;
}

.breadcrumb-scroll .breadcrumb-item {
  flex: 0 0 auto;
  max-width: min(38vw, 240px);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
}

.breadcrumb-scroll .breadcrumb-item:hover {
  background-color: hsl(var(--accent));
}

.breadcrumb-scroll .breadcrumb-item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-right: 0.35rem;
}

.breadcrumb-scroll .breadcrumb-item.is-current {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.breadcrumb-scroll .breadcrumb-separator {
  flex: 0 0 auto;
  margin: 0 0.15rem;
  opacity: 0.45;
  user-select: none;
}

.navbar-end {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.15rem;
  margin-left: auto;
  padding-left: 0.5rem;
  border-left: 1px solid hsl(var(--border));
}

.navbar-end .btn-icon {
  width: 2.1rem;
  height: 2.1rem;
}

.navbar-end .btn-icon svg {
  width: 1.15rem !important;
  height: 1.15rem !important;
  stroke-width: 2 !important;
}

#toolbarToggle.toolbar-off {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

/* Collapsible drawer holds ALL action icons (search, upload, filters, sort) */
.toolbar-drawer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
}

body.toolbar-hidden .toolbar-drawer {
  display: none;
}

.toolbar-drawer .drawer-search {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 420px;
}

.toolbar-drawer .search-input {
  height: 2.2rem;
  font-size: 0.85rem;
}

.toolbar-drawer .toolbar-actions,
.toolbar-drawer .toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Calm the icon storm: smaller, thinner icons inside the drawer */
.toolbar-drawer .btn {
  height: 2.15rem;
  padding: 0 0.75rem;
  font-size: 0.83rem;
  font-weight: 600;
}

.toolbar-drawer .btn-icon {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
}

.toolbar-drawer .btn svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
  stroke-width: 2 !important;
}

.toolbar-drawer .toolbar-select {
  height: 2.15rem;
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .logo-compact .logo-text {
    display: none;
  }

  .breadcrumb-scroll .breadcrumb-item {
    max-width: 34vw;
    font-size: 0.82rem;
    padding: 0.3rem 0.4rem;
  }

  .toolbar-drawer {
    gap: 0.45rem;
    padding: 0.5rem 0.6rem;
  }

  .toolbar-drawer .drawer-search {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* ===== Sidebar v2: clean, collapsible, navigable ===== */
.sidebar-toggle {
  display: inline-flex;
}

.sidebar-v2 {
  padding: 0;
  gap: 0;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.7rem 0.6rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  flex: 0 0 auto;
}

.sidebar-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
}

.sidebar-collapse-btn {
  width: 1.9rem;
  height: 1.9rem;
}

.sidebar-collapse-btn svg {
  width: 1.05rem !important;
  height: 1.05rem !important;
  stroke-width: 2 !important;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.6rem 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sb-section {
  border-radius: calc(var(--radius) + 2px);
}

.sb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
}

.sb-section-head:hover {
  background-color: hsl(var(--accent) / 0.55);
  color: hsl(var(--foreground));
}

.sb-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.sb-head-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.sb-chev {
  width: 0.95rem !important;
  height: 0.95rem !important;
  transition: transform 0.18s ease;
  opacity: 0.7;
}

.sb-section.is-collapsed .sb-chev {
  transform: rotate(-90deg);
}

.sb-section.is-collapsed .sb-section-body {
  display: none;
}

.sb-section-body {
  padding: 0.1rem 0 0.4rem;
}

.sb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}

.sb-icon-btn:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.sb-icon-btn svg {
  width: 0.9rem !important;
  height: 0.9rem !important;
  stroke-width: 2 !important;
}

.sidebar-v2 .nav-item {
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.86rem;
  margin-bottom: 1px;
}

.sidebar-v2 .nav-item svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.sidebar-v2 .nav-item.active {
  background-color: hsl(var(--secondary));
  box-shadow: inset 2px 0 0 hsl(var(--primary));
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sb-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  min-width: 0;
}

.sb-row:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.sb-row.active {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font-weight: 600;
  box-shadow: inset 2px 0 0 hsl(var(--primary));
}

.sb-row svg {
  width: 1rem !important;
  height: 1rem !important;
  flex-shrink: 0;
}

.sb-row-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-row-remove {
  flex: 0 0 auto;
  display: inline-flex;
  opacity: 0;
  border-radius: 5px;
  padding: 1px;
}

.sb-row:hover .sb-row-remove {
  opacity: 0.8;
}

.sb-row-remove:hover {
  background: hsl(var(--accent));
  opacity: 1 !important;
}

.sb-row-remove svg {
  width: 0.8rem !important;
  height: 0.8rem !important;
}

.sb-empty {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  opacity: 0.85;
  padding: 0.4rem 0.6rem;
  line-height: 1.45;
}

/* Folder tree */
.sb-tree {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sb-tree-node {
  min-width: 0;
}

.sb-tree-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

.sb-tree-row:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.sb-tree-row.active {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font-weight: 600;
  box-shadow: inset 2px 0 0 hsl(var(--primary));
}

.sb-tree-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 5px;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.sb-tree-toggle:hover {
  background: hsl(var(--accent));
}

.sb-tree-toggle svg {
  width: 0.85rem !important;
  height: 0.85rem !important;
  transition: transform 0.15s ease;
}

.sb-tree-toggle.is-open svg {
  transform: rotate(90deg);
}

.sb-tree-toggle.is-leaf {
  visibility: hidden;
}

.sb-tree-icon {
  flex: 0 0 auto;
  display: inline-flex;
  color: hsl(var(--folder));
}

.sb-tree-icon svg {
  width: 1rem !important;
  height: 1rem !important;
}

.sb-tree-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-tree-children {
  margin-left: 0.85rem;
  padding-left: 0.35rem;
  border-left: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-tree-loading,
.sb-tree-error {
  font-size: 0.78rem;
  color: hsl(var(--muted-foreground));
  padding: 0.3rem 0.5rem;
}

/* Storage card */
.storage-card {
  padding: 0.75rem 0.8rem;
}

.storage-top {
  align-items: baseline;
}

.storage-pct {
  font-weight: 700;
  color: hsl(var(--foreground));
}

.storage-sub {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.sidebar-foot {
  flex: 0 0 auto;
  border-top: 1px solid hsl(var(--border));
  padding: 0.5rem 0.6rem 0.7rem;
  max-height: 38%;
  overflow-y: auto;
}

.tips-card p {
  margin-bottom: 0.35rem;
  line-height: 1.5;
  font-size: 0.8rem;
}

.tips-card p:last-child {
  margin-bottom: 0;
}

body.sb-tips-hidden #tipsSection {
  display: none;
}

/* ===== Sort & recency upgrades ===== */
.list-header-cell {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.25rem;
  margin: -0.15rem -0.25rem;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.list-header-cell:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent) / 0.6);
}

.list-header-type,
.list-header-size,
.list-header-date {
  justify-content: flex-end;
}

.list-header-cell.is-sorted {
  color: hsl(var(--foreground));
}

.sort-arrow {
  font-size: 0.65rem;
  line-height: 1;
  min-width: 0.7em;
  color: hsl(var(--primary));
}

.toolbar-btn-active {
  background-color: hsl(var(--secondary)) !important;
  border-color: hsl(var(--primary) / 0.5) !important;
  color: hsl(var(--foreground)) !important;
}

.new-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: hsl(var(--file-green) / 0.16);
  border: 1px solid hsl(var(--file-green) / 0.4);
  color: hsl(var(--file-green));
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.file-date-col {
  white-space: nowrap;
}

