/* ═══════════════════════════════════════════════════════════════════════════
   CincoMind Hub — Design System v2
   Dirección visual: Linear · Vercel · Stripe · Notion · Arc
   Paleta: Zinc neutrals + Indigo accent
   Tipografía: Inter
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  color-scheme: light;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--text-primary);
  background: var(--bg-canvas);
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg { display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; }

/* ── CSS Custom Properties ──────────────────────────────────────────────── */
:root {
  /* ── Backgrounds (Zinc scale) */
  --bg-canvas:   #FAFAFA;
  --bg-base:     #FFFFFF;
  --bg-subtle:   #F4F4F5;
  --bg-muted:    #E4E4E7;

  /* backward compat aliases */
  --bg-primary:   var(--bg-canvas);
  --bg-secondary: var(--bg-base);
  --bg-tertiary:  var(--bg-subtle);
  --bg-grouped:   var(--bg-subtle);
  --bg-elevated:  var(--bg-base);

  /* ── Borders */
  --border:         rgba(0,0,0,.07);
  --border-strong:  rgba(0,0,0,.14);
  --border-input:   rgba(0,0,0,.22);
  --border-color:   rgba(0,0,0,.07);
  --separator:      rgba(0,0,0,.05);

  /* ── Text */
  --text-primary:     #09090B;
  --text-secondary:   #52525B;
  --text-tertiary:    #A1A1AA;
  --text-placeholder: #D4D4D8;

  /* ── Accent — Indigo */
  --accent:        #4F46E5;
  --accent-hover:  #4338CA;
  --accent-soft:   rgba(79,70,229,.08);
  --accent-border: rgba(79,70,229,.20);
  --accent-text:   #4338CA;

  /* backward compat */
  --color-blue:    #4F46E5;

  /* ── Status */
  --color-green:  #16A34A;
  --color-red:    #DC2626;
  --color-amber:  #D97706;
  --color-purple: #7C3AED;
  --color-teal:   #0891B2;
  --color-pink:   #DB2777;
  --color-gray:   #6B7280;
  --color-gray-light: #9CA3AF;

  --green-soft:  rgba(22,163,74,.08);
  --red-soft:    rgba(220,38,38,.08);
  --amber-soft:  rgba(217,119,6,.08);
  --purple-soft: rgba(124,58,237,.08);
  --teal-soft:   rgba(8,145,178,.08);
  --gray-soft:   rgba(107,114,128,.08);

  /* ── Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05), 0 1px 8px rgba(0,0,0,.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,.06), 0 2px 24px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08), 0 4px 48px rgba(0,0,0,.05);
  --shadow-xl: 0 24px 48px rgba(0,0,0,.10), 0 8px 16px rgba(0,0,0,.06);
  --shadow-blue: 0 0 0 3px rgba(79,70,229,.15);

  /* ── Layout */
  --sidebar-width:  220px;
  --topbar-height:  52px;
  --content-max:    1320px;

  /* ── Radius */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-full: 9999px;

  /* ── Animation */
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:      100ms;
  --dur-normal:    180ms;
  --dur-slow:      300ms;

  /* ── Typography */
  --font-sans:    'Inter', -apple-system, system-ui, sans-serif;
  --font-display: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Menlo', monospace;

  /* ── Glassmorphism */
  --glass-bg:   rgba(255,255,255,.80);
  --glass-blur: blur(20px) saturate(160%);
}

[data-theme="dark"] {
  --bg-canvas:   #09090B;
  --bg-base:     #111113;
  --bg-subtle:   #18181B;
  --bg-muted:    #27272A;

  --bg-primary:   var(--bg-canvas);
  --bg-secondary: var(--bg-base);
  --bg-tertiary:  var(--bg-subtle);
  --bg-grouped:   var(--bg-subtle);
  --bg-elevated:  var(--bg-base);

  --border:         rgba(255,255,255,.07);
  --border-strong:  rgba(255,255,255,.14);
  --border-color:   rgba(255,255,255,.07);
  --separator:      rgba(255,255,255,.05);

  --text-primary:     #FAFAFA;
  --text-secondary:   #A1A1AA;
  --text-tertiary:    #71717A;
  --text-placeholder: #52525B;

  --accent:        #6366F1;
  --accent-hover:  #4F46E5;
  --accent-soft:   rgba(99,102,241,.12);
  --accent-border: rgba(99,102,241,.25);
  --accent-text:   #818CF8;
  --color-blue:    #6366F1;

  --color-green:  #22C55E;
  --color-red:    #EF4444;
  --color-amber:  #F59E0B;
  --color-purple: #A855F7;
  --color-teal:   #22D3EE;
  --color-pink:   #F472B6;
  --color-gray:   #9CA3AF;

  --green-soft:  rgba(34,197,94,.10);
  --red-soft:    rgba(239,68,68,.10);
  --amber-soft:  rgba(245,158,11,.10);
  --purple-soft: rgba(168,85,247,.10);
  --teal-soft:   rgba(34,211,238,.10);
  --gray-soft:   rgba(156,163,175,.10);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.24);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.32), 0 1px 8px rgba(0,0,0,.24);
  --shadow-md: 0 4px 8px rgba(0,0,0,.40), 0 2px 24px rgba(0,0,0,.28);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.48), 0 4px 48px rgba(0,0,0,.32);
  --shadow-xl: 0 24px 48px rgba(0,0,0,.56), 0 8px 16px rgba(0,0,0,.40);
  --shadow-blue: 0 0 0 3px rgba(99,102,241,.20);

  --glass-bg:   rgba(17,17,19,.85);
}

/* ── Typography scale ───────────────────────────────────────────────────── */
h1 { font-size: 1.5rem;   font-weight: 700; letter-spacing: -.03em;  line-height: 1.2; }
h2 { font-size: 1.25rem;  font-weight: 700; letter-spacing: -.025em; line-height: 1.3; }
h3 { font-size: 1.0625rem;font-weight: 600; letter-spacing: -.02em;  line-height: 1.35;}
h4 { font-size: .9375rem; font-weight: 600; letter-spacing: -.015em; }
h5 { font-size: .875rem;  font-weight: 600; }
h6 { font-size: .8125rem; font-weight: 600; }
p  { color: var(--text-secondary); }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: var(--bg-canvas);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease);
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.sidebar__brand-name {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.sidebar__brand-sub {
  font-size: .625rem;
  color: var(--text-tertiary);
  display: block;
  line-height: 1.3;
  font-weight: 500;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 8px;
  scrollbar-width: none;
}
.sidebar__nav::-webkit-scrollbar { display: none; }

.sidebar__section-title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  padding: 4px 2px;
  margin: 18px -8px 4px;
  padding-left: 10px;
  border-top: 2px solid rgba(0,0,0,.18);
  padding-top: 14px;
  user-select: none;
}
.sidebar__nav > .sidebar__section-title:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}
[data-theme="dark"] .sidebar__section-title {
  border-top-color: rgba(255,255,255,.18);
  color: #A1A1AA;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: color var(--dur-fast), background var(--dur-fast);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar__item:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.sidebar__item.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.sidebar__item-icon {
  width: 15px; height: 15px;
  flex-shrink: 0;
  stroke-width: 1.75;
  opacity: .75;
}

.sidebar__item.active .sidebar__item-icon { opacity: 1; }

.sidebar__item-badge {
  margin-left: auto;
  background: var(--color-red);
  color: #fff;
  font-size: .5625rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

.sidebar__footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast);
  margin-top: 2px;
}
.sidebar__user:hover { background: var(--bg-subtle); }

.sidebar__avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .6875rem; font-weight: 700;
  flex-shrink: 0;
}

.sidebar__user-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  font-size: .625rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: capitalize;
}

/* Collapsed sidebar */
.app-layout.sidebar-collapsed .sidebar {
  width: 52px;
}

.app-layout.sidebar-collapsed .sidebar__brand-name,
.app-layout.sidebar-collapsed .sidebar__brand-sub,
.app-layout.sidebar-collapsed .sidebar__section-title,
.app-layout.sidebar-collapsed .sidebar__item-badge,
.app-layout.sidebar-collapsed .sidebar__user-name,
.app-layout.sidebar-collapsed .sidebar__user-role,
.app-layout.sidebar-collapsed .sidebar__item > span:not(.sidebar__item-icon) {
  display: none;
}

.app-layout.sidebar-collapsed .sidebar__item {
  justify-content: center;
  padding: 7px;
}

.app-layout.sidebar-collapsed .sidebar__item-icon { opacity: 1; }

/* ── Main Wrapper ────────────────────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100vw - var(--sidebar-width));
  transition: margin-left var(--dur-normal) var(--ease), width var(--dur-normal) var(--ease);
  overflow-x: hidden;
}

.app-layout.sidebar-collapsed .main-wrapper {
  margin-left: 52px;
  width: calc(100vw - 52px);
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar__title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.topbar__search {
  flex: 1;
  max-width: 340px;
  position: relative;
}

.topbar__search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.topbar__search input {
  width: 100%;
  height: 32px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 10px 0 32px;
  font-size: .8125rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.topbar__search input:focus {
  background: var(--bg-base);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-blue);
  cursor: text;
}

.topbar__search-kbd {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: .625rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  background: var(--bg-muted);
  border-radius: var(--radius-xs);
  padding: 1px 4px;
  pointer-events: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.topbar__action-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
  position: relative;
}

.topbar__action-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 24px 28px 48px;
  min-width: 0;
}

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-header__info { flex: 1; min-width: 0; }

.page-header__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-header__subtitle {
  font-size: .8125rem;
  color: var(--text-tertiary);
  margin-top: 3px;
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--bg-base);
}

.auth-brand {
  background:
    radial-gradient(ellipse 80% 50% at 10% 90%, rgba(59,130,246,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(96,165,250,0.14) 0%, transparent 55%),
    linear-gradient(155deg, #050E1F 0%, #0A2150 45%, #071A3E 100%);
  display: flex;
  flex-direction: column;
  padding: 36px 44px;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(96,165,250,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 35% at 50% 50%, rgba(37,99,235,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.auth-brand__logoimg {
  height: 72px;
  width: auto;
  object-fit: contain;
}
.auth-logo__img {
  height: 72px;
  width: auto;
  object-fit: contain;
}
.sidebar__brand-img {
  height: 30px;
  width: auto;
  object-fit: contain;
  max-width: 140px;
}

.auth-brand__mark {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}

.auth-brand__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}

.auth-brand__sub {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
}

.auth-brand__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 28px;
  position: relative;
  z-index: 1;
}

.auth-brand__headline {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 10px;
}

.auth-brand__headline span {
  background: linear-gradient(135deg, #60A5FA, #93C5FD);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand__desc {
  font-size: .875rem;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
  max-width: 340px;
  margin-bottom: 20px;
}

.auth-brand__features {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.auth-brand__feature {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand__feature-icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}

.auth-brand__feature-text {
  font-size: .8125rem;
  color: rgba(255,255,255,.6);
  font-weight: 500;
}

.auth-brand__footer {
  position: relative;
  z-index: 1;
}

.auth-brand__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: rgba(255,255,255,.35);
  font-weight: 500;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #F8F9FC;
}

.auth-card {
  width: 100%;
  max-width: 480px;
}

.auth-logo { display: none; align-items: center; gap: 8px; margin-bottom: 28px; }
.auth-logo__name { font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.auth-logo__sub  { font-size: .8125rem; color: var(--text-tertiary); }

.auth-title    { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.03em; }
.auth-subtitle { font-size: .875rem; color: var(--text-tertiary); margin-bottom: 24px; }
.auth-footer   { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--text-tertiary); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: .75rem; color: var(--text-tertiary); }

@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand  { display: none; }
  .auth-logo   { display: flex; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-base);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card--elevated {
  border: none;
  box-shadow: var(--shadow-md);
}

.card--glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

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

.card__title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.card__body {
  padding: 16px;
}

/* ── KPI Grid ────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  border-radius: 0 1px 1px 0;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

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

.kpi-card__value {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--text-primary);
  line-height: 1;
}

.kpi-card__label {
  font-size: .75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.kpi-trend { display: flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; }
.kpi-trend--up   { color: var(--color-green); }
.kpi-trend--down { color: var(--color-red); }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  height: 34px;
  border-radius: var(--radius-md);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
  border: none;
  outline: none;
  text-decoration: none !important;
  white-space: nowrap;
  font-family: var(--font-sans);
  flex-shrink: 0;
  position: relative;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-muted); color: var(--text-primary); }

.btn-white {
  background: var(--bg-base);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-white:hover { background: var(--bg-subtle); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text-primary); }

.btn-danger {
  background: var(--red-soft);
  color: var(--color-red);
  border: 1px solid rgba(220,38,38,.15);
}
.btn-danger:hover { background: rgba(220,38,38,.14); }

.btn-success {
  background: var(--green-soft);
  color: var(--color-green);
  border: 1px solid rgba(22,163,74,.15);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: .75rem;
  border-radius: var(--radius-sm);
  gap: 4px;
}

.btn-lg {
  height: 42px;
  padding: 0 20px;
  font-size: .9375rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
}

.btn-icon.btn-sm { width: 28px; height: 28px; }

.btn-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */

.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.form-hint { font-size: .75rem; color: var(--text-tertiary); margin-top: 4px; }
.form-error { font-size: .75rem; color: var(--color-red); margin-top: 4px; font-weight: 500; }

.form-control {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-base);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: .875rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-blue);
}

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

textarea.form-control {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

select.form-control {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  width: 15px; height: 15px;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */

.table-wrapper {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .8125rem;
}

.table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
}

.table thead th:last-child { width: 44px; }

.table tbody tr {
  border-bottom: 1px solid var(--separator);
  transition: background var(--dur-fast);
}

.table tbody tr:last-child { border-bottom: none; }

.table tbody tr:hover { background: var(--bg-subtle); }

.table td {
  padding: 11px 16px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge--blue   { background: var(--accent-soft);  color: var(--accent-text); }
.badge--green  { background: var(--green-soft);   color: var(--color-green); }
.badge--red    { background: var(--red-soft);     color: var(--color-red);   }
.badge--amber  { background: var(--amber-soft);   color: var(--color-amber); }
.badge--purple { background: var(--purple-soft);  color: var(--color-purple);}
.badge--teal   { background: var(--teal-soft);    color: var(--color-teal);  }
.badge--gray   { background: var(--gray-soft);    color: var(--color-gray);  }
.badge--pink   { background: rgba(219,39,119,.08);color: var(--color-pink);  }

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════════════ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 12px;
}

.alert--success { background: var(--green-soft);  color: var(--color-green); border-color: rgba(22,163,74,.15);  }
.alert--error   { background: var(--red-soft);    color: var(--color-red);   border-color: rgba(220,38,38,.15);  }
.alert--warning { background: var(--amber-soft);  color: var(--color-amber); border-color: rgba(217,119,6,.15);  }
.alert--info    { background: var(--accent-soft); color: var(--accent);      border-color: var(--accent-border); }

/* Alert bar (topbar flash) */
.alert-bar { padding: 10px 20px; font-size: .8125rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.alert-bar--success { background: var(--color-green); color: #fff; }
.alert-bar--error   { background: var(--color-red);   color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn var(--dur-normal) var(--ease);
}

.modal-backdrop.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-base);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp var(--dur-normal) var(--ease);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal--lg { max-width: 720px; }
.modal--sm { max-width: 380px; }

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

.modal__title { font-size: .9375rem; font-weight: 700; letter-spacing: -.02em; }

.modal__close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.modal__close:hover { background: var(--bg-subtle); color: var(--text-primary); }

.modal__body { padding: 20px; overflow-y: auto; flex: 1; }

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DROPDOWNS
   ═══════════════════════════════════════════════════════════════════════════ */

.dropdown { position: relative; }

.dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  padding: 4px;
  animation: slideDown var(--dur-fast) var(--ease);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.dropdown__item:hover { background: var(--bg-subtle); }

.dropdown__item--danger { color: var(--color-red); }
.dropdown__item--danger:hover { background: var(--red-soft); }

.dropdown__separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KANBAN
   ═══════════════════════════════════════════════════════════════════════════ */

.kanban-board {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.kanban-col {
  min-width: 268px;
  max-width: 288px;
  flex-shrink: 0;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  border: none;
  overflow: hidden;
}

.kanban-col__header {
  padding: 12px 12px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-col__title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.kanban-col__count {
  background: var(--bg-muted);
  color: var(--text-tertiary);
  font-size: .6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.kanban-col__body {
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
  /* overflow y flex:1 se aplican en pipeline/index.php para scroll por columna */
}

.kanban-col__body.drag-over { background: var(--accent-soft); }

.kanban-card {
  background: var(--bg-base);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: none;
  box-shadow: var(--shadow-xs);
  cursor: grab;
  transition: box-shadow var(--dur-fast), transform var(--dur-fast);
}

.kanban-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; }

.kanban-card__title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -.01em;
}

.kanban-card__meta {
  font-size: .75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kanban-empty {
  padding: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 8px;
}

.empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  opacity: .65;
  margin-bottom: 4px;
}

.empty-state__title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.empty-state__desc {
  font-size: .875rem;
  color: var(--text-tertiary);
  max-width: 320px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIST ITEMS (iOS-style)
   ═══════════════════════════════════════════════════════════════════════════ */

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--separator);
  transition: background var(--dur-fast);
  min-width: 0;
}

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

.list-item--link {
  text-decoration: none !important;
  cursor: pointer;
}

.list-item--link:hover { background: var(--bg-subtle); }

.list-item__icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}

.list-item__body { flex: 1; min-width: 0; }

.list-item__title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}

.list-item__sub {
  font-size: .75rem;
  color: var(--text-tertiary);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item__meta { flex-shrink: 0; font-size: .8125rem; color: var(--text-tertiary); }

/* ═══════════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════════════════ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.breadcrumb__item {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast);
}

.breadcrumb__item:hover { color: var(--text-primary); }

.breadcrumb__item--active {
  color: var(--text-primary);
  font-weight: 600;
}

.breadcrumb__sep {
  color: var(--text-tertiary);
  font-size: .8125rem;
  user-select: none;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════════════════════════════════ */

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

.skeleton {
  background: linear-gradient(90deg,
    var(--bg-subtle) 0%,
    var(--bg-muted) 50%,
    var(--bg-subtle) 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: .875rem;
  border-radius: var(--radius-xs);
}

.skeleton-title {
  height: 1.25rem;
  border-radius: var(--radius-xs);
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMAND PALETTE (⌘K)
   ═══════════════════════════════════════════════════════════════════════════ */

.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: max(10vh, 60px);
  animation: fadeIn var(--dur-fast) var(--ease);
}

.cmd-backdrop.hidden { display: none; }

.cmd-palette {
  width: 100%;
  max-width: 580px;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUp var(--dur-normal) var(--ease);
}

.cmd-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.cmd-search-icon { color: var(--text-tertiary); flex-shrink: 0; }

.cmd-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -.01em;
}

.cmd-search input::placeholder { color: var(--text-tertiary); }

.cmd-kbd {
  font-size: .6875rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 2px 5px;
  cursor: pointer;
}

.cmd-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
}

.cmd-group-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-tertiary);
  padding: 8px 10px 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast);
  text-decoration: none !important;
  color: var(--text-primary);
}

.cmd-item:hover, .cmd-item.focused {
  background: var(--accent-soft);
  color: var(--accent);
}

.cmd-item.focused { background: var(--accent); color: #fff; }

.cmd-item__icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .875rem;
}

.cmd-item.focused .cmd-item__icon {
  background: rgba(255,255,255,.2);
}

.cmd-item__label {
  font-size: .875rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-item__sub {
  font-size: .75rem;
  opacity: .7;
}

.cmd-item__kbd {
  font-size: .625rem;
  font-family: var(--font-mono);
  opacity: .5;
}

.cmd-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: .875rem;
}

.cmd-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.cmd-footer-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .6875rem;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: all;
  animation: toastIn var(--dur-normal) var(--ease);
  max-width: 360px;
  min-width: 260px;
}

.toast.removing {
  animation: toastOut var(--dur-normal) var(--ease) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(8px) scale(.96); }
}

.toast__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast--success .toast__dot { background: var(--color-green); }
.toast--error   .toast__dot { background: var(--color-red);   }
.toast--info    .toast__dot { background: var(--accent);       }
.toast--warning .toast__dot { background: var(--color-amber);  }

/* ═══════════════════════════════════════════════════════════════════════════
   AI PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.ai-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  background: var(--bg-base);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-normal) var(--ease);
}

.ai-panel.open { transform: translateX(0); }

.ai-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.ai-panel__badge {
  font-size: .625rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #7C3AED);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.ai-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  font-size: .875rem;
  line-height: 1.55;
}

.ai-message--user {
  background: var(--accent-soft);
  color: var(--text-primary);
  margin-left: 24px;
  border-bottom-right-radius: var(--radius-xs);
}

.ai-message--ai {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  margin-right: 24px;
  border-bottom-left-radius: var(--radius-xs);
}

.ai-panel__input {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ai-panel__input textarea {
  flex: 1;
  height: 38px;
  max-height: 120px;
  resize: none;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: .875rem;
  font-family: var(--font-sans);
  outline: none;
  background: var(--bg-subtle);
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.ai-panel__input textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-blue);
  background: var(--bg-base);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WELCOME BANNER
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-banner {
  background: #09090B;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(79,70,229,.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-banner__content { position: relative; z-index: 1; }

.welcome-banner__greeting {
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.welcome-banner__name {
  font-size: 1.375rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}

.welcome-banner__stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.welcome-banner__stat-label {
  font-size: .6875rem;
  color: rgba(255,255,255,.4);
  display: block;
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.welcome-banner__stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISC COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Progress bar */
.progress {
  height: 5px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--dur-slow) var(--ease);
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--green  { background: var(--color-green); }
.status-dot--red    { background: var(--color-red); }
.status-dot--amber  { background: var(--color-amber); }
.status-dot--gray   { background: var(--color-gray); }
.status-dot--blue   { background: var(--accent); }

/* Avatar */
.avatar {
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar--sm { width: 28px; height: 28px; font-size: .6875rem; }
.avatar--md { width: 36px; height: 36px; font-size: .8125rem; }
.avatar--lg { width: 48px; height: 48px; font-size: 1rem; border-radius: var(--radius-md); }
.avatar--round { border-radius: 50%; }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end  { justify-content: flex-end; }
.justify-center { justify-content: center; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2 { gap: 4px; }
.gap-3 { gap: 8px; }
.gap-4 { gap: 12px; }
.gap-5 { gap: 16px; }
.gap-6 { gap: 20px; }
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }

.grid   { display: grid; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.block  { display: block; }
.inline { display: inline; }
.inline-flex { display: inline-flex; }

.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .75rem; }
.text-2xs     { font-size: .6875rem; }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.font-medium  { font-weight: 500; }
.font-mono    { font-family: var(--font-mono); }

.text-muted   { color: var(--text-tertiary); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--color-green); }
.text-red     { color: var(--color-red); }
.text-amber   { color: var(--color-amber); }

.bg-subtle    { background: var(--bg-subtle); }
.bg-base      { background: var(--bg-base); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.border   { border: 1px solid var(--border); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.p-3  { padding: 8px; }
.p-4  { padding: 12px; }
.p-5  { padding: 16px; }
.p-6  { padding: 20px; }
.px-4 { padding-left: 12px; padding-right: 12px; }
.py-2 { padding-top: 4px;  padding-bottom: 4px; }
.py-3 { padding-top: 8px;  padding-bottom: 8px; }
.mt-2 { margin-top: 4px; }
.mt-3 { margin-top: 8px; }
.mt-4 { margin-top: 12px; }
.mt-5 { margin-top: 16px; }
.mb-3 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 12px; }
.mb-5 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 20px; }
.ml-auto { margin-left: auto; }

.opacity-0  { opacity: 0; }
.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.inset-0  { inset: 0; }
.z-10  { z-index: 10; }
.z-50  { z-index: 50; }
.z-100 { z-index: 100; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.cursor-pointer { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .main-content { padding: 20px 20px 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 240px;
    z-index: 500;
    box-shadow: var(--shadow-xl);
  }

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

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .main-content { padding: 16px 16px 32px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .cmd-palette { margin: 0 12px; max-width: calc(100vw - 24px); }
  .cmd-backdrop { padding-top: 60px; align-items: flex-start; }

  .toast-container { bottom: 12px; right: 12px; left: 12px; }
  .toast { min-width: unset; }

  .kanban-board { padding-bottom: 20px; }
}

@media (max-width: 480px) {
  .welcome-banner { padding: 16px; }
  .kpi-card { padding: 14px 16px; }
}

/* ── Tabs / Vista switcher ───────────────────────────────────────────────── */
.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  /* reset button */
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.tab-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.tab-btn.active {
  background: var(--bg-base);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 0 1px 1px rgba(0,0,0,.06);
}

/* ── FullCalendar overrides ──────────────────────────────────────────────── */
.fc { font-family: var(--font-base); font-size: .875rem; }

/* Toolbar */
.fc .fc-toolbar { gap: 10px; flex-wrap: wrap; }
.fc .fc-toolbar-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }

/* Botones toolbar */
.fc .fc-button,
.fc .fc-button-primary {
  background: var(--bg-subtle) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  font-size: .8125rem !important;
  font-weight: 500 !important;
  padding: 5px 12px !important;
  box-shadow: none !important;
  transition: background var(--dur-fast) !important;
}
.fc .fc-button:hover,
.fc .fc-button-primary:hover {
  background: var(--bg-muted) !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.fc .fc-button-group .fc-button { border-radius: 0 !important; }
.fc .fc-button-group .fc-button:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md) !important; }
.fc .fc-button-group .fc-button:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0 !important; }

/* Grid */
.fc .fc-daygrid-day { background: var(--bg-base); }
.fc .fc-daygrid-day:hover { background: var(--bg-subtle); }
.fc .fc-daygrid-day-number { color: var(--text-secondary); font-size: .8125rem; padding: 4px 8px; }
.fc .fc-day-today { background: rgba(10,132,255,.06) !important; }
.fc .fc-day-today .fc-daygrid-day-number { color: var(--accent); font-weight: 700; }
.fc th { background: var(--bg-subtle); color: var(--text-tertiary); font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-color: var(--border) !important; }
.fc td, .fc th { border-color: var(--border) !important; }

/* Eventos */
.fc .fc-event {
  border: none !important;
  border-radius: 5px !important;
  font-size: .75rem !important;
  font-weight: 500 !important;
  padding: 2px 5px !important;
  cursor: pointer;
}
.fc .fc-event:hover { opacity: .85; }

/* Colores por tipo */
.fc .fc-event[data-type="hearing"]  { background: var(--color-red)    !important; }
.fc .fc-event[data-type="meeting"]  { background: var(--accent)        !important; }
.fc .fc-event[data-type="deadline"] { background: var(--color-amber)   !important; color: #1a1a1a !important; }
.fc .fc-event[data-type="call"]     { background: var(--color-teal)    !important; }
.fc .fc-event[data-type="task"]     { background: var(--color-green)   !important; }

/* List view */
.fc .fc-list-event:hover td { background: var(--bg-subtle) !important; }
.fc .fc-list-day-cushion { background: var(--bg-grouped) !important; }
.fc .fc-list-event-title a { color: var(--text-primary) !important; text-decoration: none; }
.fc .fc-list-empty { color: var(--text-tertiary); font-size: .875rem; }

/* ── Mobile UX additions ────────────────────────────────────────────────── */

/* Tablas con scroll horizontal en mobile */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Aplicar a todas las tablas dentro de cards en mobile */
@media (max-width: 768px) {
  .card table,
  .card__body table {
    min-width: 600px;
  }
  .card {
    overflow-x: auto;
  }

  /* Sidebar toggle visible siempre en mobile */
  #sidebarToggle {
    display: flex !important;
  }

  /* Overlay oscuro al abrir sidebar en mobile */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 499;
  }
  .sidebar-overlay.visible { display: block; }

  /* Topbar — compactar en mobile */
  .topbar__search { display: none; }
  .topbar { gap: 8px; }
}

/* Notificaciones — estilos del item */
.notif-item:hover { background: var(--bg-subtle); }
.notif-item--unread { background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT SYSTEM — fixes overflow, grids, tables
   ═══════════════════════════════════════════════════════════════════════════ */

/* KPI Grid — 4 col desktop → 2 tablet → 1 mobile */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* Detail Grid — contenido principal + sidebar fija */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .detail-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
}

/* Dashboard Grid — main + right panel */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 308px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* Table — fix table-layout y scroll en contenedor */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  table-layout: auto;  /* override fixed — evita overflow de columnas */
  min-width: 560px;    /* fuerza scroll horizontal antes de comprimir */
}
.table thead th {
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Topbar — prevenir compresión en < 1024px */
.topbar__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}
@media (max-width: 1024px) {
  .topbar__search { display: none; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; }
}

/* Dropdown — evitar salir del viewport */
.dropdown__menu {
  max-width: calc(100vw - 24px);
}

/* List item body — garantizar truncado */
.list-item__body {
  min-width: 0;
  overflow: hidden;
}

/* Flex children — evitar overflow por texto largo */
.flex-min-0 { min-width: 0; }

/* Card header — título + botón no se pisan */
.card__header {
  flex-shrink: 0;
  min-width: 0;
}
.card__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* Analytics charts — colapsar en tablet */
@media (max-width: 900px) {
  .analytics-chart-row {
    grid-template-columns: 1fr !important;
  }
}

/* Page header actions — wrap en mobile */
.page-header {
  flex-wrap: wrap;
  gap: 10px;
}
.page-header__actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Form row 2-col → 1 col en mobile */
@media (max-width: 640px) {
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Confirm modal animation ──────────────────────────────────────────── */
#confirmModal { animation: fadeIn .15s ease; }
#confirmModal > div { animation: slideUp .18s ease; }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Inline form field errors ─────────────────────────────────────────── */
.field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-red, #ef4444);
}
.form-control.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--color-red, #ef4444) !important;
  background: color-mix(in srgb, var(--color-red, #ef4444) 4%, transparent);
}

/* ── Search page input focus ring ─────────────────────────────────────── */
input[type=text]:focus { outline: none; }

/* ── Auth integrations logos ─────────────────────────────────────────── */
.auth-brand__integrations {
  padding: 14px 0 4px;
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 4px;
}
.auth-brand__int-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.45);
  margin-bottom: 12px;
}
.auth-brand__int-logos {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-brand__int-logo {
  height: 28px;
  display: flex;
  align-items: center;
  opacity: .85;
  transition: opacity .15s;
}
.auth-brand__int-logo:hover { opacity: 1; }
.auth-brand__int-logo img {
  height: 24px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ── Empty States (premium SVG) ───────────────────────────────────────── */
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:64px 24px;text-align:center;gap:12px}
.empty-state__icon{color:#8e8e93;margin-bottom:4px}
.empty-state__title{font-size:1.0625rem;font-weight:600;color:#1d1d1f;margin:0}
.empty-state__sub{font-size:0.875rem;color:#6e6e73;margin:0;max-width:340px}
/* ── Inline field errors ──────────────────────────────────────────────── */
.field-error{display:block;font-size:0.75rem;color:#ff3b30;margin-top:4px;font-weight:500}
.form-group input.is-invalid,.form-group select.is-invalid,.form-group textarea.is-invalid{border-color:#ff3b30!important}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM MICRO-INTERACTIONS & ANIMATIONS — CincoMind Hub v2.1
   ═══════════════════════════════════════════════════════════════════════════ */

/* Premium card hover */
.card {
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.card:hover {
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08));
}

/* Button micro-animations */
.btn {
  transition: all 150ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

/* Smooth sidebar active transition */
.sidebar__item {
  transition: background 150ms ease, color 150ms ease;
}

/* Table row hover */
.table tbody tr {
  transition: background 100ms ease;
}

/* Form focus rings */
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
  transition: box-shadow 150ms ease, border-color 150ms ease;
}

/* Badge pulse animation for notifications */
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}
.badge--pulse {
  animation: pulse-badge 2s infinite;
}

/* Skeleton loading */
@keyframes skeleton-shine {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary,#e5e5ea) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: 6px;
}

/* Fade in content */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-content {
  animation: fadeIn 200ms ease;
}

/* Premium scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ── Toast notifications ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: .9375rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 300ms ease;
}
.toast--success { background: #1c1c1e; color: #fff; }
.toast--error   { background: #ff3b30; color: #fff; }
@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── KPI trend indicator ─────────────────────────────────────────────────── */
.kpi-trend {
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.kpi-trend--up   { color: var(--color-green); background: var(--green-soft); }
.kpi-trend--down { color: var(--color-red);   background: var(--red-soft); }

/* ── Quick actions strip ─────────────────────────────────────────────────── */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}


/* ── Card selector (tipo Persona/Empresa) ────────────────────────────────── */
.card-option {
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: border-color .15s, background .15s, box-shadow .15s;
  cursor: pointer;
  background: var(--bg-primary);
}
.card-option:hover {
  background: var(--bg-secondary);
  border-color: rgba(10,132,255,.35);
}
.card-option.is-selected {
  border: 2px solid var(--color-blue);
  background: rgba(10,132,255,.05);
  box-shadow: 0 0 0 3px rgba(10,132,255,.08);
}

/* ── Autocomplete / Smart Select ─────────────────────────────────────────── */
.ac-wrap { position: relative; }
.ac-input {
  width: 100%;
  padding: 9px 38px 9px 12px;
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: .9375rem;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.ac-input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(10,132,255,.12);
}
.ac-clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-tertiary);
  font-size: 1rem; cursor: pointer;
  display: none; padding: 2px 4px;
  line-height: 1;
}
.ac-clear:hover { color: var(--text-primary); }
.ac-dropdown {
  position: fixed; /* fixed para escapar overflow:hidden de .card */
  background: var(--bg-primary);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 240px; overflow-y: auto;
  z-index: 9999;
  display: none;
}
.ac-dropdown.is-open { display: block; }
.ac-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid var(--separator);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.is-focused { background: var(--bg-secondary); }
.ac-item__label { font-size: .9375rem; font-weight: 500; flex: 1; }
.ac-item__sub { font-size: .75rem; color: var(--text-tertiary); }
.ac-empty { padding: 14px; text-align: center; font-size: .875rem; color: var(--text-tertiary); }
.ac-loading { padding: 14px; text-align: center; font-size: .875rem; color: var(--text-tertiary); }

/* Quick actions chip bar (aparece al seleccionar un contacto) */
.ac-quick-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 10px 12px;
  background: rgba(10,132,255,.05);
  border: 1px solid rgba(10,132,255,.15);
  border-radius: var(--radius-sm);
}
.ac-quick-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px;
  font-size: .8125rem; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.ac-quick-chip:hover { transform: translateY(-1px); }
.ac-quick-chip--blue { background: var(--color-blue); color: #fff; }
.ac-quick-chip--green { background: var(--color-green); color: #fff; }
.ac-quick-chip--gray { background: var(--bg-tertiary); color: var(--text-primary); }
