/* ========================================
   抖音矩阵管理系统 - 交互式管理界面
   ======================================== */

:root {
  /* Primary - Indigo */
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-primary-soft: rgba(99, 102, 241, 0.1);
  --color-primary-light: rgba(99, 102, 241, 0.05);

  /* Accent */
  --color-accent: #22d3ee;

  /* Functional */
  --color-success: #10b981;
  --color-success-soft: rgba(16, 185, 129, 0.1);
  --color-warning: #f59e0b;
  --color-warning-soft: rgba(245, 158, 11, 0.1);
  --color-danger: #ef4444;
  --color-danger-soft: rgba(239, 68, 68, 0.1);

  /* Neutrals */
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-surface-alt: #f8fafc;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;

  /* Sidebar */
  --sidebar-bg: #0f172a;
  --sidebar-surface: #1e293b;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: rgba(99, 102, 241, 0.15);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f1f5f9;
  --sidebar-indicator: #6366f1;

  /* Text */
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
}

/* ========================================
   Layout
   ======================================== */

.admin-page {
  min-height: 100vh;
  background: var(--color-bg);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ========================================
   Sidebar
   ======================================== */

.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  z-index: 100;
  overflow: hidden;
  transition: width 0.3s ease;
}

.app-sidebar.collapsed {
  width: 72px;
}

.app-sidebar.collapsed .sidebar-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-text,
.app-sidebar.collapsed .nav-section-label {
  display: none;
}

.app-sidebar.collapsed .sidebar-brand {
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.brand-text .eyebrow,
.brand-text h1 {
  display: block;
  margin: 0;
}

.brand-text .eyebrow {
  font-size: 10px;
  color: var(--sidebar-text);
  margin-bottom: 2px;
}

.brand-text h1 {
  font-size: 14px;
  font-weight: 700;
  color: var(--sidebar-text-active);
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-text-active);
}

.sidebar-toggle svg {
  transition: transform 0.3s ease;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.nav-section-label {
  display: none;
}

.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
  color: var(--sidebar-text);
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 32px;
  background: var(--sidebar-indicator);
  border-radius: 0 3px 3px 0;
}

/* Collapsed sidebar state */
.app-sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 12px;
}

.app-sidebar.collapsed .nav-icon {
  margin: 0;
}

.app-sidebar.collapsed .nav-link.active::before {
  height: 24px;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-link.active .nav-icon {
  background: var(--color-primary);
  color: white;
}

.nav-text {
  flex: 1;
  min-width: 0;
}

.nav-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sidebar-text-active);
}

.nav-text small {
  display: block;
  font-size: 11px;
  color: var(--sidebar-text);
  margin-top: 2px;
}

/* ========================================
   Main Content
   ======================================== */

:root {
  --sidebar-width: 220px;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Topbar */
.topbar {
  padding: 24px 32px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.page-breadcrumb .separator {
  opacity: 0.5;
}

.topbar h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
}

.workspace-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: var(--color-surface-alt);
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.header-user-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.header-user-status.ready {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.header-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.header-user-name .user-label {
  color: var(--muted);
}

.header-user-name strong {
  color: var(--ink);
  font-weight: 600;
}

.header-user-info .logout-btn {
  width: auto;
  padding: 8px 12px;
  font-size: 12px;
}

/* Base logout button style */
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

.import-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.import-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Banner */
.banner {
  margin: 20px 32px 0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--color-success-soft);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--color-success);
  font-weight: 600;
  font-size: 14px;
}

/* Content Area */
.content-area {
  flex: 1;
  padding: 24px 32px;
  max-width: 100%;
  overflow-x: auto;
}

/* View Panel */
.view-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.3s ease;
}

.view-panel.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Stats Row
   ======================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--stat-color-start), var(--stat-color-end));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:nth-child(1) { --stat-color-start: #6366f1; --stat-color-end: #8b5cf6; }
.stat-card:nth-child(2) { --stat-color-start: #10b981; --stat-color-end: #34d399; }
.stat-card:nth-child(3) { --stat-color-start: #a855f7; --stat-color-end: #c084fc; }
.stat-card:nth-child(4) { --stat-color-start: #f59e0b; --stat-color-end: #fbbf24; }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.15;
  background: linear-gradient(135deg, var(--stat-color-start), transparent);
}

.stat-icon.blue {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  color: #6366f1;
}

.stat-icon.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  color: #10b981;
}

.stat-icon.purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
  color: #a855f7;
}

.stat-icon.orange {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  color: #f59e0b;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  font-feature-settings: 'tnum';
}

.stat-desc {
  display: block;
  font-size: 11px;
  color: var(--subtle);
  margin-top: 6px;
  font-weight: 500;
}

/* ========================================
   Quick Actions
   ======================================== */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--action-color, #6366f1), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.action-btn:hover::before {
  opacity: 0.06;
}

.action-btn:hover .action-arrow {
  transform: translateX(4px);
  color: var(--action-color, var(--color-primary));
}

.action-btn:nth-child(1) { --action-color: #6366f1; }
.action-btn:nth-child(2) { --action-color: #10b981; }
.action-btn:nth-child(3) { --action-color: #a855f7; }

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
  color: var(--action-color, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}

.action-btn:hover .action-icon {
  transform: scale(1.05);
}

.action-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.action-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.action-text span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.action-arrow {
  color: var(--subtle);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.25s ease;
}

/* ========================================
   Content Grid
   ======================================== */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  max-width: 100%;
}

.content-card {
  background: var(--color-surface);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.content-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.content-card.full-width {
  grid-column: 1 / -1;
}

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

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.card-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 5px 12px;
  border-radius: 20px;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.refresh-btn svg {
  transition: transform 0.3s ease;
}

.refresh-btn:hover svg {
  transform: rotate(180deg);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.batch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  border: none;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.batch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Account List
   ======================================== */

.account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.account-list::-webkit-scrollbar {
  width: 6px;
}

.account-list::-webkit-scrollbar-track {
  background: transparent;
}

.account-list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--color-surface-alt);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-item:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateX(4px);
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

.account-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.account-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-ready {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.status-pending {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

/* ========================================
   Top Video Box
   ======================================== */

.top-video-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-video-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, #8b5cf6 100%);
  color: white;
}

.top-video-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 10px;
}

.top-video-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.top-video-meta {
  font-size: 13px;
  opacity: 0.8;
}

.top-video-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.jump-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jump-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Top video summary card */
.top-video-summary {
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, #8b5cf6 100%);
  color: white;
}

.top-video-summary .mini-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 10px;
}

.top-video-summary h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-video-summary p {
  font-size: 13px;
  opacity: 0.8;
  margin: 0 0 14px;
}

.top-video-summary strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ========================================
   Video Ranking
   ======================================== */

.video-ranking {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ranking-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ranking-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ranking-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.ranking-info {
  flex: 1;
}

.ranking-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-account {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.ranking-plays {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ========================================
   Auth Layout
   ======================================== */

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 100%;
}

.auth-form-section .content-card,
.auth-info-section .content-card {
  height: fit-content;
}

.import-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  border: none;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.submit-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.import-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--color-success-soft);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-success);
  margin-bottom: 12px;
}

.result-header strong {
  font-size: 15px;
}

.result-body {
  padding-left: 30px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.result-item span {
  color: var(--muted);
}

.result-item code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}

.import-copy {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Info Steps */
.info-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-step {
  display: flex;
  gap: 16px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.step-content p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ========================================
   Account Management
   ======================================== */

.account-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-item {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.metric-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.search-bar {
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 14px;
  color: var(--subtle);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Table */
.table-container {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--color-surface);
}

.table-container.video-table {
  max-height: 480px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.data-table th {
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, #f8fafc 100%);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table td.cell-tight {
  padding: 10px 14px;
}

.data-table tbody tr {
  transition: all 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--color-primary-light);
}

.data-table tbody tr {
  height: 64px;
}

.cell-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  display: block;
}

.table-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.table-status.ready {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.table-status.pending {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.table-status.error {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr.is-selected {
  background: var(--color-primary-soft);
}

.data-table tbody tr.is-selected:hover {
  background: var(--color-primary-soft);
}

.data-table tbody tr.is-selected td {
  border-color: rgba(99, 102, 241, 0.1);
}

.table-entity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.table-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.table-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
  font-size: 13px;
}

.table-id {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.cell-content {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.cell-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.table-badge.success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.table-badge.warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.table-btn:active {
  transform: scale(0.97);
}

.table-btn.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.table-btn.primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.table-btn.sync {
  background: var(--sidebar-bg);
  border-color: var(--sidebar-bg);
  color: white;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.table-btn.sync:hover {
  background: #1e293b;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.3);
}

.table-btn.danger {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--color-danger);
}

.table-btn.danger:hover {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
}

/* Compact buttons used in tables */
.compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--muted);
  white-space: nowrap;
}

.compact-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.compact-button:active {
  transform: scale(0.97);
}

.compact-button.ghost {
  background: transparent;
  border-color: transparent;
}

.compact-button.ghost:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.compact-button.disabled,
button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.compact-button.sync-button {
  background: var(--sidebar-bg);
  border-color: var(--sidebar-bg);
  color: white;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.compact-button.sync-button:hover {
  background: #1e293b;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.3);
}

/* Entity cells in tables */
.entity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entity-video {
  cursor: pointer;
}

.entity-copy {
  flex: 1;
  min-width: 0;
}

.entity-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.entity-copy p {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 0;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

/* Input stack in table cells */
.cell-stack {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.cell-stack input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  font-size: 11px;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.cell-stack input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.cell-stack .compact-button {
  padding: 6px 10px;
  font-size: 11px;
  flex-shrink: 0;
}

/* Status stack in table cells */
.status-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.status-stack small {
  font-size: 11px;
  color: var(--muted);
}

.video-thumb {
  width: 50px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.video-thumb.compact-thumb {
  width: 42px;
  height: 54px;
  border-radius: 6px;
}

/* Video ranking list items */
.radar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radar-row:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateX(4px);
}

.list-main {
  flex: 1;
  min-width: 0;
}

.list-main strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}

.list-main span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-side {
  text-align: right;
  flex-shrink: 0;
}

.list-side .rank-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-mono);
  line-height: 1;
}

.list-side .rank-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* List rows used in overview */
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--color-surface-alt);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-row:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateX(4px);
}

.list-row .list-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.list-row .list-main {
  flex: 1;
  min-width: 0;
}

.list-row .list-main strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}

.list-row .list-main small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.list-row .list-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge-error {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.empty-inline {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

.table-input {
  width: 160px;
  padding: 8px 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.table-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========================================
   Video Layout
   ======================================== */

.video-layout {
  display: grid;
  grid-template-columns: 1fr minmax(0, 380px);
  gap: 24px;
  align-items: start;
  max-width: 100%;
}

.video-list-section .content-card {
  max-height: calc(100vh - 200px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-list-section .table-container {
  flex: 1;
  overflow-y: auto;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-select {
  width: 160px;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  background: var(--color-surface);
  cursor: pointer;
}

/* Preview Card */
.preview-card {
  position: sticky;
  top: 24px;
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.preview-empty svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.preview-empty p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f172a;
}

.preview-media video {
  display: block;
  width: 100%;
  max-height: 300px;
}

.preview-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.preview-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.preview-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.preview-stat-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  text-align: center;
  border: 1px solid var(--color-border);
}

.preview-stat-item .stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.preview-stat-item strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-mono);
}

.preview-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.preview-details .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.preview-details .detail-row:last-child {
  border-bottom: none;
}

.preview-details span {
  font-size: 13px;
  color: var(--muted);
}

.preview-details strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.source-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.source-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ========================================
   Video Modal
   ======================================== */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--color-surface);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  overflow: hidden;
  flex: 1;
}

.modal-media {
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-media video {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-info {
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid var(--color-border);
}

.modal-info h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.4;
}

.modal-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.modal-stat-item {
  padding: 16px;
  border-radius: 12px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  text-align: center;
}

.modal-stat-item .stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.modal-stat-item strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-mono);
}

.modal-details {
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .modal-media {
    max-height: 300px;
  }

  .modal-media video {
    max-height: 300px;
  }

  .modal-info {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1400px) {
  .video-layout {
    grid-template-columns: 1fr minmax(0, 320px);
  }

  .video-ranking {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .video-layout {
    grid-template-columns: 1fr;
  }

  .preview-card {
    position: static;
  }

  .video-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 280px;
    padding: 20px;
    align-items: stretch;
  }

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

  .app-sidebar .sidebar-brand {
    flex-direction: row;
    gap: 14px;
  }

  .app-sidebar .sidebar-brand .eyebrow,
  .app-sidebar .sidebar-brand h1 {
    display: block;
  }

  .app-sidebar .nav-link {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 14px;
  }

  .app-sidebar .nav-text small {
    display: block;
    font-size: 12px;
  }

  .app-main {
    margin-left: 0;
  }

  .video-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Collapsed sidebar state - content adjusts */
@media (min-width: 1025px) {
  body.sidebar-collapsed .app-main {
    margin-left: 72px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
  }

  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .header-user-info {
    flex-wrap: wrap;
    gap: 10px;
  }

  .content-area {
    padding: 16px 20px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat-card {
    flex-direction: row;
    text-align: left;
  }

  .stat-icon {
    margin: 0;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .video-ranking {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}
