/* ═══════════════════════════════════════════════════════════════
   SellerKite — Dashboard Design System (Dark Mode)
   ═══════════════════════════════════════════════════════════════ */

/* Inherits CSS variables from cinematic.css */
@import url('/assets/css/cinematic.css');

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

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--space-5) 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-overlay);
  transition: transform var(--duration-normal) var(--ease-out);
}

.sidebar-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding: 0 var(--space-5) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}

.sidebar-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0 var(--space-3);
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

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

.sidebar-link.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-3) var(--space-4);
}

.sidebar-user {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

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

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

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

/* ── Main Content ────────────────────────────────────────────── */
.app-main {
  flex: 1;
  margin-left: 260px;
  padding: var(--space-8);
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.app-header-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.stat-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ── Project Cards ───────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

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

.project-card-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-body {
  padding: var(--space-4);
}

.project-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.project-card-status {
  font-size: 12px;
  font-weight: 500;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder {
  color: var(--text-dim);
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: var(--space-5);
}

.alert-error {
  background: var(--error-dim);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.alert-success {
  background: var(--success-dim);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #86efac;
}

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-8);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 500;
}

/* ── Empty States ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--text-dim);
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-desc {
  font-size: 14px;
  margin-bottom: var(--space-6);
}

/* ── Pipeline Steps ──────────────────────────────────────────── */
.pipeline-steps {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.pipeline-step.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

.pipeline-step.done {
  color: var(--success);
}

.pipeline-step-arrow {
  color: var(--text-dim);
  font-size: 12px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
    padding: var(--space-4);
  }
}
