/* ===== CSS Variables ===== */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #22c55e;
  --warning: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-sm: 4px;
  --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-gray { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-outline:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }

.btn-success {
  background: var(--success);
  color: var(--white);
}
.btn-success:hover:not(:disabled) { background: #16a34a; }

.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 0.375rem;
  min-width: 2rem;
  min-height: 2rem;
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-input::placeholder { color: var(--gray-400); }

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

textarea.form-input { resize: vertical; min-height: 80px; }

/* ===== Toggle Switch ===== */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.toggle-wrap input[type="checkbox"] { display: none; }
.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--gray-300);
  border-radius: 11px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.toggle-wrap input:checked + .toggle-track { background: var(--primary); }
.toggle-wrap input:checked + .toggle-track::after { transform: translateX(18px); }

/* ===== Login Page ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.login-card .subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.login-error {
  background: #fef2f2;
  color: var(--danger);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid #fecaca;
}

/* ===== App Layout ===== */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Nav */
.top-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav .brand {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tabs {
  display: flex;
  gap: 0;
  height: 100%;
}

.nav-tab {
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.nav-tab:hover { color: var(--gray-700); }
.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.username-label {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ===== Main Content Area ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-panel { display: none; flex: 1; }
.tab-panel.active { display: flex; flex-direction: column; }

/* ===== Files Tab Layout ===== */
.files-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar - Directory Tree */
.sidebar {
  width: 240px;
  border-right: 1px solid var(--gray-200);
  background: var(--white);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.dir-tree-item {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: background var(--transition);
  gap: 0.375rem;
  user-select: none;
}
.dir-tree-item:hover { background: var(--gray-100); }
.dir-tree-item.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }

.dir-tree-item .icon { font-size: 1rem; flex-shrink: 0; }
.dir-tree-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dir-children { padding-left: 1rem; }

.dir-tree-item .expand-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.dir-tree-item .expand-icon.expanded { transform: rotate(90deg); }

/* Content Area */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gray-50);
}

/* Breadcrumb */
.breadcrumb-bar {
  padding: 0.75rem 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.breadcrumb-item:hover { color: var(--primary); background: var(--primary-light); }
.breadcrumb-item.current { color: var(--gray-800); font-weight: 500; cursor: default; }
.breadcrumb-item.current:hover { background: transparent; color: var(--gray-800); }
.breadcrumb-sep { color: var(--gray-300); font-size: 0.75rem; }

/* Toolbar */
.toolbar {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

/* Upload Zone */
.upload-zone {
  margin: 1rem;
  padding: 2rem;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  text-align: center;
  background: var(--white);
  transition: all var(--transition);
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--gray-400); }
.upload-zone .upload-text { color: var(--gray-500); font-size: 0.875rem; }
.upload-zone .upload-text strong { color: var(--primary); }
.upload-zone .upload-hint { color: var(--gray-400); font-size: 0.75rem; margin-top: 0.25rem; }

.upload-progress {
  margin: 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.upload-progress .progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.375rem;
}
.upload-progress .progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.upload-progress .progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--gray-600);
}

/* File List */
.file-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.file-list-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
}
.file-list-empty .empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }

.file-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 0.5rem;
}

.file-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.file-table td {
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover td { background: var(--gray-50); }

.file-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.file-name .file-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.file-name .file-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray-800);
}
.file-name .file-name-text:hover { color: var(--primary); }

.file-actions {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.file-share-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  font-size: 0.8125rem;
  cursor: pointer;
}
.file-share-count:hover { text-decoration: underline; }

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-lg { max-width: 700px; }

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-600); }

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Share success box */
.share-result-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  word-break: break-all;
  user-select: all;
}

/* Inline dir create */
.inline-create {
  padding: 0.5rem 0.75rem;
  display: flex;
  gap: 0.375rem;
}
.inline-create input {
  flex: 1;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  outline: none;
}

/* ===== Settings Tab ===== */
.settings-panel {
  max-width: 600px;
  padding: 1.5rem;
}

.settings-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.settings-section h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.watermark-preview {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  position: relative;
  min-height: 150px;
  overflow: hidden;
}

.watermark-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ===== Accounts Tab ===== */
.accounts-panel {
  max-width: 600px;
  padding: 1.5rem;
}

.accounts-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1.25rem;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.account-row:last-child { border-bottom: none; }
.account-row .account-name { font-weight: 500; }

/* ===== Access Log Table ===== */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.log-table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.log-table td {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.log-table tr:hover td { background: var(--gray-50); }
.log-table-wrap { overflow-x: auto; }

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 250px;
  max-width: 400px;
  pointer-events: auto;
  animation: toast-in 0.3s ease;
  border-left: 4px solid var(--gray-400);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }

.toast-out { animation: toast-out 0.3s ease forwards; }

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===== Color Preview ===== */
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.color-input-wrap input[type="color"] {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 2px;
  cursor: pointer;
}
.color-input-wrap .color-hex {
  font-size: 0.8125rem;
  color: var(--gray-600);
  font-family: monospace;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .files-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }

  .nav-tabs { gap: 0; }
  .nav-tab { padding: 0 0.625rem; font-size: 0.8125rem; }

  .top-nav { padding: 0 0.75rem; }

  .file-table th:nth-child(3),
  .file-table td:nth-child(3) {
    display: none;
  }

  .file-actions { gap: 0.125rem; }
  .file-actions .btn-sm { padding: 0.25rem 0.375rem; font-size: 0.75rem; }

  .modal { max-width: 100%; margin: 0.5rem; }

  .toolbar { padding: 0.375rem 0.75rem; }

  .upload-zone { margin: 0.5rem; padding: 1.5rem 1rem; }

  .breadcrumb-bar { padding: 0.5rem 0.75rem; }
}

@media (max-width: 480px) {
  .top-nav .brand span { display: none; }
  .username-label { display: none; }

  .sidebar { max-height: 160px; }
}

/* ===== Spinner ===== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Share Panel (inline expansion) */
.share-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 4px 0 8px 0;
  overflow: hidden;
}
.share-panel-inner { padding: 12px; }
.share-panel-header {
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.share-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.share-table th { background: #f1f5f9; padding: 6px 8px; text-align: left; font-weight: 600; color: #64748b; border-bottom: 1px solid #e2e8f0; }
.share-table td { padding: 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.share-table tr:last-child td { border-bottom: none; }
.share-link-url { font-size: 0.78rem; color: #2563eb; word-break: break-all; }
.share-alias { font-size: 0.75rem; color: #64748b; margin-top: 2px; }
.share-panel-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }

/* Access Log Panel (inline) */
.access-log-panel td { padding: 0; }
.log-panel-inner { padding: 12px; background: #fffbeb; border-radius: 6px; margin: 4px; }
.log-header { font-weight: 600; font-size: 0.85rem; color: #92400e; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.log-table th { background: #fef3c7; padding: 5px 8px; text-align: left; font-weight: 600; color: #92400e; }
.log-table td { padding: 5px 8px; border-bottom: 1px solid #fef9c7; }

/* Button variants */
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-link { background: none; color: #2563eb; text-decoration: underline; border: none; }

/* File Table */
.file-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.file-table th {
  background: #f8fafc;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}
.file-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; }
.file-table tr:hover { background: #f8fafc; }
.file-table .col-icon { width: 32px; text-align: center; }
.file-table .col-name { min-width: 200px; }
.file-table .col-size { width: 80px; color: #94a3b8; font-size: 0.8rem; }
.file-table .col-date { width: 140px; color: #94a3b8; font-size: 0.8rem; }
.file-table .col-actions { width: 200px; white-space: nowrap; }
.file-table .file-name { font-weight: 500; color: #1e293b; }

/* Action Links (inline, not buttons) */
.action-link {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 4px;
  font-size: 0.78rem;
  color: #2563eb;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s;
}
.action-link:hover { background: #eff6ff; }
.action-link.action-danger { color: #dc2626; }
.action-link.action-danger:hover { background: #fef2f2; }
.action-link.has-shares { color: #059669; font-weight: 600; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  font-size: 0.95rem;
}
