/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.sidebar-logo svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary);
}

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

.nav-section {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

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

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.topbar-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text);
}

.topbar-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Content Area */
.content {
  flex: 1;
  padding: 2rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--primary);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-glow);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.stat-card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 1.5rem;
}

/* Stream List */
.stream-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stream-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.2s;
  cursor: pointer;
}

.stream-item:hover {
  border-color: var(--primary);
}

.stream-thumbnail {
  width: 120px;
  height: 68px;
  background: var(--bg-tertiary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.stream-thumbnail svg {
  width: 2rem;
  height: 2rem;
}

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

.stream-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stream-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.running {
  background: var(--success);
  animation: pulse 2s infinite;
}

.status-dot.stopped {
  background: var(--text-muted);
}

.status-dot.error {
  background: var(--error);
}

.status-dot.starting {
  background: var(--warning);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.stream-actions {
  display: flex;
  gap: 0.5rem;
}

.stream-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.video-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}

.video-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.video-thumbnail {
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.video-thumbnail svg {
  width: 3rem;
  height: 3rem;
}

.video-info {
  padding: 1rem;
}

.video-name {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-close svg {
  width: 1.5rem;
  height: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.upload-zone svg {
  width: 3rem;
  height: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.upload-zone h4 {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.upload-zone p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .content {
    padding: 1rem;
  }

  .stream-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .stream-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
}


/* SPA Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal.open .modal-content {
  transform: scale(1);
}

/* Stream Item Styles */
.stream-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.stream-item-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stream-item-status.status-running { background: var(--success); animation: pulse 2s infinite; }
.stream-item-status.status-starting { background: var(--warning); animation: pulse 1s infinite; }
.stream-item-status.status-pending { background: var(--text-muted); }
.stream-item-status.status-error { background: var(--error); }
.stream-item-status.status-stopped { background: var(--text-muted); }

.stream-item-details { flex: 1; min-width: 0; }
.stream-item-name { font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.stream-item-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); flex-wrap: wrap; }
.stream-item-actions { display: flex; gap: 0.5rem; }

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.status-badge.status-running { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.status-badge.status-starting { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.status-badge.status-error { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.status-badge.status-stopped, .status-badge.status-pending { background: var(--bg-tertiary); color: var(--text-muted); }
.status-badge.status-active { background: rgba(34, 197, 94, 0.2); color: var(--success); }

/* Video Card Actions */
.video-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

/* Key List */
.key-list { display: flex; flex-direction: column; gap: 1rem; }
.key-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.key-item-info { display: flex; align-items: center; gap: 1rem; flex: 1; }
.key-item-icon { width: 2.5rem; height: 2.5rem; background: var(--primary-glow); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.key-item-icon svg { width: 1.25rem; height: 1.25rem; }
.key-item-details { flex: 1; }
.key-item-name { font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.key-item-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 0.5rem; flex-wrap: wrap; }
.key-item-actions { display: flex; gap: 0.5rem; }

/* Storage Info */
.storage-info { margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 0.75rem; }
.storage-bar { height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; margin-bottom: 0.5rem; }
.storage-used { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 4px; transition: width 0.3s; }
.storage-text { font-size: 0.875rem; color: var(--text-muted); }

/* Upload Progress */
.upload-progress { text-align: center; }
.upload-file-name { font-weight: 500; color: var(--text); margin-bottom: 1rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 4px; transition: width 0.3s; }
.progress-text { margin-top: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }

/* Alert */
.alert { padding: 1rem; border-radius: 0.5rem; }
.alert-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--text); }
.alert a { color: var(--primary); text-decoration: underline; }

/* Checkbox */
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.checkbox-label input { width: 1rem; height: 1rem; }

/* Current Plan */
.current-plan { display: flex; flex-direction: column; gap: 1rem; }
.current-plan-name { font-size: 2rem; font-weight: 700; color: var(--primary); }
.current-plan-info { display: flex; flex-wrap: wrap; gap: 2rem; }
.plan-info-item { display: flex; flex-direction: column; gap: 0.25rem; }
.plan-info-item .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.plan-info-item .value { font-weight: 600; color: var(--text); }

/* Pricing Grid Compact */
.pricing-grid.compact { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.pricing-grid.compact .pricing-card { padding: 1.5rem; }
.pricing-card.current { border-color: var(--primary); }
.current-badge { background: var(--primary) !important; }

/* Loading */
.loading { text-align: center; padding: 2rem; color: var(--text-muted); }

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

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

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.skeleton-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

.skeleton-text {
  height: 2rem;
  width: 60%;
}

.skeleton-text-sm {
  height: 1rem;
  width: 80%;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stat Card Live Icon */
.stat-card-icon.live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

/* Button sizes */
.btn-sm { padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.btn svg { width: 1rem; height: 1rem; }


/* ========================================
   ENHANCED DASHBOARD STYLES
   ======================================== */

/* Welcome Banner */
.welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary) 0%, #991b1b 100%);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.welcome-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.welcome-content p {
  opacity: 0.9;
  font-size: 1rem;
}

.live-pulse {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  backdrop-filter: blur(10px);
}

.live-pulse.active .pulse-dot {
  background: #22c55e;
  animation: livePulse 1.5s infinite;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.pulse-text {
  font-weight: 500;
  font-size: 0.9rem;
}

/* Enhanced Stat Cards */
.stat-card-gradient {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  border-color: rgba(220, 38, 38, 0.3);
}

.stat-card-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.stat-card-trend.up {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.stat-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-card-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin-top: 1rem;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #f97316 100%);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Stat Card Icon Colors */
.stat-card-icon.folder { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-card-icon.key { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.stat-card-icon.plan { background: rgba(234, 179, 8, 0.15); color: #eab308; }

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Quick Actions Card */
.quick-actions-card .card-body {
  padding: 1rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.2s;
  text-align: center;
}

.quick-action-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.quick-action-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.quick-action-icon.upload { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.quick-action-icon.key { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.quick-action-icon.play { background: rgba(220, 38, 38, 0.15); color: var(--primary); }
.quick-action-icon.upgrade { background: rgba(234, 179, 8, 0.15); color: #eab308; }

.quick-action-item span {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}

/* Usage Card */
.usage-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.usage-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.usage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usage-label {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

.usage-value {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.usage-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.usage-fill.streams { background: linear-gradient(90deg, var(--primary) 0%, #f97316 100%); }
.usage-fill.videos { background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%); }
.usage-fill.keys { background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%); }

/* Enhanced Stream Item */
.stream-item.enhanced {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  transition: all 0.2s;
}

.stream-item.enhanced:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.stream-item-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.stream-item-meta .meta-item svg {
  opacity: 0.7;
}

/* Recent Videos Grid */
.recent-videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.recent-video-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.recent-video-item:hover {
  border-color: var(--primary);
}

.video-thumb {
  width: 48px;
  height: 36px;
  background: var(--bg-tertiary);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.video-thumb svg {
  width: 1rem;
  height: 1rem;
}

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

.video-info .video-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-info .video-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-videos {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.empty-videos p {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .recent-videos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .welcome-banner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}


/* Detail Grid */
.detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.detail-label {
  font-weight: 500;
  color: var(--text-muted);
}

.detail-row span:last-child {
  color: var(--text);
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}
