/* ============================================================
   LEVELPRO AUTO — Modern SaaS Design System (v3)
   Estilo: PMSuite / Linear / Stripe / HubSpot 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ============== BACKGROUNDS — Less bright (PMSuite/Notion style) ============== */
  --bg-app:           #f6f7f9;        /* gris suave de fondo */
  --bg-content:       #f1f3f6;        /* fondo de contenido (más oscuro = profundidad) */
  --bg-card:          #ffffff;        /* cards puras blancas para resaltar */
  --bg-hover:         #eef0f3;        /* hover más visible */
  --bg-muted:         #f6f7f9;        /* alt soft */

  /* ============== BORDERS — More defined ============== */
  --border:           #e1e5ea;        /* borde un poco más visible */
  --border-soft:      #eaeef2;
  --border-focus:     #4f46e5;        /* indigo-600 */

  /* ============== TEXT ============== */
  --text:             #0f172a;        /* slate-900 */
  --text-secondary:   #334155;        /* slate-700 */
  --text-muted:       #64748b;        /* slate-500 */
  --text-subtle:      #94a3b8;        /* slate-400 */
  --text-inverse:     #ffffff;

  /* ============== BRAND (INDIGO) ============== */
  --brand:            #4f46e5;        /* indigo-600 */
  --brand-hover:      #4338ca;        /* indigo-700 */
  --brand-active:     #3730a3;        /* indigo-800 */
  --brand-soft:       #eef2ff;        /* indigo-50 */
  --brand-soft-hover: #e0e7ff;        /* indigo-100 */
  --brand-text:       #4338ca;        /* indigo-700 — for text on light bg */

  /* ============== STATES ============== */
  --success:          #10b981;        /* emerald-500 */
  --success-soft:     #d1fae5;        /* emerald-100 */
  --success-text:     #047857;        /* emerald-700 */

  --warning:          #f59e0b;        /* amber-500 */
  --warning-soft:     #fef3c7;        /* amber-100 */
  --warning-text:     #b45309;        /* amber-700 */

  --danger:           #ef4444;        /* red-500 */
  --danger-soft:      #fee2e2;        /* red-100 */
  --danger-text:      #b91c1c;        /* red-700 */

  --info:             #0ea5e9;        /* sky-500 */
  --info-soft:        #e0f2fe;        /* sky-100 */
  --info-text:        #0369a1;        /* sky-700 */

  /* ============== MODULE COLORS ============== */
  --mod-dashboard:    #4f46e5;        /* indigo */
  --mod-desking:      #10b981;        /* emerald — like PMSuite Sales */
  --mod-pipeline:     #3b82f6;        /* blue */
  --mod-inventory:    #8b5cf6;        /* violet */
  --mod-credit:       #f59e0b;        /* amber */
  --mod-reports:      #ec4899;        /* pink */
  --mod-settings:     #64748b;        /* slate */

  /* ============== SHADOWS ============== */
  --shadow-xs:        0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm:        0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow:           0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-md:        0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg:        0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* ============== RADIUS ============== */
  --radius-sm:        4px;
  --radius:           6px;
  --radius-md:        8px;
  --radius-lg:        12px;
  --radius-xl:        16px;
  --radius-pill:      999px;

  /* ============== TYPOGRAPHY ============== */
  --font-sans:        'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:        'JetBrains Mono', "SF Mono", Menlo, Monaco, monospace;

  /* ============== SPACING (consistent scale) ============== */
  --space-1:          4px;
  --space-2:          8px;
  --space-3:          12px;
  --space-4:          16px;
  --space-5:          20px;
  --space-6:          24px;
  --space-8:          32px;
  --space-10:         40px;
  --space-12:         48px;
  --space-16:         64px;
}

/* ============================================================
   GLOBAL RESETS
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'cv01', 'cv02', 'cv03', 'cv04';
}

/* Tabular numbers for data */
.lp-tnum, .lp-mono {
  font-variant-numeric: tabular-nums;
}

.lp-mono {
  font-family: var(--font-mono);
}

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */

/* === BUTTONS === */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.lp-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.lp-btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: var(--shadow-xs);
}

.lp-btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: var(--shadow-sm);
}

.lp-btn-primary:active {
  background: var(--brand-active);
}

.lp-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.lp-btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--text-subtle);
  color: var(--text);
}

.lp-btn-soft {
  background: var(--brand-soft);
  color: var(--brand-text);
}

.lp-btn-soft:hover {
  background: var(--brand-soft-hover);
}

.lp-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  gap: 4px;
}

.lp-btn-lg {
  padding: 10px 18px;
  font-size: 14px;
}

/* === CARDS === */
.lp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.lp-card-padded {
  padding: var(--space-6);
}

.lp-card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.lp-card-body {
  padding: var(--space-6);
}

/* === KPI CARDS (like PMSuite) === */
.lp-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  transition: all 0.15s ease;
}

.lp-kpi:hover {
  border-color: var(--text-subtle);
  box-shadow: var(--shadow-sm);
}

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

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

.lp-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.lp-kpi-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.lp-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* KPI icon colors (matching PMSuite) */
.lp-kpi-icon-indigo { background: #eef2ff; color: #4f46e5; }
.lp-kpi-icon-emerald { background: #d1fae5; color: #059669; }
.lp-kpi-icon-blue { background: #dbeafe; color: #2563eb; }
.lp-kpi-icon-violet { background: #ede9fe; color: #7c3aed; }
.lp-kpi-icon-amber { background: #fef3c7; color: #d97706; }
.lp-kpi-icon-pink { background: #fce7f3; color: #db2777; }
.lp-kpi-icon-rose { background: #ffe4e6; color: #e11d48; }

/* === BADGES === */
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

.lp-badge-success { background: var(--success-soft); color: var(--success-text); }
.lp-badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.lp-badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.lp-badge-info { background: var(--info-soft); color: var(--info-text); }
.lp-badge-brand { background: var(--brand-soft); color: var(--brand-text); }
.lp-badge-neutral { background: var(--bg-hover); color: var(--text-secondary); }

/* === INPUTS === */
.lp-input,
.lp-select,
.lp-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-card);
  transition: all 0.15s ease;
}

.lp-input:focus,
.lp-select:focus,
.lp-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.lp-input::placeholder {
  color: var(--text-subtle);
}

.lp-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* === STUB / EMPTY STATES === */
.lp-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-12) var(--space-6);
  text-align: center;
  background: var(--bg-content);
}

.lp-stub-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: var(--space-6);
}

.lp-stub-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.lp-stub-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.lp-stub-text {
  max-width: 480px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.lp-stub-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  max-width: 760px;
  width: 100%;
  margin-bottom: var(--space-8);
}

.lp-stub-feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: left;
  transition: all 0.15s ease;
}

.lp-stub-feature:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.lp-stub-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: var(--space-3);
}

.lp-stub-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.lp-stub-feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.lp-stub-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.lp-stub-cta:hover {
  background: var(--brand-hover);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* === TOAST === */
.lp-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: 360px;
}

.lp-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.lp-toast.error { background: var(--danger); }
.lp-toast.success { background: var(--success); }

/* === SCROLLBARS === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* === UTILITIES === */
.lp-flex { display: flex; }
.lp-flex-col { display: flex; flex-direction: column; }
.lp-items-center { align-items: center; }
.lp-justify-between { justify-content: space-between; }
.lp-gap-2 { gap: var(--space-2); }
.lp-gap-3 { gap: var(--space-3); }
.lp-gap-4 { gap: var(--space-4); }
.lp-gap-6 { gap: var(--space-6); }

.lp-text-muted { color: var(--text-muted); }
.lp-text-subtle { color: var(--text-subtle); }
.lp-text-success { color: var(--success-text); }
.lp-text-danger { color: var(--danger-text); }

.lp-text-xs { font-size: 11px; }
.lp-text-sm { font-size: 12px; }
.lp-text-base { font-size: 14px; }
.lp-text-lg { font-size: 16px; }
.lp-text-xl { font-size: 20px; }
.lp-text-2xl { font-size: 24px; }
.lp-text-3xl { font-size: 30px; }

.lp-font-medium { font-weight: 500; }
.lp-font-semibold { font-weight: 600; }
.lp-font-bold { font-weight: 700; }
