/* ============================================================
   NIRELLO — Dashboard Styles
   Premium SaaS Dashboard · Dark Luxury
   ============================================================ */

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

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-2);
  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.4s var(--ease-luxury);
}

.sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--beige);
}

.sidebar-logo span { color: var(--brown); }

.sidebar-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(109,82,66,0.12);
  border: 1px solid rgba(109,82,66,0.25);
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--brown-light);
  letter-spacing: 0.06em;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 12px;
  margin: 20px 0 8px;
}

.sidebar-section-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(162,153,139,0.06);
  color: var(--text-secondary);
}

.nav-item.active {
  background: rgba(109,82,66,0.12);
  color: var(--beige);
  border: 1px solid rgba(109,82,66,0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: var(--brown);
  border-radius: 0 2px 2px 0;
}

.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  background: rgba(109,82,66,0.2);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  color: var(--brown-light);
}

.nav-badge.new {
  background: rgba(74,222,128,0.15);
  color: #4ade80;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover { background: rgba(162,153,139,0.06); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brown) 0%, var(--stone) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  flex-shrink: 0;
}

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

.user-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ────────────────────────────────────────────── */
.dash-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: rgba(11,8,7,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.topbar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.topbar-breadcrumb {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
}

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

.topbar-btn {
  width: 36px; height: 36px;
  background: rgba(162,153,139,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.topbar-btn:hover {
  background: rgba(162,153,139,0.1);
  color: var(--beige);
}

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--brown-light);
  border-radius: 50%;
  border: 1.5px solid var(--bg-2);
}

/* ── Dashboard Content ───────────────────────────────────────── */
.dash-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ── Welcome Banner ──────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, rgba(109,82,66,0.12) 0%, rgba(162,153,139,0.06) 100%);
  border: 1px solid rgba(109,82,66,0.2);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(109,82,66,0.5), transparent);
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.welcome-sub {
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(109,82,66,0.3), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

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

.stat-card-icon {
  width: 40px; height: 40px;
  background: rgba(109,82,66,0.1);
  border: 1px solid rgba(109,82,66,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-light);
  margin-bottom: 16px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card-label {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.stat-card-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
}

/* ── Content Grid ────────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-bottom: 28px;
}

/* ── Panel ───────────────────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}

.panel-action {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--brown-light);
  cursor: pointer;
  transition: color var(--transition);
}

.panel-action:hover { color: var(--beige); }

.panel-body { padding: 24px; }

/* ── Upload Panel ────────────────────────────────────────────── */
.dash-upload-zone {
  border: 1.5px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  background: rgba(18,14,12,0.4);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dash-upload-zone:hover {
  border-color: var(--border-glow);
  background: rgba(109,82,66,0.04);
  box-shadow: var(--glow-sm);
}

.dash-upload-zone.drag-over {
  border-color: var(--brown);
  box-shadow: var(--glow-md);
}

/* ── Video List ──────────────────────────────────────────────── */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}

.video-item:last-child { border-bottom: none; }
.video-item:hover { background: rgba(162,153,139,0.03); }

.video-thumb {
  width: 72px; height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1a1410, #0d0a08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.video-thumb-quality {
  position: absolute;
  bottom: 2px; right: 3px;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 700;
  color: var(--brown-light);
  letter-spacing: 0.05em;
}

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

.video-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.video-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.video-status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-done {
  background: rgba(74,222,128,0.1);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.2);
}

.status-processing {
  background: rgba(109,82,66,0.15);
  color: var(--brown-light);
  border: 1px solid rgba(109,82,66,0.3);
  animation: statusPulse 1.5s ease-in-out infinite;
}

.status-queued {
  background: rgba(162,153,139,0.08);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.video-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.video-action-btn {
  width: 30px; height: 30px;
  background: rgba(162,153,139,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.video-action-btn:hover {
  background: rgba(109,82,66,0.12);
  border-color: rgba(109,82,66,0.3);
  color: var(--brown-light);
}

/* ── Plan Card ───────────────────────────────────────────────── */
.plan-card {
  background: linear-gradient(135deg, rgba(109,82,66,0.1) 0%, rgba(162,153,139,0.04) 100%);
  border: 1px solid rgba(109,82,66,0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.plan-expiry {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.plan-usage-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.plan-usage-bar {
  height: 4px;
  background: rgba(162,153,139,0.1);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 16px;
}

.plan-usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brown), var(--beige));
  border-radius: 100px;
  box-shadow: 0 0 8px rgba(109,82,66,0.5);
}

/* ── AI Recommendations ──────────────────────────────────────── */
.ai-rec-card {
  background: rgba(109,82,66,0.06);
  border: 1px solid rgba(109,82,66,0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ai-rec-icon {
  width: 32px; height: 32px;
  background: rgba(109,82,66,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-light);
  flex-shrink: 0;
  font-size: 14px;
}

.ai-rec-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.ai-rec-desc {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Processing Queue ────────────────────────────────────────── */
.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.queue-item:last-child { border-bottom: none; }

.queue-num {
  width: 24px; height: 24px;
  background: rgba(162,153,139,0.08);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.queue-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-time {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Activity Feed ───────────────────────────────────────────── */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.activity-icon.success { background: rgba(74,222,128,0.1); }
.activity-icon.info { background: rgba(109,82,66,0.12); }
.activity-icon.warning { background: rgba(251,191,36,0.1); }

.activity-text {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.activity-time {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Notification Panel ──────────────────────────────────────── */
.notif-panel {
  position: absolute;
  top: 52px; right: 0;
  width: 320px;
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s var(--ease-luxury);
}

.notif-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.notif-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
}

.notif-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item:hover { background: rgba(162,153,139,0.04); }
.notif-item:last-child { border-bottom: none; }

.notif-dot-indicator {
  width: 8px; height: 8px;
  background: var(--brown-light);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.notif-text {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notif-time {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Speed Meter ─────────────────────────────────────────────── */
.speed-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.speed-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.speed-text {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #4ade80;
  font-weight: 600;
}

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

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .dash-main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .dash-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .welcome-banner { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 0 16px; }
}