/* 
  AMF ADMIN — SWISS MODERNISM EDITION
  Typography as architecture, white space as luxury
*/

/* CSS Custom Properties */
:root {
  /* Pure monochrome palette */
  --ink: #000000;
  --paper: #FFFFFF;
  --grey-900: #111111;
  --grey-700: #333333;
  --grey-500: #666666;
  --grey-300: #999999;
  --grey-100: #E5E5E5;
  --grey-50: #F5F5F5;
  
  /* Accent: International Klein Blue */
  --accent: #0000FF;
  --accent-dim: rgba(0, 0, 255, 0.08);
  
  /* Typography: Helvetica-forward with system fallbacks */
  --font-primary: 'Helvetica Neue', 'Helvetica', 'Arial', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Extreme negative tracking */
  --tracking-display: -0.08em;
  --tracking-headline: -0.05em;
  --tracking-body: -0.02em;
  --tracking-mono: 0.02em;
  
  /* Spatial luxury */
  --space-unit: 8px;
  --space-xs: calc(var(--space-unit) * 1);   /* 8px */
  --space-sm: calc(var(--space-unit) * 2);   /* 16px */
  --space-md: calc(var(--space-unit) * 3);   /* 24px */
  --space-lg: calc(var(--space-unit) * 6);   /* 48px */
  --space-xl: calc(var(--space-unit) * 12);  /* 96px */
  --space-xxl: calc(var(--space-unit) * 24); /* 192px */
  
  /* Grid */
  --grid-columns: 12;
  --column-gap: var(--space-md);
  --max-width: 1440px;
  
  /* Motion: Studied restraint */
  --transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset with intent */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: var(--tracking-body);
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-headline);
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3rem, 8vw, 8rem);
  letter-spacing: var(--tracking-display);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: var(--tracking-mono);
  font-family: var(--font-mono);
}

p {
  max-width: 65ch;
  margin-bottom: var(--space-md);
}

/* Links: Minimal intervention */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: border-color var(--transition);
}

a:hover {
  border-color: var(--accent);
}

/* Focus states: Accessibility without decoration */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Grid system */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  column-gap: var(--column-gap);
}

/* Admin layout: Editorial structure */
.admin-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER: Slim, functional bar
   ============================================ */
.admin-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--grey-200);
  z-index: 1000;
  height: 44px;
}

.admin-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  max-width: none;
}

.admin-logo {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grey-700);
}

.admin-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.admin-nav a {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border: none;
  padding: 4px 0;
  position: relative;
  color: var(--grey-500);
  transition: color 0.15s;
}

.admin-nav a:hover {
  color: var(--ink);
}

.admin-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.15s;
}

.admin-nav a:hover::after,
.admin-nav a.active::after {
  width: 100%;
}

.admin-nav a.active {
  font-weight: 600;
  color: var(--ink);
}

/* User badge: Minimal */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}

.user-role {
  padding: 2px 6px;
  background: var(--ink);
  color: var(--paper);
  text-transform: uppercase;
  font-size: 0.55rem;
}

/* Global Search Bar - Compact */
.global-search-container {
  position: relative;
  flex: 1;
  max-width: 280px;
  margin: 0 24px;
}

.global-search-input {
  width: 100%;
  padding: 6px 12px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.15s;
  border-radius: 0;
}

.global-search-input:focus {
  border-color: var(--grey-400);
  outline: none;
  background: var(--paper);
}

.global-search-input::placeholder {
  color: var(--grey-400);
  text-transform: uppercase;
}

.global-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--grey-300);
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.global-search-result-section {
  border-bottom: 1px solid var(--grey-100);
}

.global-search-section-header {
  padding: 6px 10px;
  background: var(--grey-50);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--grey-500);
}

.global-search-result-item {
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--grey-50);
}

.global-search-result-item:hover {
  background: var(--grey-50);
}

.global-search-result-title {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.global-search-result-meta {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--grey-400);
  text-transform: uppercase;
}

.global-search-no-results {
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--grey-400);
  text-transform: uppercase;
}

/* ============================================
   MAIN LAYOUT: Compact sidebar + content
   ============================================ */
.admin-main {
  flex: 1;
  margin-top: 44px;
  padding: 16px 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
}

.admin-sidebar {
  border-right: 1px solid var(--grey-200);
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 60px;
  height: fit-content;
}

.admin-content {
  min-width: 0;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin-bottom: 4px;
}

.admin-sidebar .admin-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-sidebar .admin-nav a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-bottom: none;
  cursor: pointer;
  color: var(--grey-600);
  transition: all 0.1s;
  margin-left: -8px;
}

.admin-sidebar .admin-nav a:hover {
  background: var(--grey-50);
  color: var(--ink);
}

.admin-sidebar .admin-nav a.active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.admin-sidebar .admin-nav a::after {
  display: none;
}

.admin-sidebar .admin-nav a.active {
  font-weight: 700;
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--ink);
    padding-right: 0;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    flex-direction: row;
    gap: var(--space-lg);
    overflow-x: auto;
  }
  
  .admin-sidebar .admin-nav {
    flex-direction: row;
    gap: var(--space-md);
  }
}

/* Section markers: "01 — SECTION TITLE" format */
.section {
  margin-bottom: var(--space-xxl);
  width: 100%;
  overflow: visible; /* Ensure sections don't clip content */
}

/* Section markers - minimal */
.section-marker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--grey-200);
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--grey-400);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
}

/* Remove the echo effect - too distracting */
.section-title::after {
  display: none;
}

/* Buttons: Brutalist elegance */
/* Buttons - compact */
.btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--grey-300);
  cursor: pointer;
  transition: all 0.1s;
  position: relative;
}

.btn:hover {
  background: var(--grey-100);
  border-color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

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

.btn-danger {
  color: #c62828;
  border-color: #ffcdd2;
}

.btn-danger:hover {
  background: #ffcdd2;
  border-color: #c62828;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.55rem;
}

/* ============================================
   COVERS GRID: Compact items
   ============================================ */
.covers-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.cover-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--grey-100);
  overflow: hidden;
  cursor: move;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--grey-200);
}

/* Remove the rotations - cleaner look */
.cover-item:nth-child(3n+1),
.cover-item:nth-child(3n+2) {
  transform: none;
}

.cover-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.15s;
}

/* Remove grayscale filter - show images in color */
.cover-item:hover .cover-image {
  filter: none;
}

/* Cover metadata - minimal overlay */
.cover-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.15s;
}

.cover-item:hover .cover-meta {
  opacity: 1;
}

.cover-index {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--grey-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s;
}

.cover-item:hover .cover-index {
  opacity: 1;
}

/* Dropzone: Minimal intervention */
.dropzone {
  border: 1px dashed var(--grey-400);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 8px;
}

.dropzone:hover,
.dropzone.active {
  border-color: var(--ink);
  background: var(--grey-50);
}

.dropzone.dragover {
  border-color: #00cc66;
  border-style: solid;
  border-width: 2px;
  background: rgba(0, 204, 102, 0.08);
}

.dropzone-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  line-height: 1.6;
}

/* Audio artist card drop target state */
.audio-artist-card.drop-target {
  border: 2px solid #00cc66 !important;
  background: rgba(0, 204, 102, 0.15) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 204, 102, 0.3);
}

/* Forms: Studied restraint */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--grey-300);
  color: var(--ink);
  font-family: var(--font-primary);
  font-size: 1rem;
  letter-spacing: var(--tracking-body);
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--ink);
  outline: none;
}

/* Asset repository: Grid-breaking layout */
.asset-browser {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-lg);
  min-height: 600px;
}

.folder-panel {
  border-right: 1px solid var(--grey-300);
  padding-right: 8px;
}

.folder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder-item {
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.1s;
  border-left: 2px solid transparent;
  padding-left: 6px;
  text-transform: uppercase;
}

.folder-item:hover {
  border-left-color: var(--grey-400);
}

.folder-item.active {
  border-left-color: var(--ink);
  font-weight: 600;
}

/* Asset grid */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.asset-item {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--grey-50);
  overflow: hidden;
}

.asset-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition), filter var(--transition);
}

.asset-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

/* Multi-select enhancements */
.folder-item.drop-target {
  background: var(--accent-dim);
  border-left-color: var(--accent);
}

.asset-item {
  border: 2px solid transparent;
  transition: all var(--transition);
}

.asset-item.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.asset-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Asset preview + overlay */
.asset-preview {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}

.asset-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-sm) var(--space-sm);
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.0));
  color: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asset-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-action {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  opacity: 0.8;
}

.asset-checkbox {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  width: 20px;
  height: 20px;
  z-index: 10;
  accent-color: var(--accent);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
}

.asset-multi-select-mode .asset-checkbox,
.asset-item:hover .asset-checkbox,
.asset-item.selected .asset-checkbox {
  opacity: 1;
}

.asset-content {
  position: relative;
  height: 100%;
}

.asset-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: var(--space-xs);
  transform: translateY(100%);
  transition: transform var(--transition);
}

.asset-item:hover .asset-info,
.asset-item.selected .asset-info {
  transform: translateY(0);
}

.asset-name-input {
  background: transparent;
  border: none;
  color: white;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  width: 100%;
  margin-bottom: var(--space-xs);
}

.asset-name-input:focus {
  outline: 1px solid var(--accent);
}

.asset-url {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  opacity: 0.7;
  cursor: pointer;
  margin-bottom: var(--space-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-url:hover {
  opacity: 1;
}

.asset-delete {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.5);
  color: white;
  font-size: 0.625rem;
  padding: 2px 6px;
  cursor: pointer;
}

.asset-delete:hover {
  background: rgba(255, 0, 0, 0.4);
}

/* Multi-select controls */
.multi-select-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.asset-multi-select-mode .multi-select-controls #selectAllBtn,
.asset-multi-select-mode .multi-select-controls #deselectAllBtn {
  display: inline-block !important;
}

.selection-counter {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: var(--tracking-mono);
}

/* Drag preview */
.drag-preview {
  background: var(--accent);
  color: white;
  padding: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  border-radius: 4px;
}

/* Dragging state */
.dragging-assets .asset-item.selected {
  opacity: 0.5;
}

.dragging-assets .folder-item {
  position: relative;
}

.dragging-assets .folder-item::after {
  content: 'DROP HERE';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.625rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.dragging-assets .folder-item.drop-target::after {
  opacity: 1;
}

/* Media Library Enhancements */
.media-library-toggle {
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  transition: all var(--transition);
  margin-left: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.media-library-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}

.toggle-icon {
  transition: transform var(--transition);
}

.media-library-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.recently-added-preview {
  margin: var(--space-lg) 0;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--grey-100);
}

.recently-added-preview h3 {
  margin-bottom: var(--space-md);
  color: var(--grey-500);
}

.recent-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  max-height: 200px;
  overflow-y: auto;
}

.recent-asset-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--grey-50);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.recent-asset-item:hover {
  transform: scale(1.02);
}

.recent-asset-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-asset-item .asset-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: var(--space-xs);
  font-size: 0.625rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--grey-100);
}

.view-modes {
  display: flex;
  gap: var(--space-xs);
}

.view-mode-btn {
  background: none;
  border: 1px solid var(--grey-300);
  color: var(--grey-500);
  font-size: 1rem;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 40px;
}

.view-mode-btn:hover,
.view-mode-btn.active {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--grey-50);
}

.library-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.search-input {
  background: var(--grey-50);
  border: 1px solid var(--grey-300);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  width: 200px;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--ink);
  outline: none;
}

.sort-select {
  background: var(--grey-50);
  border: 1px solid var(--grey-300);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition);
}

.sort-select:focus {
  border-color: var(--ink);
  outline: none;
}

/* List View */
.asset-grid.list-view {
  display: block;
}

.asset-grid.list-view .asset-item {
  display: grid;
  grid-template-columns: 60px 1fr auto auto auto;
  gap: var(--space-md);
  align-items: center;
  aspect-ratio: unset;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--grey-100);
  background: transparent;
}

.asset-grid.list-view .asset-item:hover {
  background: var(--grey-50);
}

.asset-grid.list-view .asset-item img,
.asset-grid.list-view .asset-item video {
  width: 60px;
  height: 60px;
  border-radius: 4px;
}

.list-view-name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

.list-view-size,
.list-view-date,
.list-view-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
}

/* Coverflow View */
.asset-grid.coverflow-view {
  display: flex;
  overflow-x: auto;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  scroll-behavior: smooth;
}

.asset-grid.coverflow-view .asset-item {
  flex: 0 0 300px;
  height: 300px;
  transform-style: preserve-3d;
  transition: all var(--transition);
}

.asset-grid.coverflow-view .asset-item:hover {
  transform: scale(1.05) rotateY(5deg);
}

.asset-grid.coverflow-view .asset-item img,
.asset-grid.coverflow-view .asset-item video {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .view-controls {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }
  
  .library-actions {
    justify-content: space-between;
  }
  
  .search-input {
    width: 150px;
  }
}

/* Toast: Editorial announcement */
.toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  transform: translateY(200%);
  transition: transform var(--transition);
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
}

.toast.show {
  transform: translateY(0);
}

.toast.has-action .toast-undo-btn {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  padding: 2px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.toast.has-action .toast-undo-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

/* Loading state: Minimal indicator */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

/* Responsive: Graceful degradation */
@media (max-width: 1024px) {
  :root {
    --space-xxl: calc(var(--space-unit) * 16);
  }
  
  .covers-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --space-xxl: calc(var(--space-unit) * 12);
  }
  
  h1 {
    font-size: clamp(2rem, 6vw, 4rem);
  }
  
  .admin-header {
    height: 60px;
  }
  
  .admin-main {
    margin-top: 60px;
    padding: var(--space-xl) 0;
  }
  
  .asset-browser {
    grid-template-columns: 1fr;
  }
  
  .folder-panel {
    border-right: none;
    border-bottom: 1px solid var(--ink);
    padding-right: 0;
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
  }
}

/* Print styles: Gallery catalog aesthetic */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .admin-header,
  .btn,
  .dropzone {
    display: none;
  }
  
  .cover-image {
    filter: grayscale(100%) contrast(1.2);
  }
}

/* Reduced motion: Respect user preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Batch mode enhancements */
.batch-active .cover-item {
  cursor: pointer;
}

.batch-active .cover-item.selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.batch-active .cover-item.selected .cover-index {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

/* Search functionality */
.search-container {
  margin-bottom: var(--space-xl);
}

.search-input {
  width: 100%;
  max-width: 240px;
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--grey-300);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.search-input:focus {
  outline: none;
  border-color: var(--grey-500);
}

.search-input::placeholder {
  color: var(--grey-400);
}

/* Modal: Full editorial treatment */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

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

.modal-content {
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: var(--space-xl);
}

/* Side-panel variant for cover editing */
.modal-side {
  justify-content: flex-end;
  align-items: stretch;
}

.modal-content-side {
  max-width: 520px;
  width: 520px;
  height: 100vh;
  max-height: 100vh;
  border-left: 1px solid var(--ink);
  border-right: none;
  border-top: none;
  border-bottom: none;
  padding: var(--space-xl);
  box-shadow: -12px 0 40px rgba(0,0,0,0.25);
  box-sizing: border-box;
  overflow-x: hidden;
}

.modal-side .modal-header {
  position: sticky;
  top: 0;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  background: linear-gradient(to bottom, var(--paper) 70%, rgba(255,255,255,0));
  z-index: 1;
}

.modal-side #modalBody {
  padding-right: var(--space-sm);
}

@media (max-width: 900px) {
  .modal-content-side {
    width: 100%;
    max-width: 100%;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-xl);
}

.modal-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: var(--tracking-headline);
  text-transform: uppercase;
}

.modal-close {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--ink);
}

.modal-close:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Sortable.js styles */
.sortable-ghost {
  opacity: 0.4;
}

.sortable-chosen {
  transform: scale(1.05);
}

.sortable-drag {
  opacity: 0;
}

/* Asset dropzone specific styles */
.asset-content {
  position: relative;
}

/* Create new folder modal */
.folder-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: var(--space-xl);
  z-index: 2000;
  min-width: 400px;
}

/* Image selection modal */
.image-selector {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.image-selector.active {
  opacity: 1;
  pointer-events: auto;
}

.image-selector-content {
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: var(--space-xl);
}

.image-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.image-selector-item {
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.image-selector-item:hover {
  border-color: var(--grey-500);
}

.image-selector-item.selected {
  border-color: var(--accent);
}

.image-selector-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition);
}

.image-selector-item:hover img {
  filter: grayscale(0%);
}

/* ===================
   ENHANCED COVERS INTERFACE STYLES
   =================== */

/* Recently Edited Section */
.recently-edited-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-200);
  width: 100%;
  overflow: hidden;
}

.subsection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.subsection-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--grey-600);
}

.btn-text {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--grey-700);
  cursor: pointer;
  transition: color var(--transition);
}

.btn-text:hover {
  color: var(--ink);
}

.recent-covers-grid {
  display: flex;
  gap: var(--space-md);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: var(--space-sm);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* Ensure the container doesn't shrink */
  flex-shrink: 0;
  /* Add some padding on the right for the last item */
  padding-right: var(--space-md);
}

.recent-covers-grid::-webkit-scrollbar {
  height: 8px;
}

.recent-covers-grid::-webkit-scrollbar-track {
  background: var(--grey-200);
}

.recent-covers-grid::-webkit-scrollbar-thumb {
  background: var(--grey-600);
  border-radius: 4px;
}

.recent-covers-grid .cover-item {
  flex: 0 0 120px;
  min-width: 120px;
  height: 120px;
  position: relative;
}

/* Ensure last item is visible */
.recent-covers-grid .cover-item:last-child {
  margin-right: var(--space-lg);
}

/* Compact cover items for recent section */
.cover-item-compact {
  flex: 0 0 120px;
  min-width: 120px;
  height: 120px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cover-item-compact:hover {
  transform: scale(1.05);
}

.cover-item-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.cover-meta-compact {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Ensure last compact item is visible */
.recent-covers-grid .cover-item-compact:last-child {
  margin-right: var(--space-lg);
}

/* Sortable ghost styling for drag and drop */
.sortable-ghost {
  opacity: 0.4;
  background: var(--grey-100);
  border: 2px dashed var(--grey-400);
  border-radius: 8px;
}

/* Ensure cover items are draggable */
.cover-item {
  cursor: move;
}

.cover-item-compact {
  cursor: move;
}

/* Disable drag cursor in batch mode */
.batch-mode .cover-item,
.batch-mode .cover-item-compact {
  cursor: pointer;
}

/* Enhanced Controls */
/* Controls toolbar - compact */
.covers-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--grey-200);
  background: var(--grey-50);
  position: sticky;
  top: 52px;
  z-index: 500;
}

.view-mode-toggles {
  display: flex;
  gap: 2px;
}

.view-toggle {
  width: 28px;
  height: 28px;
  border: 1px solid var(--grey-300);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
  font-family: var(--font-mono);
}

.view-toggle:hover {
  border-color: var(--grey-500);
  background: var(--paper);
}

.view-toggle.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.view-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.search-filter-container {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .search-filter-container {
    flex-direction: row;
    align-items: center;
  }
  
  .search-input {
    flex: 1;
    max-width: none;
  }
}

.filter-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 5px 8px;
  border: 1px solid var(--grey-300);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--grey-500);
}

/* Batch Operations */
.batch-operations {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border: 1px solid var(--accent);
  background: var(--accent-dim);
}

.batch-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 700;
}

.batch-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Batch Toolbar for Assets and Audio */
.batch-toolbar {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 400px;
  backdrop-filter: blur(10px);
}

.batch-toolbar .batch-info {
  color: var(--paper);
  font-weight: 600;
}

.batch-toolbar .batch-actions .btn {
  background: var(--paper);
  color: var(--ink);
  border: none;
}

.batch-toolbar .batch-actions .btn:hover {
  background: var(--grey-100);
}

.batch-toolbar .batch-actions .btn-danger {
  background: #ff4444;
  color: var(--paper);
}

.batch-toolbar .batch-actions .btn-danger:hover {
  background: #ff6666;
}

/* ============================================
   Audio Management Styles - COMPACT LAYOUT
   ============================================ */

.audio-browser {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.audio-content {
  padding: 8px;
}

.audio-grid {
  display: grid;
  gap: 8px;
}

/* Artist hubs - compact horizontal pills */
.audio-artist-hubs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  margin-bottom: 8px;
}

.audio-artist-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--grey-300);
  background: var(--paper);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.7rem;
  transition: all 0.1s;
}

.audio-artist-card:hover {
  border-color: var(--grey-500);
}

.audio-artist-card.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.audio-artist-card.drop-target {
  border-color: #00cc66 !important;
  background: rgba(0, 204, 102, 0.1) !important;
}

.audio-artist-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grey-300);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.audio-artist-avatar.all {
  background: var(--grey-800);
}

.audio-artist-avatar.unassigned {
  background: var(--grey-400);
}

.audio-artist-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-artist-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.audio-artist-count {
  font-size: 0.6rem;
  opacity: 0.5;
}

.audio-artist-card.active .audio-artist-count {
  opacity: 0.7;
}

/* Hide these in compact mode */
.audio-artist-label,
.audio-artist-unassigned {
  display: none;
}

@media (max-width: 768px) {
  .audio-browser {
    grid-template-columns: 1fr;
  }
  
  .audio-artist-hubs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

/* ============================================
   iTunes-Style Compact Audio List
   ============================================ */

/* Table header */
.audio-table-header {
  display: grid;
  grid-template-columns: 20px 24px 1fr 100px 50px 80px;
  gap: 6px;
  padding: 4px 8px;
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-300);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey-500);
  position: sticky;
  top: 0;
  z-index: 10;
}

.audio-table-header span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Audio list container */
.audio-list {
  border: 1px solid var(--grey-300);
  background: var(--paper);
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

/* Audio row - ultra compact */
.audio-row {
  display: grid;
  grid-template-columns: 20px 24px 1fr 100px 50px 80px;
  gap: 6px;
  padding: 3px 8px;
  border-bottom: 1px solid var(--grey-100);
  align-items: center;
  transition: background 0.08s ease;
  cursor: default;
  min-height: 28px;
}

.audio-row:hover {
  background: var(--grey-50);
}

.audio-row.selected {
  background: rgba(0, 102, 255, 0.06);
}

.audio-row.playing {
  background: rgba(0, 204, 102, 0.06);
}

.audio-row.dragging {
  opacity: 0.5;
}

/* Checkbox column */
.audio-row-checkbox {
  width: 12px;
  height: 12px;
  cursor: pointer;
  accent-color: var(--ink);
}

/* Play button column */
.audio-play-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.1s ease;
  font-size: 9px;
  color: var(--grey-500);
}

.audio-play-btn:hover {
  background: var(--grey-200);
  color: var(--ink);
}

.audio-row.playing .audio-play-btn {
  background: #00cc66;
  color: white;
}

/* Title column */
.audio-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.audio-title-input {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  width: 100%;
  padding: 1px 3px;
  margin: -1px -3px;
  border-radius: 2px;
}

.audio-title-input:hover {
  background: var(--grey-100);
}

.audio-title-input:focus {
  background: var(--paper);
  outline: 1px solid var(--grey-400);
}

/* Artist column */
.audio-artist {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--grey-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.audio-artist:hover {
  color: var(--ink);
}

.audio-artist.unassigned {
  color: var(--grey-400);
  font-style: italic;
}

/* Duration column */
.audio-duration {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--grey-400);
  text-align: right;
}

/* Actions column - hidden by default, show on hover */
.audio-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.1s;
}

.audio-row:hover .audio-actions {
  opacity: 1;
}

.audio-action-btn {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  font-size: 9px;
  color: var(--grey-400);
  transition: all 0.08s ease;
}

.audio-action-btn:hover {
  background: var(--grey-200);
  color: var(--ink);
}

.audio-action-btn.danger:hover {
  background: #ffcdd2;
  color: #c62828;
}

/* Now playing bar - compact */
.audio-now-playing {
  position: sticky;
  bottom: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 12px;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.audio-now-playing.active {
  display: flex;
}

.audio-now-playing-info {
  flex: 1;
  min-width: 0;
}

.audio-now-playing-title {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-now-playing-artist {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  opacity: 0.6;
  text-transform: uppercase;
}

.audio-now-playing-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.audio-now-playing-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.1s;
}

.audio-now-playing-btn:hover {
  background: rgba(255,255,255,0.2);
}

.audio-now-playing-btn.play {
  width: 32px;
  height: 32px;
  background: white;
  color: var(--ink);
}

.audio-progress {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.audio-progress-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.audio-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  min-width: 32px;
  text-align: center;
}

/* Move modal */
.audio-move-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.audio-move-modal.active {
  display: flex;
}

.audio-move-content {
  background: var(--paper);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.audio-move-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  margin-bottom: 16px;
}

.audio-move-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.audio-move-option {
  padding: 12px;
  border: 1px solid var(--grey-300);
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-move-option:hover {
  background: var(--grey-50);
  border-color: var(--ink);
}

.audio-move-option.selected {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ============================================
   Subfolders Section
   ============================================ */

.audio-subfolders-section {
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--grey-200);
}

.audio-subfolders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.audio-subfolders-title {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  color: var(--grey-400);
  text-transform: uppercase;
}

.audio-subfolder-add-btn {
  width: 16px;
  height: 16px;
  border: 1px solid var(--grey-400);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.audio-subfolder-add-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

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

.audio-subfolder-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.08s;
  width: 100%;
}

.audio-subfolder-btn:hover {
  background: var(--grey-50);
}

.audio-subfolder-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.audio-subfolder-btn.drop-target {
  border-color: #00cc66;
  background: rgba(0, 204, 102, 0.08);
}

.audio-subfolder-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-subfolder-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  opacity: 0.6;
  min-width: 20px;
  text-align: right;
}

.audio-subfolder-actions {
  display: none;
  gap: 2px;
}

.audio-subfolder-btn:hover .audio-subfolder-actions {
  display: flex;
}

.audio-subfolder-btn.active .audio-subfolder-actions {
  display: flex;
}

.audio-subfolder-action {
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: background 0.1s;
}

.audio-subfolder-btn:not(.active) .audio-subfolder-action {
  background: var(--grey-200);
}

.audio-subfolder-action:hover {
  background: rgba(255,255,255,0.4);
}

.audio-subfolder-btn:not(.active) .audio-subfolder-action:hover {
  background: var(--grey-300);
}

.audio-subfolder-action.danger:hover {
  background: #ffcdd2;
  color: #c62828;
}

/* Subfolder badges in track list */
.audio-title-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.audio-subfolder-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.audio-subfolder-badge {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  padding: 0 4px;
  background: var(--grey-100);
  color: var(--grey-500);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.audio-row.playing .audio-subfolder-badge {
  background: rgba(0, 204, 102, 0.15);
  color: #00994d;
}

/* Legacy support - hide old styles */
.audio-item {
  display: none;
}

.audio-item-content {
  display: none;
}

.audio-checkbox {
  margin-top: var(--space-sm);
}

.audio-player {
  min-width: 0;
}

.audio-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 200px;
}

.audio-filename {
  padding: var(--space-sm);
  border: 1px solid var(--grey-300);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.audio-url {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-500);
  cursor: pointer;
  word-break: break-all;
  padding: var(--space-sm);
  background: var(--grey-50);
  border: 1px solid var(--grey-100);
}

.audio-url:hover {
  background: var(--grey-100);
  color: var(--accent);
}

/* View Modes */
.covers-main-container {
  margin-bottom: var(--space-xl);
}

/* Grid View (Enhanced) */
.covers-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
}

.covers-view-grid .cover-item {
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--paper);
  border: 1px solid transparent;
}

.covers-view-grid .cover-item:hover {
  transform: translateY(-4px);
  border-color: var(--grey-300);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.covers-view-grid .cover-item.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.covers-view-grid .cover-item .batch-checkbox {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 20px;
  height: 20px;
  z-index: 10;
  opacity: 0;
  transition: opacity var(--transition);
}

.batch-active .covers-view-grid .cover-item .batch-checkbox {
  opacity: 1;
}

/* List View */
.covers-view-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--grey-100);
}

.covers-view-list .cover-item-list {
  display: grid;
  grid-template-columns: 60px 1fr auto auto auto;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--paper);
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
}

.covers-view-list .cover-item-list:hover {
  background: var(--grey-50);
}

.covers-view-list .cover-item-list.selected {
  background: var(--accent-dim);
}

.covers-view-list .cover-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition);
}

.covers-view-list .cover-item-list:hover .cover-thumb {
  filter: grayscale(0%);
}

.covers-view-list .cover-meta-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.covers-view-list .cover-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-body);
}

.covers-view-list .cover-artist {
  font-size: 0.75rem;
  color: var(--grey-700);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
}

.covers-view-list .cover-categories {
  font-size: 0.625rem;
  color: var(--grey-500);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
}

.covers-view-list .cover-date {
  font-size: 0.75rem;
  color: var(--grey-500);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
}

.covers-view-list .cover-actions {
  display: flex;
  gap: var(--space-xs);
  opacity: 0;
  transition: opacity var(--transition);
}

.covers-view-list .cover-item-list:hover .cover-actions {
  opacity: 1;
}

/* Coverflow View */
.covers-view-coverflow {
  display: flex;
  overflow-x: auto;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.covers-view-coverflow::-webkit-scrollbar {
  height: 4px;
}

.covers-view-coverflow::-webkit-scrollbar-track {
  background: var(--grey-100);
}

.covers-view-coverflow::-webkit-scrollbar-thumb {
  background: var(--grey-500);
  border-radius: 2px;
}

.covers-view-coverflow .cover-item-coverflow {
  flex: 0 0 auto;
  width: 250px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.covers-view-coverflow .cover-item-coverflow:hover {
  transform: scale(1.05) translateY(-8px);
}

.covers-view-coverflow .cover-item-coverflow.focused {
  transform: scale(1.1) translateY(-12px);
  z-index: 10;
}

.covers-view-coverflow .cover-image-coverflow {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition-slow);
}

.covers-view-coverflow .cover-item-coverflow:hover .cover-image-coverflow,
.covers-view-coverflow .cover-item-coverflow.focused .cover-image-coverflow {
  filter: grayscale(0%);
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.page-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--grey-700);
}

/* Actions */
.covers-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* Enhanced Cover Items */
.cover-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition-slow);
}

.cover-item:hover .cover-image {
  filter: grayscale(20%);
}

.cover-index {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 24px;
  height: 24px;
  background: var(--paper);
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  transition: all var(--transition);
}

.cover-meta {
  padding: var(--space-md);
  font-size: 0.75rem;
  line-height: 1.3;
}

.cover-meta > div:first-child {
  text-transform: uppercase;
  letter-spacing: var(--tracking-body);
  margin-bottom: var(--space-xs);
}

.cover-meta > div:last-child {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--grey-700);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, var(--grey-100) 25%, var(--grey-50) 50%, var(--grey-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .covers-controls {
    padding: var(--space-md);
  }
  
  .search-filter-container {
    flex-direction: column;
  }
  
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .covers-view-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-md);
  }
  
  .covers-view-list .cover-item-list {
    grid-template-columns: 50px 1fr auto;
    gap: var(--space-sm);
  }
  
  .covers-view-list .cover-date,
  .covers-view-list .cover-actions {
    display: none;
  }
  
  .covers-view-coverflow .cover-item-coverflow {
    width: 200px;
  }
  
  .covers-actions {
    justify-content: center;
  }
} 

/* Enhanced Asset Controls */
/* Asset controls - compact single line */
.asset-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid var(--grey-200);
  background: var(--paper);
  position: sticky;
  top: 52px;
  z-index: 500;
}

.asset-search-filter-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.asset-search-filter-container .search-input {
  flex: 1;
  max-width: 200px;
  padding: 5px 8px;
  font-size: 0.55rem;
}

.asset-filter-controls {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.asset-filter-controls .filter-select {
  padding: 4px 6px;
  font-size: 0.5rem;
}

.asset-view-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.asset-view-modes {
  display: flex;
  gap: 2px;
}

.view-mode-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--grey-300);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.view-mode-btn:hover {
  border-color: var(--grey-700);
  background: var(--paper);
}

.view-mode-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.view-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.asset-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.asset-count-indicator {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 3px 6px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
}

@media (max-width: 768px) {
  .asset-controls {
    padding: 6px;
    gap: 4px;
  }
  
  .asset-search-filter-container .search-input {
    max-width: 120px;
  }
} 

/* Audio controls - compact single line */
.audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid var(--grey-200);
  background: var(--paper);
  position: sticky;
  top: 52px;
  z-index: 500;
}

.audio-search-filter-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .audio-search-filter-container {
    flex-direction: row;
    align-items: center;
  }
  
  .audio-search-filter-container .search-input {
    flex: 1;
    max-width: none;
  }
}

.audio-filter-controls {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.audio-view-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.audio-view-modes {
  display: flex;
  gap: var(--space-xs);
}

.audio-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.audio-count-indicator {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  padding: var(--space-xs) var(--space-sm);
  background: var(--paper);
  border: 1px solid var(--grey-300);
}

@media (max-width: 768px) {
  .audio-controls {
    padding: var(--space-md);
  }
  
  .audio-filter-controls {
    flex-direction: column;
  }
  
  .audio-view-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .audio-view-modes {
    justify-content: center;
  }
  
  .audio-actions {
    justify-content: space-between;
  }
} 

/* Advanced Filters */
.advanced-filters {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  border: 1px solid var(--grey-300);
  background: var(--paper);
  border-radius: 0;
}

.advanced-filters-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--grey-100);
}

.advanced-filters-header h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--grey-700);
  margin: 0;
}

.advanced-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--grey-700);
}

.date-range-inputs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.date-input {
  flex: 1;
  padding: var(--space-sm);
  border: 1px solid var(--grey-300);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: border-color var(--transition);
}

.date-input:focus {
  border-color: var(--ink);
  outline: none;
}

.date-separator {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.quick-filter-btn {
  padding: var(--space-xs) var(--space-sm);
  background: transparent;
  border: 1px solid var(--grey-300);
  color: var(--grey-700);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  cursor: pointer;
  transition: all var(--transition);
}

.quick-filter-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--grey-50);
}

.quick-filter-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.quick-filter-btn[data-filter="clear"] {
  border-color: var(--grey-500);
  color: var(--grey-500);
}

.quick-filter-btn[data-filter="clear"]:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 768px) {
  .advanced-filters-grid {
    grid-template-columns: 1fr;
  }
  
  .date-range-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .date-separator {
    text-align: center;
    padding: var(--space-xs) 0;
  }
  
  .quick-filters {
    justify-content: stretch;
  }
  
  .quick-filter-btn {
    flex: 1;
    text-align: center;
  }
} 