/* ============================================================
   WAST Panel — tema visual inspirado en CelestialSaaS
   (awesome-landing-pages / PaulleDemon)
   Primary #4f55c1 · light SaaS · Roboto · pills · soft glow
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap");

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

:root {
  --primary: #4f55c1;
  --primary-soft: #c8cbf9;
  --primary-muted: rgba(79, 85, 193, 0.12);
  --primary-hover: #3f45a8;

  --bg: #f6f7fb;
  --bg-glow: linear-gradient(83deg, #ceaed474 15%, #abd4e693 33%, #73edc097 79%, #8c91e86b 100%);
  --panel: #ffffff;
  --panel2: #f3f4f9;
  --border: #e4e6f0;
  --border-strong: #d0d3e2;

  --text: #0d0d0d;
  --muted: #595959;
  --muted2: #8a8a98;

  --green: #16a34a;
  --red: #dc2626;
  --yellow: #ca8a04;
  --purple: #7c3aed;
  --sky: #0284c7;
  --turquoise: #0d9488;

  --accent: var(--primary);
  --accent2: #6b70d4;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  --shadow: 0 10px 25px -8px rgba(15, 23, 42, 0.08), 0 4px 10px -6px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --sidebar-w: 248px;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 180px;
  background: var(--bg-glow);
  filter: blur(90px);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
.hidden { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd2e0; border-radius: 8px; }

/* ===== APP LAYOUT ===== */
.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #8c91e8);
  box-shadow: 0 8px 18px rgba(79, 85, 193, 0.28);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.02em; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.nav { display: flex; flex-direction: column; padding: 10px 12px; gap: 2px; flex: 1; overflow: auto; }
.nav-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  padding: 14px 10px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-item:hover { background: var(--primary-muted); color: var(--primary); }
.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 16px rgba(79, 85, 193, 0.25);
}
.nav-item.logout { margin-top: auto; color: var(--muted); }
.nav-item.logout:hover { color: var(--red); background: rgba(220, 38, 38, 0.08); }

.sidebar-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--border);
}
.sidebar-foot .nav-dev {
  width: 100%;
  margin-bottom: 4px;
}
.nav-item { position: relative; }
.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-lead-bell {
  position: relative;
  border: 1px solid var(--border);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.btn-lead-bell .nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  margin: 0;
}
.lead-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.lead-card.unread { border-color: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-muted); }
.lead-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-card-top strong { font-size: 15px; }
.lead-when { margin-left: auto; font-size: 12px; color: var(--muted); }
.lead-meta, .lead-contact { font-size: 13px; color: var(--muted); margin-top: 4px; }
.lead-contact a { color: var(--primary); text-decoration: none; font-weight: 600; }
.lead-contact a:hover { text-decoration: underline; }
.lead-msg { margin: 8px 0 10px; font-size: 14px; color: var(--text); }

.sitio-img-picker { margin-top: 12px; }
.sitio-img-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.sitio-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}
.sitio-thumb {
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 0 0 6px;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  font-family: inherit;
}
.sitio-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
  background: #eee;
}
.sitio-thumb span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  padding: 4px 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sitio-thumb.on {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}
.sitio-thumb:hover { border-color: var(--primary-soft); }
.sitio-upload { display: inline-block; margin-top: 10px; cursor: pointer; }

.dev-checks {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}
.dev-check {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
}
.dev-check span:last-child { color: var(--muted); }
.dev-field { margin: 14px 0 4px; }
.dev-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.dev-help {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0 0 8px;
  max-width: 720px;
}
.dev-masked {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.dev-masked code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.dev-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.dev-row input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13.5px;
  background: #fff;
}
.dev-row input:focus {
  outline: none;
  border-color: var(--primary);
}
.dev-test {
  margin-top: 6px;
  font-size: 12.5px;
}
.dev-test.ok { color: var(--green); }
.dev-test.err { color: var(--red); }
@media (max-width: 800px) {
  .dev-row { grid-template-columns: 1fr; }
}
.conn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0 4px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted2);
}
.dot-on { background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(246, 247, 251, 0.82);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar-left > div { min-width: 0; }
.topbar h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}
.view-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 2px 0 0;
  line-height: 1.3;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-date {
  color: var(--muted);
  font-size: 13px;
  text-transform: capitalize;
  white-space: nowrap;
  line-height: 1.2;
}
.view { padding: 22px 28px 40px; }

/* ===== CARDS / GRIDS ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.card, .sys-card, .agent-card, .empresa-card, .campana-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.card-title, .section-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.card-title { margin-bottom: 10px; }
.stat-card .stat-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; color: var(--text); }
.stat-card .stat-meta { font-size: 12px; margin-top: 4px; color: var(--muted); }
.stat-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
}
.accent-bg { background: var(--primary-muted); color: var(--primary); }
.green-bg { background: rgba(22, 163, 74, 0.12); color: var(--green); }
.purple-bg { background: rgba(124, 58, 237, 0.12); color: var(--purple); }
.yellow-bg { background: rgba(202, 138, 4, 0.14); color: var(--yellow); }
.red-bg { background: rgba(220, 38, 38, 0.12); color: var(--red); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.btn-mobile-nav, .btn-sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}
.btn-sidebar-close { margin-left: auto; font-size: 22px; line-height: 1; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 30;
}
.sitio-wa-row { max-width: 360px; margin: 0 0 14px; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .btn-mobile-nav, .btn-sidebar-close { display: inline-flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 88vw);
    min-width: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 40;
    height: 100%;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.12);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-overlay {
    display: block;
  }
  body.nav-open { overflow: hidden; }
  .nav-item { justify-content: flex-start; padding: 11px 12px; }
  .topbar-date { display: none; }
  .view { padding: 14px 14px 36px; }
  .topbar { padding: 12px 14px; }
  .topbar h2 { font-size: 18px; }
  .section-head { align-items: stretch; }
  .section-head .action-row { width: 100%; }
  .page-tabs { width: 100%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap { overflow-x: auto; }
  table { min-width: 560px; }
}
.mt-lg { margin-top: 18px; }
.card-grid, .empresa-grid, .agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* ===== TABLES ===== */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel2);
  font-weight: 600;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(79, 85, 193, 0.03); }
.num { font-variant-numeric: tabular-nums; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--panel2);
  color: var(--muted);
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge-gray { background: #eef0f5; color: var(--muted); }
.badge-green { background: rgba(22, 163, 74, 0.12); color: var(--green); }
.badge-red { background: rgba(220, 38, 38, 0.12); color: var(--red); }
.badge-purple { background: rgba(124, 58, 237, 0.12); color: var(--purple); }
.badge-sky { background: rgba(2, 132, 199, 0.12); color: var(--sky); }
.badge-turquoise { background: rgba(13, 148, 136, 0.12); color: var(--turquoise); }
.badge-yellow { background: rgba(202, 138, 4, 0.14); color: var(--yellow); }
.badge-blue { background: var(--primary-muted); color: var(--primary); }

/* ===== BUTTONS (Celestial pills) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(79, 85, 193, 0.28);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  filter: none;
}
.btn-danger { color: var(--red); border-color: rgba(220, 38, 38, 0.35); }
.btn-danger:hover, .btn-danger-dark:hover {
  border-color: var(--red);
  background: rgba(220, 38, 38, 0.06);
  color: var(--red);
}
.btn-danger-dark {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.25);
}
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  box-shadow: none;
}
.btn-ghost:hover { color: var(--primary); background: var(--primary-muted); }

/* ===== AGENTS / SYSTEM ===== */
.agent-head { display: flex; align-items: center; gap: 12px; }
.agent-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), #8c91e8);
}
.agent-name { font-weight: 600; font-size: 14.5px; }
.agent-role, .agent-desc, .agent-busy { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.agent-stats { font-size: 12px; color: var(--muted); }
.agent-bar { height: 5px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.agent-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8c91e8);
  border-radius: 4px;
}

.sys-card h4 { font-size: 14.5px; margin: 0 0 4px; font-weight: 600; }
.sys-card p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.45; }
.sys-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.details-tech {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.details-tech > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.details-tech > summary::-webkit-details-marker { display: none; }
.details-tech[open] > summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: var(--panel2);
}
.details-tech .table-wrap { border: none; border-radius: 0; box-shadow: none; }

/* ===== FORMS / MODAL ===== */
.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-row input, .form-row select, .form-row textarea,
.wast-input, .wast-textarea {
  width: 100%;
  background: #fff;
  border: 2px solid #d8dae6;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  color-scheme: light;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.wast-input:focus, .wast-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.wast-textarea { min-height: 110px; resize: vertical; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal h3 { font-size: 18px; margin-bottom: 14px; font-weight: 600; }

/* ===== TOAST ===== */
.toast {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-top: 8px;
  font-size: 13.5px;
  max-width: 360px;
}
.toast.ok { border-color: rgba(22, 163, 74, 0.35); }
.toast.err { border-color: rgba(220, 38, 38, 0.35); color: var(--red); }
#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ===== NOTES / EMPTY ===== */
.note, .page-lead, .wast-hint, .wast-dt, .muted-note {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.page-lead { margin: 0 0 14px; max-width: 720px; }
.empty-state {
  color: var(--muted);
  font-size: 13.5px;
  padding: 18px 8px;
  text-align: center;
}

/* ===== PAGE TABS ===== */
.page-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}
.page-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.page-tab:hover { color: var(--primary); }
.page-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(79, 85, 193, 0.25);
}
.page-panel { display: none; }
.page-panel.active { display: block; }

.subtabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.subtab {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.subtab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.action-row, .actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}
.action-row .btn { min-width: auto; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ===== CHARTS ===== */
.chart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.chart-row:last-child { border-bottom: none; }
.chart-label { flex: 0 0 140px; font-size: 12.5px; color: var(--muted); }
.chart-bar {
  flex: 1;
  height: 8px;
  background: var(--panel2);
  border-radius: 99px;
  overflow: hidden;
}
.chart-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8c91e8);
  border-radius: 99px;
  min-width: 2px;
}
.chart-val { font-size: 12.5px; color: var(--text); font-weight: 600; min-width: 70px; text-align: right; }

/* Donut + legend */
.wast-chart-split {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}
.wast-donut-wrap { flex: 0 0 auto; }
.wast-donut { display: block; }
.wast-donut-center {
  font-size: 22px;
  font-weight: 700;
  fill: var(--text);
  font-family: inherit;
}
.wast-donut-sub {
  font-size: 11px;
  fill: var(--muted);
  font-family: inherit;
}
.wast-legend {
  list-style: none;
  flex: 1 1 160px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.wast-legend li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}
.wast-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin-top: 3px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.wast-legend-lab {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}
.wast-legend-val {
  color: var(--text);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.wast-legend-val em {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* Vertical bars (daily) */
.wast-vbars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: calc(var(--vbar-h, 160px) + 48px);
  padding: 8px 4px 0;
  overflow-x: auto;
}
.wast-vbar {
  flex: 1 1 28px;
  min-width: 28px;
  max-width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.wast-vbar-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1;
}
.wast-vbar-track {
  flex: 1;
  width: 100%;
  max-width: 36px;
  background: var(--panel2);
  border-radius: 10px 10px 6px 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: 40px;
}
.wast-vbar-fill {
  width: 100%;
  border-radius: 10px 10px 4px 4px;
  min-height: 4px;
  transition: height 0.35s ease;
}
.wast-vbar-lab {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Horizontal bars (top paths) */
.wast-hbars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 6px;
}
.wast-hbar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 5px;
}
.wast-hbar-lab {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.wast-hbar-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 0 0 auto;
}
.wast-hbar-meta {
  font-weight: 500;
  color: var(--muted);
  font-size: 11.5px;
  margin-left: 4px;
}
.wast-hbar-track {
  height: 12px;
  background: var(--panel2);
  border-radius: 99px;
  overflow: hidden;
}
.wast-hbar-fill {
  height: 100%;
  border-radius: 99px;
  min-width: 4px;
  transition: width 0.35s ease;
}

@media (max-width: 720px) {
  .wast-chart-split { justify-content: center; }
  .wast-legend { width: 100%; }
}

/* ===== Media picker (Publicar) ===== */
.wast-media-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.wast-media-head .wast-hint {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}
.wast-media-selected {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  min-height: 72px;
}
.wast-media-selected img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  display: block;
}
.wast-media-selected {
  flex-wrap: wrap;
}
.wast-media-chip {
  position: relative;
  flex: 0 0 auto;
}
.wast-media-chip-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.wast-media-selected code {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.wast-post-img-stack {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 180px;
}
.wast-post-img-stack img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.wast-ai-bar {
  margin: 0 0 14px;
  padding: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
}
.wast-ai-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.wast-brand-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  background: var(--primary-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.wast-brand-modes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wast-brand-hint {
  flex: 1 1 180px;
  min-width: 160px;
}
.wast-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}
.wast-media-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.wast-media-tile:hover {
  border-color: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}
.wast-media-tile.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-muted);
}
.wast-media-tile.is-branded {
  outline: 1px dashed var(--turquoise);
}
.wast-media-tile.is-branded .wast-media-name {
  color: var(--turquoise);
  font-weight: 600;
}
.wast-media-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}
.wast-media-thumb img,
.wast-media-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel2);
  display: block;
}
.wast-media-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: opacity .15s;
}
.wast-media-tile:hover .wast-media-zoom,
.wast-media-tile:focus-within .wast-media-zoom {
  opacity: 1;
  pointer-events: auto;
}
.wast-media-name {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}
.wast-media-chip-zoom {
  position: absolute;
  left: -6px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity .15s;
}
.wast-media-chip:hover .wast-media-chip-zoom {
  opacity: 1;
}

/* Lightbox preview */
.wast-img-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(10, 14, 30, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.wast-img-preview {
  width: min(960px, 96vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wast-img-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.wast-img-preview-meta strong {
  display: block;
  font-size: 14px;
}
.wast-img-preview-meta code {
  display: block;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  margin-top: 2px;
}
.wast-img-preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wast-img-preview-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #0f1220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.wast-img-preview-body img {
  max-width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.wast-post-thumb {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
}
.wast-post-thumb-zoom {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15,23,42,.8);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
}
.wast-post-thumb:hover .wast-post-thumb-zoom {
  opacity: 1;
}
.wast-post-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 10px 0 4px;
}
.wast-post-img img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.wast-post-img {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.wast-post-img-empty { min-width: 70px; }
.wast-post-body .wast-post-text { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .wast-post-body { flex-direction: column; }
}

/* ===== CONTENIDO (wast-*) ===== */
.wast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.wast-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.wast-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--text); font-weight: 600; }
.wast-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.wast-tag {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel2);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 500;
}
.wast-tag-camp { background: var(--primary-muted); color: var(--primary); }
.wast-empty { color: var(--muted); font-size: 13px; padding: 16px 0; }
.wast-monospace {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--muted2);
}
.wast-spin {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: wast-rot 0.7s linear infinite;
  vertical-align: -2px;
}
@keyframes wast-rot { to { transform: rotate(360deg); } }
.wast-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 4px;
}
.wast-filters select { max-width: 240px; }
.wast-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}
.wast-summary .wast-tag {
  cursor: pointer;
  border: 1px solid transparent;
}
.wast-summary .wast-tag.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}
.wast-post-text {
  white-space: pre-wrap;
  margin-top: 8px;
  max-height: 160px;
  overflow: auto;
  color: var(--text);
  font-size: 13.5px;
}
.wast-approve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #fff;
}
.wast-approve input {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.wast-approve.is-on {
  border-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.08);
  color: var(--green);
}
.wast-approve.is-disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== CAMPAÑAS ===== */
.campaña-name, .empresa-card h4 { font-size: 15.5px; font-weight: 650; }
.campaña-meta, .empresa-meta { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.campaña-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ===== KANBAN (legacy safe) ===== */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kanban-col {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.kanban-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kanban-count {
  background: var(--panel2);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--muted);
}
.kanban-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}
.kanban-select { width: 100%; margin-top: 6px; }

/* platforms */
.plat { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel2); }
.plat-Facebook { background: #e8eefc; color: #1d4ed8; }
.plat-Instagram { background: #fce7f3; color: #be185d; }
.plat-X, .plat-Twitter { background: #f1f5f9; color: #0f172a; }
.plat-LinkedIn { background: #e0f2fe; color: #0369a1; }
.plat-TikTok { background: #f5f5f5; color: #171717; }
.plat-Email, .plat-Web { background: var(--primary-muted); color: var(--primary); }

.spread {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* responsive view padding */
@media (max-width: 640px) {
  .view { padding: 12px 12px 32px; }
  .topbar { padding: 10px 12px; }
  .cards { grid-template-columns: 1fr; }
  .stat-card .stat-value { font-size: 22px; }
  .login-card { margin: 16px; width: calc(100% - 32px); }
  .sitio-wa-row { max-width: none; }
}


/* ===== LOGIN SCREEN (Celestial) ===== */
body.is-login { overflow: hidden; }
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 50;
}
.login-glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 45vh;
  background: linear-gradient(83deg, #ceaed474 15%, #abd4e693 33%, #73edc097 79%, #8c91e86b 100%);
  filter: blur(90px);
  pointer-events: none;
}
.login-card {
  position: relative;
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px 26px 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .logo { margin: 0 auto 12px; }
.login-brand h1 {
  font-size: 28px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text);
}
.login-brand p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin: 12px 0 6px;
}
.login-card input {
  width: 100%;
  border: 2px solid #d8dae6;
  border-radius: 9999px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
}
.login-card input:focus {
  outline: none;
  border-color: var(--primary);
}
.login-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
}
.login-card .btn-block { margin-top: 18px; padding: 12px 16px; font-size: 15px; }
.login-foot {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted2);
}


/* ===== CONFIRM DIALOG (Celestial) ===== */
.wast-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  animation: wast-fade-in 0.15s ease;
}
@keyframes wast-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wast-confirm {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px 22px 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  animation: wast-pop 0.18s ease;
}
@keyframes wast-pop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.wast-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: var(--primary-muted);
  color: var(--primary);
}
.wast-confirm-icon.danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red);
}
.wast-confirm h3 {
  font-size: 18px;
  font-weight: 650;
  margin: 0 0 8px;
  color: var(--text);
}
.wast-confirm p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
  white-space: pre-wrap;
}
.wast-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.wast-confirm-actions .btn { min-width: 110px; }

/* Feed preview — dual format uses CENTER crop of each photo */
.feed-img-single img,
.feed-img-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}
.feed-img-single img { aspect-ratio: 1; }
.feed-img-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  background: #111;
  aspect-ratio: 1;
}
.feed-img-half {
  overflow: hidden;
  min-width: 0;
}
.feed-img-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.feed-brand-name { display: block; }

/* Sitio Caridi CMS */
.sitio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}
.sitio-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sitio-card-media {
  position: relative;
  background: #111;
  min-height: 180px;
}
.sitio-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sitio-card-ph {
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 13px;
}
.sitio-card-price-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}
.sitio-card-body { padding: 14px 16px 16px; }
.sitio-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.sitio-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  font-family: inherit;
  color: var(--text);
}
.sitio-title:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.sitio-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sitio-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.sitio-fields label, .sitio-full {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sitio-full { margin-top: 10px; }
.sitio-fields input, .sitio-fields select,
.sitio-full input, .sitio-full textarea, .sitio-full select {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}
.sitio-img-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}
.sitio-upload { cursor: pointer; }
@media (max-width: 800px) {
  .sitio-card { grid-template-columns: 1fr; }
  .sitio-card-media { height: 180px; }
  .sitio-fields { grid-template-columns: 1fr; }
  .sitio-img-row { grid-template-columns: 1fr; }
}

/* ===== PUBLICAR: crear + vista previa ===== */
.crear-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.crear-brand-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.crear-brand-label .wast-input {
  min-width: 200px;
  font-weight: 700;
  border-color: var(--primary);
  color: var(--primary);
}
.segmented-control {
  display: inline-flex;
  background: var(--panel2);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 4px;
  border: 1px solid var(--border);
}
.segmented-control .subtab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.segmented-control .subtab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(79, 85, 193, 0.25);
}
.crear-mode-hidden { display: none !important; }
.crear-media-card { margin-bottom: 16px; }
.crear-media-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 20px;
  align-items: start;
}
.crear-media-col { min-width: 0; }
.crear-preview-col {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.crear-text-col { margin-top: 0; }
.crear-text-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 650;
}
.feed-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.feed-preview-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
@media (max-width: 1024px) {
  .crear-media-split { grid-template-columns: 1fr; }
  .crear-preview-col {
    padding-left: 0;
    border-left: none;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
}
.feed-card {
  background: #f7f8fb;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 100%;
  margin: 0;
}
.feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.feed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-meta { display: flex; flex-direction: column; }
.feed-brand-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1c1e21;
  display: block;
}
.feed-time { font-size: 11px; color: #65676b; }
.feed-body {
  padding: 0 12px 10px;
  font-size: 13.5px;
  color: #050505;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow-y: auto;
}
.feed-media {
  background: #f0f2f5;
  width: 100%;
  overflow: hidden;
}
.feed-img-placeholder {
  padding: 24px 14px;
  text-align: center;
  color: var(--muted2);
  font-size: 13px;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}
.feed-footer {
  padding: 8px 14px 12px;
  border-top: 1px solid #f0f2f5;
}
.feed-stat {
  font-size: 12px;
  color: #65676b;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f2f5;
}
.feed-actions {
  display: flex;
  justify-content: space-around;
  font-size: 12px;
  font-weight: 600;
  color: #65676b;
}
