:root {
  /* =========================================================
     DESIGN SYSTEM: LUXURY REAL ESTATE / WARM EXECUTIVE
     ========================================================= */
  --bg: #f8f6f2;
  --bg-subtle: #f2eee8;
  --bg-raised: #ffffff;
  --bg-card-hover: #faf8f5;

  --ink: #14171d;
  --ink-secondary: #3d4653;
  --muted: #667085;
  --line: #e8e3da;
  --line-strong: #d5cdc0;
  --line-subtle: rgba(20, 23, 29, 0.05);

  /* Executive Obsidian Dark Chrome */
  --sidebar: #0e131b;
  --sidebar-surface: #151c27;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-text: #e2e8f0;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.06);

  /* Warm Executive Bronze & Copper */
  --accent: #b86228;
  --accent-hover: #9c4f1c;
  --accent-light: #fbf3ec;
  --accent-gold: #c28938;
  --accent-gradient: linear-gradient(135deg, #c46d32 0%, #9e4b17 100%);
  --accent-gradient-hover: linear-gradient(135deg, #b05c24 0%, #8c3e12 100%);
  --accent-glow: rgba(184, 98, 40, 0.2);
  --link: #b86228;

  /* Modern Semantic Accents */
  --red: #be123c;
  --red-soft: #fff1f2;
  --red-border: rgba(190, 18, 60, 0.22);

  --green: #059669;
  --green-soft: #ecfdf5;
  --green-border: rgba(5, 150, 105, 0.22);

  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: rgba(217, 119, 6, 0.24);

  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --blue-border: rgba(37, 99, 235, 0.22);

  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --purple-border: rgba(124, 58, 237, 0.22);

  /* Shadows & Depth */
  --shadow-xs: 0 1px 2px rgba(20, 23, 29, 0.04);
  --shadow-sm: 0 1px 3px rgba(20, 23, 29, 0.05), 0 1px 2px rgba(20, 23, 29, 0.03);
  --shadow: 0 4px 18px -2px rgba(20, 23, 29, 0.06), 0 2px 6px -1px rgba(20, 23, 29, 0.03);
  --shadow-md: 0 10px 28px -4px rgba(20, 23, 29, 0.08), 0 4px 10px -2px rgba(20, 23, 29, 0.04);
  --shadow-lg: 0 20px 42px -8px rgba(20, 23, 29, 0.12), 0 8px 18px -4px rgba(20, 23, 29, 0.06);

  /* Typography */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Plus Jakarta Sans", sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  color-scheme: light;
}

/* =========================================================
   BASE & RESET
   ========================================================= */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -5%, rgba(196, 109, 50, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 15%, rgba(194, 137, 56, 0.05), transparent 50%);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

a {
  color: var(--link);
  transition: color 0.15s ease;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img, svg {
  display: block;
}

.skip {
  position: absolute;
  left: 14px;
  top: -60px;
  background: white;
  color: var(--ink);
  padding: 10px 16px;
  z-index: 999;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip:focus {
  top: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.noscript {
  padding: 24px;
}

/* =========================================================
   LOGIN SCREEN (LUXURY EXECUTIVE SHOWCASE)
   ========================================================= */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--bg);
}

.login-aside {
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(196, 109, 50, 0.22), transparent 55%),
    radial-gradient(750px 450px at 100% 100%, rgba(194, 137, 56, 0.15), transparent 50%),
    linear-gradient(180deg, #0e131b 0%, #080c12 100%);
  color: white;
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.login-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.wordmark {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.wordmark strong {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.wordmark small {
  color: var(--sidebar-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-aside h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 16px 0 16px;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.login-aside .lede {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.6;
  max-width: 44ch;
  position: relative;
  z-index: 2;
  margin: 0 0 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 30px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: rgba(196, 109, 50, 0.16);
  border: 1px solid rgba(196, 109, 50, 0.35);
  color: #fbd6b4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

.points {
  list-style: none;
  padding: 0;
  margin: 16px 0 32px;
  position: relative;
  z-index: 2;
}

.points li {
  position: relative;
  padding-left: 32px;
  margin: 14px 0;
  color: #e2e8f0;
  font-size: 15px;
  font-weight: 500;
}

.points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid #c26d38;
  border-bottom: 2.5px solid #c26d38;
  transform: rotate(-45deg);
}

.faces-wrap {
  position: relative;
  z-index: 2;
  margin-top: 12px;
}

.faces {
  display: flex;
}

.faces span {
  width: 44px;
  height: 44px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2.5px solid #0e131b;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: white;
  background: var(--accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.faces span:first-child {
  margin-left: 0;
  background: linear-gradient(135deg, #c46d32, #9e4b17);
}
.faces span:nth-child(2) {
  background: #059669;
}
.faces span:nth-child(3) {
  background: #2563eb;
}
.faces span:nth-child(4) {
  background: #7c3aed;
}

.faces-note {
  margin-top: 12px;
  font-size: 13.5px !important;
  color: #94a3b8 !important;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--bg);
}

.panel-card {
  width: min(460px, 100%);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.panel-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.panel-header {
  margin-bottom: 24px;
}

.login-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.panel-card h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.panel-card .lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.demo-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-btn {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  text-align: left;
  border-radius: var(--radius);
  min-height: 58px;
}

.demo-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.demo-avatar.secondary {
  background: var(--bg-subtle);
  color: var(--accent);
}

.demo-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.demo-info strong {
  font-size: 14px;
  font-weight: 700;
}

.demo-info small {
  font-size: 12px;
  opacity: 0.85;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin: 22px 0 18px;
  text-transform: lowercase;
}

.or::before, .or::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.w-full {
  width: 100% !important;
}

/* =========================================================
   APP SHELL & SIDEBAR NAVIGATION
   ========================================================= */
.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100%;
  background:
    radial-gradient(400px 300px at 0% 0%, rgba(196, 109, 50, 0.16), transparent 70%),
    linear-gradient(180deg, #10151e 0%, #0a0d14 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  z-index: 20;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 24px 20px 14px;
  color: white;
}

.brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-text small {
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}

.side-nav::-webkit-scrollbar {
  width: 5px;
}
.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

.nav-group {
  margin: 18px 10px 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-link svg {
  color: #64748b;
  transition: color 0.15s ease;
  flex: 0 0 auto;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: #f1f5f9;
}

.nav-link:hover svg {
  color: #f1f5f9;
}

.nav-link.is-active {
  background: linear-gradient(90deg, rgba(196, 109, 50, 0.22) 0%, rgba(255, 255, 255, 0.04) 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #c26d38;
}

.nav-link.is-active svg {
  color: #e0965d;
}

.badge {
  margin-left: auto;
  background: linear-gradient(135deg, #c46d32, #9e4b17);
  color: #ffffff;
  border-radius: var(--radius-full);
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
  box-shadow: 0 2px 6px rgba(184, 98, 40, 0.35);
}

.side-foot {
  padding: 16px 14px;
  border-top: 1px solid var(--sidebar-border);
  background: rgba(0, 0, 0, 0.15);
}

.me {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.me-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.me-info span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}

.role-selector-wrap {
  margin-bottom: 10px;
}

.role-selector-wrap .field span {
  color: var(--sidebar-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.role-selector-wrap select {
  background: #141b25;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  min-height: 36px;
  font-size: 13px;
  padding: 6px 10px;
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-sm {
  min-height: 34px !important;
  font-size: 12px !important;
  padding: 0 8px !important;
  border-radius: var(--radius-sm) !important;
}

.side-foot .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.side-foot .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.scrim {
  display: none;
}
.btn.nav-toggle {
  display: none;
}

/* =========================================================
   MAIN VIEW & TOPBAR
   ========================================================= */
.main {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 32px 36px;
  overscroll-behavior: contain;
}

.main::-webkit-scrollbar {
  width: 8px;
}
.main::-webkit-scrollbar-thumb {
  background: #dcd5cb;
  border-radius: 99px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0 18px;
  background: rgba(248, 246, 242, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232, 227, 218, 0.8);
  margin-bottom: 22px;
}

.topbar-titles {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 2.2vw, 34px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}

.lede {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 74ch;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.view {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.note {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

/* =========================================================
   CARDS & CONTAINERS
   ========================================================= */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card h2, .modal-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.modal-card h2 {
  font-size: 26px;
  margin-bottom: 12px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
}

.layout-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.layout-2 > * {
  min-width: 0;
}

/* =========================================================
   DASHBOARD EXECUTIVE WIDGETS
   ========================================================= */
.dash-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #faf7f2 100%);
  border: 1px solid var(--line);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.dash-welcome::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 109, 50, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(184, 98, 40, 0.2);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  margin-bottom: 8px;
}

.dash-welcome h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.dash-welcome .lede {
  margin: 0;
  font-size: 14.5px;
}

.welcome-kpi {
  display: flex;
  gap: 20px;
  flex: 0 0 auto;
}

.welcome-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
  min-width: 130px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.welcome-stat small {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.welcome-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

/* =========================================================
   KPI METRICS GRID
   ========================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-grid.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(184, 98, 40, 0.12);
}

.kpi-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--muted);
}

.kpi-value {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
}

.kpi-label {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.kpi-note {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* KPI Tones */
.kpi-alert {
  background: linear-gradient(180deg, #fffafa, #ffffff);
  border-color: #fecdd3;
}
.kpi-alert .kpi-icon {
  background: var(--red-soft);
  color: var(--red);
  box-shadow: 0 2px 6px rgba(190, 18, 60, 0.15);
}
.kpi-alert .kpi-value {
  color: var(--red);
}
.kpi-alert .kpi-badge {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.kpi-soon {
  background: linear-gradient(180deg, #fffdfa, #ffffff);
  border-color: #fde68a;
}
.kpi-soon .kpi-icon {
  background: var(--amber-soft);
  color: var(--amber);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
}
.kpi-soon .kpi-value {
  color: var(--amber);
}
.kpi-soon .kpi-badge {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

/* =========================================================
   PIPELINE / EMBUDO COMERCIAL
   ========================================================= */
.pipeline-card .card-head {
  margin-bottom: 12px;
}

.pipeline-badge {
  font-size: 12px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(184, 98, 40, 0.2);
}

.pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipe {
  display: grid;
  grid-template-columns: minmax(160px, 180px) 1fr 45px 36px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 12px;
  text-align: left;
  transition: all 0.16s ease;
}

.pipe:hover {
  background: var(--bg-subtle);
  border-color: var(--line);
  transform: translateX(3px);
}

.pipe-label {
  display: flex;
  align-items: center;
}

.pipe-bar {
  height: 9px;
  background: #ebe5dc;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.pipe-bar i {
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pipe-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

.pipe-count {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  text-align: right;
}

/* =========================================================
   UPCOMING FOLLOW-UPS & LINK ROWS
   ========================================================= */
.upcoming-card .card-head {
  margin-bottom: 14px;
}

.view-all-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease;
}

.view-all-link:hover {
  transform: translateX(3px);
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-row {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-height: 52px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: all 0.18s ease;
}

.link-row:hover {
  background: #fffcf8;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(184, 98, 40, 0.1);
  transform: translateY(-1px);
}

.link-row-main {
  flex: 1;
  min-width: 0;
}

.link-row-main strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-row-main small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lr-when {
  font-weight: 700;
  color: var(--ink);
}

.lr-agent {
  color: var(--accent);
  font-weight: 600;
}

.link-row-arrow {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  opacity: 0.6;
  transition: transform 0.18s ease, color 0.18s ease;
}

.link-row:hover .link-row-arrow {
  transform: translateX(3px);
  color: var(--accent);
  opacity: 1;
}

/* =========================================================
   STATUS PILLS & BADGES (EXECUTIVE PALETTE)
   ========================================================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 11px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-color, currentColor);
  flex: 0 0 auto;
}

.neutral {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(100, 116, 139, 0.18);
}

.st-nuevo {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.st-contacto {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.st-visita, .st-hoy {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.st-negociacion {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.st-ganado, .st-programado {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.st-perdido, .st-vencido {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid rgba(190, 18, 60, 0.22);
}

.pill-type {
  background: #faf7f2;
  color: var(--ink);
  border: 1px solid var(--line);
}

.date-chip {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.agent-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.prospect-link {
  text-decoration: none;
  color: var(--ink);
}
.prospect-link:hover {
  color: var(--accent);
}

.desc-text {
  color: var(--ink-secondary);
  font-size: 13.5px;
}

/* =========================================================
   TABLES & LISTS
   ========================================================= */
.table-wrap {
  overflow-x: auto;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #e2dbd0;
  border-radius: 99px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

caption {
  text-align: left;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbf9f6;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
  font-size: 14px;
}

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

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: #fbf8f3;
}

td a {
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* =========================================================
   TOOLBARS, FORMS & INPUTS
   ========================================================= */
.toolbar, .action-row, .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.toolbar {
  margin-bottom: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-xs);
}

.toolbar > .note {
  flex: 1 0 100%;
  margin-top: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
}

.field.grow {
  flex: 1;
  min-width: 240px;
}

.field.full, .form-grid .full {
  grid-column: 1 / -1;
  min-width: 0;
}

.field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dcd5cb;
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 98, 40, 0.16);
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

[aria-invalid="true"] {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.14) !important;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  background: white;
  user-select: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(184, 98, 40, 0.28);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 18px rgba(184, 98, 40, 0.38);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  border-color: #dcd5cb;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: #fbf8f3;
  border-color: #cbbfaf;
  color: var(--ink);
}

.btn-danger {
  background: white;
  border-color: #fecdd3;
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: #fda4af;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-secondary);
}
.back:hover {
  color: var(--accent);
}

/* =========================================================
   DETAILS, METADATA & TIMELINE
   ========================================================= */
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 16px 0 0;
}

.meta-grid dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-grid dd {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.interest-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
}

.meter {
  display: inline-block;
  width: 76px;
  height: 8px;
  background: #e8e3da;
  border-radius: var(--radius-full);
  vertical-align: middle;
  margin-right: 8px;
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}

.timeline {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}

.tl-item {
  position: relative;
  padding: 0 0 20px 24px;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 98, 40, 0.15);
}

.tl-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.tl-top time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.tl-item p {
  margin: 0 0 6px;
  color: var(--ink);
}

/* =========================================================
   CHARTS & STATISTICS CARDS
   ========================================================= */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

.chart-card {
  overflow: hidden;
}

.vbars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-height: 200px;
  padding-top: 20px;
}

.vbar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vbar-value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}

.vbar-track {
  width: 100%;
  max-width: 48px;
  height: 130px;
  background: #f1ede6;
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.vbar-fill {
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vbar-label {
  font-size: 12.5px;
  text-align: center;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.hbar {
  margin-bottom: 14px;
}

.hbar-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.hbar-track {
  height: 10px;
  background: #f1ede6;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hbar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c46d32, #b86228);
  border-radius: var(--radius-full);
}

.pie-wrap {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
}

.pie {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}

.pie-hole {
  position: absolute;
  inset: 44px;
  background: var(--bg-raised);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pie-hole strong {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.pie-hole span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink);
}

.legend strong {
  margin-left: auto;
  font-family: var(--display);
  font-weight: 700;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.trend svg {
  width: 100%;
  height: auto;
}

/* =========================================================
   CONFIG, CATALOGS & CRITERIA
   ========================================================= */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.catalog-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.catalog-head .field {
  min-width: 0;
  flex: 1;
}
.catalog-head input {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.catalog-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.catalog-row input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #dcd5cb;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: white;
}

/* =========================================================
   FORM STUDIO & FORM BUILDER (LUXURY EXECUTIVE)
   ========================================================= */
.form-studio {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Studio Form Switcher Tabs */
.studio-nav-tabs {
  display: flex;
  gap: 10px;
  background: #f1ede7;
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  align-items: center;
  flex-wrap: wrap;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-tab-btn svg {
  color: var(--muted);
  transition: color 0.16s ease;
}

.studio-tab-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
}

.studio-tab-btn:hover svg {
  color: var(--ink);
}

.studio-tab-btn.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.studio-tab-btn.is-active svg {
  color: var(--accent);
}

.studio-tab-count {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #f5f1ea;
  color: var(--ink-secondary);
  transition: all 0.16s ease;
}

.studio-tab-btn.is-active .studio-tab-count {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(184, 98, 40, 0.2);
}

.tl-custom-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tl-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8f6f2;
  border: 1px solid #e5dfd4;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.form-studio-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #faf6f0 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.form-studio-hero::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 109, 50, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(184, 98, 40, 0.25);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  margin-bottom: 8px;
}

.form-studio-hero h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}

.form-studio-hero .lede {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-metrics {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}

.metric-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  min-width: 95px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.metric-box small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.metric-box strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}

.studio-col-builder {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.studio-col-preview {
  position: sticky;
  top: 20px;
}

/* Create new field card */
.studio-create-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbf9f6 100%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
}

.studio-create-card .card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.studio-create-card .create-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.studio-create-card .create-icon svg {
  width: 18px;
  height: 18px;
}

.studio-create-card h3 {
  margin: 0 0 3px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.studio-create-card p.lede {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.create-fields-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 14px;
  align-items: end;
  margin: 16px 0;
}

.create-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.studio-preview-hint {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Field list stack */
.field-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-item-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-item-card:hover {
  border-color: #cbbfb0;
  box-shadow: var(--shadow-sm);
}

.field-item-card.is-custom {
  border-left: 3px solid var(--accent);
}

.fic-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fic-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.fic-pos {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1ede7;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
}

.fic-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: #fbf9f6;
  color: var(--ink-secondary);
  border: 1px solid #e8e1d6;
}

.fic-type-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.tag-system {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f1ede7;
  color: #64748b;
}

.tag-custom {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(184, 98, 40, 0.25);
}

.fic-label-input {
  flex: 1;
  min-width: 180px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  background: #faf8f5;
  border: 1px solid #e5dfd4;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: all 0.16s ease;
}

.fic-label-input:hover {
  background: #f5f0e8;
  border-color: #d8cebd;
}

.fic-label-input:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 98, 40, 0.14);
  outline: none;
}

.fic-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.reorder-btns {
  display: inline-flex;
  gap: 2px;
  background: #f5f1eb;
  padding: 2px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-icon:hover {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-icon.btn-danger-icon:hover {
  background: #fee2e2;
  color: var(--red);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* Secondary properties row */
.fic-props-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid #f2ede5;
  flex-wrap: wrap;
}

.fic-prop-controls {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.fic-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.fic-control select {
  font-size: 13px;
  padding: 5px 10px;
  min-height: 34px;
  border: 1px solid #dcd5cb;
  border-radius: var(--radius-sm);
  background: white;
}

/* Switch toggle component */
.toggle-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  user-select: none;
}

.toggle-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 38px;
  height: 22px;
  background: #dcd5cb;
  border-radius: 99px;
  position: relative;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  flex: 0 0 auto;
}

.toggle-track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-control input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-control input:checked + .toggle-track::before {
  transform: translateX(16px);
}

.toggle-control input:focus-visible + .toggle-track {
  box-shadow: 0 0 0 3px rgba(184, 98, 40, 0.25);
}

/* Catalog status bar & custom chips options panel */
.fic-options-panel {
  background: #faf8f5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 4px;
}

.catalog-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.csb-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.csb-left svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.csb-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.csb-preview code {
  background: #f1ede7;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink);
  font-family: monospace;
}

.custom-chips-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.custom-chip-item {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #dcd5cb;
  border-radius: var(--radius-full);
  padding: 2px 8px 2px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease;
}

.custom-chip-item:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(184, 98, 40, 0.15);
}

.chip-edit-input {
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  min-width: 65px;
  padding: 4px 0;
}

.chip-edit-input:focus {
  outline: none;
  color: var(--accent);
}

.chip-delete-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0;
  transition: all 0.15s ease;
}

.chip-delete-btn:hover {
  background: #fee2e2;
  color: var(--red);
}

.chip-delete-btn svg {
  width: 12px;
  height: 12px;
}

.custom-add-option-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.custom-add-option-form input {
  flex: 1;
  min-height: 36px;
  font-size: 13px;
  border: 1px solid #dcd5cb;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  background: #ffffff;
}

.custom-add-option-form .btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
}

/* =========================================================
   LIVE PREVIEW PANEL (STUDIO CHROME)
   ========================================================= */
.preview-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.preview-chrome {
  background: #0f141d;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chrome-dots {
  display: inline-flex;
  gap: 6px;
}

.chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.chrome-dots span:nth-child(1) { background: #ef4444; }
.chrome-dots span:nth-child(2) { background: #f59e0b; }
.chrome-dots span:nth-child(3) { background: #10b981; }

.chrome-title {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
  font-family: var(--display);
}

.chrome-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  padding: 2px 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chrome-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.preview-info-banner {
  background: linear-gradient(90deg, #faf7f2 0%, #f4ede2 100%);
  border-bottom: 1px solid var(--line);
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.preview-info-banner svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: 0 0 auto;
}

.preview-mock-window {
  padding: 20px 22px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 23, 29, 0.15) transparent;
}

.preview-mock-window::-webkit-scrollbar {
  width: 5px;
}

.preview-mock-window::-webkit-scrollbar-track {
  background: transparent;
}

.preview-mock-window::-webkit-scrollbar-thumb {
  background: rgba(20, 23, 29, 0.15);
  border-radius: 99px;
}

.preview-mock-window::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 23, 29, 0.3);
}

.mock-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mock-modal-header strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.mock-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1ede7;
  color: var(--ink-secondary);
}

.preview-fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.mock-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

/* =========================================================
   PROSPECT CAPTURE MODAL (STRUCTURED SECTIONS)
   ========================================================= */
dialog:has(.modal-prospect-container) {
  width: min(860px, calc(100vw - 32px));
}

.modal-prospect-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prospect-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pfh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(184, 98, 40, 0.25);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  margin-bottom: 6px;
}

.prospect-form-head h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
}

.prospect-form-head .lede {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.pfh-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #f4ede2;
  border: 1px solid #dfd4c5;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.pfh-owner-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.modal-close-cross {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 0 0 auto;
}

.modal-close-cross:hover {
  background: #f1ede7;
  color: var(--ink);
  border-color: #cbbfb0;
}

.p-form-section {
  background: #ffffff;
  border: 1px solid #ebe5dc;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 4px;
}

.pfs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f2ede6;
}

.pfs-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c46d32, #9e4b17);
  color: white;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(184, 98, 40, 0.25);
  flex: 0 0 auto;
}

.pfs-header h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.pfs-header .pfs-sub {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

.req-star {
  color: #e11d48;
  font-weight: 800;
  margin-left: 3px;
}

.opt-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.p-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

/* =========================================================
   INTERACTION MODAL
   ========================================================= */
.modal-interaction-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.interaction-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ifh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  margin-bottom: 6px;
}

.interaction-form-head h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
}

.ifh-name {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.ifh-name strong {
  color: var(--ink);
}

.interaction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}


.criteria {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 16px 14px;
  box-shadow: var(--shadow-xs);
}

.criteria summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  min-height: 42px;
  display: flex;
  align-items: center;
  color: var(--ink);
}

.criteria ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}
.empty p {
  margin: 0 0 14px;
  font-size: 15px;
}

.error {
  color: var(--red);
  font-weight: 700;
  font-size: 13.5px;
  margin: 8px 0;
}
.error:empty {
  display: none;
}

/* =========================================================
   MODALS, DIALOGS & TOAST
   ========================================================= */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

dialog.narrow {
  width: min(500px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(14, 19, 27, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  box-shadow: var(--shadow-lg);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(14px);
  background: #11161f;
  color: white;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  max-width: min(92vw, 480px);
  font-size: 14px;
  font-weight: 600;
}

#toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   RESPONSIVENESS
   ========================================================= */
@media (max-width: 1280px) {
  .kpi-grid.cols-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-grid.cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-welcome {
    flex-direction: column;
    align-items: flex-start;
  }
  .welcome-kpi {
    width: 100%;
  }
  .welcome-stat {
    flex: 1;
  }
}

@media (max-width: 960px) {
  html, body, #root {
    overflow: auto;
    height: auto;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-aside {
    padding: 40px 24px;
  }
  .app {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .sidebar {
    position: fixed;
    z-index: 50;
    height: 100vh;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.nav-open .sidebar {
    transform: none;
  }
  body.nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(14, 19, 27, 0.6);
    backdrop-filter: blur(4px);
    border: 0;
    z-index: 40;
  }
  .btn.nav-toggle {
    display: inline-flex;
  }
  .main {
    height: auto;
    overflow: visible;
    padding: 0 18px 36px;
  }
  .layout-2, .chart-grid, .split, .form-grid, .meta-grid, .kpi-grid, .kpi-grid.cols-6, .catalog-grid, .field-config-main, .field-config-main.cols-3, .studio-layout, .create-fields-grid, .interaction-grid {
    grid-template-columns: 1fr;
  }
  .form-studio-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .studio-col-preview {
    position: static;
  }
  .span-2, .form-grid .full {
    grid-column: auto;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  table {
    min-width: 640px;
  }
}

/* =========================================================
   PROFILING SECTIONS: VAK (SENSORY) & DISC (BEHAVIORAL)
   ========================================================= */

.profiling-card {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(20, 23, 29, 0.04);
  margin-top: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.profiling-card:hover {
  box-shadow: 0 4px 16px rgba(20, 23, 29, 0.06);
}

.profiling-card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-subtle);
  margin-bottom: 18px;
}

.card-head-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.vak-avatar {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.disc-avatar {
  background: linear-gradient(135deg, #ffe4e6 0%, #fee2e2 100%);
  color: #be123c;
  border: 1px solid #fecdd3;
}

.section-lead {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.45;
}

.section-lead strong {
  color: var(--ink);
  font-weight: 600;
}

/* VAK Grid */
.vak-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.vak-card {
  border: 1.5px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.vak-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.vak-card.is-active {
  border-width: 2px;
}

.vak-card.vak-visual.is-active {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
}

.vak-card.vak-auditivo.is-active {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

.vak-card.vak-kinestesico.is-active {
  border-color: #10b981;
  background: linear-gradient(180deg, #f7fdf9 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.vak-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vak-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.vak-icon-bubble {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
}

.vak-visual .vak-icon-bubble {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.vak-auditivo .vak-icon-bubble {
  background: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}

.vak-kinestesico .vak-icon-bubble {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

.vak-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  color: var(--muted);
}

.vak-switch-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.vak-card.is-active .vak-switch-btn {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.vak-predominant-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.btn-make-primary {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-make-primary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.vak-body {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.vak-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.vak-traits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vak-traits-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.vak-traits-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: bold;
}

.vak-quotes-box {
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 10px;
}

.vak-advisor-tip {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  background: #faf8f5;
  border: 1px solid #f1eae0;
  color: var(--ink);
}

.vak-advisor-tip strong {
  display: block;
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* Profiling Footer Rows */
.profiling-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
  background: #faf9f6;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.pfr-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.compact-field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.compact-field select {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.pfr-notes {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}

.pfr-notes.full-notes {
  flex: 1 1 100%;
}

.inline-notes-input {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

/* =========================================================
   DISC BEHAVIORAL PROFILE SECTION
   ========================================================= */

.disc-hero {
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.disc-hero-dominante {
  background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 60%, #fff5f5 100%);
  border: 1.5px solid #fecdd3;
}

.disc-hero-sociable {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 60%, #faf5ff 100%);
  border: 1.5px solid #ddd6fe;
}

.disc-hero-analitico {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 60%, #f8fafc 100%);
  border: 1.5px solid #bae6fd;
}

.disc-hero-estable {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 60%, #f0fdf4 100%);
  border: 1.5px solid #a7f3d0;
}

.disc-hero-empty {
  background: #f8fafc;
  border: 1.5px dashed var(--line-strong);
}

.disc-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.disc-letter-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.disc-hero-dominante .disc-letter-badge {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
}

.disc-hero-sociable .disc-letter-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.disc-hero-analitico .disc-letter-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.disc-hero-estable .disc-letter-badge {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.disc-hero-content {
  flex: 1;
  min-width: 260px;
}

.disc-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.disc-hero-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 6px;
}

.disc-hero-dominante .disc-hero-tag {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.disc-hero-sociable .disc-hero-tag {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.disc-hero-analitico .disc-hero-tag {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.disc-hero-estable .disc-hero-tag {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.disc-hero-content h3 {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  font-family: 'Outfit', sans-serif;
}

.disc-hero-tagline {
  font-size: 14.5px;
  font-weight: 600;
  margin: 4px 0 10px;
}

.disc-hero-dominante .disc-hero-tagline { color: #9f1239; }
.disc-hero-sociable .disc-hero-tagline { color: #5b21b6; }
.disc-hero-analitico .disc-hero-tagline { color: #075985; }
.disc-hero-estable .disc-hero-tagline { color: #065f46; }

.disc-hero-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  margin: 0 0 12px;
}

.disc-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.disc-trait-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 4-Quadrant Buttons Selector */
.disc-quadrants-wrap {
  margin-bottom: 22px;
}

.disc-label-help {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.disc-quadrant-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.disc-qbtn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.disc-qbtn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.qbtn-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  flex-shrink: 0;
}

.disc-qbtn-d .qbtn-badge { background: #be123c; }
.disc-qbtn-i .qbtn-badge { background: #7c3aed; }
.disc-qbtn-c .qbtn-badge { background: #0284c7; }
.disc-qbtn-s .qbtn-badge { background: #059669; }

.qbtn-body {
  display: flex;
  flex-direction: column;
}

.qbtn-body strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.qbtn-body small {
  font-size: 11.5px;
  color: var(--muted);
}

.disc-qbtn.is-active {
  border-width: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.disc-qbtn-d.is-active {
  border-color: #be123c;
  background: #fff1f2;
}

.disc-qbtn-i.is-active {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.disc-qbtn-c.is-active {
  border-color: #0284c7;
  background: #f0f9ff;
}

.disc-qbtn-s.is-active {
  border-color: #059669;
  background: #ecfdf5;
}

/* Commercial Intelligence 4-Box Grid */
.disc-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.guide-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.guide-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-subtle);
}

.guide-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.guide-box-sell .guide-icon { background: #dcfce7; color: #15803d; }
.guide-box-avoid .guide-icon { background: #fee2e2; color: #b91c1c; }
.guide-box-traits .guide-icon { background: #e0f2fe; color: #0369a1; }
.guide-box-close .guide-icon { background: #fef3c7; color: #b45309; }

.guide-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.guide-box li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.guide-box-sell li::before {
  content: '✓';
  position: absolute;
  left: 2px;
  color: #10b981;
  font-weight: bold;
}

.guide-box-avoid li::before {
  content: '✕';
  position: absolute;
  left: 2px;
  color: #ef4444;
  font-weight: bold;
}

.guide-box-traits li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: #0284c7;
  font-weight: bold;
}

.guide-close-callout {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #92400e;
  font-style: italic;
  font-weight: 500;
}

/* Prospect Table Badges */
.row-profiling-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.disc-chip-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.disc-chip-mini.disc-dominante {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.disc-chip-mini.disc-sociable {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.disc-chip-mini.disc-analitico {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.disc-chip-mini.disc-estable {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.vak-chip-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--line);
}

.vak-chip-mini.is-primary {
  background: #f1f5f9;
  color: var(--ink);
  font-weight: 700;
  border-color: #cbd5e1;
}

/* Modal Form Styles for VAK and DISC */
.modal-profiling-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.modal-check-card {
  border: 1.5px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-check-card:hover {
  border-color: var(--line-strong);
  background: #faf8f5;
}

.modal-check-card input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.modal-check-content strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}

.modal-check-content small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}

.modal-disc-radios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.modal-radio-card {
  border: 1.5px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-radio-card:hover {
  border-color: var(--line-strong);
  background: #faf8f5;
}

.modal-radio-card input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.modal-radio-body strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.modal-radio-body small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .vak-channel-grid {
    grid-template-columns: 1fr;
  }
  .disc-quadrant-buttons {
    grid-template-columns: 1fr 1fr;
  }
  .disc-guide-grid {
    grid-template-columns: 1fr;
  }
  .modal-profiling-grid {
    grid-template-columns: 1fr;
  }
  .modal-disc-radios {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .disc-quadrant-buttons {
    grid-template-columns: 1fr;
  }
  .modal-disc-radios {
    grid-template-columns: 1fr;
  }
  .profiling-footer-row {
    flex-direction: column;
    align-items: stretch;
  }
  .pfr-notes {
    min-width: auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

