/**
 * fase30.css — Panel empleados pro (Fase 30).
 * Dashboard accionable, command palette, notificaciones, bottom nav móvil.
 * Scoped con prefijo .f30-*
 */

/* ═══ TOPBAR PRO ═══ */
.f30-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 22px;
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 54px;
  margin-bottom: 12px;
}
.f30-topbar-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.f30-topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  transition: all .2s;
}
.f30-topbar-search input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.f30-topbar-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.f30-topbar-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--line); padding: 3px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 700; color: var(--muted); font-family: ui-monospace, monospace;
  pointer-events: none;
}
.f30-topbar-spacer { flex: 1; }
.f30-topbar-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all .2s;
  font-size: 15px;
}
.f30-topbar-btn:hover { background: #eef2ff; border-color: var(--accent); color: var(--accent); }
.f30-notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

/* ═══ NOTIF PANEL (dropdown) ═══ */
.f30-notif-panel {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.18), 0 0 0 1px rgba(15,23,42,0.04);
  z-index: 200;
  display: none;
  overflow: hidden;
  animation: f30Pop .18s cubic-bezier(.2,.8,.2,1);
}
.f30-notif-panel.show { display: flex; flex-direction: column; }
.f30-notif-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800;
}
.f30-notif-head .actions { display: flex; gap: 6px; }
.f30-notif-head .actions button {
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 6px;
}
.f30-notif-head .actions button:hover { background: var(--bg); color: var(--accent); }
.f30-notif-list {
  overflow-y: auto;
  flex: 1;
}
.f30-notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; gap: 12px;
  cursor: pointer;
  transition: background .15s;
}
.f30-notif-item:hover { background: var(--bg); }
.f30-notif-item:last-child { border-bottom: none; }
.f30-notif-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 14px;
}
.f30-notif-body { flex: 1; min-width: 0; }
.f30-notif-title { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.f30-notif-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.f30-notif-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }

@keyframes f30Pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══ COMMAND PALETTE ═══ */
.f30-cmd {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(6px);
  animation: f30Fade .15s ease;
}
.f30-cmd.show { display: flex; }
.f30-cmd-panel {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 70vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  animation: f30SlideDown .2s cubic-bezier(.2,.8,.2,1);
}
.f30-cmd-search {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.f30-cmd-search i { color: var(--muted); font-size: 16px; }
.f30-cmd-search input {
  flex: 1;
  border: none;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  background: transparent;
  color: var(--ink);
}
.f30-cmd-search kbd { background: var(--bg); padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; color: var(--muted); font-family: ui-monospace, monospace; }
.f30-cmd-results { overflow-y: auto; padding: 6px; }
.f30-cmd-section {
  font-size: 10px; font-weight: 800; text-transform: none;
  letter-spacing: 1px; color: var(--muted);
  padding: 10px 14px 6px;
}
.f30-cmd-item {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  border-radius: 10px;
  font-size: 13.5px;
  transition: background .1s;
}
.f30-cmd-item.active, .f30-cmd-item:hover { background: #eef2ff; }
.f30-cmd-item .icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg); border-radius: 8px;
  color: var(--accent); font-size: 13px;
}
.f30-cmd-item .body { flex: 1; min-width: 0; }
.f30-cmd-item .title { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f30-cmd-item .sub { font-size: 11px; color: var(--muted); }
.f30-cmd-item .arrow { color: var(--muted); opacity: 0; transition: opacity .15s; font-size: 11px; }
.f30-cmd-item.active .arrow { opacity: 1; }
.f30-cmd-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.f30-cmd-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  display: flex; gap: 14px;
  font-size: 10px;
  color: var(--muted);
}
.f30-cmd-footer kbd { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 10px; font-family: ui-monospace, monospace; margin: 0 3px; }

@keyframes f30Fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes f30SlideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ DASHBOARD "MI DÍA" ═══ */
.f30-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.f30-dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex; flex-direction: column;
  min-height: 180px;
  transition: all .2s cubic-bezier(.2,.8,.2,1);
}
.f30-dash-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,23,42,0.08); }
.f30-dash-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.f30-dash-card-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 15px; color: #fff;
  flex-shrink: 0;
}
.f30-dash-card-title {
  font-weight: 800; font-size: 14px; color: var(--ink);
  flex: 1;
}
.f30-dash-card-count {
  font-size: 24px; font-weight: 900; line-height: 1;
}
.f30-dash-card.urgente .f30-dash-card-icon { background: #ef4444; }
.f30-dash-card.urgente .f30-dash-card-count { color: #dc2626; }
.f30-dash-card.urgente { border-color: rgba(239,68,68,.25); }
.f30-dash-card.urgente.activa { animation: f30Pulse 1.5s ease-in-out infinite; }
.f30-dash-card.mercadeo .f30-dash-card-icon { background: #f59e0b; }
.f30-dash-card.mercadeo .f30-dash-card-count { color: #d97706; }
.f30-dash-card.listos .f30-dash-card-icon { background: #10b981; }
.f30-dash-card.listos .f30-dash-card-count { color: #059669; }
.f30-dash-card.proximos .f30-dash-card-icon { background: #6366f1; }
.f30-dash-card.proximos .f30-dash-card-count { color: #4f46e5; }

.f30-dash-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 8px;
  max-height: 180px;
  overflow-y: auto;
}
.f30-dash-list-item {
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.f30-dash-list-item:hover { background: #eef2ff; }
.f30-dash-list-item .centro-chip {
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  text-transform: none; letter-spacing: 0;
}
.f30-dash-list-item .centro-chip.coban  { background: #ccfbf1; color: #0f766e; }
.f30-dash-list-item .centro-chip.salama { background: #e0e7ff; color: #4f46e5; }
.f30-dash-list-item .centro-chip.peten  { background: #fff7ed; color: #c2410c; }
.f30-dash-list-item .curso { flex: 1; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f30-dash-list-item .tiempo { font-size: 10px; color: var(--muted); flex-shrink: 0; }

.f30-dash-card-cta {
  margin-top: auto; padding-top: 10px;
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
  background: none; border: none;
  padding: 8px 0;
}
.f30-dash-card-cta:hover { gap: 8px; }
.f30-dash-empty {
  color: var(--muted); font-size: 12px;
  padding: 12px; text-align: center;
  background: var(--bg); border-radius: 10px;
}

@keyframes f30Pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); }
  50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

/* ═══ SIDEBAR REORGANIZADA (grupos colapsables) ═══ */
.f30-nav-group-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 1.5px;
  color: #94a3b8;
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.f30-nav-group-title i.chevron { margin-left: auto; transition: transform .2s; font-size: 9px; }
.f30-nav-group-title.collapsed i.chevron { transform: rotate(-90deg); }
.f30-nav-group { display: flex; flex-direction: column; gap: 2px; }
.f30-nav-group.collapsed { display: none; }

/* ═══ MOBILE BOTTOM NAV ═══ */
@media (max-width: 900px) {
  body:not(.ws-marcas-active) .f30-mobile-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(15,23,42,0.08);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0));
    z-index: 140;
    min-height: 64px;
  }
  body:not(.ws-marcas-active) .f30-mobile-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s;
    text-decoration: none;
    position: relative;
  }
  body:not(.ws-marcas-active) .f30-mobile-btn i { font-size: 18px; }
  body:not(.ws-marcas-active) .f30-mobile-btn.active { color: var(--accent); }
  body:not(.ws-marcas-active) .f30-mobile-btn.fab {
    background: var(--accent);
    color: #fff;
    border-radius: 16px;
    margin: -18px 6px 6px;
    box-shadow: 0 8px 20px rgba(99,102,241,.4);
    min-width: 56px;
  }
  body:not(.ws-marcas-active) .f30-mobile-btn.fab i { font-size: 22px; }
  body:not(.ws-marcas-active) .f30-mobile-btn .badge {
    position: absolute;
    top: 2px; right: 16%;
    background: #ef4444; color: #fff;
    font-size: 9px; font-weight: 800;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 99px;
    display: grid; place-items: center;
    border: 1.5px solid #fff;
  }
  body:not(.ws-marcas-active) .main-content { padding-bottom: 78px !important; }
  body:not(.ws-marcas-active) .f30-topbar { padding: 10px 12px; }
  body:not(.ws-marcas-active) .f30-topbar-search kbd { display: none; }
}
@media (min-width: 901px) {
  .f30-mobile-bottom { display: none; }
}

/* ═══ TOASTS ═══ */
.f30-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.f30-toast {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,0.14);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: auto;
  animation: f30ToastIn .3s cubic-bezier(.2,.8,.2,1);
  border-left: 4px solid var(--accent);
}
.f30-toast.success { border-left-color: #10b981; }
.f30-toast.error { border-left-color: #ef4444; }
.f30-toast.warning { border-left-color: #f59e0b; }
.f30-toast i { font-size: 16px; flex-shrink: 0; }
.f30-toast.success i { color: #10b981; }
.f30-toast.error i { color: #ef4444; }
.f30-toast.warning i { color: #f59e0b; }
.f30-toast.hiding { animation: f30ToastOut .25s ease forwards; }
@keyframes f30ToastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes f30ToastOut { from { opacity:1; } to { opacity:0; transform: translateX(20px); } }

@media (max-width: 640px) {
  .f30-toast-container { right: 12px; left: 12px; bottom: 76px; }
  .f30-toast { min-width: auto; width: 100%; }
}


/* ═══════════════════════════════════════════════════════════
   TEMA OSCURO — se activa con html[data-theme="dark"]
   ═══════════════════════════════════════════════════════════ */
html[data-theme="dark"] {
  --ink: #e2e8f0;
  --ink-light: #cbd5e1;
  --muted: #94a3b8;
  --subtle: #64748b;
  --line: #334155;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
}

/* body + main container */
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .app-layout { background: var(--bg); }
html[data-theme="dark"] .sidebar { background: #0b1220; border-right: 1px solid var(--line); }
html[data-theme="dark"] .sidebar-brand-text { color: var(--ink); }
html[data-theme="dark"] .sidebar-brand-sub { color: var(--muted); }
html[data-theme="dark"] .nav-item { color: var(--ink-light); }
html[data-theme="dark"] .nav-item:hover { background: rgba(99,102,241,.15); color: #fff; }
html[data-theme="dark"] .nav-item.active { background: rgba(99,102,241,.25); color: #fff; }
html[data-theme="dark"] .nav-section-label, html[data-theme="dark"] .f30-nav-group-title { color: var(--subtle); }

/* Cards, panels */
html[data-theme="dark"] .sol-card, html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .config-card, html[data-theme="dark"] .ficha-card,
html[data-theme="dark"] .modal-content, html[data-theme="dark"] .cards-grid > *,
html[data-theme="dark"] .home-card, html[data-theme="dark"] .area-card,
html[data-theme="dark"] .catalogo-card { background: var(--bg-card); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .area-card:hover { background: #253143; }

/* Inputs */
html[data-theme="dark"] .input, html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"], html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"], html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] textarea, html[data-theme="dark"] select, html[data-theme="dark"] .select {
  background: #0f172a; color: var(--ink); border-color: var(--line);
}
html[data-theme="dark"] .input::placeholder, html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::placeholder { color: var(--subtle); }
html[data-theme="dark"] .input:focus { border-color: var(--accent); background: #0f172a; }

/* Buttons */
html[data-theme="dark"] .btn-ghost, html[data-theme="dark"] .btn-secondary {
  background: #253143; color: var(--ink); border-color: var(--line);
}
html[data-theme="dark"] .btn-ghost:hover, html[data-theme="dark"] .btn-secondary:hover {
  background: #334155; color: #fff;
}

/* Chips y etiquetas */
html[data-theme="dark"] .chip { background: #253143; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .chip.active { background: var(--accent); color: #fff; }

/* Modales */
html[data-theme="dark"] .modal { background: rgba(0,0,0,.65); }
html[data-theme="dark"] .modal-header { border-bottom-color: var(--line); }
html[data-theme="dark"] .modal-title { color: var(--ink); }
html[data-theme="dark"] .form-label { color: var(--ink-light); }

/* Tablas y listas */
html[data-theme="dark"] table { color: var(--ink); }
html[data-theme="dark"] th, html[data-theme="dark"] td { border-color: var(--line); }
html[data-theme="dark"] tr:hover { background: rgba(99,102,241,.08); }

/* Topbar Fase 30 */
html[data-theme="dark"] .f30-topbar { background: #1e293b; border-bottom-color: var(--line); }
html[data-theme="dark"] .f30-topbar-search input { background: #0f172a; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .f30-topbar-btn { background: #0f172a; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .f30-topbar-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Notif panel Fase 30 */
html[data-theme="dark"] .f30-notif-panel { background: #1e293b; }
html[data-theme="dark"] .f30-notif-head { border-bottom-color: var(--line); }
html[data-theme="dark"] .f30-notif-item { border-bottom-color: var(--line); }
html[data-theme="dark"] .f30-notif-item:hover { background: #253143; }
html[data-theme="dark"] .f30-notif-title { color: var(--ink); }

/* Command palette Fase 30 */
html[data-theme="dark"] .f30-cmd-panel { background: #1e293b; }
html[data-theme="dark"] .f30-cmd-search { border-bottom-color: var(--line); }
html[data-theme="dark"] .f30-cmd-search input { color: var(--ink); }
html[data-theme="dark"] .f30-cmd-item.active, html[data-theme="dark"] .f30-cmd-item:hover { background: rgba(99,102,241,.2); }
html[data-theme="dark"] .f30-cmd-item .title { color: var(--ink); }
html[data-theme="dark"] .f30-cmd-item .icon { background: #253143; }

/* Dashboard mi día Fase 30 */
html[data-theme="dark"] .f30-dash-card { background: #1e293b; border-color: var(--line); }
html[data-theme="dark"] .f30-dash-card-title { color: var(--ink); }
html[data-theme="dark"] .f30-dash-list-item { background: #0f172a; }
html[data-theme="dark"] .f30-dash-list-item:hover { background: #253143; }
html[data-theme="dark"] .f30-dash-list-item .curso { color: var(--ink); }
html[data-theme="dark"] .f30-dash-empty { background: #0f172a; color: var(--muted); }

/* Mobile bottom nav Fase 30 */
html[data-theme="dark"] .f30-mobile-bottom { background: #1e293b; border-top-color: var(--line); }
html[data-theme="dark"] .f30-mobile-btn { color: var(--muted); }
html[data-theme="dark"] .f30-mobile-btn.active { color: #a5b4fc; }

/* Toasts en dark */
html[data-theme="dark"] .f30-toast { background: #1e293b; color: var(--ink); border-color: var(--line); }

/* Search dropdown de smart-search-bar */
html[data-theme="dark"] .smart-search-bar input { background: #0f172a; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .search-dropdown { background: #1e293b; border-color: var(--line); }
html[data-theme="dark"] .search-item:hover { background: rgba(99,102,241,.15); }
html[data-theme="dark"] .search-item { color: var(--ink); }

/* Workspace marcas en dark */
html[data-theme="dark"] .workspace-switcher { box-shadow: 0 6px 18px rgba(99,102,241,0.5); }
html[data-theme="dark"] .workspace-switcher-menu { background: #1e293b; border-color: var(--line); }
html[data-theme="dark"] .workspace-option { color: var(--ink); }
html[data-theme="dark"] .workspace-option:hover { background: rgba(99,102,241,.15); }

/* Sidebar overlay respetar blur */
html[data-theme="dark"] .sidebar-overlay { background: rgba(0,0,0,0.7); }


/* ═══ Topbar search dropdown inline (Fase 30.7) ═══ */
.f30-topbar-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.15);
  max-height: 420px;
  overflow-y: auto;
  z-index: 100;
}
.f30-topbar-results.hidden { display: none; }
.f30-topbar-results .sec { font-size: 10px; font-weight: 800; text-transform: none; letter-spacing: 0; color: var(--muted); padding: 10px 14px 4px; }
.f30-topbar-results .item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background .12s;
}
.f30-topbar-results .item:hover { background: #eef2ff; }
.f30-topbar-results .item .name { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f30-topbar-results .item .sub { font-size: 10px; color: var(--muted); }
.f30-topbar-results .item i { font-size: 14px; flex-shrink: 0; }
.f30-topbar-results .item .badge {
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 99px;
  white-space: nowrap; flex-shrink: 0;
}
.f30-topbar-results .item .badge.recibido { background: #fee2e2; color: #dc2626; }
.f30-topbar-results .item .badge.en_diseno { background: #fef3c7; color: #d97706; }
.f30-topbar-results .item .badge.en_revision { background: #dbeafe; color: #2563eb; }
.f30-topbar-results .item .badge.revision_mercadeo { background: #ffedd5; color: #ea580c; }
.f30-topbar-results .item .badge.aprobado { background: #dcfce7; color: #16a34a; }
.f30-topbar-results .item .badge.programado { background: #e0e7ff; color: #4f46e5; }
.f30-topbar-results .item .badge.publicado { background: #cffafe; color: #0891b2; }
.f30-topbar-results .item .badge.rechazado { background: #fee2e2; color: #b91c1c; }
.f30-topbar-results .empty { padding: 20px; text-align: center; color: var(--muted); font-size: 12px; }

/* Dark mode */
html[data-theme="dark"] .f30-topbar-results { background: #1e293b; border-color: var(--line); }
html[data-theme="dark"] .f30-topbar-results .item:hover { background: rgba(99,102,241,.15); }
html[data-theme="dark"] .f30-topbar-results .item .name { color: var(--ink); }

@media (max-width: 640px) {
  .f30-topbar-results { left: -12px; right: -12px; }
}


/* ═══ Fase 30.10 — Eliminar search bar antigua definitivamente ═══ */
/* La topbar de Fase 30 reemplaza completamente a smart-search-bar.
   El JS antiguo la re-muestra al cambiar de sección; forzamos display:none aquí. */
#smart-search-bar { display: none !important; }


/* ═══════════════════════════════════════════════════════════
   FASE 49 — Ocultar widgets F30 antes del login
   El topbar, mobile bottom-nav, command palette y notif panel
   no deben aparecer mientras #dashboard-view está oculto
   (i.e. cuando el usuario aún no ha autenticado).
   Selector con `~` (general sibling) — todos los widgets
   están al mismo nivel que #dashboard-view bajo <body>.
   ═══════════════════════════════════════════════════════════ */
#dashboard-view.hidden ~ .f30-topbar,
#dashboard-view.hidden ~ .f30-mobile-bottom,
#dashboard-view.hidden ~ .f30-cmd,
#dashboard-view.hidden ~ .f30-notif-panel,
#dashboard-view.hidden ~ .f30-toast-container { display: none !important; }
