/* ============================================================
   Vibration Drive – Main Stylesheet
   Premium dark design with glassmorphism effects
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg: #0f0f17;
  --bg2: #16161f;
  --bg3: #1e1e2d;
  --surface: #22223a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e2ef;
  --text-muted: #8282a8;
  --primary: #6366f1;
  --primary-h: #4f52d6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: all 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-h);
}
img,
video,
audio {
  max-width: 100%;
}
code {
  font-family: "Courier New", monospace;
  font-size: 0.85em;
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Navbar (public) ───────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-brand a {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-links a {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-links a:hover {
  background: var(--bg3);
  color: var(--text);
}
.nav-search {
  margin-left: auto;
  display: flex;
}
.nav-search input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.9rem;
  min-width: 200px;
}
.nav-search button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
}

/* ── Main layout ──────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ── Flash messages ───────────────────────────────────── */
.flash-container {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}
.flash {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.flash-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}
.flash-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}
.flash-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--warning);
  color: var(--warning);
}
.flash-info {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-h);
  color: #fff;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg3);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-full {
  width: 100%;
  justify-content: center;
}
.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-sm.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-sm.btn-success {
  background: var(--success);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-sm.btn-warning {
  background: var(--warning);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-sm.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
}

/* ── Forms ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.input-field {
  width: 100%;
  padding: 0.55rem 0.8rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
}
.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.input-select {
  padding: 0.45rem 0.75rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.input-color {
  width: 48px;
  height: 36px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
}
.input-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
}
.textarea-mono {
  font-family: monospace;
  resize: vertical;
}
.form-checks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.check-label input {
  accent-color: var(--primary);
}
.form-actions {
  margin-top: 1.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Cards ────────────────────────────────────────────── */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.file-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.file-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.file-card-link {
  display: block;
  padding: 1.25rem;
  color: var(--text);
}
.file-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.file-name {
  font-weight: 500;
  font-size: 0.9rem;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.file-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.file-tags-mini {
  font-size: 0.75rem;
  color: var(--primary);
  margin-top: 0.3rem;
}

/* ── Tags ─────────────────────────────────────────────── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.tag-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  border: 1px solid;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

/* ── Browse table ─────────────────────────────────────── */
.file-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.file-table th,
.data-table th {
  background: var(--bg3);
  color: var(--text-muted);
}
.file-table th,
.file-table td,
.data-table th,
.data-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.file-table tr:hover td,
.data-table tr:hover td {
  background: var(--bg2);
}
.data-table.small-table td,
.data-table.small-table th {
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
}
.file-icon-cell {
  font-size: 1.2rem;
}

/* ── Folders ─────────────────────────────────────────── */
.folder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--warning);
  min-width: 100px;
  transition: var(--transition);
}
.folder-item:hover {
  border-color: var(--warning);
  transform: translateY(-2px);
}
.folder-item span {
  font-size: 0.85rem;
  color: var(--text);
}

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--primary);
}
.browse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.sort-link {
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.sort-link.active {
  background: var(--primary);
  color: #fff;
}

/* ── File detail ──────────────────────────────────────── */
.file-detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .file-detail-card {
    grid-template-columns: 1fr;
  }
}
.file-detail-preview {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
}
.preview-image {
  width: 100%;
  height: auto;
  display: block;
}
.player-container {
  padding: 1.5rem;
}
.audio-player,
.audio-player-full {
  width: 100%;
}
.video-player,
.video-player-full {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}
.pdf-preview {
  width: 100%;
  height: 500px;
  border: none;
}
.no-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
}
.file-detail-info {
}
.file-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.file-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.file-meta-list {
  list-style: none;
  margin-bottom: 1rem;
}
.file-meta-list dt {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}
.file-meta-list dd {
  font-size: 0.9rem;
}
.file-meta-list .sha256 {
  font-family: monospace;
  font-size: 0.75rem;
  word-break: break-all;
}
.file-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.file-actions {
  margin-top: 1rem;
}
.file-versions {
  margin-top: 1.5rem;
}
.file-versions h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.file-versions ul {
  list-style: none;
  font-size: 0.85rem;
}
.file-versions li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

/* ── Upload page ──────────────────────────────────────── */
.upload-page h2 {
  margin-bottom: 0.5rem;
}
.upload-hint {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.drop-zone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(99, 102, 241, 0.05);
}
.drop-zone:hover,
.drop-zone.drag-over {
  background: rgba(99, 102, 241, 0.1);
  border-color: #fff;
}
.drop-zone i {
  color: var(--primary);
  margin-bottom: 1rem;
}
.file-label {
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}
.upload-meta-form {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.file-queue {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.queue-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}
.qi-name {
  font-weight: 500;
  font-size: 0.9rem;
}
.qi-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0;
}
.qi-progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.4rem 0;
}
.qi-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width 0.2s;
  border-radius: 3px;
}
.qi-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.upload-results {
  margin-top: 1rem;
}

/* ── Articles ─────────────────────────────────────────── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.article-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}
.article-card:hover {
  border-color: var(--primary);
}
.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.article-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.article-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.article-detail {
  max-width: 800px;
}
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.article-header time {
  color: var(--text-muted);
}
.article-body {
  line-height: 1.8;
}
.article-attachments {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* ── Media ────────────────────────────────────────────── */
.media-page h2 {
  margin-bottom: 0.5rem;
}
.media-player-wrap {
  margin: 1.5rem 0;
}
.transcription-block {
  margin-top: 1.5rem;
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.transcription-text {
  white-space: pre-wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-height: 400px;
  overflow-y: auto;
}

/* ── Pagination ───────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.3rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.page-btn {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}
.page-btn:hover {
  background: var(--bg3);
}
.page-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ── Admin layout ─────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 0.75rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-nav {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sidebar-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--bg3);
  color: var(--text);
}
.sidebar-nav a.logout-link:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}
.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.admin-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-header h1 {
  font-size: 1.2rem;
  font-weight: 600;
}
.admin-header-user {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.admin-content {
  padding: 1.5rem;
  flex: 1;
}

/* ── Dashboard stats ──────────────────────────────────── */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.dash-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.dash-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ── Settings ─────────────────────────────────────────── */
.settings-layout {
  max-width: 900px;
}
.settings-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.settings-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.token-rotate-form {
  margin-top: 1.5rem;
}
.workspace-selector {
  margin-bottom: 1.5rem;
}

/* ── Two-col admin ────────────────────────────────────── */
.admin-two-col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .admin-two-col {
    grid-template-columns: 1fr;
  }
}
.col-list h3,
.col-form h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.tags-admin-list,
.cat-admin-item,
.tag-admin-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tag-admin-item,
.cat-admin-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}
.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

/* ── Login page ───────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f17 100%);
}
.login-container {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
}
.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
.login-brand h1 {
  font-size: 1.4rem;
  margin-top: 0.4rem;
}
.login-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Workspace header / storage ───────────────────────── */
.ws-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.ws-info h2 {
  font-size: 1.5rem;
}
.ws-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.storage-bar {
  min-width: 220px;
}
.storage-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}
.quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.search-results-header {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Misc ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state i {
  display: block;
  margin-bottom: 1rem;
}
.text-muted {
  color: var(--text-muted);
}
.text-center {
  text-align: center;
}
.small {
  font-size: 0.8rem;
}
.breadcrumb-simple {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.audit-layout {
}
.file-name-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.attach-role {
  font-size: 0.75rem;
}

/* ── Shared Links ─────────────────────────────────────── */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.link-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.link-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.link-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.link-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.link-card:hover .link-thumb {
  transform: scale(1.05);
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  color: #fff;
  opacity: 0.8;
}
.link-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.link-site {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.link-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.link-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.link-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card-glass {
  background: rgba(22, 22, 31, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }
  .admin-main {
    margin-left: 0;
  }
  .navbar {
    flex-wrap: wrap;
  }
  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .link-grid {
    grid-template-columns: 1fr;
  }
  .nav-search {
    flex: 1 1 100%;
  }
}
