:root {
  --eb-primary: #4f46e5;
  --eb-sidebar-bg: #1e1b4b;
  --eb-sidebar-fg: #c7d2fe;
}

body { background: #f4f5fb; color: #1f2937; }

/* ===== Layout shell ===== */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 250px; flex-shrink: 0; background: var(--eb-sidebar-bg);
  color: var(--eb-sidebar-fg); position: fixed; top: 0; bottom: 0; left: 0;
  overflow-y: auto; z-index: 1040; transition: transform .2s;
}
.app-main { flex: 1; margin-left: 250px; min-width: 0; }
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem;
  font-weight: 700; font-size: 1.15rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: #818cf8; }
.sidebar-section {
  padding: 1rem 1.25rem .35rem; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .08em; color: #6366f1; font-weight: 600;
}
.app-sidebar .nav-link {
  display: flex; align-items: center; gap: .7rem; padding: .55rem 1.25rem;
  color: var(--eb-sidebar-fg); font-size: .9rem; border-left: 3px solid transparent;
}
.app-sidebar .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.app-sidebar .nav-link.active { background: rgba(129,140,248,.15); color: #fff; border-left-color: #818cf8; }
.app-sidebar .nav-link i { width: 18px; text-align: center; }

/* ===== Header ===== */
.app-header {
  display: flex; align-items: center; gap: 1rem; background: #fff;
  padding: .75rem 1.5rem; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 1030;
}
.app-header-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--eb-primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}

/* ===== Cards / stats ===== */
.card { border: 1px solid #eceef5; border-radius: .65rem; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.stat-card { background: #fff; border: 1px solid #eceef5; border-radius: .65rem; padding: 1.1rem; height: 100%; }
.stat-icon { width: 44px; height: 44px; border-radius: .55rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .6rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { color: #6b7280; font-size: .8rem; margin-top: .25rem; }

.content-card { transition: transform .12s, box-shadow .12s; }
.content-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(79,70,229,.1); }
.content-badge {
  min-width: 28px; height: 28px; padding: 0 .4rem; border-radius: .4rem; background: #eef2ff; color: var(--eb-primary);
  font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center;
}
.content-icon { font-size: 1.5rem; color: var(--eb-primary); }

/* ===== Soft badge backgrounds ===== */
.bg-primary-soft { background: #eef2ff !important; } .text-primary { color: #4f46e5 !important; }
.bg-success-soft { background: #ecfdf5 !important; }
.bg-info-soft { background: #eff6ff !important; }
.bg-warning-soft { background: #fffbeb !important; }
.bg-danger-soft { background: #fef2f2 !important; }
.bg-secondary-soft { background: #f3f4f6 !important; }
.bg-purple-soft { background: #f5f3ff !important; } .text-purple { color: #7c3aed !important; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 3rem 1rem; color: #9ca3af; }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .75rem; }

/* ===== Etapas ===== */
.drag-handle { cursor: grab; color: #9ca3af; font-size: 1.2rem; padding-top: 2px; }
.etapa-item.dragging { opacity: .5; }
.etapa-thumb { max-height: 60px; border-radius: .35rem; border: 1px solid #e5e7eb; }
.etapa-thumb-lg { max-height: 160px; border-radius: .5rem; border: 1px solid #e5e7eb; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Code chip ===== */
.code-chip { font-family: ui-monospace, monospace; background: #f3f4f6; padding: .1rem .45rem; border-radius: .35rem; font-size: .82rem; }

/* ===== Login ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.login-card { background: #fff; padding: 2.25rem; border-radius: 1rem; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-logo { width: 64px; height: 64px; border-radius: 1rem; background: #eef2ff; color: var(--eb-primary); font-size: 2rem; display: inline-flex; align-items: center; justify-content: center; }

.btn-primary { background: var(--eb-primary); border-color: var(--eb-primary); }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.progress-bar { background: var(--eb-primary); }

/* ===== Responsivo ===== */
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-main { margin-left: 0; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
}
