:root {
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --border: #E7E9F1;
  --text: #14171F;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --blue: #2F5FE0;
  --blue-soft: #EAF0FE;
  --green: #1E9E6B;
  --green-soft: #E7F7EF;
  --amber: #C8850F;
  --amber-soft: #FDF2DF;
  --purple: #7C5CE0;
  --purple-soft: #F1ECFC;
  --red: #D5493C;
  --red-soft: #FCEBE9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 23, 31, 0.04), 0 8px 24px rgba(20, 23, 31, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 24px;
  font-weight: 700;
  font-size: 16px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: left;
  width: 100%;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:not(.is-disabled):hover {
  background: #F4F6FB;
  color: var(--text);
}

.nav-item.is-active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.nav-item.is-disabled {
  color: var(--text-faint);
  cursor: default;
}

.nav-item.is-disabled[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  margin-left: 8px;
  background: var(--text);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 5;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ---------- Topbar ---------- */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  width: 320px;
  color: var(--text-faint);
}

.search svg { width: 16px; height: 16px; }

.search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--text);
  font-size: 13px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  color: var(--text);
  font-weight: 500;
}

.company-pill svg { width: 16px; height: 16px; color: var(--text-muted); }

.icon-btn {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.icon-btn svg { width: 18px; height: 18px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-meta strong { font-size: 13px; }
.user-meta span { font-size: 12px; color: var(--text-faint); }

/* ---------- Content ---------- */

.content {
  padding: 24px 28px 60px;
  max-width: 1400px;
}

.grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.col-main, .col-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-header h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.card-header .muted {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.link-btn {
  border: none;
  background: none;
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  padding: 0;
}

/* Greeting */

.greeting-card h1 {
  font-size: 22px;
  margin: 0 0 6px;
}

.greeting-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  max-width: 60ch;
}

.greeting-facts {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.fact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.fact-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fact-icon.good { background: var(--green-soft); color: var(--green); }
.fact-icon.warn { background: var(--amber-soft); color: var(--amber); }
.fact-icon.info { background: var(--blue-soft); color: var(--blue); }

/* Priority decision */

.priority-card {
  border: 1px solid var(--border);
}

.priority-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.priority-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.priority-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.priority-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.priority-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}

.priority-desc {
  margin: 0;
  color: var(--text-muted);
  max-width: 62ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: #F1F2F5; color: var(--text-muted); }

.priority-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metric-label {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0 0 4px;
}

.metric-value {
  font-weight: 600;
  font-size: 14px;
}

.stars { color: #D8DCE6; letter-spacing: 1px; }
.stars .on { color: var(--amber); }

.priority-impact-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 500;
  font-size: 13px;
  margin: 0 0 18px;
}

.priority-impact-note.is-negative {
  color: var(--amber);
}

.row-learning-note {
  margin-top: 4px;
}

.row-learning-note .priority-impact-note {
  margin: 0;
  font-size: 12.5px;
}

.priority-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #274FC2; }

.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #F7F8FB; }

.btn-danger-ghost { background: var(--card); color: var(--red); border-color: var(--red-soft); }
.btn-danger-ghost:hover { background: var(--red-soft); }

.priority-more {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: none;
}

.priority-more.is-open { display: block; }

/* Progress list */

.progress-list, .decisions-full-list {
  display: flex;
  flex-direction: column;
}

.progress-row, .decision-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.progress-row:last-child, .decision-row:last-child { border-bottom: none; }

.row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.row-body { flex: 1; min-width: 0; }

.row-title {
  font-weight: 600;
  font-size: 13.5px;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  margin: 0;
  color: var(--text-faint);
  font-size: 12.5px;
}

.row-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 140px;
}

.progress-track {
  width: 120px;
  height: 6px;
  background: #EEF0F5;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.row-team {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 12px;
}

.row-percent {
  font-weight: 700;
  font-size: 13px;
  min-width: 34px;
  text-align: right;
}

/* Expandable progress/decision rows + task panel */

.progress-row-wrap, .decision-row-wrap {
  border-bottom: 1px solid var(--border);
}

.progress-row-wrap:last-child, .decision-row-wrap:last-child { border-bottom: none; }

.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.decision-row-wrap .decision-row {
  border-bottom: none;
  padding: 14px 0;
}

.task-panel {
  display: none;
  padding: 4px 0 16px 50px;
}

.task-panel.is-open { display: block; }

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  color: #fff;
}

.task-check.is-done {
  background: var(--green);
  border-color: var(--green);
}

.task-body { flex: 1; min-width: 0; }

.task-desc {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.task-desc.is-done {
  color: var(--text-faint);
  text-decoration: line-through;
}

.task-team {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* Objectives */

.objectives-list { display: flex; flex-direction: column; }

.objective-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.objective-row:last-child { border-bottom: none; }

.objective-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.objective-title { font-weight: 600; font-size: 13.5px; margin: 0 0 3px; }

.objective-meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.objective-values {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Company */

.company-details, .company-scope {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.detail-row:last-child { border-bottom: none; }

.detail-label { color: var(--text-faint); }
.detail-value { font-weight: 500; text-align: right; }

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.report-table th {
  text-align: left;
  color: var(--text-faint);
  font-weight: 500;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.report-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.report-table tr:last-child td { border-bottom: none; }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--blue-soft);
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* Journal (Knowledge) */

.journal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.journal-form-row {
  display: flex;
  gap: 10px;
}

.journal-form input[type="text"],
.journal-form select,
.journal-form textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card);
}

.journal-form input[type="text"] { flex: 1; }
.journal-form select { width: 220px; }
.journal-form textarea { resize: vertical; min-height: 64px; }

.journal-list { display: flex; flex-direction: column; }

.journal-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.journal-entry:last-child { border-bottom: none; }

.journal-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.journal-entry-title { font-weight: 600; font-size: 13.5px; margin: 0; }
.journal-entry-date { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.journal-entry-desc { margin: 4px 0 6px; font-size: 13px; color: var(--text-muted); }

/* Reports (full list) */

.reports-full-list .report-table { font-size: 13px; }
.reports-full-list .report-table th, .reports-full-list .report-table td { padding: 10px 12px; }

/* Briefing list (Empresa hoy) */

.briefing-list { display: flex; flex-direction: column; gap: 4px; }

.briefing-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.briefing-row:last-child { border-bottom: none; }

.briefing-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.briefing-label { font-size: 12px; color: var(--text-faint); margin: 0; }
.briefing-value { font-size: 13px; font-weight: 600; margin: 1px 0 0; }

.sparkline { margin-left: auto; flex-shrink: 0; }

/* Timeline */

.timeline-list { position: relative; padding-left: 4px; }

.timeline-row {
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-row:last-child { padding-bottom: 0; }

.timeline-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10px;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 4px;
  flex-shrink: 0;
}

.timeline-row:not(:last-child) .timeline-dot-col::after {
  content: "";
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
}

.timeline-time {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0 0 2px;
}

.timeline-title { font-size: 13px; font-weight: 600; margin: 0 0 2px; }
.timeline-desc { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* Empty / error states */

.empty-state, .error-state {
  padding: 24px 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.error-state { color: var(--red); }

.skeleton-line, .skeleton-block {
  background: linear-gradient(90deg, #F1F2F6 25%, #F8F9FB 37%, #F1F2F6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

.skeleton-line { height: 14px; margin: 10px 0; }
.skeleton-block { height: 160px; }

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Views */

.view { display: none; }
.view.is-active { display: block; }

/* Toast */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Login */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 2px;
}

.login-sub {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.login-card input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
}

.login-card .btn {
  justify-content: center;
  margin-top: 6px;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  margin: 0;
  min-height: 16px;
}

/* Superadmin panel */

.superadmin-shell {
  min-height: 100vh;
  background: var(--bg);
}

.superadmin-content {
  padding: 24px 28px 60px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-client-list { display: flex; flex-direction: column; }

.admin-client-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.admin-client-row:last-child { border-bottom: none; }

.admin-client-info { flex: 1; min-width: 0; }

.admin-client-name { font-weight: 600; font-size: 13.5px; margin: 0 0 2px; }
.admin-client-meta { margin: 0; color: var(--text-faint); font-size: 12px; }

.admin-client-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.admin-brand-row:last-child { border-bottom: none; }

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.admin-summary-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
}

.admin-summary-label { font-size: 12px; color: var(--text-faint); margin: 0 0 4px; }
.admin-summary-value { font-size: 18px; font-weight: 700; margin: 0; }

.period-selector {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
}

.period-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.period-btn.is-active {
  background: var(--card);
  color: var(--blue);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20,23,31,0.06);
}

@media (max-width: 980px) {
  .grid-2col { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 20px; }
}
/* ==========================================================
   Publishing — "Publicar el cambio en tu web" + "Mi web"
   (append to the end of styles.css)
   ========================================================== */

.pub-slot { padding: 6px 0 8px 30px; }

.pub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pub-card.pub-drafted { border-color: #BFD0FA; background: #F7F9FF; }
.pub-card.pub-published { border-color: #BFE6D3; }

.pub-lead { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.pub-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pub-text {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
}

.pub-chip {
  background: var(--amber-soft);
  color: #5C3B00;
  border-radius: 6px;
  padding: 1px 7px;
  font-weight: 600;
  border: 1px dashed #E0B665;
}

.pub-chip.is-set { border-style: solid; border-color: transparent; }

.pub-gate {
  background: #FFF7E3;
  border: 1px solid #F1D79A;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pub-gate.is-ok { background: var(--green-soft); border-color: #BFE6D3; }

.pub-gate-text { margin: 0; font-size: 13px; line-height: 1.5; }

.pub-gate-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }

.pub-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; min-width: 180px; flex: 1 1 180px; }
.pub-field-wide { flex: 1 1 100%; width: 100%; }

.pub-field input,
.pub-form input {
  font: inherit;
  font-weight: 400;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.pub-field input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }

.pub-target { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }

.pub-meta { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.pub-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pub-hint { font-size: 12px; color: var(--text-faint); }

.pub-actions a.btn { text-decoration: none; }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.pub-notice { border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.5; border: 1px solid transparent; }
.pub-notice-green { background: var(--green-soft); border-color: #BFE6D3; color: #14664A; }
.pub-notice-amber { background: var(--amber-soft); border-color: #F1D79A; color: #4A3200; }
.pub-notice-red { background: var(--red-soft); border-color: #F3C4BF; color: #8A2A20; }
.pub-notice-gray { background: #F1F2F5; border-color: var(--border); color: var(--text-muted); }

/* Preview modal */

.pub-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 31, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.pub-modal {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pub-modal h2 { margin: 0; font-size: 18px; }

.pub-diff {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.pub-diff div { padding: 3px 10px; white-space: pre-wrap; word-break: break-word; }
.pub-diff-add { background: #E7F7EF; color: #14664A; }
.pub-diff-del { background: #FCEBE9; color: #8A2A20; }
.pub-diff-ctx { background: #F7F8FB; color: var(--text-muted); }

.pub-guarantees { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }

.pub-modal .pub-actions { justify-content: flex-end; margin-top: 4px; }

/* Mi web view */

.pub-conn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.pub-conn-title { margin: 0; font-weight: 600; font-size: 14px; }

.pub-platforms { display: inline-flex; gap: 6px; margin-bottom: 14px; background: var(--bg); padding: 4px; border-radius: 12px; }

.pub-platform {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.pub-platform.is-active { background: var(--card); color: var(--blue); box-shadow: var(--shadow); }

.pub-steps { margin: 0 0 16px; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--text); }

.pub-form { display: flex; flex-wrap: wrap; gap: 12px; }
