*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colores Connect Design System (tokens/colors.css) */
  --bg:        #F6F8FC; /* --neutral-100 / --surface-page */
  --surface:   #FFFFFF; /* --neutral-50 / --surface-card */
  --border:    #E2E8F0; /* --neutral-300 / --border-subtle */
  --primary:   #7F56D9; /* --button-primary-bg */
  --primary-l: #F1E7FA; /* --purple-100 */
  --primary-d: #6941C6; /* hover documentado del primary */
  --teal:      #00B4DB; /* --cyan-600 — acento oficial (datos, estados activos) */
  --teal-l:    #DBF9FF; /* --cyan-100 */
  --text:      #0E1323; /* --connect-navy */
  --muted:     #6B7280; /* --connect-gray */
  --muted-l:   #94A3B8; /* --neutral-500 */

  /* Sidebar dark */
  --sb-bg:       #1C1E2B;
  --sb-bg2:      #14151F;
  --sb-border:   rgba(255,255,255,0.07);
  --sb-text:     rgba(255,255,255,0.88);
  --sb-muted:    rgba(255,255,255,0.45);
  --sb-muted-l:  rgba(255,255,255,0.25);
  --sb-hover:    rgba(255,255,255,0.06);
  --sb-active:   rgba(127,86,217,0.18);

  /* KPI accent colors */
  --blue:   #2563EB; /* --blue-500 */
  --blue-l: #E0E9FC; /* --blue-100 */
  --orange: #FE931A; /* --safety-500 */
  --org-l:  #FFF3E5; /* --safety-100 */
  --amber:  #EFB008; /* --warning-300 */
  --amb-l:  #FFF5D5; /* --warning-100 */
  --green:  #0EA78C; /* --fleet-600 */
  --grn-l:  #BBF9EE; /* --fleet-100 */

  --sidebar-w: 224px;
  --header-h:  64px;
  --radius:    12px;

  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-primary); font-size: 14px; display: flex; overflow: hidden; }

.is-hidden.is-hidden { display: none; }

/* Lucide icons (Connect Design System icon set) swapped in for emoji */
.ico-svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ══ SIDEBAR (dark) ══ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

/* ── Collapsed state ── */
.sidebar.collapsed { width: 56px; }
.sidebar.collapsed .sb-logo { padding: 12px 0; justify-content: center; }
.sidebar.collapsed .sb-toggle { margin-left: 0; }
.sidebar.collapsed .sb-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .sb-section-label { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }
.sidebar.collapsed .sb-nav { padding: 12px 8px; }
.sidebar.collapsed .sb-link { padding: 9px 0; justify-content: center; gap: 0; }
.sidebar.collapsed .sb-link span:not(.sb-ico):not(.sb-badge) { display: none; }
.sidebar.collapsed .sb-link .sb-ico { width: 20px; height: 20px; opacity: .55; }
.sidebar.collapsed .sb-link.active .sb-ico { opacity: 1; }
.sidebar.collapsed .sb-badge { display: none; }
.sidebar.collapsed .sb-footer { padding: 12px 0; justify-content: center; flex-direction: column; gap: 8px; }
.sidebar.collapsed .sb-user-info,
.sidebar.collapsed .sb-logout-btn span { display: none; }
.sidebar.collapsed .sb-logout-btn { padding: 5px; border: none; }

/* Toggle button — lives inside sb-logo, right side */
.sb-toggle {
  margin-left: auto; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--sb-hover); border: 1px solid var(--sb-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--sb-muted);
  transition: background .15s, color .15s;
}
.sb-toggle:hover { background: rgba(255,255,255,0.1); color: var(--sb-text); }
.sb-toggle svg { transition: transform .25s cubic-bezier(.4,0,.2,1); flex-shrink: 0; }
.sidebar.collapsed .sb-toggle { margin-left: 0; }
.sidebar.collapsed .sb-toggle svg { transform: rotate(180deg); }

.sb-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-logo-toggle-wrap { padding: 12px 14px; align-items: center; justify-content: flex-end; }
.sb-logo img { height: 28px; }
.sb-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.sb-logo-text .l1 { font-size: 14px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.sb-logo-text .l2 { font-size: 13px; font-weight: 700; color: #8B84FF; letter-spacing: -0.01em; }

.sb-nav { flex: 1; padding: 12px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }

.sb-section-label {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sb-muted-l); padding: 12px 10px 6px; margin-top: 4px;
}
.sb-section-label:first-child { padding-top: 4px; }

.sb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--sb-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s;
  text-decoration: none; background: none; border: none;
  width: 100%; font-family: inherit; text-align: left;
  position: relative;
}
.sb-link:hover  { background: var(--sb-hover); color: var(--sb-text); }
.sb-link.active { background: var(--sb-active); color: #9F75F2; font-weight: 600; }
.sb-link .sb-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .4; }
.sb-link:hover .sb-ico { opacity: .7; }
.sb-link.active .sb-ico { opacity: 1; }
.sb-badge {
  margin-left: auto; background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 100px;
  padding: 1px 6px; min-width: 18px; text-align: center;
}

.sb-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sb-border);
  display: flex; align-items: center; gap: 10px;
}
.sb-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #9F75F2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-primary); font-size: 12px; font-weight: 700; color: #fff;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-family: var(--font-primary); font-size: 13px; font-weight: 600; color: var(--sb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-family: var(--font-primary); font-size: 11px; color: var(--sb-muted); }
.sb-logout-btn {
  background: none; border: 1px solid var(--sb-border); cursor: pointer; color: var(--sb-muted);
  padding: 5px 10px; border-radius: 6px; transition: color .15s, background .15s, border-color .15s;
  display: flex; align-items: center; gap: 5px; font-family: var(--font-primary); font-size: 11px; font-weight: 600;
}
.sb-logout-btn:hover { color: var(--sb-text); background: var(--sb-hover); border-color: rgba(255,255,255,0.15); }

/* ══ MAIN ══ */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Top bar */
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px; gap: 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 var(--border);
}
.topbar-search {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
}
.topbar-search input {
  background: none; border: none; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text);
  width: 100%;
}
.topbar-search input::placeholder { color: var(--muted-l); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: none; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; color: var(--muted);
  position: relative;
}
.tb-icon-btn:hover { background: var(--bg); }
.tb-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; background: var(--primary); border-radius: 50%;
  border: 1.5px solid white;
}
.tb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #A78BFA);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; cursor: pointer;
}
.workspace-logo-img { height: 28px; display: block; flex-shrink: 0; }

/* Content scroll area */
.content { flex: 1; overflow-y: auto; padding: 32px; }

/* ── Greeting ── */
.greeting { margin-bottom: 24px; }
.greeting-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2px; }
.greeting h1 { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.greeting h1 span { color: var(--primary); }
.greeting-date { font-size: 12px; color: var(--muted); }
.greeting-cargo { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.greeting-sub { font-size: 13px; color: var(--muted); }

/* ── KPI Cards ── */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
@media(max-width:900px){ .kpi-row { grid-template-columns: repeat(2,1fr); } }

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .2s;
}
.kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.kpi-clickable { cursor: pointer; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.kpi-num { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi-foot { font-size: 11px; color: var(--muted); }

.kpi-blue  .kpi-num { color: var(--blue);   } .kpi-blue  .kpi-icon { background: var(--blue-l); }
.kpi-org   .kpi-num { color: var(--orange);  } .kpi-org   .kpi-icon { background: var(--org-l);  }
.kpi-amb   .kpi-num { color: var(--amber);   } .kpi-amb   .kpi-icon { background: var(--amb-l);  }
.kpi-grn   .kpi-num { color: var(--green);   } .kpi-grn   .kpi-icon { background: var(--grn-l);  }

/* ── Ecosistema banner ── */
.ecosistema-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px; margin-top: 10px;
  background: linear-gradient(90deg, #1C1E2B 0%, #141621 100%);
  border: 1px solid rgba(127,86,217,0.22);
  border-radius: var(--radius); text-decoration: none; color: #fff;
  transition: border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.ecosistema-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(127,86,217,0.10) 0%, transparent 55%);
  pointer-events: none;
}
.ecosistema-banner:hover { border-color: rgba(127,86,217,0.5); box-shadow: 0 4px 24px rgba(127,86,217,0.15); }
.eco-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.eco-body { flex: 1; }
.eco-label { font-family: var(--font-mono); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(159,117,242,0.75); margin-bottom: 3px; }
.eco-name { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.eco-desc { font-size: 11px; color: rgba(255,255,255,0.45); }
.eco-tag {
  display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; align-items: center;
}
.eco-pill { font-size: 9px; font-weight: 600; padding: 3px 8px; border-radius: 100px; border: 1px solid; }
.eco-pill-p { border-color: rgba(127,86,217,0.4); color: #9F75F2; }
.eco-pill-t { border-color: rgba(0,180,219,0.4); color: #4CD0FF; }
.eco-arrow { font-size: 15px; color: rgba(127,86,217,0.7); flex-shrink: 0; margin-left: 10px; transition: transform .2s; }
.ecosistema-banner:hover .eco-arrow { transform: translateX(4px); }

/* ── Nota de Conducción banner (visible a whitelist y Kaufmann, no solo internal-only) ── */
.nc-banner {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 16px 22px; margin-top: 10px;
  background: linear-gradient(90deg, #0B3B42 0%, #0A2A30 100%);
  border: 1px solid rgba(0,180,219,0.28);
  border-radius: var(--radius); text-align: left; color: #fff;
  font-family: inherit; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.nc-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,180,219,0.12) 0%, transparent 55%);
  pointer-events: none;
}
.nc-banner:hover { border-color: rgba(0,180,219,0.55); box-shadow: 0 4px 24px rgba(0,180,219,0.15); }
.nc-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.nc-body { flex: 1; }
.nc-label { font-family: var(--font-mono); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(0,180,219,0.85); margin-bottom: 3px; }
.nc-name { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.nc-desc { font-size: 11px; color: rgba(255,255,255,0.45); }
.nc-arrow { font-size: 15px; color: rgba(0,180,219,0.75); flex-shrink: 0; margin-left: 10px; transition: transform .2s; }
.nc-banner:hover .nc-arrow { transform: translateX(4px); }

/* ── Nota de Conducción modal: selección de país (mismas tarjetas que /acceso) ── */
.nc-modal-sub { font-size: 13px; color: var(--muted); margin-top: -8px; margin-bottom: 16px; }
.client-flags { display: flex; flex-direction: column; gap: 10px; }
.client-flag-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}
a.client-flag-card:hover {
  border-color: var(--primary);
  background: var(--primary-l);
  box-shadow: 0 4px 14px rgba(127,86,217,0.12);
  transform: translateY(-1px);
}
.cf-flag  { font-size: 26px; line-height: 1; flex-shrink: 0; }
.cf-name  { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); }
.cf-arrow { font-size: 12px; font-weight: 700; color: var(--primary-d); white-space: nowrap; }
.client-flag-card.disabled { opacity: .6; cursor: default; pointer-events: none; background: var(--surface); }
.client-flag-card.disabled .cf-flag { filter: grayscale(1); opacity: .7; }
.client-flag-card.disabled .cf-name { color: var(--muted); }
.cf-soon {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--border);
  padding: 4px 10px; border-radius: 100px; white-space: nowrap;
}

/* ── Two-col layout ── */
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
@media(max-width:1100px){ .two-col { grid-template-columns: 1fr; } }

/* ── Panel cards ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-title { font-size: 14px; font-weight: 700; color: var(--text); }
.panel-action { font-size: 12px; color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: none; }
.panel-action:hover { text-decoration: underline; }
.panel-body { padding: 8px 0; }

/* ── Activity list ── */
.act-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px;
  transition: background .15s; cursor: pointer;
}
.act-item:hover { background: var(--bg); }
.act-ico {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-top: 1px;
  background: var(--primary-l);
}
.act-body { flex: 1; min-width: 0; }
.act-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.act-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.act-time { font-size: 11px; color: var(--muted-l); flex-shrink: 0; padding-top: 2px; }

/* ── Quick access grid ── */
.qa-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 14px 16px; }
.qa-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border-radius: 10px; cursor: pointer;
  transition: background .15s; text-decoration: none;
}
.qa-item:hover { background: var(--bg); }
.qa-ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.qa-bg-blue   { background: #EFF6FF; }
.qa-bg-purple { background: #EDE9FF; }
.qa-bg-orange { background: #FFF7ED; }
.qa-bg-green  { background: #F0FDF4; }
.qa-bg-red    { background: #FEF2F2; }
.qa-bg-mint   { background: #ECFDF5; }
.qa-lbl { font-size: 10px; font-weight: 500; color: var(--muted); text-align: center; line-height: 1.3; }

/* ── Empty state ── */
.empty-act { padding: 40px 20px; text-align: center; color: var(--muted-l); font-size: 13px; }

/* ── Native tools ── */
.native-section { margin-bottom: 28px; }
.section-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-hd--tight { margin-bottom: 14px; }
.section-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-l); }
.native-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media(max-width:900px){ .native-tools { grid-template-columns: repeat(3,1fr); } }
.native-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.native-card:hover { border-color: rgba(107,63,228,0.35); box-shadow: 0 4px 16px rgba(107,63,228,0.08); }
.native-card-icon { font-size: 22px; }
.native-card-name { font-size: 13px; font-weight: 700; color: var(--text); }
.native-card-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ── Featured tool cards ── */
.native-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media(max-width:700px){ .native-featured { grid-template-columns: 1fr; } }
.native-feat {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.native-feat::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(107,63,228,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.native-feat:hover { border-color: rgba(107,63,228,0.5); box-shadow: 0 4px 20px rgba(107,63,228,0.1); }
.native-feat:nth-child(2) { border-left-color: #10B981; }
.native-feat:nth-child(2)::before { background: linear-gradient(90deg, rgba(16,185,129,0.04) 0%, transparent 60%); }
.native-feat:nth-child(2):hover { border-color: rgba(16,185,129,0.5); box-shadow: 0 4px 20px rgba(16,185,129,0.1); }
.nf-logo {
  width: 100px; height: 64px; flex-shrink: 0; border-radius: 10px;
  background: #fff; border: 1px solid rgba(107,63,228,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; overflow: hidden; padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nf-logo img { width: 100%; height: 100%; object-fit: contain; }
.native-feat:nth-child(2) .nf-logo { border-color: rgba(16,185,129,0.12); }
.nf-body { flex: 1; min-width: 0; }
.nf-badge {
  font-family: var(--font-mono);
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 100px;
  background: var(--primary-l); color: var(--primary); border: 1px solid rgba(107,63,228,0.2);
  margin-bottom: 5px;
}
.native-feat:nth-child(2) .nf-badge { background: rgba(16,185,129,0.08); color: #10B981; border-color: rgba(16,185,129,0.2); }
.nf-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.nf-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.nf-arrow { font-size: 16px; color: var(--muted-l); flex-shrink: 0; transition: transform .2s; }
.native-feat:hover .nf-arrow { transform: translateX(3px); }

/* ── Pillars ── */
.pillars-section { margin-top: 28px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media(max-width:1000px){ .pillars { grid-template-columns: repeat(2,1fr); } }
.pillar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pillar-header { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.pillar-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pillar-dot-connect  { background: #6B3FE4; }
.pillar-dot-copiloto { background: #3B82F6; }
.pillar-dot-dimo     { background: #10B981; }
.pillar-dot-wicar    { background: #F97316; }
.pillar-title { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pillar-count { margin-left: auto; font-size: 10px; color: var(--muted-l); font-weight: 600; }
.pillar-tools { padding: 5px; }
.tool-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 8px; text-decoration: none; color: inherit;
  transition: background .15s;
}
.tool-row:hover { background: var(--bg); }
.tool-row-icon { font-size: 13px; flex-shrink: 0; width: 18px; text-align: center; opacity: .6; }
.tool-row-name { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; }
.tool-row-arrow { font-size: 11px; color: var(--muted-l); opacity: 0; transition: opacity .15s; }
.tool-row:hover .tool-row-arrow { opacity: 1; }
.tool-row.hidden { display: none; }
/* Acceso restringido: oculta herramientas internas a usuarios fuera de la whitelist */
body.restricted .internal-only { display: none !important; }
/* Lanzadores de producto: visibles SOLO en la vista reducida (reemplazan los KPIs) */
.product-launch { display: none; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
body.restricted .product-launch { display: grid; }
.product-btn { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 16px; text-decoration: none; color: #fff; transition: transform .15s, box-shadow .15s; }
.product-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.18); }
.product-btn .pb-ico { font-size: 26px; flex-shrink: 0; }
.product-btn .pb-name { font-size: 17px; font-weight: 800; display: block; }
.product-btn .pb-sub { font-size: 12px; font-weight: 500; opacity: .9; display: block; margin-top: 2px; }
.product-btn .pb-arrow { margin-left: auto; font-size: 18px; opacity: .9; }
.pb-wicar    { background: linear-gradient(135deg, #fb5f00, #ff8a3d); }
.pb-dimo     { background: linear-gradient(135deg, #e92f31, #ff5a5c); }
.pb-copiloto { background: linear-gradient(135deg, #6c8eff, #8b40f5); }
@media(max-width:700px){ .product-launch { grid-template-columns: 1fr; } }
.pillar.empty .pillar-tools::after { content: 'Sin resultados'; display: block; font-size: 11px; color: var(--muted-l); text-align: center; padding: 12px; }

/* Search */
.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px 9px 36px;
  font-size: 13px; color: var(--text); font-family: inherit; outline: none;
  transition: border-color .2s;
}
.search-wrap input:focus { border-color: var(--primary); }
.search-wrap input::placeholder { color: var(--muted-l); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .4; pointer-events: none; }
.search-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted-l); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 10px; }

/* ══ PÁGINA EQUIPO ══ */
.team-head { margin-bottom: 20px; }
.team-title { font-size: 22px; font-weight: 800; color: var(--text); }
.team-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.team-loading { color: var(--muted); font-size: 14px; grid-column: 1 / -1; }
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: box-shadow .2s, transform .2s; }
.team-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.08); transform: translateY(-2px); }
.tc-avatar { position: relative; width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 25px; overflow: hidden; margin-bottom: 14px; }
.tc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-name { font-size: 15px; font-weight: 700; color: var(--text); }
.tc-nick { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 2px; }
.tc-cargo { font-size: 12.5px; color: var(--muted); margin-top: 9px; line-height: 1.4; }
.tc-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: center; }
.tc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tc-email { margin-top: 12px; font-size: 12px; color: var(--primary); text-decoration: none; word-break: break-all; }
.tc-email:hover { text-decoration: underline; }
.tc-note-btn {
  margin-top: 12px; width: 100%; background: var(--primary-l); color: var(--primary-d);
  border: none; border-radius: 8px; padding: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}

/* Avatar hash colors (mismo orden que AV_COLORS en workspace.js) */
.av-c0 { background: #7F56D9; }
.av-c1 { background: #00B4DB; }
.av-c2 { background: #F97316; }
.av-c3 { background: #E92F31; }
.av-c4 { background: #6C8EFF; }
.av-c5 { background: #9B59B6; }
.av-c6 { background: #16A085; }
.av-c7 { background: #E67E22; }

/* ══ PÁGINA TAREAS (kanban) ══ */
.tk-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.tk-title { font-size:22px; font-weight:800; color:var(--text); }
.tk-sub { font-size:14px; color:var(--muted); margin-top:4px; }
.tk-select { padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font-size:13px; font-family:inherit; cursor:pointer; }
.tk-board { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; align-items:start; }
.tk-col { background:var(--bg); border:1px solid var(--border); border-radius:14px; padding:12px; display:flex; flex-direction:column; min-height:140px; }
.tk-col-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; padding:0 4px; }
.tk-col-name { font-size:13px; font-weight:700; color:var(--text); }
.tk-col-count { font-size:11px; font-weight:700; color:var(--muted); background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:1px 8px; }
.tk-col-body { display:flex; flex-direction:column; gap:10px; min-height:40px; flex:1; border-radius:10px; transition:background .15s; }
.tk-col-body.tk-over { background:var(--primary-l); }
.tk-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,0.04); transition:box-shadow .15s; }
.tk-card:hover { box-shadow:0 4px 14px rgba(0,0,0,0.10); }
.tk-card-top { display:flex; align-items:flex-start; gap:8px; }
.tk-prio { width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0; }
.tk-prio-alta  { background: #E92F31; }
.tk-prio-media { background: #F59E0B; }
.tk-prio-baja  { background: #10B981; }
.tk-card-title { font-size:13.5px; font-weight:600; color:var(--text); line-height:1.35; }
.tk-card-desc { font-size:12px; color:var(--muted); margin-top:6px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tk-card-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; flex-wrap:wrap; }
.tk-resp { display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); }
.tk-resp-ini { width:20px; height:20px; border-radius:50%; background:var(--primary); color:#fff; font-size:9px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.tk-due { font-size:11px; color:var(--muted); white-space:nowrap; }
.tk-due-soon { color:#B45309; font-weight:600; }
.tk-due-over { color:#DC2626; font-weight:700; }
.tk-add { margin-top:10px; background:none; border:1px dashed var(--border); color:var(--muted); border-radius:8px; padding:8px; font-size:12.5px; font-weight:600; cursor:pointer; font-family:inherit; transition:border-color .15s, color .15s; }
.tk-add:hover { border-color:var(--primary); color:var(--primary); }
.tk-modal-overlay { position:fixed; inset:0; background:rgba(15,18,30,0.45); display:flex; align-items:center; justify-content:center; z-index:1000; padding:20px; }
.tk-modal-box { background:var(--surface); border-radius:16px; width:100%; max-width:440px; padding:24px; box-shadow:0 24px 60px rgba(0,0,0,0.25); max-height:90vh; overflow-y:auto; }
.tk-modal-box h2 { font-size:17px; font-weight:800; color:var(--text); margin-bottom:16px; }
.tk-field { margin-bottom:12px; }
.tk-field label { display:block; font-family: var(--font-mono); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:5px; }
.tk-input, .tk-modal-box select, .tk-modal-box textarea { width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:8px; font-size:13.5px; font-family:inherit; color:var(--text); background:var(--surface); outline:none; }
.tk-input:focus, .tk-modal-box select:focus, .tk-modal-box textarea:focus { border-color:var(--primary); }
.tk-modal-box textarea { resize:vertical; min-height:70px; }
.tk-row2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.tk-actions { display:flex; align-items:center; gap:10px; margin-top:18px; }
.tk-btn { padding:10px 18px; border-radius:8px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer; border:none; }
.tk-btn-save { background:var(--primary); color:#fff; }
.tk-btn-cancel { background:var(--bg); color:var(--text); border:1px solid var(--border); }
.tk-btn-del { background:none; color:#DC2626; border:1px solid #FCA5A5; margin-left:auto; }
@media (max-width:900px){ .tk-board { grid-template-columns:1fr; } }
.tk-msg { color:var(--muted); font-size:13px; margin-bottom:12px; }
.nav-btn-link { text-decoration: none; display: inline-block; }

/* ══ PÁGINA COMUNICACIÓN ══ */
.com-filter { padding:7px 14px; border:1px solid var(--border); border-radius:20px; background:var(--surface); color:var(--muted); font-size:12.5px; font-weight:600; font-family:inherit; cursor:pointer; }
.com-filter.active { background:var(--primary); color:#fff; border-color:var(--primary); }
#com-list .act-item { border-bottom:1px solid var(--border); }
#com-list .act-item:last-child { border-bottom:none; }
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.com-list-panel { padding: 8px 16px; }

/* Placeholders de carga / vacío (mismo indent que .act-item real, 12px 20px) */
.ph-text { font-size: 13px; color: var(--muted); padding: 8px 0; }
.ph-text--wide { padding: 8px 20px; }

/* Radios de tipo de nota */
.radio-row { display: flex; gap: 16px; }
.radio-label { margin: 0; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-input { width: auto; }

/* Badges de notas/comunicados (ntItem) */
.nt-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-left: 6px; }
.nt-badge-global   { background: var(--teal-l); color: var(--teal); }
.nt-badge-enviada  { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.nt-badge-personal { background: var(--primary-l); color: var(--primary-d); }
.nt-badge-nuevo    { background: #FEE2E2; color: #DC2626; }
.nt-reply-btn, .nt-delete-btn {
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.nt-reply-btn { color: var(--primary); font-size: 12px; font-weight: 700; padding: 2px 4px; }
.nt-delete-btn { color: var(--muted-l); font-size: 13px; padding: 2px; }
.nt-item-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ver-todo-link { display: block; margin-top: 10px; }
