/* ═══════════════════════════════════════════════════════════════════════════
   nexo-admin.css — Shared Design System for NEXO Interagentes & Admin Panels
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ Reset & Base ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg-base:    #030914;
  --bg-surface: rgba(10, 15, 30, 0.6);
  --bg-card:    rgba(15, 23, 42, 0.7);
  --bg-hover:   rgba(30, 45, 69, 0.8);
  --border:     rgba(148, 163, 184, 0.15);
  --border-hi:  rgba(212, 175, 55, 0.4);
  --text-pri:   #f8fafc;
  --text-sec:   #cbd5e1;
  --text-muted: #64748b;
  --nexo:       #d4af37;
  --nexo-dark:  #b8860b;
  --nexo-glow:  rgba(212, 175, 55, 0.25);
  --teal:       #14b8a6;
  --purple:     #8b5cf6;
  --green:      #10b981;
  --yellow:     #f59e0b;
  --red:        #ef4444;
  --orange:     #f97316;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 8px 32px rgba(0, 0, 0, 0.6);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-base) url('/img/cyber_legal_bg.png') no-repeat center center fixed;
  background-size: cover;
}
body.theme-cinema { background: var(--bg-base) url('/img/cinematic_bg.png') no-repeat center center fixed; background-size: cover; }
body.theme-sport { background: var(--bg-base) url('/img/hyper_sport_bg.png') no-repeat center center fixed; background-size: cover; }
body.theme-legal { background: var(--bg-base) url('/img/cyber_legal_bg.png') no-repeat center center fixed; background-size: cover; }
  color: var(--text-pri);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ═══ Layout Shell ══════════════════════════════════════════════════════════ */
.nexo-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ═══ Top Bar ═══════════════════════════════════════════════════════════════ */
.nexo-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nexo-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nexo-topbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--nexo-dark), var(--nexo));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--nexo-glow);
}
.nexo-topbar-brand .brand-text {
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(90deg, #fcd34d, var(--nexo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.nexo-topbar-brand .brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1;
  margin-top: 1px;
  white-space: nowrap;
}

/* ── Nav pills ── */
.nexo-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--nexo) transparent;
  padding-bottom: 2px;
}
.nexo-nav::-webkit-scrollbar { display: block; height: 3px; }
.nexo-nav::-webkit-scrollbar-thumb { background: var(--nexo); border-radius: 2px; }
.nexo-nav::-webkit-scrollbar-track { background: transparent; }
.nexo-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  white-space: nowrap;
  transition: background .14s, color .14s;
  border: 1px solid transparent;
}
.nexo-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-pri);
}
.nexo-nav-item.active {
  background: var(--nexo-glow);
  color: var(--nexo);
  border-color: rgba(14,165,233,.3);
}
.nexo-nav-item .nav-icon { font-size: 13px; line-height: 1; }
.nexo-nav-item .nav-badge {
  background: var(--nexo);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
  margin-left: 2px;
}

/* ── Exit buttons ── */
.nexo-exit-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-exit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .14s;
  border: 1px solid;
  white-space: nowrap;
}
.btn-exit-agents {
  background: rgba(245,158,11,.1);
  color: var(--yellow);
  border-color: rgba(245,158,11,.3);
}
.btn-exit-agents:hover {
  background: rgba(245,158,11,.2);
  color: #fff;
}
.btn-exit-brands {
  background: rgba(20,184,166,.1);
  color: var(--teal);
  border-color: rgba(20,184,166,.3);
}
.btn-exit-brands:hover {
  background: rgba(20,184,166,.2);
  color: #fff;
}
.btn-exit-map {
  background: rgba(139,92,246,.1);
  color: var(--purple);
  border-color: rgba(139,92,246,.3);
}
.btn-exit-map:hover {
  background: rgba(139,92,246,.2);
  color: #fff;
}

/* ── User badge ── */
.nexo-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--nexo-dark), #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-pri);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-role {
  font-size: 10px;
  color: var(--text-muted);
}

/* ═══ Main Content Area ═════════════════════════════════════════════════════ */
.nexo-main {
  flex: 1;
  padding: 24px;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

/* ═══ Page Header ═══════════════════════════════════════════════════════════ */
.nexo-page-header {
  margin-bottom: 24px;
}
.nexo-page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-pri);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nexo-page-header p {
  font-size: 13px;
  color: var(--text-sec);
  margin-top: 4px;
}
.nexo-page-header .header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ═══ Cards & Panels ════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pri);
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-body { padding: 0; }
.card-body-pad { padding: 18px; }

/* ═══ Stat Cards ════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all .2s;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.stat-card:hover {
  border-color: var(--border-hi);
  box-shadow: 0 4px 20px var(--nexo-glow);
  transform: translateY(-3px);
}
.stat-icon {
  font-size: 20px;
  line-height: 1;
}
.stat-val {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.stat-delta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ═══ Buttons ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  transition: all .14s;
  white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.btn-primary    { background: var(--nexo);   border-color: var(--nexo-dark); color: #fff; }
.btn-primary:hover    { background: var(--nexo-dark); }
.btn-success    { background: #166534; border-color: #15803d; color: var(--green); }
.btn-success:hover    { background: #15803d; color: #fff; }
.btn-danger     { background: #7f1d1d; border-color: #991b1b; color: #fca5a5; }
.btn-danger:hover     { background: #991b1b; color: #fff; }
.btn-warn       { background: #78350f; border-color: #92400e; color: #fcd34d; }
.btn-warn:hover       { background: #92400e; color: #fff; }
.btn-ghost      { background: var(--bg-surface); border-color: var(--border-hi); color: var(--text-sec); }
.btn-ghost:hover      { border-color: var(--nexo); color: var(--text-pri); }
.btn-nexo-soft  { background: var(--nexo-glow); border-color: rgba(14,165,233,.3); color: var(--nexo); }
.btn-nexo-soft:hover  { background: rgba(14,165,233,.25); color: #fff; }

/* ═══ Badges ════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ═══ Tables ════════════════════════════════════════════════════════════════ */
.nexo-table-wrap {
  overflow-x: auto;
}
.nexo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.nexo-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  white-space: nowrap;
}
.nexo-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.nexo-table tbody tr:last-child td { border-bottom: none; }
.nexo-table tbody tr:hover td { background: var(--bg-hover); }

/* ═══ Forms ═════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sec);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.form-control, .form-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  color: var(--text-pri);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color .14s;
  appearance: none;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--nexo);
  box-shadow: 0 0 0 3px var(--nexo-glow);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.form-check input[type="checkbox"] { accent-color: var(--nexo); width: 15px; height: 15px; }

/* ═══ Modal ═════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 500;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-overlay.open,
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow);
  animation: modalIn .18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-pri);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color .12s, background .12s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-pri); }
.modal-body { padding: 18px 22px; }
.modal-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ═══ Empty state ═══════════════════════════════════════════════════════════ */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}
.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .4;
}
.empty-state p {
  color: var(--text-sec);
  font-size: 14px;
}

/* ═══ Alert ═════════════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
}
.alert-info    { background: rgba(14,165,233,.1); border-color: rgba(14,165,233,.3); color: #7dd3fc; }
.alert-warn    { background: rgba(245,158,11,.1);  border-color: rgba(245,158,11,.3);  color: #fcd34d; }
.alert-danger  { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.3);   color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.1);   border-color: rgba(34,197,94,.3);   color: #86efac; }

/* ═══ Filters bar ═══════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.filter-bar .filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  color: var(--text-pri);
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
  min-width: 130px;
}
.filter-select:focus { outline: none; border-color: var(--nexo); }
.filter-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  color: var(--text-pri);
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  flex: 1;
  min-width: 160px;
}
.filter-input:focus { outline: none; border-color: var(--nexo); }
.filter-input::placeholder { color: var(--text-muted); }

/* ═══ Spinner ═══════════════════════════════════════════════════════════════ */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-hi);
  border-top-color: var(--nexo);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Toast ═════════════════════════════════════════════════════════════════ */
#nexo-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow);
  animation: toastIn .2s ease;
  pointer-events: auto;
  border-left: 4px solid;
  max-width: 360px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast-success { background: #14532d; border-color: var(--green); }
.toast-error   { background: #450a0a; border-color: var(--red); }
.toast-info    { background: #0c2340; border-color: var(--nexo); }

/* ═══ Clock ═════════════════════════════════════════════════════════════════ */
.nexo-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
  line-height: 1.1;
  min-width: 80px;
}
.nexo-clock .clock-tz {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.nexo-clock .clock-time {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-pri);
}
.nexo-clock .clock-utc {
  font-size: 9px;
  color: var(--text-muted);
}

@media (max-width: 900px) { .nexo-clock { display: none; } }

/* ═══ Language Selector ══════════════════════════════════════════════════════ */
.nexo-lang-picker {
  flex-shrink: 0;
}
.nexo-lang-picker select {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  color: var(--text-sec);
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  min-width: 130px;
  transition: border-color .14s;
}
.nexo-lang-picker select:focus {
  outline: none;
  border-color: var(--nexo);
}
@media (max-width: 768px) { .nexo-lang-picker { display: none; } }

/* ═══ Quick Action Buttons ══════════════════════════════════════════════════ */
.qa-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-pri);
  text-decoration: none;
  transition: border-color .14s, background .14s;
}
.qa-btn:hover { border-color: var(--nexo); background: var(--nexo-glow); }

/* ═══ Thread rows ═══════════════════════════════════════════════════════════ */
.thread-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: var(--bg-hover); }
.sol-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.sol-row:last-child { border-bottom: none; }
.sol-row:hover { background: var(--bg-hover); }

/* ═══ WIPO accent strip ═════════════════════════════════════════════════════ */
.wipo-strip {
  height: 3px;
  background: linear-gradient(90deg, var(--nexo), var(--teal), var(--purple));
  width: 100%;
}

/* ═══ Responsive ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nexo-topbar { padding: 0 14px; height: 52px; }
  .nexo-main   { padding: 14px; }
  .user-name, .user-role { display: none; }
  .nexo-topbar-brand .brand-sub { display: none; }
  .btn-exit span { display: none; }
  .btn-exit { padding: 6px 9px; }
}
@media (max-width: 480px) {
  .nexo-topbar-brand .brand-text { font-size: 13px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ═══ RTL (árabe, hebreo, etc.) ════════════════════════════════════════════ */
[dir="rtl"] .nexo-topbar        { flex-direction: row-reverse; }
[dir="rtl"] .nexo-nav           { flex-direction: row-reverse; }
[dir="rtl"] .nexo-exit-btns     { flex-direction: row-reverse; }
[dir="rtl"] .nexo-page-header h1{ flex-direction: row-reverse; }
[dir="rtl"] .card-head          { flex-direction: row-reverse; }
[dir="rtl"] .stats-grid         { direction: rtl; }
[dir="rtl"] .nexo-table         { direction: rtl; }
[dir="rtl"] .nexo-table thead th{ text-align: right; }
[dir="rtl"] .filter-bar         { flex-direction: row-reverse; }
[dir="rtl"] .modal-footer       { flex-direction: row-reverse; }
[dir="rtl"] .btn                { flex-direction: row-reverse; }
[dir="rtl"] .toast-item         { border-left: none; border-right: 4px solid; }
[dir="rtl"] .brand-sub          { text-align: right; }
[dir="rtl"] .nexo-topbar-brand  { flex-direction: row-reverse; }
[dir="rtl"] .nexo-user-badge    { flex-direction: row-reverse; }
[dir="rtl"] .qa-btn             { flex-direction: row-reverse; }
[dir="rtl"] .thread-row         { flex-direction: row-reverse; }
[dir="rtl"] .stat-card          { text-align: right; }

/* ═══ Agent Cards (specific to agentes.php) ═════════════════════════════════ */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.agent-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s ease;
  box-shadow: var(--shadow);
}
.agent-card:hover {
  border-color: var(--border-hi);
  box-shadow: 0 8px 30px var(--nexo-glow);
  transform: translateY(-4px);
}
.agent-card.destacado {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow), 0 4px 20px rgba(245,158,11,.12);
}
.card-top {
  padding: 16px 18px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.agent-flag {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.agent-main {
  flex: 1;
  min-width: 0;
}
.agent-nombre {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-pri);
  line-height: 1.3;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-sub {
  font-size: .8rem;
  color: var(--text-sec);
}
.badge-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.card-servicios {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.srv-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
}
.card-tarifas {
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  font-size: .8rem;
  color: var(--text-sec);
}
.card-tarifas strong { color: var(--text-pri); }
.card-actions {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
.srv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.srv-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: .82rem;
  transition: border-color .15s;
}
.srv-check:hover { border-color: var(--nexo); }
.srv-check input { accent-color: var(--nexo); cursor: pointer; }
.srv-check.active { border-color: rgba(14,165,233,.44); background: var(--nexo-glow); }

@media (max-width: 768px) {
  .agents-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .srv-grid { grid-template-columns: repeat(2, 1fr); }
}
