:root {
  --a2p-blue: #1B3ED4;
  --a2p-blue-dark: #1B3ED4;
  --a2p-orange: #FF6A00;
  --a2p-bg: #f4f6fb;
  --a2p-text: #1b1f33;
  --a2p-muted: #8b90a5;
  --a2p-line: #E5E7EB;
  --a2p-card: #ffffff;
  --a2p-radius: 18px;
  --a2p-font: "Poppins", system-ui, sans-serif;
}

html, body.a2p-fullscreen-body {
  margin: 0;
  padding: 0;
  background: var(--a2p-bg);
  font-family: var(--a2p-font);
  color: var(--a2p-text);
}

body.a2p-fullscreen-body .wp-site-blocks,
body.a2p-form-page .entry-content > .wp-block-shortcode,
body.a2p-list-page .entry-content {
  max-width: none;
}

body.a2p-list-page {
  background: var(--a2p-bg);
}

body.a2p-list-page .wp-block-post-title,
body.a2p-list-page .entry-title {
  display: none;
}

body.a2p-list-page .site-main,
body.a2p-list-page .entry-content,
body.a2p-list-page .page-content {
  background: transparent;
}

.a2p-app,
.a2p-list-wrap,
.a2p-auth {
  font-family: var(--a2p-font);
  color: var(--a2p-text);
  box-sizing: border-box;
}

.a2p-app *,
.a2p-list-wrap *,
.a2p-auth * {
  box-sizing: border-box;
}

.a2p-app [hidden],
.a2p-list-wrap [hidden],
.a2p-auth [hidden] {
  display: none !important;
}

/* Neutraliza el reset de Hello Elementor (bordes #c36 en buttons/inputs). */
.a2p-app a,
.a2p-list-wrap a,
.a2p-auth a {
  color: inherit;
  text-decoration: none;
  background: transparent;
}

.a2p-app a:hover,
.a2p-app a:focus,
.a2p-app a:active,
.a2p-list-wrap a:hover,
.a2p-auth a:hover {
  color: inherit;
  background: transparent;
}

.a2p-app button,
.a2p-app [type="button"],
.a2p-app [type="submit"],
.a2p-list-wrap button,
.a2p-list-wrap [type="button"],
.a2p-auth button,
.a2p-auth [type="submit"] {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  box-shadow: none;
  color: inherit;
  border-radius: 0;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
  text-transform: none;
  text-align: inherit;
  white-space: normal;
  width: auto;
  padding: 0;
}

.a2p-app button:hover,
.a2p-app button:focus,
.a2p-app button:focus-visible,
.a2p-app [type="button"]:hover,
.a2p-app [type="button"]:focus,
.a2p-app [type="button"]:focus-visible,
.a2p-app [type="submit"]:hover,
.a2p-app [type="submit"]:focus,
.a2p-list-wrap button:hover,
.a2p-list-wrap button:focus,
.a2p-auth button:hover,
.a2p-auth button:focus {
  background: none;
  color: inherit;
  border: 0;
  box-shadow: none;
  outline: none;
  text-decoration: none;
}

.a2p-app input[type="date"],
.a2p-app input[type="email"],
.a2p-app input[type="number"],
.a2p-app input[type="password"],
.a2p-app input[type="search"],
.a2p-app input[type="tel"],
.a2p-app input[type="text"],
.a2p-app input[type="time"],
.a2p-app input[type="url"],
.a2p-app textarea,
.a2p-auth input[type="email"],
.a2p-auth input[type="password"],
.a2p-auth input[type="text"] {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: none;
  outline: none;
  background: #fff;
}

.a2p-app input:focus,
.a2p-app input:focus-visible,
.a2p-app textarea:focus,
.a2p-app textarea:focus-visible,
.a2p-auth input:focus,
.a2p-auth input:focus-visible {
  outline: none;
  box-shadow: none;
}

.a2p-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--a2p-bg);
}

.a2p-topbar {
  background: var(--a2p-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.a2p-topbar-left,
.a2p-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.a2p-app .a2p-back {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.a2p-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.a2p-brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.a2p-brand-text strong {
  color: #ff9a4d;
}

.a2p-app .a2p-btn-ghost {
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
  padding: 8px 12px;
}

.a2p-app .a2p-topbar .a2p-btn-ghost {
  background: transparent;
  font-family: var(--a2p-font);
  font-weight: 400;
  font-size: 14px;
  color: #fff;
}

.a2p-app .a2p-btn-preview {
  background: #FF6A00;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.a2p-app .a2p-btn-preview:hover,
.a2p-app .a2p-btn-preview:focus,
.a2p-app .a2p-btn-preview:focus-visible,
.a2p-app .a2p-btn-preview:active {
  background: #FF6A00;
  color: #fff;
}

.a2p-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 64px);
}

.a2p-sidebar {
  background: #fff;
  border-right: 1px solid var(--a2p-line);
  padding: 16px 0;
}

.a2p-app .a2p-step-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 0;
  text-align: left;
  font-family: var(--a2p-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: #99A1AF;
  padding: 12px 20px;
  border-radius: 0;
  cursor: pointer;
  margin-bottom: 0;
}

.a2p-app .a2p-step-link.is-active {
  background: #E8EDFB;
  color: #1B3ED4;
  font-weight: 600;
  box-shadow: inset -3px 0 0 #1B3ED4;
}

.a2p-app .a2p-step-link.is-done {
  color: #99A1AF;
  font-weight: 400;
  background: #fff;
}

.a2p-step-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.a2p-step-icon img {
  width: 36px;
  height: 36px;
  display: none;
  object-fit: contain;
  border-radius: 50%;
}

.a2p-app .a2p-step-link .a2p-ico-idle { display: block; }
.a2p-app .a2p-step-link.is-active .a2p-ico-idle,
.a2p-app .a2p-step-link.is-done .a2p-ico-idle { display: none; }
.a2p-app .a2p-step-link.is-active .a2p-ico-active { display: block; }
.a2p-app .a2p-step-link.is-done .a2p-ico-done { display: block; }

.a2p-main {
  width: min(900px, 100%);
  justify-self: center;
  padding: 36px 24px 120px;
}

.a2p-panel { display: none; }
.a2p-panel.is-active { display: block; }

.a2p-main h1 {
  margin: 0 0 6px;
  font-family: var(--a2p-font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--a2p-text);
}

.a2p-lead {
  margin: 0 0 24px;
  font-family: var(--a2p-font);
  font-size: 14px;
  font-weight: 400;
  color: var(--a2p-muted);
}

.a2p-card {
  background: var(--a2p-card);
  border: 1px solid #E5E7EB;
  border-radius: var(--a2p-radius);
  padding: 22px 24px 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
}

.a2p-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.a2p-card h2 {
  margin: 0;
  font-family: var(--a2p-font);
  font-size: 14px;
  font-weight: 700;
}

.a2p-card h2 em,
.a2p-label em {
  color: var(--a2p-muted);
  font-style: normal;
  font-weight: 500;
}

.a2p-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--a2p-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 26px;
}

.a2p-app .a2p-input,
.a2p-auth input {
  width: 100%;
  border: 1px solid #E5E7EB;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--a2p-text);
  outline: none;
}

.a2p-app .a2p-input:focus,
.a2p-auth input:focus {
  border-color: #c5cffc;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,91,255,.08);
}

.a2p-app textarea.a2p-input,
.a2p-app textarea {
  resize: vertical;
  max-width: 100%;
  overflow-x: hidden;
}

.a2p-textarea-sm { min-height: 88px; }
.a2p-textarea-lg { min-height: 140px; }

.a2p-counter {
  text-align: right;
  color: var(--a2p-muted);
  font-size: 12px;
  margin-top: 8px;
}

.a2p-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 8px;
}

.a2p-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.a2p-card-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.a2p-app .a2p-btn-add,
.a2p-list-wrap .a2p-btn-add {
  background: #fff;
  color: var(--a2p-blue);
  border: 1.5px solid #d9e0ff;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.a2p-author {
  background: #f8f9fd;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.a2p-author-top,
.a2p-ref-head,
.a2p-conclusion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.a2p-author-top strong {
  color: var(--a2p-blue);
  font-size: 12px;
  letter-spacing: .04em;
}

.a2p-author-flags {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.a2p-author-flags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.a2p-app .a2p-remove,
.a2p-list-wrap .a2p-remove {
  border: 0;
  background: transparent;
  color: #c44747;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.a2p-ref-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.a2p-ref-row {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.a2p-ref-row-main {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.4fr);
}

.a2p-ref-row-meta {
  grid-template-columns: minmax(0, 2fr) 88px 80px 80px minmax(0, 1.1fr);
}

.a2p-ref-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--a2p-blue);
}

.a2p-ref-grid .a2p-input {
  width: 100%;
  min-width: 0;
}

.a2p-footer-nav {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.a2p-footer-spacer { flex: 1; }

.a2p-app .a2p-btn-next,
.a2p-app .a2p-btn-orange,
.a2p-app .a2p-btn-white,
.a2p-app .a2p-btn-prev,
.a2p-list-wrap .a2p-btn-next,
.a2p-list-wrap .a2p-btn-orange {
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  padding: 12px 22px;
  border: 0;
}

.a2p-app .a2p-btn-next,
.a2p-list-wrap .a2p-btn-next {
  background: #1B3ED4;
  color: #fff;
  box-shadow: 0 10px 15px -3px #BEDBFF;
}

.a2p-app .a2p-btn-next:hover,
.a2p-app .a2p-btn-next:focus,
.a2p-app .a2p-btn-next:focus-visible,
.a2p-app .a2p-btn-next:active,
.a2p-list-wrap .a2p-btn-next:hover,
.a2p-list-wrap .a2p-btn-next:focus {
  background: #1B3ED4;
  color: #fff;
}

.a2p-app .a2p-btn-prev {
  background: #fff;
  color: #5b6178;
  border: 1px solid var(--a2p-line);
}

.a2p-app .a2p-btn-prev:hover,
.a2p-app .a2p-btn-prev:focus,
.a2p-app .a2p-btn-prev:focus-visible,
.a2p-app .a2p-btn-prev:active {
  background: #fff;
  color: #5b6178;
  border: 1px solid var(--a2p-line);
}

.a2p-app .a2p-btn-orange,
.a2p-list-wrap .a2p-btn-orange {
  background: var(--a2p-orange);
  color: #fff;
}

.a2p-app .a2p-btn-orange:hover,
.a2p-app .a2p-btn-orange:focus,
.a2p-app .a2p-btn-orange:focus-visible,
.a2p-app .a2p-btn-orange:active,
.a2p-list-wrap .a2p-btn-orange:hover,
.a2p-list-wrap .a2p-btn-orange:focus,
.a2p-list-wrap .a2p-btn-orange:active {
  background: var(--a2p-orange);
  color: #fff;
}

.a2p-app .a2p-btn-white {
  background: #fff;
  color: var(--a2p-blue);
}

.a2p-app .a2p-btn-white:hover,
.a2p-app .a2p-btn-white:focus,
.a2p-app .a2p-btn-white:focus-visible,
.a2p-app .a2p-btn-white:active {
  background: #fff;
  color: var(--a2p-blue);
}

.a2p-app .a2p-btn-sm,
.a2p-list-wrap .a2p-btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.a2p-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.a2p-switch input { display: none; }

.a2p-switch-ui {
  width: 44px;
  height: 24px;
  background: #d7dbe8;
  border-radius: 999px;
  position: relative;
  flex: 0 0 44px;
}

.a2p-switch-ui:after {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: .2s ease;
}

.a2p-switch input:checked + .a2p-switch-ui {
  background: var(--a2p-blue);
}

.a2p-switch input:checked + .a2p-switch-ui:after {
  left: 23px;
}

.a2p-summary {
  margin: 0;
}

.a2p-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f8;
  font-size: 14px;
}

.a2p-summary span:last-child {
  color: #111;
  font-weight: 600;
}

.a2p-ready {
  background: linear-gradient(180deg, #3b5bff 0%, #2b47e6 100%);
  color: #fff;
  border-radius: 22px;
  padding: 36px 28px;
  text-align: center;
}

.a2p-ready h2 { margin: 0 0 8px; }
.a2p-ready p { margin: 0 0 22px; color: rgba(255,255,255,.86); }
.a2p-ready-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.a2p-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1b1f33;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  z-index: 40;
}

.a2p-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.a2p-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 48, .55);
}

.a2p-modal-dialog {
  position: relative;
  width: min(920px, calc(100% - 32px));
  height: calc(100% - 40px);
  margin: 20px auto;
  background: #eef1f8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#a2p-preview-modal .a2p-modal-dialog {
  width: min(1100px, calc(100% - 24px));
  height: calc(100% - 24px);
  margin: 12px auto;
}

.a2p-modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--a2p-line);
  gap: 12px;
}

.a2p-preview-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.a2p-preview-hint {
  font-size: 12px;
  color: var(--a2p-muted);
  font-weight: 400;
  margin-right: 4px;
}

.a2p-app .a2p-modal-bar .a2p-btn-ghost {
  color: var(--a2p-text);
}

.a2p-preview-stage {
  overflow: auto;
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  background: #d7dce8;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  cursor: grab;
}

.a2p-preview-stage.is-panning {
  cursor: grabbing;
  user-select: none;
}

.a2p-preview-stage.is-panning * {
  user-select: none;
}

.a2p-preview-fit {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(16, 22, 48, .12);
  background: #fff;
}

.a2p-preview-frame {
  display: block;
  width: 1080px;
  height: 1920px;
  border: 0;
  margin: 0;
  padding: 0;
  background: #fff;
  transform-origin: top left;
  pointer-events: none;
}

.a2p-resource-slot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--a2p-line);
}

.a2p-resource-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.a2p-resource-status {
  color: var(--a2p-muted);
  font-size: 12px;
}

.a2p-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--a2p-bg);
  padding: 32px 16px;
}

.a2p-auth-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(28,39,84,.08);
}

.a2p-brand-center {
  justify-content: center;
  margin-bottom: 12px;
}

.a2p-auth-intro {
  text-align: center;
  color: var(--a2p-muted);
}

.a2p-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f4f6fb;
  border-radius: 12px;
  padding: 4px;
  margin: 18px 0;
}

.a2p-auth .a2p-tabs button {
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--a2p-muted);
}

.a2p-auth .a2p-tabs button.is-active {
  background: #fff;
  color: var(--a2p-blue);
}

.a2p-auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0;
}

.a2p-auth-msg {
  color: #b42318;
  min-height: 1.2em;
}

.a2p-list-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 128px 20px 96px;
}

.a2p-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.a2p-list-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--a2p-text);
}

.a2p-list-head p {
  margin: 8px 0 0;
  color: var(--a2p-muted);
  font-size: 15px;
  line-height: 1.5;
}

.a2p-list-head a {
  text-decoration: none;
  flex-shrink: 0;
}

.a2p-list-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #eef1f8;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 20px;
  max-width: 420px;
}

.a2p-list-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 11px 16px;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--a2p-muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.a2p-list-tabs button:hover {
  color: var(--a2p-blue);
}

.a2p-list-tabs button.is-active {
  background: #fff;
  color: var(--a2p-blue);
  box-shadow: 0 2px 10px rgba(27, 62, 212, 0.1);
}

.a2p-list-tabs__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(27, 62, 212, 0.1);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.a2p-list-tabs button:not(.is-active) .a2p-list-tabs__count {
  background: rgba(139, 144, 165, 0.18);
  color: var(--a2p-muted);
}

.a2p-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a2p-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid rgba(27, 62, 212, 0.08);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 28px rgba(28, 39, 84, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.a2p-list-item:hover {
  border-color: rgba(27, 62, 212, 0.18);
  box-shadow: 0 12px 32px rgba(28, 39, 84, 0.09);
  transform: translateY(-1px);
}

.a2p-list-item__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.a2p-list-item__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--a2p-text);
  word-break: break-word;
}

.a2p-list-item__date {
  font-size: 13px;
  color: var(--a2p-muted);
}

.a2p-list-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.a2p-list-empty-filter {
  background: #fff;
  border: 1px dashed rgba(27, 62, 212, 0.2);
  border-radius: 18px;
  padding: 36px 24px;
  text-align: center;
  color: var(--a2p-muted);
  font-size: 15px;
}

.a2p-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.a2p-badge.is-draft {
  background: rgba(255, 106, 0, 0.12);
  color: #c45a00;
}

.a2p-badge.is-done {
  background: rgba(27, 62, 212, 0.1);
  color: var(--a2p-blue);
}

.a2p-empty {
  background: #fff;
  border: 1px solid rgba(27, 62, 212, 0.08);
  border-radius: 22px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(28, 39, 84, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.a2p-empty__icon {
  width: 56px;
  height: 56px;
  color: var(--a2p-blue);
  margin-bottom: 4px;
}

.a2p-empty__icon svg {
  width: 100%;
  height: 100%;
}

.a2p-empty p {
  margin: 0;
  color: var(--a2p-muted);
  font-size: 15px;
}

.a2p-empty .a2p-btn-next {
  margin-top: 6px;
  text-decoration: none;
}

@media (max-width: 720px) {
  .a2p-list-head {
    flex-direction: column;
    align-items: stretch;
  }

  .a2p-list-head .a2p-btn-next {
    align-self: flex-start;
  }

  .a2p-list-tabs {
    max-width: none;
  }

  .a2p-list-item {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
  }

  .a2p-list-item__actions {
    justify-content: flex-start;
    padding-top: 4px;
    border-top: 1px solid #f0f2f8;
  }
}

.a2p-secondary { margin-top: 12px; }

#a2p-authors [data-author]:only-child [data-remove="author"],
#a2p-references [data-ref]:only-child [data-remove="ref"] {
  display: none;
}

.a2p-header-card-head {
  justify-content: space-between;
}

.a2p-header-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.a2p-app .a2p-header-change {
  background: transparent;
  border: 0;
  color: var(--a2p-blue);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
}

.a2p-card.a2p-header-card {
  overflow: visible;
}

.a2p-header-preview {
  border-radius: 14px;
  overflow: visible;
  background: transparent;
  line-height: 0;
}

.a2p-header-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  background: #eef1f8;
  border-radius: 14px;
}

.a2p-header-placeholder {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  padding: 0 16px;
  text-align: center;
}

.a2p-headers-dialog {
  width: min(860px, calc(100% - 32px));
  height: auto;
  max-height: calc(100% - 80px);
}

.a2p-headers-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: auto;
}

.a2p-app .a2p-header-option {
  display: block;
  width: 100%;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

.a2p-app .a2p-header-option.is-selected,
.a2p-app .a2p-header-option:hover {
  border-color: #1B3ED4;
}

.a2p-header-option img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  background: #eef1f8;
}

.a2p-header-option span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}

.a2p-headers-empty {
  margin: 12px 4px 24px;
  color: var(--a2p-muted);
}

.a2p-chart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f8;
}

.a2p-chart-item span {
  display: block;
  color: var(--a2p-muted);
  font-size: 12px;
  font-weight: 500;
}

.a2p-chart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a2p-chart-editor h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.a2p-chart-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.a2p-app .a2p-chart-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #5b6178;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.a2p-app .a2p-chart-type.is-active {
  background: #1B3ED4;
  border-color: #1B3ED4;
  color: #fff;
}

.a2p-chart-series {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.a2p-chart-editor.is-donut .a2p-chart-axes {
  display: none;
}

.a2p-chart-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.a2p-chart-table {
  width: 100%;
  border-collapse: collapse;
}

.a2p-chart-table th {
  text-align: left;
  font-size: 12px;
  color: #6b7280;
  background: #f8fafc;
  padding: 10px;
}

.a2p-chart-table td {
  padding: 8px 10px;
  border-top: 1px solid #f0f2f8;
}

.a2p-chart-table .a2p-input {
  min-width: 0;
}

.a2p-app .a2p-table-add {
  background: transparent;
  border: 0;
  color: var(--a2p-blue);
  font: inherit;
  font-weight: 700;
  padding: 10px 0;
  cursor: pointer;
}

.a2p-app .a2p-row-remove {
  background: transparent;
  border: 0;
  color: #9aa0b4;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.a2p-chart-legend-switch {
  margin: 12px 0;
}

.a2p-chart-preview-box {
  background: #f6f8fc;
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
}

.a2p-chart-preview-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9aa0b4;
  margin-bottom: 8px;
}

.a2p-chart-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.a2p-figure-box {
  background: #f6f8fc;
  border-radius: 14px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.a2p-figure-box img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.a2p-figure-empty {
  color: var(--a2p-muted);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

.a2p-figure-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.a2p-file-btn {
  display: inline-flex;
  cursor: pointer;
}

@media (max-width: 900px) {
  .a2p-chart-series { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .a2p-shell { grid-template-columns: 1fr; }
  .a2p-sidebar { display: none; }
  .a2p-main { padding: 24px 16px 100px; max-width: none; }
  .a2p-grid-2,
  .a2p-ref-row-main,
  .a2p-ref-row-meta { grid-template-columns: 1fr; }
}

/* Guía de ayuda por sección (toolkit) */
.a2p-guide {
  margin: -8px 0 20px;
  background: #F3F6FF;
  border: 1px solid #D9E1FF;
  border-radius: 14px;
  font-family: var(--a2p-font);
  color: var(--a2p-text);
}
.a2p-guide summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--a2p-blue);
}
.a2p-guide-body {
  padding: 0 18px 16px;
  font-size: 13px;
  line-height: 1.55;
}
.a2p-guide-body h3 {
  margin: 12px 0 4px;
  font-size: 13px;
  font-weight: 700;
}
.a2p-guide-body p,
.a2p-guide-body ul {
  margin: 0 0 6px;
}
.a2p-guide-body ul {
  padding-left: 18px;
}
.a2p-guide-note {
  color: var(--a2p-muted);
  font-style: italic;
}

/* Aviso de autoguardado en la barra superior */
.a2p-autosave {
  font-family: var(--a2p-font);
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
  white-space: nowrap;
}

/* Bibliografía en texto libre */
.a2p-ref .r-text {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}
.a2p-ref-total {
  display: inline-block;
  margin-left: 6px;
  font-weight: 600;
  color: var(--a2p-blue);
}
@media (max-width: 720px) {
  .a2p-autosave { display: none; }
}

/* Recuadro de cada paso de la ficha (la clase .a2p-panel también la usa el póster). */
.a2p-app .a2p-panel.is-active {
  padding: 28px 32px 32px;
  background: #fff;
  border: 1px solid #DCE3F5;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(28, 39, 84, .05);
}

/* Área privada */
.a2p-list-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
  padding: 32px 36px;
  border-radius: 24px;
  background: linear-gradient(120deg, #1B3ED4 0%, #2F5BFF 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(27, 62, 212, .22);
  position: relative;
  overflow: hidden;
}
.a2p-list-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 122, 26, .18);
  pointer-events: none;
}
.a2p-list-hero__text,
.a2p-list-hero__side { position: relative; z-index: 1; }
.a2p-list-hero__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #FFB27A;
}
.a2p-list-wrap .a2p-list-hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}
.a2p-list-hero p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .85);
}
.a2p-list-hero__side {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.a2p-list-stats { display: flex; gap: 10px; }
.a2p-list-stat {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  text-align: center;
}
.a2p-list-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}
.a2p-list-stat span {
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
}
.a2p-list-wrap a.a2p-list-hero__cta {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border-radius: 999px;
  background: #FF6A00;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(255, 106, 0, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.a2p-list-wrap a.a2p-list-hero__cta:hover,
.a2p-list-wrap a.a2p-list-hero__cta:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 106, 0, .38);
}

.a2p-list-item { justify-content: flex-start; }
.a2p-list-item__thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}
.a2p-list-item__thumb svg { width: 26px; height: 26px; }
.a2p-list-item__thumb.is-done { background: rgba(27, 62, 212, .08); color: var(--a2p-blue); }
.a2p-list-item__thumb.is-draft { background: rgba(255, 106, 0, .1); color: #FF6A00; }
.a2p-list-item__main { flex: 1; }
.a2p-list-item__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
}
.a2p-list-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.a2p-list-wrap .a2p-delete-poster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  color: #9AA1B5;
  background: transparent;
}
.a2p-list-wrap .a2p-delete-poster svg { width: 18px; height: 18px; }
.a2p-list-wrap .a2p-delete-poster:hover,
.a2p-list-wrap .a2p-delete-poster:focus {
  color: #c44747;
  background: #FDECEC;
}

@media (max-width: 720px) {
  .a2p-app .a2p-panel.is-active { padding: 20px 18px 24px; border-radius: 16px; }
  .a2p-list-wrap { padding-top: 104px; }
  .a2p-list-hero { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .a2p-list-hero__side { width: 100%; flex-wrap: wrap; }
  .a2p-list-item__thumb { display: none; }
}
