:root {
  --bg: #0f1723;
  --bg-soft: #162132;
  --panel: #1f2a3b;
  --panel-soft: #25354b;
  --ink: #edf3fb;
  --muted: #b7c6da;
  --line: #344861;
  --primary: #ffb020;
  --primary-soft: #3b2d0f;
  --ok: #2bc178;
  --warn: #ffb020;
  --danger: #f56b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #24344d 0%, transparent 36%),
    radial-gradient(circle at 100% 0%, #24304a 0%, transparent 34%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: #9fcbff;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
}

.top {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  color: var(--primary);
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 0.9rem;
}

.nav a.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: #ffd586;
  font-weight: 600;
}

.card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 20px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--primary-soft);
  color: #ffd586;
  border: 1px solid #6e5321;
  font-size: 0.82rem;
  font-weight: 600;
}

h1 {
  margin: 10px 0;
  font-size: 1.7rem;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: block;
  margin-bottom: 8px;
  color: #d2def0;
  font-size: 0.92rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #121d2b;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  border: 1px solid #8a641d;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #ffdca0;
  font-weight: 600;
  background: linear-gradient(135deg, #664813, #4f360d);
}

.btn.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: #1a2534;
}

.btn.subtle {
  border-color: #455a72;
  color: #c7d7ea;
  background: #1a2738;
  font-weight: 500;
}

.notice {
  margin-top: 10px;
  border: 1px solid #425a79;
  background: #1a2b41;
  color: #bcd2ef;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #32465f;
  text-align: left;
  padding: 10px 8px;
  font-size: 0.92rem;
}

th {
  color: #dbe8f9;
  font-weight: 600;
}

td {
  color: #c5d4e7;
}

.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-recebido { background: #23324b; color: #b9d8ff; border-color: #415f8e; }
.status-sem_correspondencia { background: #4b3a23; color: #ffd9a3; border-color: #8e6f41; }
.status-triagem { background: #1f3a5b; color: #9fd0ff; border-color: #3b628d; }
.status-complementar { background: #3f3216; color: #ffd792; border-color: #876422; }
.status-aprovado { background: #183a2e; color: #98efc7; border-color: #2f8d6b; }
.status-negado { background: #4d2323; color: #ffc4c4; border-color: #9f4444; }

.precheck-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.precheck-ok {
  background: #173a2d;
  color: #9de5c4;
  border-color: #2c8967;
}

.precheck-manual {
  background: #3a2d17;
  color: #ffd392;
  border-color: #8f6923;
}

.precheck-escalated {
  background: #352353;
  color: #d7c0ff;
  border-color: #6b4db2;
}

.row-manual-received td {
  background: rgba(255, 176, 32, 0.08);
}

.timeline {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.timeline li {
  border-left: 3px solid #3a4f67;
  margin-left: 8px;
  padding: 0 0 10px 10px;
  color: #c3d3e8;
}

.msg-ok,
.msg-err {
  margin-top: 10px;
  border-radius: 10px;
  padding: 10px 12px;
}

.msg-ok {
  border: 1px solid #2f8d6b;
  background: #17392e;
  color: #9ce4c5;
}

.msg-err {
  border: 1px solid #9f4444;
  background: #432323;
  color: #ffd0d0;
}

small.meta {
  color: #8ea4be;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}


.msg-info {
  border: 1px solid #425a79;
  background: #1a2b41;
  color: #bcd2ef;
  border-radius: 10px;
  padding: 10px 12px;
}

/* ==========================================
   Admin login
   ========================================== */

.admin-auth-page {
  margin: 0;
  min-height: 100vh;
  color: #0f172a;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(191, 219, 254, 0.8) 0%, transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(254, 215, 170, 0.62) 0%, transparent 28%),
    #eef2f7;
}

.admin-auth-matriz {
  background:
    radial-gradient(circle at 0% 0%, rgba(191, 219, 254, 0.72) 0%, transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.34) 0%, transparent 24%),
    #edf2f8;
}

.admin-auth-editorial {
  background:
    radial-gradient(circle at 0% 0%, rgba(191, 219, 254, 0.72) 0%, transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(251, 113, 133, 0.24) 0%, transparent 22%),
    #f2f5f9;
}

.admin-auth-shell {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 32px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.admin-auth-hero {
  border: 1px solid #dbe3ef;
  border-radius: 28px;
  background:
    linear-gradient(140deg, rgba(11, 19, 37, 0.98), rgba(21, 36, 63, 0.96)),
    #0b1325;
  color: #f8fbff;
  padding: 30px 30px 28px;
  display: grid;
  gap: 22px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.admin-auth-matriz .admin-auth-hero {
  background:
    linear-gradient(145deg, rgba(8, 17, 38, 0.98), rgba(18, 37, 68, 0.96)),
    #081126;
}

.admin-auth-editorial .admin-auth-hero {
  background:
    linear-gradient(145deg, rgba(19, 26, 46, 0.98), rgba(52, 31, 66, 0.96)),
    #131a2e;
}

.admin-auth-eyebrow {
  margin: 0 0 8px;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-auth-hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 1.7rem + 1.9vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.admin-auth-copy {
  margin: 0;
  color: #d9e2ee;
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 780px;
}

.admin-auth-copy strong {
  color: #fff3c4;
}

.admin-auth-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-auth-role-card {
  border: 1px solid rgba(219, 234, 254, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  backdrop-filter: blur(6px);
}

.admin-auth-role-card.is-matriz {
  max-width: 420px;
}

.admin-auth-role-card.is-editorial {
  border-color: rgba(244, 114, 182, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.admin-auth-role-title {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.admin-auth-role-copy {
  margin: 8px 0 0;
  color: #d0dae8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.admin-auth-note {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 18px;
  background: rgba(250, 204, 21, 0.08);
  padding: 18px 18px 16px;
}

.admin-auth-note-title {
  margin: 0;
  color: #fff0b3;
  font-size: 0.96rem;
  font-weight: 800;
}

.admin-auth-note-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #d9e2ee;
  display: grid;
  gap: 8px;
}

.admin-auth-card {
  border: 1px solid #d9e1ec;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1);
}

.admin-auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-auth-card-head h2 {
  margin: 0;
  color: #0b1325;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.admin-auth-channel-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  white-space: nowrap;
}

.admin-auth-channel-pill.is-matriz {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.admin-auth-channel-pill.is-editorial {
  border-color: #f9a8d4;
  background: #fff1f7;
  color: #9d174d;
}

.admin-auth-message {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.admin-auth-message.tone-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-auth-message.tone-ok {
  border: 1px solid #86efac;
  background: #ecfdf3;
  color: #166534;
}

.admin-auth-message.tone-warning {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.admin-auth-message.tone-err {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.admin-auth-summary-card {
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #f8fafc;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.admin-auth-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.admin-auth-summary-label {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-auth-summary-value {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
}

.admin-auth-summary-value.is-code {
  font-size: 0.9rem;
  font-family: "Consolas", "SFMono-Regular", monospace;
  word-break: break-word;
}

.admin-auth-summary-copy {
  margin: 0;
  color: #526074;
  font-size: 0.93rem;
  line-height: 1.65;
}

.admin-auth-summary-meta {
  margin: 0;
  color: #526074;
  font-size: 0.86rem;
  line-height: 1.55;
}

.admin-auth-primary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-auth-manual-panel {
  border: 1px dashed #d0d9e6;
  border-radius: 20px;
  background: #fcfdff;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.admin-auth-manual-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-auth-form {
  display: grid;
  gap: 14px;
}

.admin-auth-form label {
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-auth-form input,
.admin-auth-form textarea {
  margin-top: 8px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid #cfd8e4;
  background: #ffffff;
  color: #0f172a;
  padding: 12px 14px;
  font: inherit;
}

.admin-auth-form textarea {
  min-height: 180px;
  resize: vertical;
}

.admin-auth-form input:focus,
.admin-auth-form textarea:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.admin-auth-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-auth-session-card {
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #fbfcfe;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.admin-auth-session-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-auth-session-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.admin-auth-session-copy {
  margin: 6px 0 0;
  color: #526074;
  font-size: 0.92rem;
  line-height: 1.6;
}

.admin-auth-session-copy.is-warning {
  color: #92400e;
}

.admin-auth-role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
}

.admin-auth-session-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-auth-callback-card {
  justify-items: center;
  text-align: center;
  min-height: 280px;
  align-content: center;
}

.admin-auth-spinner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 4px solid #dbeafe;
  border-top-color: #1d4ed8;
  animation: admin-auth-spin 0.9s linear infinite;
}

@keyframes admin-auth-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .admin-auth-shell {
    grid-template-columns: 1fr;
    padding: 20px 14px;
  }

  .admin-auth-hero,
  .admin-auth-card {
    border-radius: 22px;
    padding: 20px;
  }

  .admin-auth-role-grid {
    grid-template-columns: 1fr;
  }

  .admin-auth-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-auth-card-head,
  .admin-auth-session-head,
  .admin-auth-manual-head {
    flex-direction: column;
  }

  .admin-auth-primary-actions,
  .admin-auth-form-actions,
  .admin-auth-session-actions {
    flex-direction: column;
  }
}

/* ==========================================
   Triagem operator UI (inicio + fila)
   ========================================== */

.triage-shell {
  min-height: 100vh;
  background: #f3f4f6;
  color: #121212;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

.triage-topbar {
  position: relative;
  background: #f3f4f6;
  border-bottom: 1px solid #d8dadd;
  padding: 18px 28px 16px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.triage-system-title {
  margin: 0;
  color: #050505;
  font-size: 2.8rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.triage-system-subtitle {
  margin: 8px 0 0;
  color: #4a5565;
  font-size: 1.45rem;
}

.triage-topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.triage-operator-line {
  margin: 0;
  font-size: 0.95rem;
  color: #556274;
}

.triage-nav {
  display: flex;
  gap: 10px;
}

.triage-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccd2db;
  border-radius: 12px;
  padding: 10px 18px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.triage-nav a:hover {
  border-color: #0a0f2a;
  text-decoration: none;
}

.triage-nav a.active {
  background: #060827;
  border-color: #060827;
  color: #ffffff;
}

body.operator-mode-triagem .triage-shell {
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.3), transparent 34%),
    #f3f4f6;
}

body.operator-mode-triagem .triage-topbar {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(243, 244, 246, 0.98));
}

body.operator-mode-triagem .triage-system-title {
  color: #06122f;
}

body.operator-mode-triagem .triage-nav a.active,
body.operator-mode-triagem .triage-status-option.active {
  background: #0b3ea8;
  border-color: #0b3ea8;
}

body.operator-mode-triagem .triage-home-card,
body.operator-mode-triagem .triage-home-comms,
body.operator-mode-triagem .triage-case-banner {
  box-shadow: 0 18px 45px rgba(8, 47, 122, 0.08);
}

body.operator-mode-triagem .triage-case-banner {
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.98)),
    #ffffff;
}

body.operator-mode-manual .triage-shell {
  background:
    radial-gradient(circle at top right, rgba(253, 230, 138, 0.25), transparent 36%),
    #f6f3ee;
}

body.operator-mode-manual .triage-topbar {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.98), rgba(246, 243, 238, 0.98));
  border-bottom-color: #e8d8bf;
}

body.operator-mode-manual .triage-system-title {
  color: #4a2800;
}

body.operator-mode-manual .triage-system-subtitle,
body.operator-mode-manual .triage-operator-line {
  color: #75562c;
}

body.operator-mode-manual .triage-nav a {
  border-color: #dfd3c1;
  background: rgba(255, 255, 255, 0.92);
}

body.operator-mode-manual .triage-nav a:hover {
  border-color: #9a6700;
}

body.operator-mode-manual .triage-nav a.active,
body.operator-mode-manual .triage-status-option.active {
  background: #7c4a03;
  border-color: #7c4a03;
}

body.operator-mode-manual .triage-home-card,
body.operator-mode-manual .triage-home-comms,
body.operator-mode-manual .triage-case-banner,
body.operator-mode-manual .triage-filter-panel {
  border-color: #e6d7c0;
  box-shadow: 0 20px 45px rgba(122, 74, 3, 0.08);
}

body.operator-mode-manual .triage-home-card,
body.operator-mode-manual .triage-home-comms {
  background: rgba(255, 251, 244, 0.95);
}

body.operator-mode-manual .triage-current-status {
  background: #fff7eb;
  border-color: #f4d7a1;
}

body.operator-mode-manual .triage-home-title,
body.operator-mode-manual .triage-status-switch h3,
body.operator-mode-manual .triage-notices-header h3,
body.operator-mode-manual .triage-queue-intro .triage-home-title,
body.operator-mode-manual .triage-case-banner-copy h2 {
  color: #4a2800;
}

body.operator-mode-manual .triage-case-banner {
  background:
    linear-gradient(140deg, rgba(255, 251, 244, 0.98), rgba(255, 245, 230, 0.98)),
    #ffffff;
}

.triage-main {
  padding: 20px 30px 30px;
}

.triage-queue-main {
  max-width: 1360px;
  margin: 0 auto;
}

.triage-home-card {
  max-width: 980px;
  margin: 10px auto 0;
  background: #ffffff;
  border: 1px solid #d7dce4;
  border-radius: 22px;
  padding: 24px 26px;
}

.triage-home-layout {
  max-width: 1280px;
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.triage-home-layout .triage-home-card {
  max-width: none;
  margin: 0;
}

.triage-home-comms {
  background: #ffffff;
  border: 1px solid #d7dce4;
  border-radius: 22px;
  padding: 20px;
}

.triage-home-title {
  margin: 0 0 18px;
  font-size: 2.85rem;
  color: #060606;
  letter-spacing: -0.02em;
}

.triage-current-status {
  background: #f4f6f8;
  border-radius: 16px;
  border: 1px solid #e6e8ec;
  padding: 16px 18px;
}

.triage-block-label {
  margin: 0 0 8px;
  color: #546173;
  font-size: 0.98rem;
}

.triage-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 5px 14px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
}

.triage-status-chip.disponivel {
  background: #d1fae5;
  border-color: #86efac;
  color: #065f46;
}

.triage-status-chip.pausa {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.triage-status-chip.almoco {
  background: #ffedd5;
  border-color: #fdba74;
  color: #9a3412;
}

.triage-status-switch {
  margin-top: 24px;
}

.triage-status-switch h3 {
  margin: 0 0 12px;
  color: #060606;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.triage-status-options {
  display: grid;
  gap: 12px;
}

.triage-status-option {
  width: 100%;
  border: 1px solid #d5d8df;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.triage-status-option:hover {
  border-color: #060827;
}

.triage-status-option.active {
  background: #060827;
  border-color: #060827;
}

.triage-status-option.active .triage-status-option-title,
.triage-status-option.active .triage-status-option-subtitle {
  color: #ffffff;
}

.triage-status-option-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

.triage-status-option-subtitle {
  font-size: 0.97rem;
  color: #4b5563;
}

.triage-home-kpis {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e4e7ec;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.triage-kpi {
  text-align: center;
}

.triage-kpi-value {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.1;
  font-weight: 800;
}

.triage-kpi-value.is-green {
  color: #16a34a;
}

.triage-kpi-value.is-red {
  color: #dc2626;
}

.triage-kpi-value.is-gold {
  color: #ca8a04;
}

.triage-kpi-label {
  margin: 4px 0 0;
  color: #465366;
  font-size: 1rem;
}

.triage-logout-btn {
  margin-top: 18px;
  width: 100%;
  border: 1px solid #d8dce3;
  border-radius: 12px;
  background: #ffffff;
  color: #dc2626;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.triage-home-notices {
  max-width: 980px;
  margin: 12px auto 0;
  display: grid;
  gap: 8px;
}

.triage-notices-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.triage-notices-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.95rem;
}

.triage-notices-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #fca5a5;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  text-transform: lowercase;
}

.triage-notices-badge.is-muted {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #64748b;
}

.triage-notices-list {
  display: grid;
  gap: 12px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 2px;
}

.triage-notice-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px 16px;
}

.triage-notice-card.is-read {
  opacity: 0.84;
}

.triage-notice-card.tone-danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.triage-notice-card.tone-info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.triage-notice-card.tone-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.triage-notice-card.tone-success {
  border-color: #86efac;
  background: #ecfdf3;
}

.triage-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.triage-notice-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.2rem;
}

.triage-notice-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 8px;
}

.triage-notice-body {
  margin: 10px 0 12px;
  color: #334155;
  line-height: 1.45;
}

.triage-notice-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #475569;
  font-size: 0.86rem;
}

.triage-notice-read-btn {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.triage-notice-read {
  color: #64748b;
  font-weight: 600;
}

.triage-shell .notice {
  margin-top: 0;
  border: 1px solid #d6deea;
  background: #ebf3ff;
  color: #27405f;
}

.triage-filter-panel {
  margin-top: 8px;
  border: 1px solid #d7dce4;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
}

.triage-filter-panel label {
  color: #243244;
}

.triage-filter-panel input,
.triage-filter-panel select,
.triage-textarea,
.triage-note textarea,
.triage-note select {
  border: 1px solid #d7dce4;
  background: #ffffff;
  color: #111827;
}

.triage-queue-intro {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.triage-queue-intro .triage-home-title {
  font-size: clamp(2.1rem, 1.45rem + 1.55vw, 2.75rem);
  letter-spacing: -0.03em;
}

.triage-queue-intro h2 {
  margin: 0;
  color: #0f172a;
}

.triage-queue-intro p {
  margin-top: 6px;
  color: #516175;
  max-width: 780px;
}

.triage-queue-root {
  margin-top: 10px;
}

.triage-case-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  gap: 18px;
  border: 1px solid #d7dce4;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.96)),
    #ffffff;
  padding: 20px 22px;
}

.triage-case-banner-copy h2 {
  margin: 6px 0 10px;
  color: #091123;
  font-size: clamp(2rem, 1.15rem + 1.8vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.triage-case-banner-copy p:last-child {
  margin: 0;
  color: #4a586c;
  font-size: 1.02rem;
  line-height: 1.65;
}

.triage-case-banner-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.triage-case-banner-stat {
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #fbfcfe;
  padding: 14px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.triage-case-banner-label {
  display: inline-flex;
  align-items: center;
  color: #516175;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.triage-case-banner-value {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #0f172a;
  font-size: 1rem;
}

.triage-case-banner-value strong {
  color: #0b1325;
  font-size: 1.08rem;
  line-height: 1.35;
}

.triage-case-banner-value small {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.triage-case-banner-value .status-chip {
  align-self: flex-start;
}

.triage-mode-wrap {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.triage-panel {
  background: #ffffff;
  border: 1px solid #d7dce4;
  border-radius: 18px;
  padding: 16px;
  min-height: 65vh;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.triage-scroll {
  max-height: calc(100vh - 290px);
  overflow-y: auto;
  padding-right: 6px;
}

.triage-card {
  border: 1px solid #e1e4ea;
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 12px;
}

.triage-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  color: #101827;
  letter-spacing: -0.02em;
}

.triage-card h4 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #162334;
}

.triage-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.triage-card-eyebrow {
  margin: 0 0 6px;
  color: #5a6980;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.triage-card-copy {
  margin: 0 0 14px;
  color: #526074;
  font-size: 0.97rem;
  line-height: 1.6;
}

.triage-card-protocol {
  border-color: #d4dae3;
}

.triage-kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.triage-kv dt {
  color: #4d5b6f;
  font-weight: 600;
}

.triage-kv dd {
  margin: 0;
  color: #162334;
}

.triage-case-protocol {
  display: inline-flex;
  border: 1px solid #d2d8e1;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 0.9rem;
  color: #243244;
  background: #f9fafb;
}

.triage-protocol-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.triage-protocol-meta {
  margin: 10px 0 0;
  color: #475569;
  font-size: 0.98rem;
}

.triage-compare-block {
  margin-bottom: 12px;
}

.triage-compare-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.triage-compare-row-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.triage-compare-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  white-space: nowrap;
}

.triage-compare-pill.is-ok {
  border-color: #86efac;
  background: #ecfdf3;
  color: #166534;
}

.triage-compare-pill.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.triage-compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #e1e4ea;
  border-radius: 14px;
  overflow: hidden;
}

.triage-compare-col {
  padding: 14px 16px;
  background: #f8fafc;
}

.triage-compare-col.is-registered {
  border-left: 1px solid #dbe1ea;
}

.triage-compare-label {
  margin: 0;
  color: #4b5a6d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.triage-compare-value {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: clamp(1rem, 0.78rem + 0.5vw, 1.22rem);
  line-height: 1.45;
  font-weight: 700;
  word-break: break-word;
}

.triage-compare-value.is-ok {
  color: #15803d;
}

.triage-compare-value.is-warn {
  color: #b45309;
}

.triage-contact-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.triage-contact-label {
  margin: 0 0 8px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
}

.triage-contact-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.triage-contact-values span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 0.98rem;
  font-weight: 600;
}

.triage-owner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.triage-owner-grid > div:last-child {
  grid-column: 1 / -1;
}

.triage-owner-value {
  margin: 8px 0 0;
  color: #111827;
  font-size: 1.18rem;
  line-height: 1.45;
  font-weight: 700;
}

.triage-precheck-box {
  border-radius: 14px;
  border: 1px solid #bae6c8;
  background: #ecfdf3;
  padding: 16px;
}

.triage-precheck-box.warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.triage-precheck-box.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.triage-precheck-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
  color: #166534;
}

.triage-precheck-box.warn .triage-precheck-title {
  color: #92400e;
}

.triage-precheck-box.danger .triage-precheck-title {
  color: #991b1b;
}

.triage-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.triage-history-list li {
  border-left: 3px solid #e2e8f0;
  padding-left: 12px;
}

.triage-history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  color: #111827;
  font-weight: 700;
}

.triage-history-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.9rem;
}

.triage-doc-item {
  border: 1px solid #d8dce3;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: #ffffff;
}

.triage-doc-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 700;
}

.triage-doc-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border-radius: 999px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.76rem;
  padding: 2px 8px;
  text-transform: uppercase;
}

.triage-doc-badge.is-real {
  border-color: #86efac;
  background: #ecfdf3;
  color: #166534;
}

.triage-doc-media {
  border: 1px solid #d8dce3;
  border-radius: 14px;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px;
  margin-bottom: 8px;
  background: linear-gradient(140deg, #cbd5e1, #e2e8f0);
}

.triage-doc-media span {
  display: inline-flex;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.7);
  color: #ffffff;
  font-size: 0.82rem;
  padding: 5px 8px;
}

.triage-doc-media-selfie {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 36%, #93c5fd 100%);
}

.triage-doc-media-frente {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 36%, #86efac 100%);
}

.triage-doc-media-verso {
  background: linear-gradient(135deg, #fef9c3 0%, #fde68a 36%, #facc15 100%);
}

.triage-doc-preview {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  color: #475569;
  background: #f9fafb;
  font-size: 0.9rem;
}

.triage-bottom-actions {
  position: static;
  margin-top: 14px;
  border: 1px solid #d8dce3;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "summary summary"
    "group secondary";
  align-items: start;
  gap: 10px 12px;
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.1);
}

.triage-action-summary {
  grid-area: summary;
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: 760px;
}

.triage-action-label {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.triage-action-copy {
  margin: 0;
  color: #526074;
  font-size: 0.84rem;
  line-height: 1.45;
}

.triage-manual-alert {
  border-color: #fdba74;
  background: #fff7ed;
}

.triage-manual-banner {
  border-color: #f8d2a8;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.98), rgba(255, 245, 235, 0.96)),
    #ffffff;
}

.triage-manual-root .triage-panel:first-child {
  border-color: #f8d2a8;
  background: #fffbf5;
}

.triage-manual-search {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.triage-manual-results {
  border-color: #d8dce3;
  background: #ffffff;
}

.triage-manual-alert h3 {
  color: #9a3412;
}

.triage-manual-search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.triage-manual-target-label {
  margin: 0 0 8px;
}

.triage-manual-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.triage-manual-target-btn {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.triage-manual-target-btn:hover {
  border-color: #060827;
}

.triage-manual-target-btn.active {
  background: #060827;
  border-color: #060827;
  color: #ffffff;
}

.triage-manual-result-list {
  display: grid;
  gap: 12px;
}

.triage-manual-result-card {
  border: 1px solid #d8dce3;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px 16px;
}

.triage-manual-result-card.is-selected {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.triage-manual-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.triage-manual-result-head h4 {
  margin: 0;
  color: #111827;
  font-size: 1.12rem;
  line-height: 1.25;
}

.triage-manual-level {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.triage-manual-level.high {
  border-color: #86efac;
  background: #ecfdf3;
  color: #166534;
}

.triage-manual-level.medium {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.triage-manual-level.low {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.triage-manual-result-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.triage-manual-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 700;
}

.triage-manual-select input {
  width: auto;
}

.triage-manual-recommendation {
  border: 1px solid #d8dce3;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.triage-manual-recommendation.tone-neutral {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.triage-manual-recommendation.tone-success {
  border-color: #86efac;
  background: #ecfdf3;
}

.triage-manual-recommendation.tone-warning {
  border-color: #fcd34d;
  background: #fffbeb;
}

.triage-manual-recommendation-title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.triage-manual-recommendation.tone-success .triage-manual-recommendation-title {
  color: #166534;
}

.triage-manual-recommendation.tone-warning .triage-manual-recommendation-title {
  color: #92400e;
}

.triage-manual-results-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fbfcfe;
  padding: 16px;
}

.triage-manual-match-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.triage-manual-match-group {
  display: grid;
  gap: 8px;
}

.triage-manual-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.triage-manual-field-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
}

.triage-manual-field-chip.tone-ok {
  border-color: #86efac;
  background: #ecfdf3;
  color: #166534;
}

.triage-manual-field-chip.tone-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.triage-manual-field-chip.tone-muted {
  border-color: #dbe3ee;
  background: #f8fafc;
  color: #64748b;
}

.triage-action-group {
  grid-area: group;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.triage-decision-btn {
  border: 1px solid #d7dce4;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 12px;
  min-width: 176px;
  max-width: 228px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.triage-decision-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.triage-decision-btn-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}

.triage-decision-btn-copy {
  color: #526074;
  font-size: 0.76rem;
  line-height: 1.35;
}

.triage-decision-btn.tone-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.triage-decision-btn.tone-success .triage-decision-btn-copy {
  color: #166534;
}

.triage-decision-btn.tone-danger {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #991b1b;
}

.triage-decision-btn.tone-danger .triage-decision-btn-copy {
  color: #9f1239;
}

.triage-decision-btn.tone-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.triage-decision-btn.tone-warning .triage-decision-btn-copy {
  color: #92400e;
}

.triage-decision-btn.tone-secondary {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.triage-action-secondary {
  grid-area: secondary;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
}

.btn.success {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.btn.danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.btn.warning {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.triage-supervisor-link {
  border: none;
  background: transparent;
  color: #60738d;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.triage-note {
  margin-top: 8px;
}

.triage-note label {
  color: #334155;
  font-weight: 700;
}

.triage-note select {
  margin-top: 8px;
}

.triage-note textarea {
  min-height: 112px;
  margin-top: 8px;
}

.triage-required-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
}

.triage-note-hint {
  margin: 10px 0 0;
  color: #607086;
  font-size: 0.88rem;
  line-height: 1.55;
}

.triage-empty {
  border: 1px dashed #c6ceda;
  border-radius: 14px;
  background: #ffffff;
  padding: 18px;
  color: #334155;
}

.triage-manual-empty h2 {
  margin: 0 0 8px;
}

.triage-manual-empty p {
  margin: 0;
}

.triage-empty-list {
  margin: 12px 0;
  padding-left: 18px;
  color: #475569;
  display: grid;
  gap: 6px;
}

.triage-manual-empty .actions {
  margin: 10px 0 8px;
}

.triage-shell .msg-ok {
  border: 1px solid #86efac;
  background: #ecfdf3;
  color: #166534;
}

.triage-shell .msg-err {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.triage-shell .msg-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

@media (max-width: 1180px) {
  .triage-home-layout {
    grid-template-columns: 1fr;
  }

  .triage-system-title {
    font-size: 2.1rem;
  }

  .triage-system-subtitle {
    font-size: 1.05rem;
  }

  .triage-topbar {
    padding: 14px 18px;
  }

  .triage-main {
    padding: 16px;
  }

  .triage-queue-main {
    max-width: none;
  }

  .triage-case-banner {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .triage-case-banner-metrics {
    grid-template-columns: 1fr;
  }

  .triage-mode-wrap {
    grid-template-columns: 1fr;
  }

  .triage-manual-search-grid {
    grid-template-columns: 1fr;
  }

  .triage-manual-targets {
    grid-template-columns: 1fr;
  }

  .triage-compare-row,
  .triage-contact-values {
    grid-template-columns: 1fr;
  }

  .triage-compare-row-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .triage-panel {
    min-height: auto;
  }

  .triage-scroll {
    max-height: none;
    overflow: visible;
  }

  .triage-bottom-actions {
    position: static;
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "group"
      "secondary";
  }

  .triage-action-group {
    width: 100%;
  }

  .triage-decision-btn {
    width: 100%;
    min-width: 0;
  }

  .triage-action-secondary {
    width: 100%;
  }
}

/* Matriz (A+B bootstrap) */
.matriz-page {
  margin: 0;
  background: #f3f5f8;
  color: #0f172a;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

.editorial-page {
  background: #f5f6fa;
}

.matriz-page a {
  color: #1d4ed8;
}

.matriz-page p,
.matriz-page li,
.matriz-page label,
.matriz-page small,
.matriz-page .meta {
  color: #475569;
}

.matriz-page table th {
  color: #334155;
  font-weight: 700;
}

.matriz-page table td {
  color: #0f172a;
}

.matriz-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 18px 36px;
}

.matriz-head h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
  color: #0b1731;
}

.matriz-head p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 1.1rem;
}

.matriz-head-auth {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.matriz-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.matriz-subnav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.matriz-subnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.matriz-subnav-link:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.matriz-subnav-link.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.matriz-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #d6dfeb;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

.matriz-session-pill strong {
  color: #0b1731;
}

.matriz-session-pill span {
  color: #64748b;
}

.matriz-login-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.matriz-login-link:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.matriz-logout-btn {
  border: 1px solid #0f172a;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.matriz-toolbar {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: end;
}

.matriz-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

.matriz-filter select {
  min-width: 170px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 10px;
}

.matriz-refresh {
  border: 1px solid #1d4ed8;
  border-radius: 10px;
  background: #1d4ed8;
  color: #ffffff;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}

.matriz-context {
  margin-top: 18px;
  border: 1px solid #c8d4e8;
  border-radius: 12px;
  background: #eaf2ff;
  color: #1e3a8a;
  padding: 12px 14px;
}

.matriz-context.err {
  border-color: #f5c2c7;
  background: #fff1f2;
  color: #9f1239;
}

.app-assistant-debug-panel {
  margin-top: 14px;
  background: #ffffff;
}

.app-assistant-debug-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #0f172a;
  font-weight: 800;
}

.app-assistant-debug-panel summary small {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.app-assistant-debug-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.app-assistant-debug-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.app-assistant-debug-summary div {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 10px;
}

.app-assistant-debug-summary span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-assistant-debug-summary strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.app-assistant-debug-actions {
  display: flex;
  justify-content: flex-end;
}

.app-assistant-debug-actions button {
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #ffffff;
  color: #1d4ed8;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.app-assistant-debug-panel pre {
  max-height: 320px;
  overflow: auto;
  margin: 0;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.matriz-action-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.matriz-action-card {
  display: block;
  border: 1px solid #d8dee8;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  padding: 18px;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.matriz-action-card:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
}

.matriz-action-card h2 {
  margin: 0;
  font-size: 1.18rem;
  color: #0f172a;
}

.matriz-action-card p {
  margin: 10px 0 0;
  color: #475569;
  line-height: 1.5;
}

.matriz-action-tag {
  display: inline-block;
  margin-top: 14px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: lowercase;
}

.matriz-kpi-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.matriz-kpi {
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
}

.matriz-kpi-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.matriz-kpi-link:hover {
  text-decoration: none;
  border-color: #b7c6db;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.matriz-kpi-label {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.matriz-kpi-value {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}

.matriz-doors {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.matriz-grid-ops {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.matriz-grid-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.matriz-card {
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.matriz-card-full {
  grid-column: 1 / -1;
}

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

.matriz-card h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  color: #0f172a;
}

.matriz-card-head h2 {
  margin-bottom: 0;
}

.matriz-inline-link {
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.matriz-inline-link:hover {
  text-decoration: underline;
}

.matriz-inline-muted {
  color: #526074;
  font-size: 0.86rem;
}

.matriz-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.matriz-filter-grow {
  flex: 1 1 320px;
}

.matriz-filter input {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 10px;
}

.matriz-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.matriz-quick-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.matriz-quick-link:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.matriz-highlight-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.matriz-highlight-list li {
  margin-bottom: 8px;
  line-height: 1.35;
}

.matriz-review-list {
  display: grid;
  gap: 10px;
}

.matriz-review-card {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfdff;
}

.matriz-review-card p {
  margin: 6px 0 0;
  color: #526074;
}

.matriz-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.matriz-review-head h4 {
  margin: 0;
  font-size: 0.98rem;
}

.matriz-priority {
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.matriz-priority.alta {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.matriz-priority.media {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.matriz-priority.baixa {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.matriz-review-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matriz-mini-btn {
  font-size: 0.8rem;
  padding: 6px 10px;
}

.matriz-notice-list {
  display: grid;
  gap: 10px;
}

.matriz-notice-card {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfdff;
}

.matriz-notice-card p {
  margin: 6px 0 0;
  color: #526074;
}

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

.matriz-notice-head h4 {
  margin: 0;
  font-size: 0.98rem;
}

.matriz-severity {
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.matriz-severity.urgente {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.matriz-severity.atencao {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.matriz-severity.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.matriz-notice-actions {
  margin-top: 8px;
}

.matriz-notice-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.matriz-notice-form label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: #334155;
  font-weight: 600;
}

.matriz-notice-form input,
.matriz-notice-form textarea,
.matriz-notice-form select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.92rem;
}

.matriz-notice-form textarea {
  resize: vertical;
  min-height: 72px;
}

.matriz-notice-form-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.matriz-notice-form-actions {
  display: flex;
  justify-content: flex-end;
}

.matriz-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.6;
}

.app-health-page .matriz-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.app-health-page .matriz-kpi {
  min-height: 112px;
}

.app-health-kpi-compact {
  font-size: 1.56rem;
}

.app-health-alert-list {
  display: grid;
  gap: 10px;
}

.app-health-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe4f0;
  border-left-width: 4px;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
}

.app-health-alert strong {
  color: #0f172a;
  display: block;
  font-size: 0.94rem;
}

.app-health-alert p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.app-health-alert span {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.app-health-alert.is-critical {
  border-left-color: #be123c;
  background: #fff7f8;
}

.app-health-alert.is-error {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.app-health-alert.is-warn {
  border-left-color: #d97706;
  background: #fffbeb;
}

.app-health-alert.is-info {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.app-health-product-grid {
  align-items: stretch;
}

.app-health-product-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.app-health-product-tile {
  min-width: 0;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fbfdff;
  padding: 12px;
}

.app-health-product-tile span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.app-health-product-tile strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 1.28rem;
  line-height: 1.2;
}

.app-health-product-tile p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.4;
}

.app-health-executive-ranking {
  margin-top: 14px;
}

.app-health-rank-list {
  display: grid;
  gap: 12px;
}

.app-health-rank-row {
  display: grid;
  gap: 7px;
}

.app-health-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-health-rank-head strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.app-health-rank-head span {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.app-health-rank-bar {
  overflow: hidden;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
}

.app-health-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.app-health-rank-row p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.app-health-domain-card {
  min-width: 0;
}

.app-health-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6deea;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.app-health-status.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.app-health-status.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.app-health-event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.app-health-event-tags span {
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.app-assistant-page .matriz-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.app-assistant-page .matriz-kpi {
  min-height: 112px;
}

.app-assistant-kpi-compact {
  font-size: 1.42rem;
}

.app-assistant-kpi-small {
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.assistant-run-now {
  background: #0f172a;
  border-color: #0f172a;
}

.assistant-run-now:disabled {
  cursor: wait;
  opacity: 0.72;
}

.app-assistant-executive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 16px;
  margin: 18px 0 16px;
}

.app-assistant-executive-card {
  min-height: 178px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.app-assistant-executive-card.is-primary {
  border-color: #bcd0ef;
  background: #f8fbff;
}

.app-assistant-card-label {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-assistant-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-assistant-executive-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.3;
}

.app-assistant-executive-card.is-primary h2 {
  font-size: 1.65rem;
}

.app-assistant-card-note {
  margin: 0;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.45;
}

.app-assistant-inline-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.app-assistant-source-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.app-assistant-source-pill {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
  min-height: 86px;
  display: grid;
  align-content: start;
  gap: 4px;
}

.app-assistant-source-pill strong {
  color: #0f172a;
  font-size: 0.86rem;
}

.app-assistant-source-pill span {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
}

.app-assistant-source-pill small {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.app-assistant-source-pill.is-connected,
.app-assistant-source-pill.is-generated {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.app-assistant-source-pill.is-warning,
.app-assistant-source-pill.is-planned,
.app-assistant-source-pill.is-standby,
.app-assistant-source-pill.is-ready,
.app-assistant-source-pill.is-skipped {
  border-color: #fde68a;
  background: #fffbeb;
}

.app-assistant-source-pill.is-error,
.app-assistant-source-pill.is-critical {
  border-color: #fecaca;
  background: #fff1f2;
}

.app-assistant-incidents-card {
  margin-bottom: 18px;
}

.app-assistant-incident-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.app-assistant-incident-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

.app-assistant-incident-card strong,
.app-assistant-incident-card span {
  display: block;
}

.app-assistant-incident-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.app-assistant-incident-card strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.app-assistant-incident-card span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.app-assistant-incident-action {
  margin: 0;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.app-assistant-incident-card a {
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.app-assistant-main-grid {
  align-items: start;
}

.app-assistant-run-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.app-assistant-run-filters button {
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.app-assistant-run-filters button.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.app-assistant-technical-details {
  margin-top: 18px;
}

.app-assistant-technical-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.app-assistant-technical-details summary::-webkit-details-marker {
  display: none;
}

.app-assistant-technical-details summary span {
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 800;
}

.app-assistant-technical-details summary small {
  color: #64748b;
  font-size: 0.86rem;
}

.app-assistant-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.app-assistant-config-grid {
  display: grid;
  gap: 8px;
}

.app-assistant-config-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.app-assistant-config-grid span {
  color: #475569;
  font-weight: 700;
}

.app-assistant-config-grid strong {
  color: #0f172a;
  text-align: right;
  overflow-wrap: anywhere;
}

.app-assistant-diagnostic,
.app-assistant-plan-block,
.app-assistant-handoff {
  display: grid;
  gap: 12px;
}

.app-assistant-diagnostic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-assistant-diagnostic-head h3,
.app-assistant-plan-block h3,
.app-assistant-handoff h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.app-assistant-diagnostic p,
.app-assistant-handoff p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.app-assistant-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.app-assistant-chip.is-healthy,
.app-assistant-chip.is-ok,
.app-assistant-chip.is-connected,
.app-assistant-chip.is-generated,
.app-assistant-chip.is-openai,
.app-assistant-chip.is-resolved,
.app-assistant-chip.is-estavel,
.app-assistant-chip.is-stable {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.app-assistant-chip.is-new,
.app-assistant-chip.is-manual_review,
.app-assistant-chip.is-skipped {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.app-assistant-chip.is-attention,
.app-assistant-chip.is-warning,
.app-assistant-chip.is-warn,
.app-assistant-chip.is-standby,
.app-assistant-chip.is-watch,
.app-assistant-chip.is-acknowledged,
.app-assistant-chip.is-investigating,
.app-assistant-chip.is-awaiting_validation,
.app-assistant-chip.is-planned {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.app-assistant-chip.is-critical,
.app-assistant-chip.is-dismissed,
.app-assistant-chip.is-error,
.app-assistant-chip.is-worsened,
.app-assistant-chip.is-reopened {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.app-assistant-definition-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.app-assistant-definition-list div {
  display: grid;
  gap: 4px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.app-assistant-definition-list dt {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-assistant-definition-list dd {
  margin: 0;
  color: #0f172a;
  line-height: 1.45;
}

.app-assistant-plan-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.app-assistant-plan-list li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.app-assistant-source-detail {
  display: inline-block;
  margin-left: 8px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.app-assistant-finding-list,
.app-assistant-run-list {
  display: grid;
  gap: 10px;
}

.app-assistant-finding {
  border: 1px solid #dbe4f0;
  border-left-width: 4px;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
}

.app-assistant-finding.is-critical {
  border-left-color: #be123c;
  background: #fff7f8;
}

.app-assistant-finding.is-error {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.app-assistant-finding.is-warn,
.app-assistant-finding.is-warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

.app-assistant-finding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.app-assistant-finding-head strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.app-assistant-finding p {
  margin: 7px 0 0;
  color: #475569;
  line-height: 1.45;
}

.app-assistant-finding span {
  display: inline-block;
  margin-top: 8px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.app-assistant-run-item {
  width: 100%;
  display: grid;
  gap: 5px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  color: #0f172a;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.app-assistant-run-item:hover,
.app-assistant-run-item.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.app-assistant-run-item span,
.app-assistant-run-item small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.app-assistant-run-item strong {
  color: #0f172a;
  font-size: 0.94rem;
  line-height: 1.35;
}

.app-assistant-run-select {
  width: 100%;
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.app-assistant-run-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
  padding-top: 8px;
}

.app-assistant-run-actions a,
.app-assistant-run-actions button,
.app-assistant-status-buttons button {
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.app-assistant-run-actions button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.app-assistant-run-actions button[data-run-status="resolved"],
.app-assistant-status-buttons button[data-detail-status-quick="resolved"] {
  border-color: #bbf7d0;
  color: #166534;
}

.app-assistant-run-actions button[data-run-status="investigating"],
.app-assistant-run-actions button[data-run-status="awaiting_validation"],
.app-assistant-status-buttons button[data-detail-status-quick="investigating"] {
  border-color: #fde68a;
  color: #92400e;
}

.app-assistant-status-buttons button[data-detail-status-quick="awaiting_validation"] {
  border-color: #fde68a;
  color: #92400e;
}

.app-assistant-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-assistant-links-title {
  margin: 16px 0 10px;
  color: #0f172a;
  font-size: 0.98rem;
}

.app-assistant-follow-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.app-assistant-follow-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
}

.app-assistant-follow-form select,
.app-assistant-follow-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.92rem;
}

.app-assistant-follow-form textarea {
  resize: vertical;
  min-height: 76px;
}

.app-assistant-follow-actions {
  display: flex;
  justify-content: flex-end;
}

.app-assistant-follow-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
}

.app-assistant-follow-summary strong {
  display: block;
  color: #0f172a;
  font-size: 0.96rem;
}

.app-assistant-follow-summary span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.app-assistant-follow-history {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.app-assistant-follow-history p {
  margin: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.45;
}

.app-assistant-follow-history strong {
  color: #0f172a;
}

.app-assistant-follow-history span {
  color: #64748b;
}

.app-assistant-revalidation {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
}

.app-assistant-revalidation strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.app-assistant-revalidation p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.app-assistant-revalidation span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.app-assistant-handoff {
  margin-top: 14px;
}

.app-assistant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-assistant-tags span {
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.app-assistant-copy-card {
  margin-bottom: 18px;
}

.app-assistant-copy-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.app-assistant-context-box {
  width: 100%;
  min-height: 260px;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px 14px;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  resize: vertical;
}

.app-assistant-detail-sections {
  align-items: start;
}

.app-assistant-evidence-grid {
  display: grid;
  gap: 12px;
}

.app-assistant-evidence-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

.app-assistant-evidence-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
}

.app-assistant-evidence-card p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.app-assistant-evidence-card pre {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  padding: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.app-assistant-comparison {
  display: grid;
  gap: 12px;
}

.app-assistant-comparison > div {
  display: grid;
  gap: 3px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
}

.app-assistant-comparison span,
.app-assistant-comparison small {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.app-assistant-comparison strong {
  color: #0f172a;
  font-size: 0.98rem;
}

.app-assistant-comparison p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.app-assistant-status-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.cofre-health-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.cofre-health-chip.is-health.is-healthy {
  border-color: #b7f0cc;
  background: #ecfdf3;
  color: #166534;
}

.cofre-health-chip.is-health.is-attention {
  border-color: #fbd38d;
  background: #fffbeb;
  color: #92400e;
}

.cofre-health-chip.is-health.is-critical {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.cofre-health-chip.is-state.is-state-contratado {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.cofre-health-chip.is-state.is-state-aguardando_beneficiarios {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.cofre-health-chip.is-state.is-state-configuracao_inicial_concluida {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.cofre-health-chip.is-state.is-state-ativo {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.cofre-health-chip.is-state.is-state-cancelado_bloqueado,
.cofre-health-chip.is-state.is-state-cancelado_encerrado {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.cofre-metric-stack {
  display: grid;
  gap: 12px;
}

.cofre-signal-strip {
  display: block;
  border: 1px solid #d6deea;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 36%),
    linear-gradient(135deg, #f8fbff 0%, #eef7ff 100%);
  padding: 16px;
}

.cofre-signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cofre-signal-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px;
  box-shadow: 0 18px 32px -28px rgba(15, 23, 42, 0.45);
}

.cofre-signal-label {
  margin: 0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.cofre-signal-value {
  margin: 10px 0 6px;
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.cofre-signal-meta {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cofre-mini-title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.cofre-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cofre-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
}

.cofre-pill strong {
  color: #0f172a;
  font-size: 0.86rem;
}

.cofre-pill span {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 700;
}

.cofre-pill-stage {
  background: #f8fafc;
}

.cofre-pill-severity {
  background: #fffaf0;
}

.cofre-pill-outcome {
  background: #f8fafc;
}

.cofre-bucket-list {
  display: grid;
  gap: 10px;
}

.cofre-bucket-item {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
}

.cofre-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #0f172a;
}

.cofre-bucket-head strong {
  font-size: 0.9rem;
}

.cofre-bucket-head span {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.cofre-bucket-bar {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
}

.cofre-bucket-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #38bdf8);
}

.cofre-health-row-selected td {
  background: #eff6ff;
}

.matriz-history-list {
  display: grid;
  gap: 12px;
}

.matriz-history-card {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px 14px;
}

.matriz-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #0f172a;
}

.matriz-history-head strong {
  color: #0f172a;
}

.matriz-history-head span {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
}

.matriz-history-card p {
  margin: 8px 0 0;
  color: #475569;
}

.matriz-door {
  display: block;
  border: 1px solid #d6deea;
  border-radius: 16px;
  background: #ffffff;
  padding: 18px;
  color: #0f172a;
  text-decoration: none;
}

.matriz-door:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.matriz-door h2 {
  margin: 0;
  font-size: 1.3rem;
}

.matriz-door p {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.45;
}

.matriz-door-tag {
  display: inline-block;
  margin-top: 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.matriz-footer {
  margin-top: 18px;
  color: #64748b;
  font-size: 0.9rem;
}

.editorial-context-note {
  border-color: #fbcfe8;
  background: #fff4fa;
  color: #9d174d;
}

.editorial-card-accent {
  border-color: #f1d6e8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 251, 0.98));
}

.editorial-board {
  display: grid;
  gap: 10px;
}

.editorial-board-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #ebedf3;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 12px;
}

.editorial-board-row strong {
  color: #0f172a;
  display: block;
}

.editorial-board-row p {
  margin: 6px 0 0;
}

.editorial-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editorial-status-chip.is-draft {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.editorial-status-chip.is-review {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.editorial-status-chip.is-changes {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.editorial-status-chip.is-scheduled {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.editorial-flow-chip {
  border-color: #e4e7ee;
  background: #f8fafc;
  color: #334155;
  cursor: default;
}

.editorial-runtime-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6deea;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.editorial-runtime-pill.is-local {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.editorial-runtime-pill.is-remote {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.editorial-kpi-value {
  margin: 10px 0 0;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.editorial-kpi-grid-compact {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.editorial-kpi-grid-compact .matriz-action-card {
  min-height: 96px;
  padding: 14px;
}

.editorial-kpi-grid-compact .matriz-action-card h2 {
  margin: 0;
  font-size: 0.98rem;
}

.editorial-kpi-grid-compact .editorial-kpi-value {
  margin-top: 8px;
  font-size: 1.65rem;
}

.editorial-kpi-grid-compact .matriz-action-tag {
  margin-top: 10px;
  padding: 4px 9px;
  font-size: 0.78rem;
}

.editorial-dashboard-grid {
  margin-top: 16px;
}

.editorial-engagement-card {
  margin-top: 16px;
}

.editorial-dashboard-campaign-card {
  margin-top: 16px;
}

.editorial-metric-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.editorial-metric-filters label {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.editorial-metric-filters span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

.editorial-metric-filters select {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.editorial-engagement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.editorial-engagement-grid article {
  display: grid;
  gap: 7px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-engagement-grid span {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 800;
}

.editorial-engagement-grid strong {
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1;
}

.editorial-engagement-grid small {
  color: #64748b;
  line-height: 1.35;
}

.editorial-campaign-dashboard-empty {
  border: 1px dashed #d6deea;
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
}

.editorial-campaign-dashboard-empty.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.editorial-campaign-dashboard-empty strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
}

.editorial-campaign-dashboard-empty p {
  margin: 8px 0 0;
  color: #64748b;
}

.editorial-campaign-dashboard-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px 14px;
}

.editorial-campaign-dashboard-headline strong,
.editorial-campaign-dashboard-headline span {
  display: block;
}

.editorial-campaign-dashboard-headline strong {
  color: #0f172a;
  font-size: 1rem;
}

.editorial-campaign-dashboard-headline span {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

.editorial-campaign-dashboard-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.editorial-campaign-dashboard-badges > span:not(.editorial-status-chip) {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.editorial-campaign-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.editorial-campaign-dashboard-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-campaign-dashboard-grid span {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
}

.editorial-campaign-dashboard-grid strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

.editorial-campaign-dashboard-grid small {
  color: #64748b;
  line-height: 1.35;
}

.editorial-compact-list {
  display: grid;
  gap: 12px;
}

.editorial-compact-item {
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-compact-item h3 {
  margin: 12px 0 6px;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
}

.editorial-compact-item h3 a {
  color: inherit;
  text-decoration: none;
}

.editorial-compact-item h3 a:hover {
  text-decoration: underline;
}

.editorial-compact-item p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.editorial-toolbar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(220px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
}

.editorial-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

.editorial-search input {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 12px;
}

.editorial-runtime-copy {
  margin: 16px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.editorial-post-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.editorial-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
}

.editorial-pagination:empty {
  display: none;
}

.editorial-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.editorial-pagination-actions button {
  min-width: 40px;
  min-height: 38px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.editorial-pagination-actions button:hover:not(:disabled),
.editorial-pagination-actions button.is-active {
  border-color: #be185d;
  background: #fdf2f8;
  color: #be185d;
}

.editorial-pagination-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.editorial-post-card {
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.32);
}

.editorial-post-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1.25fr) minmax(190px, 0.75fr) minmax(170px, 0.6fr) minmax(150px, 0.48fr) auto;
  gap: 16px;
  align-items: center;
}

.editorial-post-thumb {
  display: grid;
  place-items: center;
  width: 112px;
  min-height: 84px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
  text-align: center;
}

.editorial-post-thumb img {
  width: 100%;
  height: 100%;
  min-height: 84px;
  object-fit: cover;
}

.editorial-post-thumb.is-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
}

.editorial-post-main {
  min-width: 0;
}

.editorial-post-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editorial-post-card h3 {
  margin: 10px 0 6px;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1.25;
}

.editorial-post-card h3 a {
  color: inherit;
  text-decoration: none;
}

.editorial-post-card h3 a:hover {
  text-decoration: underline;
}

.editorial-post-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.editorial-post-meta {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #64748b;
  font-size: 0.88rem;
}

.editorial-post-meta strong {
  color: #334155;
}

.editorial-post-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.editorial-post-config {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #475569;
  font-size: 0.92rem;
}

.editorial-post-config strong {
  color: #0f172a;
}

.editorial-post-operational {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 0.88rem;
}

.editorial-post-operational span,
.editorial-post-meta span {
  display: grid;
  gap: 2px;
}

.editorial-post-operational strong,
.editorial-post-meta strong {
  color: #0f172a;
  font-size: 0.84rem;
}

.editorial-post-consumption {
  display: grid;
  gap: 6px;
  color: #475569;
}

.editorial-post-consumption span {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: baseline;
  gap: 7px;
}

.editorial-post-consumption strong {
  color: #0f172a;
  font-size: 1rem;
  line-height: 1;
  text-align: right;
}

.editorial-post-consumption small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.editorial-row-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  min-width: 112px;
}

.editorial-row-actions .editorial-primary-btn,
.editorial-row-actions .editorial-secondary-btn {
  min-height: 38px;
  padding: 8px 12px;
}

.editorial-preview-open {
  overflow: hidden;
}

.editorial-post-preview-modal[hidden] {
  display: none;
}

.editorial-post-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.editorial-post-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.editorial-post-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 30px 80px -34px rgba(15, 23, 42, 0.5);
}

.editorial-app-preview-shell {
  display: grid;
  place-items: center;
  margin-top: 16px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #f8fafc;
  padding: 18px;
}

.editorial-app-preview-frame {
  width: min(410px, 100%);
  overflow: hidden;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 50px -38px rgba(15, 23, 42, 0.7);
}

.editorial-app-preview-bar {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #e4e7ee;
  background: #ffffff;
  color: #0f172a;
  padding: 0 16px;
  font-size: 0.92rem;
  font-weight: 900;
}

.editorial-app-preview-hero {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 180px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-align: center;
}

.editorial-app-preview-hero img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.editorial-app-preview-hero.is-empty {
  background: #f8fafc;
  border-bottom: 1px dashed #cbd5e1;
  color: #94a3b8;
}

.editorial-app-preview-content {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.editorial-app-preview-content h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.22;
}

.editorial-app-preview-ad {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 12px;
}

.editorial-app-preview-ad span,
.editorial-app-preview-ad small {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.editorial-app-preview-ad strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.editorial-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.editorial-post-card .editorial-inline-actions {
  margin-top: 16px;
}

.editorial-primary-btn,
.editorial-secondary-btn,
.editorial-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.editorial-primary-btn {
  border: 1px solid #be185d;
  background: linear-gradient(135deg, #be185d, #db2777);
  color: #ffffff;
}

.editorial-primary-btn:hover {
  text-decoration: none;
  filter: brightness(1.02);
}

.editorial-secondary-btn {
  border: 1px solid #d6deea;
  background: #ffffff;
  color: #0f172a;
}

.editorial-secondary-btn:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.editorial-danger-btn {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.editorial-danger-btn:hover {
  border-color: #be123c;
  text-decoration: none;
}

.editorial-target-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background: #f8fafc;
  color: #334155;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.editorial-status-chip.is-published {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.editorial-status-chip.is-active {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.editorial-status-chip.is-paused {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.editorial-status-chip.is-archived {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.editorial-empty-state {
  border: 1px dashed #d6deea;
  border-radius: 16px;
  background: #fbfdff;
  padding: 24px;
}

.editorial-empty-state strong {
  color: #0f172a;
  display: block;
}

.editorial-empty-state p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.editorial-empty-state-compact {
  padding: 16px;
}

.editorial-empty-state .editorial-inline-actions {
  margin-top: 16px;
}

.editorial-contract-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editorial-focus-card {
  display: grid;
  gap: 14px;
  border: 1px solid #f1d6e8;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 251, 0.98));
  padding: 16px;
}

.editorial-focus-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.editorial-action-list,
.editorial-responsibility-list,
.editorial-status-summary {
  display: grid;
  gap: 10px;
}

.editorial-action-tile {
  display: grid;
  gap: 6px;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  text-decoration: none;
}

.editorial-action-tile:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.editorial-action-tile strong,
.editorial-responsibility-list strong {
  color: #0f172a;
}

.editorial-action-tile span,
.editorial-responsibility-list span {
  color: #475569;
  line-height: 1.5;
}

.editorial-responsibility-list span {
  display: block;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

.editorial-status-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editorial-status-summary-item {
  display: grid;
  gap: 4px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  text-decoration: none;
}

.editorial-status-summary-item:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.editorial-status-summary-item strong {
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1;
}

.editorial-status-summary-item span {
  color: #475569;
  font-weight: 700;
}

.editorial-status-summary-stack {
  grid-template-columns: 1fr;
}

.editorial-schedule-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
  align-items: start;
}

.editorial-library-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.65fr);
  align-items: start;
}

.editorial-library-list-card,
.editorial-library-summary-card {
  min-width: 0;
}

.editorial-schedule-audience-card {
  display: grid;
  gap: 14px;
}

.editorial-schedule-audience-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editorial-schedule-audience-tab {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  padding: 7px 10px 7px 14px;
  font: inherit;
  cursor: pointer;
}

.editorial-schedule-audience-tab span {
  font-size: 0.86rem;
  font-weight: 800;
}

.editorial-schedule-audience-tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
}

.editorial-schedule-audience-tab:hover,
.editorial-schedule-audience-tab.is-active {
  border-color: #be185d;
  background: #fdf2f8;
  color: #be185d;
}

.editorial-schedule-selected-note {
  display: grid;
  gap: 5px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px 14px;
}

.editorial-schedule-selected-note span {
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-schedule-selected-note strong {
  color: #0f172a;
}

.editorial-schedule-selected-note small {
  color: #334155;
  font-weight: 650;
  line-height: 1.45;
}

.editorial-schedule-timeline-card {
  min-width: 0;
}

.editorial-schedule-feed-card,
.editorial-schedule-summary-card {
  min-width: 0;
}

.editorial-journey-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.editorial-journey-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-journey-card.is-missing {
  border-color: #facc15;
  background: #fffbeb;
}

.editorial-journey-card.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.editorial-journey-card.is-review {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.editorial-journey-card.is-draft {
  border-color: #e4e7ee;
  background: #fbfdff;
}

.editorial-journey-card-head,
.editorial-timeline-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.editorial-journey-marker,
.editorial-journey-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.editorial-journey-marker {
  background: #eff6ff;
  color: #1d4ed8;
}

.editorial-journey-state {
  background: #f8fafc;
  color: #334155;
}

.editorial-journey-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.25;
}

.editorial-journey-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.editorial-journey-meta,
.editorial-journey-linked {
  display: grid;
  gap: 8px;
}

.editorial-journey-meta span {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 0.84rem;
}

.editorial-journey-meta strong {
  color: #0f172a;
}

.editorial-journey-post-link {
  display: grid;
  gap: 6px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
  color: #0f172a;
  text-decoration: none;
}

.editorial-journey-post-link:hover strong {
  text-decoration: underline;
}

.editorial-journey-post-link small,
.editorial-journey-empty {
  color: #64748b;
  font-weight: 700;
}

.editorial-timeline {
  display: grid;
  gap: 12px;
}

.editorial-timeline-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.editorial-timeline-marker {
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px solid #dbe3f1;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.editorial-timeline-content {
  display: grid;
  gap: 8px;
  min-height: 76px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-timeline-summary strong {
  color: #0f172a;
}

.editorial-timeline-summary span {
  color: #64748b;
  font-weight: 700;
}

.editorial-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.editorial-timeline-actions .editorial-secondary-btn {
  min-height: 34px;
  padding: 7px 10px;
}

.editorial-timeline-content a {
  display: grid;
  gap: 6px;
  color: #0f172a;
  text-decoration: none;
}

.editorial-timeline-content a:hover strong {
  text-decoration: underline;
}

.editorial-timeline-content small,
.editorial-timeline-empty {
  color: #64748b;
  font-weight: 600;
}

.editorial-delivery-buckets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.editorial-schedule-toolbar {
  grid-template-columns: repeat(2, minmax(130px, 1fr)) minmax(220px, 1.35fr) auto;
}

.editorial-library-toolbar {
  grid-template-columns: repeat(2, minmax(130px, 1fr)) minmax(220px, 1.35fr) auto;
}

.editorial-filter-count {
  margin: 10px 0 12px;
}

.editorial-schedule-feed-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1.2fr) minmax(220px, 0.8fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-schedule-feed-thumb {
  display: grid;
  place-items: center;
  width: 92px;
  min-height: 70px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
}

.editorial-schedule-feed-thumb img {
  width: 100%;
  height: 100%;
  min-height: 70px;
  object-fit: cover;
}

.editorial-schedule-feed-main h3 {
  margin: 8px 0 5px;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.25;
}

.editorial-schedule-feed-main h3 a {
  color: inherit;
  text-decoration: none;
}

.editorial-schedule-feed-main p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.editorial-schedule-feed-meta {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 0.86rem;
}

.editorial-schedule-feed-meta span {
  display: grid;
  gap: 2px;
}

.editorial-schedule-feed-meta strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.editorial-schedule-multigroup-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.editorial-schedule-multigroup-note span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-schedule-multigroup-note strong {
  color: #0f172a;
}

.editorial-schedule-multigroup-note small {
  color: #475569;
  line-height: 1.45;
}

.editorial-pregnancy-week-schedule-card {
  display: grid;
  gap: 14px;
}

.editorial-pregnancy-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.editorial-pregnancy-week-slot {
  display: grid;
  gap: 6px;
  min-height: 126px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.editorial-pregnancy-week-slot.is-filled {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.editorial-pregnancy-week-slot span {
  color: #be185d;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-pregnancy-week-slot strong {
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.25;
}

.editorial-pregnancy-week-slot small {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.editorial-pregnancy-week-slot a {
  align-self: end;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.editorial-pregnancy-week-slot a:hover {
  text-decoration: underline;
}

.editorial-delivery-bucket {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-delivery-bucket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editorial-delivery-bucket-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.25;
}

.editorial-delivery-bucket-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.editorial-delivery-bucket-head strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 1rem;
}

.editorial-delivery-bucket-list,
.editorial-review-lane-list,
.editorial-workflow-board {
  display: grid;
  gap: 10px;
}

.editorial-delivery-bucket-item {
  display: grid;
  gap: 7px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
  color: #0f172a;
  text-decoration: none;
}

.editorial-delivery-bucket-item:hover strong {
  text-decoration: underline;
}

.editorial-delivery-bucket-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.editorial-delivery-bucket-item small {
  color: #64748b;
  font-weight: 700;
}

.editorial-work-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-work-item h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
}

.editorial-work-item h3 a {
  color: inherit;
  text-decoration: none;
}

.editorial-work-item h3 a:hover {
  text-decoration: underline;
}

.editorial-work-item p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.editorial-work-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editorial-work-meta span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #64748b;
  font-size: 0.86rem;
}

.editorial-work-meta strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.editorial-row-actions-inline {
  grid-template-columns: minmax(120px, auto);
  justify-items: start;
}

.editorial-workflow-step {
  display: grid;
  grid-template-columns: minmax(80px, 0.7fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-workflow-step span {
  color: #be185d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editorial-workflow-step strong {
  color: #0f172a;
  line-height: 1.25;
}

.editorial-workflow-step b {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
}

.editorial-workflow-step p {
  grid-column: 2 / -1;
  margin: -4px 0 0;
  color: #64748b;
  line-height: 1.45;
}

.editorial-media-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.editorial-media-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-media-thumb {
  display: grid;
  place-items: center;
  min-height: 96px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 800;
  overflow: hidden;
}

.editorial-media-thumb img {
  width: 100%;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
}

.editorial-media-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.editorial-media-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.editorial-media-body h3 a {
  color: inherit;
  text-decoration: none;
}

.editorial-media-body h3 a:hover {
  text-decoration: underline;
}

.editorial-media-body code {
  display: block;
  color: #475569;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.editorial-media-body small {
  color: #64748b;
  font-weight: 600;
}

.editorial-media-body label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
}

.editorial-media-body input,
.editorial-media-body textarea {
  width: 100%;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 9px 10px;
  font: inherit;
  font-weight: 650;
}

.editorial-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.editorial-media-picker-modal {
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 24px 70px -28px rgba(15, 23, 42, 0.45);
}

.editorial-media-picker-actions {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0;
}

.editorial-media-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editorial-media-picker-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.editorial-media-picker-item:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 30px -24px rgba(37, 99, 235, 0.75);
}

.editorial-media-picker-item span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.editorial-media-picker-item code {
  color: #64748b;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.editorial-media-picker-thumb {
  display: grid;
  place-items: center;
  width: 94px;
  height: 70px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
}

.editorial-media-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-campaign-image-feedback {
  margin-top: 10px;
}

.editorial-campaign-list {
  display: grid;
  gap: 10px;
}

.editorial-campaign-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  width: 100%;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.editorial-campaign-list-item:hover,
.editorial-campaign-list-item.is-selected {
  border-color: #93c5fd;
  background: #f8fbff;
}

.editorial-campaign-list-item strong,
.editorial-campaign-list-item small {
  min-width: 0;
}

.editorial-campaign-list-item small {
  grid-column: 2;
  color: #64748b;
  font-weight: 700;
}

.editorial-campaign-active-card {
  display: grid;
  gap: 12px;
}

.editorial-campaign-active-card h3,
.editorial-campaign-active-card p {
  margin: 0;
}

.editorial-campaign-active-card h3 {
  color: #0f172a;
  font-size: 1.1rem;
}

.editorial-campaign-active-card p {
  color: #64748b;
  font-weight: 700;
}

.editorial-campaign-block-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editorial-campaign-block-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.editorial-campaign-block-thumb {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
}

.editorial-campaign-block-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-campaign-block-thumb.is-html {
  background: #fff7ed;
  color: #9a3412;
}

.editorial-campaign-block-preview span {
  grid-column: 2;
  color: #be185d;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editorial-campaign-block-preview strong {
  grid-column: 2;
  color: #0f172a;
}

.editorial-campaign-block-preview code {
  grid-column: 2;
  color: #475569;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.editorial-campaign-form {
  margin-top: 0;
}

.editorial-campaign-audience-card {
  gap: 18px;
}

.editorial-campaign-audience-mode {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editorial-campaign-audience-mode label,
.editorial-campaign-audience-chip {
  display: flex;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  padding: 14px;
}

.editorial-campaign-audience-mode label:has(input:checked),
.editorial-campaign-audience-chip:has(input:checked) {
  border-color: #d11b6f;
  background: #fff2f7;
  box-shadow: inset 0 0 0 1px #d11b6f;
}

.editorial-campaign-audience-mode input,
.editorial-campaign-audience-chip input {
  margin-top: 4px;
}

.editorial-campaign-audience-mode span,
.editorial-campaign-audience-chip span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.editorial-campaign-audience-mode strong,
.editorial-campaign-audience-chip strong {
  font-size: 0.96rem;
}

.editorial-campaign-audience-mode small,
.editorial-campaign-audience-chip small {
  color: #64748b;
  font-weight: 700;
  line-height: 1.35;
}

.editorial-campaign-audience-groups {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editorial-campaign-audience-groups.is-disabled {
  opacity: 0.58;
}

.editorial-campaign-audience-chip.is-disabled {
  background: #f3f6fb;
  color: #64748b;
  cursor: not-allowed;
}

.editorial-campaign-blocks {
  display: grid;
  gap: 14px;
}

.editorial-campaign-block {
  background: #fbfdff;
}

.editorial-compact-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 800;
}

.editorial-compact-field select {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 9px 12px;
  font: inherit;
}

.editorial-campaign-metrics {
  display: grid;
  gap: 14px;
}

.editorial-campaign-metrics-hero {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.editorial-campaign-metrics-hero .matriz-card-head {
  align-items: flex-start;
  gap: 16px;
}

.editorial-campaign-metrics-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: min(100%, 520px);
}

.editorial-campaign-metrics-hero .editorial-compact-field {
  min-width: 180px;
}

.editorial-campaign-metrics-controls .editorial-compact-field:first-child {
  min-width: min(100%, 320px);
}

.editorial-campaign-metrics-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px 14px;
}

.editorial-campaign-metrics-context > div {
  display: grid;
  gap: 5px;
}

.editorial-campaign-metrics-context strong {
  color: #0f172a;
  font-size: 1rem;
}

.editorial-campaign-metrics-context small,
.editorial-campaign-metrics-context > span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.editorial-campaign-metrics-hero .editorial-campaign-metrics-summary {
  gap: 12px;
}

.editorial-campaign-metrics-hero .editorial-campaign-metric-tile {
  min-height: 104px;
  border-color: #dbeafe;
  background: #ffffff;
  padding: 16px;
}

.editorial-campaign-metrics-hero .editorial-campaign-metric-tile strong {
  font-size: 1.9rem;
}

.editorial-campaign-kpi-strip {
  margin-top: 12px;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.editorial-campaign-kpi-strip .matriz-action-card {
  min-height: 82px;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: none;
}

.editorial-campaign-kpi-strip .matriz-action-card:hover {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.editorial-campaign-kpi-strip .matriz-action-card h2 {
  font-size: 0.88rem;
}

.editorial-campaign-kpi-strip .editorial-kpi-value {
  margin-top: 7px;
  font-size: 1.38rem;
}

.editorial-campaign-kpi-strip .matriz-action-tag {
  margin-top: 8px;
  padding: 3px 8px;
  font-size: 0.72rem;
}

.editorial-campaign-metrics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.editorial-campaign-metric-tile,
.editorial-campaign-metric-row {
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #fbfdff;
}

.editorial-campaign-metric-tile {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.editorial-campaign-metric-tile span,
.editorial-campaign-metric-row small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.editorial-campaign-metric-tile strong {
  color: #0f172a;
  font-size: 1.5rem;
  line-height: 1;
}

.editorial-campaign-metric-tile small {
  color: #64748b;
  font-weight: 700;
}

.editorial-campaign-metrics-table {
  display: grid;
  gap: 8px;
}

.editorial-campaign-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.editorial-campaign-metric-row strong {
  display: block;
  color: #0f172a;
}

.editorial-campaign-metric-row span {
  color: #1e293b;
  font-weight: 800;
  white-space: nowrap;
}

.editorial-empty-state.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.editorial-notice {
  margin-top: 16px;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  padding: 12px 14px;
  line-height: 1.5;
}

.editorial-notice.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.editorial-notice.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.editorial-notice.is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.editorial-debug-panel {
  margin-top: 10px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
}

.editorial-debug-panel summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 800;
}

.editorial-debug-panel ol {
  display: grid;
  gap: 8px;
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 0 12px 12px;
  list-style: none;
}

.editorial-debug-panel li {
  display: grid;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.editorial-debug-panel li.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.editorial-debug-panel li.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.editorial-debug-panel time {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.editorial-debug-panel strong {
  color: inherit;
}

.editorial-debug-panel span {
  color: inherit;
  overflow-wrap: anywhere;
}

.editorial-editor-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.82fr);
}

.editorial-form-page .matriz-card {
  overflow: hidden;
}

.editorial-form {
  display: grid;
  gap: 14px;
}

.editorial-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.editorial-form input,
.editorial-form select,
.editorial-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 12px;
}

.editorial-form textarea {
  min-height: 240px;
  resize: vertical;
}

.editorial-rich-field {
  display: grid;
  gap: 8px;
}

.editorial-rich-field-head {
  display: grid;
  align-items: flex-start;
  gap: 10px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.editorial-rich-field-head > div:first-child {
  display: grid;
  gap: 4px;
}

.editorial-rich-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.editorial-rich-status.is-loading {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.editorial-rich-status.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.editorial-rich-status.is-fallback {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.editorial-rich-status.is-error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.editorial-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  width: 100%;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;
  border: 0;
  padding: 0;
  color: #0f172a;
  font-family: inherit;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-formats {
  display: inline-flex;
  gap: 4px;
  margin: 0;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow button {
  display: inline-grid;
  float: none;
  place-items: center;
  width: 36px;
  height: 34px;
  min-width: 36px;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  padding: 6px;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow button svg {
  display: block;
  float: none;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-stroke {
  stroke: #334155;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-fill {
  fill: #334155;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label svg {
  width: 18px;
  height: 18px;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker {
  height: 34px;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label {
  display: inline-flex;
  align-items: center;
  min-width: 104px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 26px 0 10px;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-options {
  border-color: #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header .ql-picker-label::before,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header .ql-picker-item::before {
  content: "Paragrafo";
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header .ql-picker-label[data-value="2"]::before,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header .ql-picker-item[data-value="2"]::before {
  content: "H2";
}

.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header .ql-picker-label[data-value="3"]::before,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header .ql-picker-item[data-value="3"]::before {
  content: "H3";
}

.editorial-rich-toolbar button {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 7px 9px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.editorial-rich-toolbar button:hover,
.editorial-rich-toolbar button:focus-visible {
  border-color: #be185d;
  color: #be185d;
  outline: none;
}

.editorial-rich-toolbar button.is-active {
  border-color: #be185d;
  background: #fdf2f8;
  color: #be185d;
}

.editorial-rich-toolbar.is-native-fallback button,
.editorial-rich-toolbar.is-native-fallback.ql-toolbar.ql-snow button {
  width: auto;
  min-width: 38px;
  padding: 7px 9px;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow button:hover,
.editorial-rich-toolbar.ql-toolbar.ql-snow button:focus,
.editorial-rich-toolbar.ql-toolbar.ql-snow button.ql-active,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label:hover,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label.ql-active,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-item:hover,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-item.ql-selected {
  border-color: #be185d;
  color: #be185d;
  outline: none;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow button:hover .ql-stroke,
.editorial-rich-toolbar.ql-toolbar.ql-snow button:focus .ql-stroke,
.editorial-rich-toolbar.ql-toolbar.ql-snow button.ql-active .ql-stroke,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke {
  stroke: #be185d;
}

.editorial-rich-toolbar.ql-toolbar.ql-snow button:hover .ql-fill,
.editorial-rich-toolbar.ql-toolbar.ql-snow button:focus .ql-fill,
.editorial-rich-toolbar.ql-toolbar.ql-snow button.ql-active .ql-fill,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label:hover .ql-fill,
.editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-fill {
  fill: #be185d;
}

.editorial-rich-editor {
  min-height: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 14px 16px;
  letter-spacing: 0;
  line-height: 1.65;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: normal;
}

.editorial-rich-editor.ql-container.ql-snow {
  min-height: 320px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0;
  font-family: inherit;
  font-size: 1rem;
}

.editorial-rich-editor.ql-container.ql-snow .ql-editor {
  min-height: 318px;
  padding: 14px 16px;
  color: #0f172a;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.editorial-rich-editor:focus {
  border-color: #be185d;
  box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.12);
  outline: none;
}

.editorial-rich-editor.is-native-fallback {
  cursor: text;
}

.editorial-rich-editor.ql-container.ql-snow:focus-within {
  border-color: #be185d;
  box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.12);
}

.editorial-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.editorial-rich-editor .ql-editor.ql-blank::before {
  color: #94a3b8;
  font-style: normal;
  left: 16px;
  right: 16px;
}

.editorial-rich-editor h2,
.editorial-rich-editor .ql-editor h2,
.editorial-preview-rich-body h2 {
  margin: 18px 0 8px;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1.3;
}

.editorial-rich-editor h3,
.editorial-rich-editor .ql-editor h3,
.editorial-preview-rich-body h3 {
  margin: 14px 0 8px;
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.35;
}

.editorial-rich-editor p,
.editorial-rich-editor .ql-editor p,
.editorial-preview-rich-body p {
  margin: 0 0 12px;
}

.editorial-rich-editor blockquote,
.editorial-rich-editor .ql-editor blockquote,
.editorial-preview-rich-body blockquote {
  margin: 4px 0 12px;
  border-left: 3px solid #f9a8d4;
  color: #475569;
  padding: 6px 0 6px 12px;
}

.editorial-rich-editor ul,
.editorial-rich-editor ol,
.editorial-rich-editor .ql-editor ul,
.editorial-rich-editor .ql-editor ol,
.editorial-preview-rich-body ul,
.editorial-preview-rich-body ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.editorial-rich-editor a,
.editorial-rich-editor .ql-editor a,
.editorial-preview-rich-body a {
  color: #1d4ed8;
  font-weight: 700;
}

.editorial-rich-editor u,
.editorial-rich-editor .ql-editor u,
.editorial-preview-rich-body u {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.editorial-rich-editor del,
.editorial-rich-editor .ql-editor s,
.editorial-rich-editor .ql-editor del,
.editorial-preview-rich-body del {
  color: #64748b;
}

.editorial-form-section-main {
  background: #ffffff;
}

.editorial-section-eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: #be185d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editorial-hero-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.editorial-hero-upload-row .editorial-secondary-btn {
  min-height: 40px;
  white-space: nowrap;
}

.editorial-form small {
  min-height: 1.2em;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.editorial-hero-feedback {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.editorial-hero-feedback.is-ready {
  border-color: #86efac;
  background: #f0fdf4;
}

.editorial-hero-feedback.is-uploading {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.editorial-hero-feedback.is-error {
  border-color: #fecaca;
  background: #fff1f2;
}

.editorial-hero-feedback__thumb {
  display: grid;
  place-items: center;
  width: 78px;
  height: 58px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
  text-align: center;
}

.editorial-hero-feedback__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-hero-feedback__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.editorial-hero-feedback__body strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.editorial-hero-feedback__body span,
.editorial-hero-feedback__body code {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.editorial-hero-feedback.is-ready .editorial-hero-feedback__body strong {
  color: #166534;
}

.editorial-hero-feedback.is-error .editorial-hero-feedback__body strong {
  color: #be123c;
}

.editorial-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editorial-form-grid-wide {
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.9fr);
}

.editorial-form-grid-media {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.editorial-form-media-field,
.editorial-form-subgrid {
  min-width: 0;
}

.editorial-form-subgrid {
  display: grid;
  gap: 14px;
}

.editorial-form-section {
  display: grid;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.editorial-form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editorial-form-section-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.02rem;
}

.editorial-form-section-head p {
  margin: 6px 0 0;
  color: #475569;
  font-weight: 500;
  line-height: 1.5;
}

.editorial-section-note {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.editorial-pregnancy-week-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
}

.editorial-pregnancy-week-panel[hidden] {
  display: none;
}

.editorial-pregnancy-week-panel h4 {
  margin: 2px 0 4px;
  color: #0f172a;
  font-size: 0.98rem;
}

.editorial-pregnancy-week-panel p {
  margin: 0;
}

.editorial-field-hint {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.editorial-form input:disabled,
.editorial-form select:disabled,
.editorial-form textarea:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.editorial-delivery-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.editorial-delivery-mode-card {
  display: grid;
  gap: 6px;
  min-height: 132px;
  border: 1px solid #dbe3f1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.editorial-delivery-mode-card span {
  color: #c2185b;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-delivery-mode-card strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.editorial-delivery-mode-card small {
  color: #526074;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.editorial-delivery-mode-card:hover,
.editorial-delivery-mode-card:focus-visible,
.editorial-delivery-mode-card.is-active {
  border-color: #c2185b;
  box-shadow: 0 0 0 3px rgba(194, 24, 91, 0.12);
  outline: none;
}

.editorial-delivery-mode-card.is-active {
  background: #fff1f7;
}

.editorial-delivery-mode-card.is-disabled {
  border-style: dashed;
  background: #f8fafc;
}

.editorial-delivery-mode-card.is-disabled span {
  color: #64748b;
}

.editorial-delivery-config {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: start;
}

.editorial-delivery-config > label {
  grid-column: 1;
}

.editorial-delivery-config-card {
  grid-column: 2;
  display: grid;
  gap: 12px;
  border: 1px solid #dbe3f1;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-delivery-config-card[hidden] {
  display: none;
}

.editorial-delivery-config-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.editorial-broadcast-config-card {
  border-color: #fbcfe8;
  background: #fff7fb;
}

.editorial-broadcast-plan {
  display: grid;
  gap: 5px;
  border: 1px solid #fbcfe8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-broadcast-plan span {
  color: #be185d;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-broadcast-plan strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.editorial-broadcast-plan small {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.editorial-delivery-guardrails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editorial-delivery-guardrails article {
  display: grid;
  gap: 4px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 10px 12px;
}

.editorial-delivery-guardrails span {
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-delivery-guardrails strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.editorial-delivery-guardrails small {
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.45;
}

.editorial-remote-edit-section {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.editorial-remote-edit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.editorial-remote-edit-summary article {
  display: grid;
  gap: 5px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-remote-edit-summary span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editorial-remote-edit-summary strong {
  color: #0f172a;
  font-size: 0.98rem;
}

.editorial-remote-edit-summary small {
  color: #475569;
  line-height: 1.45;
}

.editorial-remote-edit-reason textarea {
  min-height: 88px;
}

.editorial-toggle-row {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px !important;
  border: 1px solid #dbe3f1;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px 16px;
}

.editorial-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #e11d74;
}

.editorial-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 2px -16px -16px;
  border-top: 1px solid #e4e7ee;
  background: rgba(255, 255, 255, 0.97);
  padding: 12px 16px;
  justify-content: flex-end;
  backdrop-filter: blur(8px);
}

.editorial-editor-aside {
  position: sticky;
  top: 18px;
}

.editorial-editor-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: start;
}

.editorial-preview-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-preview-card {
  display: grid;
  gap: 14px;
  border: 1px solid #ebedf3;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 18px;
}

.editorial-preview-card::before {
  content: "Preview no app";
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 9px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editorial-preview-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.2rem;
}

.editorial-preview-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.editorial-preview-rich-body {
  display: grid;
  gap: 2px;
  color: #475569;
  line-height: 1.6;
}

.editorial-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editorial-preview-sections {
  display: grid;
  gap: 10px;
}

.editorial-preview-detail-card {
  display: grid;
  gap: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-preview-detail-card strong {
  color: #0f172a;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.editorial-preview-detail-card span {
  color: #1d4ed8;
  font-weight: 700;
}

.editorial-preview-detail-card p {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
}

.editorial-preview-meta {
  margin: 0;
  display: grid;
  gap: 12px;
}

.editorial-preview-meta div {
  display: grid;
  gap: 4px;
}

.editorial-preview-meta dt {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.editorial-preview-meta dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

.editorial-hint-stack {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.editorial-hint-card {
  border: 1px solid #e4e7ee;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
}

.editorial-hint-card strong {
  color: #0f172a;
  display: block;
}

.editorial-hint-card p {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.55;
}

.editorial-workflow-guide {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.editorial-workflow-guide span {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  padding: 12px;
  font-weight: 700;
}

.editorial-workflow-guide strong {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.editorial-validation-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #e4e7ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.editorial-editor-support-grid .editorial-validation-panel {
  margin-top: 0;
}

.editorial-validation-panel .matriz-card-head {
  margin: 0;
}

.editorial-validation-list {
  display: grid;
  gap: 8px;
}

.editorial-validation-item {
  display: grid;
  gap: 3px;
  border: 1px solid #dbe3f1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.editorial-validation-item strong {
  color: #0f172a;
  font-size: 0.88rem;
}

.editorial-validation-item span {
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.4;
}

.editorial-validation-item.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.editorial-validation-item.is-ok strong {
  color: #166534;
}

.editorial-validation-item.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.editorial-validation-item.is-warning strong {
  color: #92400e;
}

.editorial-validation-item.is-error {
  border-color: #fecaca;
  background: #fff1f2;
}

.editorial-validation-item.is-error strong {
  color: #be123c;
}

@media (max-width: 980px) {
  .matriz-head-auth {
    flex-direction: column;
  }

  .matriz-head-actions {
    justify-content: flex-start;
  }

  .matriz-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matriz-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-kpi-grid-compact,
  .editorial-engagement-grid,
  .editorial-campaign-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matriz-grid-ops {
    grid-template-columns: 1fr;
  }

  .matriz-grid-duo {
    grid-template-columns: 1fr;
  }

  .editorial-schedule-grid,
  .editorial-library-grid,
  .editorial-delivery-buckets {
    grid-template-columns: 1fr;
  }

  .editorial-schedule-feed-item {
    grid-template-columns: 1fr;
  }

  .editorial-schedule-feed-thumb {
    width: 100%;
    min-height: 150px;
  }

  .editorial-schedule-feed-thumb img {
    min-height: 150px;
  }

  .editorial-pregnancy-week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .editorial-journey-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-assistant-executive-grid,
  .app-assistant-source-strip,
  .app-assistant-detail-grid {
    grid-template-columns: 1fr;
  }

  .matriz-doors {
    grid-template-columns: 1fr;
  }

  .matriz-notice-form-row {
    grid-template-columns: 1fr;
  }

  .matriz-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .editorial-board-row {
    grid-template-columns: 1fr;
  }

  .editorial-timeline-row,
  .editorial-media-card,
  .editorial-post-row {
    grid-template-columns: 1fr;
  }

  .editorial-media-grid {
    grid-template-columns: 1fr;
  }

  .editorial-media-picker-grid {
    grid-template-columns: 1fr;
  }

  .editorial-post-thumb {
    width: 100%;
    min-height: 160px;
  }

  .editorial-post-thumb img {
    min-height: 160px;
  }

  .editorial-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-schedule-toolbar,
  .editorial-library-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .editorial-row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .editorial-row-actions-inline {
    grid-template-columns: minmax(120px, auto);
  }

  .editorial-editor-layout {
    grid-template-columns: 1fr;
  }

  .editorial-editor-aside {
    position: static;
  }

  .editorial-form-grid,
  .editorial-form-grid-wide,
  .editorial-form-grid-media {
    grid-template-columns: 1fr;
  }

  .editorial-campaign-audience-mode,
  .editorial-campaign-audience-groups {
    grid-template-columns: 1fr;
  }

  .editorial-delivery-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-delivery-config,
  .editorial-editor-support-grid {
    grid-template-columns: 1fr;
  }

  .editorial-delivery-config > label,
  .editorial-delivery-config-card {
    grid-column: 1;
  }

  .editorial-delivery-guardrails {
    grid-template-columns: 1fr;
  }

  .editorial-hero-upload-row {
    grid-template-columns: 1fr;
  }

  .editorial-form-section-head {
    flex-direction: column;
  }

  .editorial-rich-field-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .editorial-rich-toolbar {
    justify-content: flex-start;
  }

  .editorial-remote-edit-summary {
    grid-template-columns: 1fr;
  }

  .editorial-campaign-metrics-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-campaign-metric-row {
    grid-template-columns: 1fr 1fr;
  }

  .editorial-campaign-block-preview {
    grid-template-columns: 1fr;
  }

  .editorial-campaign-block-thumb,
  .editorial-campaign-block-preview span,
  .editorial-campaign-block-preview strong,
  .editorial-campaign-block-preview code {
    grid-column: 1;
  }

  .editorial-campaign-block-thumb {
    grid-row: auto;
    width: 100%;
    min-height: 120px;
  }

  .editorial-form-actions {
    position: static;
    margin: 0;
  }

  .cofre-pill-grid {
    grid-template-columns: 1fr;
  }

  .cofre-signal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .matriz-action-grid {
    grid-template-columns: 1fr;
  }

  .editorial-kpi-grid-compact,
  .editorial-engagement-grid,
  .editorial-campaign-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .editorial-toolbar {
    grid-template-columns: 1fr;
  }

  .editorial-schedule-toolbar,
  .editorial-library-toolbar,
  .editorial-pregnancy-week-grid {
    grid-template-columns: 1fr;
  }

  .editorial-post-preview-modal {
    padding: 12px;
  }

  .editorial-post-preview-dialog {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .editorial-journey-board {
    grid-template-columns: 1fr;
  }

  .editorial-delivery-mode-grid {
    grid-template-columns: 1fr;
  }

  .editorial-delivery-config .editorial-form-grid {
    grid-template-columns: 1fr;
  }

  .editorial-status-summary,
  .editorial-row-actions,
  .editorial-work-meta,
  .editorial-campaign-block-preview-list,
  .editorial-campaign-metrics-summary,
  .editorial-campaign-metric-row {
    grid-template-columns: 1fr;
  }

  .editorial-workflow-step {
    grid-template-columns: 1fr auto;
  }

  .editorial-workflow-step p {
    grid-column: 1 / -1;
  }
}

/* ==========================================
   Editorial dashboard SaaS shell
   ========================================== */

.editorial-dashboard-page {
  --dash-page: #f4f7fb;
  --dash-panel: #ffffff;
  --dash-panel-soft: #f9fbfd;
  --dash-ink: #172033;
  --dash-muted: #637083;
  --dash-soft: #8a96a8;
  --dash-line: #dfe6ef;
  --dash-line-strong: #cad4e1;
  --dash-brand: #0e8f8b;
  --dash-brand-deep: #086968;
  --dash-brand-soft: #e1f7f4;
  --dash-rose: #c33d69;
  --dash-rose-soft: #fde8f0;
  --dash-amber: #b7791f;
  --dash-amber-soft: #fff3d8;
  --dash-blue: #3468d7;
  --dash-blue-soft: #e8efff;
  --dash-green: #218a5b;
  --dash-green-soft: #e6f6ed;
  --dash-violet: #6d5ac7;
  --dash-violet-soft: #f0edff;
  --dash-shadow: 0 18px 46px rgba(25, 37, 58, 0.10);
  --dash-shadow-soft: 0 10px 28px rgba(25, 37, 58, 0.07);
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(14, 143, 139, 0.11), transparent 32%),
    linear-gradient(235deg, rgba(195, 61, 105, 0.09), transparent 30%),
    var(--dash-page);
}

.editorial-dashboard-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.editorial-dashboard-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid rgba(202, 212, 225, 0.78);
  background: rgba(255, 255, 255, 0.84);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 22px;
}

.editorial-dashboard-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--dash-ink);
  text-decoration: none;
}

.editorial-dashboard-brand:hover,
.editorial-dashboard-create:hover,
.editorial-dashboard-nav-item:hover {
  text-decoration: none;
}

.editorial-dashboard-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(14, 143, 139, 0.94), rgba(52, 104, 215, 0.92));
  box-shadow: 0 14px 30px rgba(14, 143, 139, 0.24);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.18rem;
  font-weight: 900;
}

.editorial-dashboard-brand strong,
.editorial-dashboard-brand small,
.editorial-dashboard-create strong,
.editorial-dashboard-create span {
  display: block;
}

.editorial-dashboard-brand strong {
  color: var(--dash-ink);
  font-size: 1.08rem;
  line-height: 1.1;
}

.editorial-dashboard-brand small {
  margin-top: 4px;
  color: var(--dash-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editorial-dashboard-create {
  border: 1px solid rgba(14, 143, 139, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(225, 247, 244, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: var(--dash-shadow-soft);
  padding: 14px;
  color: var(--dash-brand-deep);
  text-decoration: none;
}

.editorial-dashboard-create strong {
  color: var(--dash-brand-deep);
  font-size: 0.94rem;
}

.editorial-dashboard-create span {
  margin-top: 7px;
  color: #536374;
  font-size: 0.82rem;
  line-height: 1.35;
}

.editorial-dashboard-nav {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.editorial-dashboard-nav p {
  margin: 0 0 6px;
  padding: 0 10px;
  color: var(--dash-soft);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-dashboard-nav-item {
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 9px;
  color: #415064;
  text-decoration: none;
}

.editorial-dashboard-nav-item span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef3f8;
  display: grid;
  place-items: center;
  color: #657386;
  font-size: 0.72rem;
  font-weight: 900;
}

.editorial-dashboard-nav-item strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editorial-dashboard-nav-item small {
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  background: #eef3f8;
  display: grid;
  place-items: center;
  color: #657386;
  font-size: 0.72rem;
  font-weight: 900;
}

.editorial-dashboard-nav-item.is-active {
  border-color: rgba(14, 143, 139, 0.24);
  background: #ffffff;
  box-shadow: var(--dash-shadow-soft);
  color: #0f2f3a;
}

.editorial-dashboard-nav-item.is-active span {
  color: #ffffff;
  background: var(--dash-brand);
}

.editorial-dashboard-side-card {
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background: var(--dash-panel);
  box-shadow: var(--dash-shadow-soft);
  padding: 14px;
}

.editorial-dashboard-side-card > span,
.editorial-dashboard-side-card > strong,
.editorial-dashboard-side-card > small {
  display: block;
}

.editorial-dashboard-side-card > span {
  color: var(--dash-soft);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-dashboard-side-card .editorial-runtime-pill,
.editorial-dashboard-side-card > strong {
  justify-content: flex-start;
  width: fit-content;
  margin-top: 7px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.editorial-dashboard-side-card > small {
  margin-top: 8px;
  color: var(--dash-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.editorial-dashboard-main {
  min-width: 0;
  padding: 24px 28px 32px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.editorial-dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.editorial-dashboard-topbar h1 {
  margin: 10px 0 0;
  color: #111b2d;
  font-size: clamp(2rem, 1.58rem + 1.2vw, 2.55rem);
  line-height: 1.05;
  font-weight: 900;
}

.editorial-dashboard-topbar p:not(.editorial-dashboard-eyebrow) {
  margin: 8px 0 0;
  color: var(--dash-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.editorial-dashboard-eyebrow {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(14, 143, 139, 0.22);
  border-radius: 999px;
  background: rgba(225, 247, 244, 0.78);
  color: var(--dash-brand-deep);
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-dashboard-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dash-brand);
}

.editorial-dashboard-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.editorial-dashboard-topbar > div:first-child {
  min-width: 0;
}

.editorial-dashboard-session {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 12px;
}

.editorial-dashboard-page .matriz-login-link,
.editorial-dashboard-page .matriz-logout-btn,
.editorial-dashboard-page .editorial-primary-btn,
.editorial-dashboard-page .editorial-secondary-btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 850;
}

.editorial-dashboard-page .editorial-primary-btn {
  border-color: var(--dash-brand);
  background: var(--dash-brand);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(14, 143, 139, 0.22);
}

.editorial-dashboard-page .editorial-primary-btn:hover {
  color: #ffffff;
}

.editorial-dashboard-page .matriz-logout-btn {
  border-color: #111b2d;
  background: #111b2d;
}

.editorial-dashboard-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.62fr);
  gap: 16px;
}

.editorial-dashboard-hero-card,
.editorial-dashboard-health-card,
.editorial-dashboard-filter-bar,
.editorial-dashboard-panel,
.editorial-dashboard-kpis article {
  border: 1px solid rgba(202, 212, 225, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--dash-shadow-soft);
}

.editorial-dashboard-hero-card {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.editorial-dashboard-hero-card h2 {
  margin: 0;
  color: #111b2d;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 900;
}

.editorial-dashboard-hero-card p,
.editorial-dashboard-panel p,
.editorial-dashboard-health-card p {
  margin: 8px 0 0;
  color: var(--dash-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.editorial-dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editorial-dashboard-health-card {
  padding: 15px;
  display: grid;
  gap: 12px;
}

.editorial-dashboard-health-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editorial-dashboard-health-card span {
  color: var(--dash-muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-dashboard-health-card strong {
  color: var(--dash-green);
  font-size: 1rem;
  font-weight: 950;
}

.editorial-dashboard-health-card .editorial-status-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.editorial-dashboard-health-card .editorial-status-summary-item {
  border: 1px solid rgba(33, 138, 91, 0.14);
  border-radius: 8px;
  background: var(--dash-green-soft);
  padding: 10px;
}

.editorial-dashboard-health-card .editorial-status-summary-item strong {
  display: block;
  color: var(--dash-green);
  font-size: 1.12rem;
  line-height: 1;
}

.editorial-dashboard-health-card .editorial-status-summary-item span {
  display: block;
  margin-top: 5px;
  color: #506173;
  font-size: 0.7rem;
  line-height: 1.2;
  text-transform: none;
}

.editorial-dashboard-filter-bar {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
}

.editorial-dashboard-filter-bar label {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 52px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.editorial-dashboard-filter-bar span {
  color: var(--dash-soft);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-dashboard-filter-bar select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #263246;
  padding: 0;
  font-size: 0.84rem;
  font-weight: 900;
}

.editorial-dashboard-filter-bar .editorial-secondary-btn {
  align-self: stretch;
}

.editorial-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.editorial-dashboard-kpis article {
  min-height: 102px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.editorial-dashboard-kpis article > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.editorial-dashboard-kpis span {
  color: var(--dash-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.editorial-dashboard-kpis small {
  border-radius: 999px;
  background: var(--dash-blue-soft);
  color: var(--dash-blue);
  padding: 5px 8px;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-dashboard-kpis article:nth-child(2) small {
  background: var(--dash-amber-soft);
  color: var(--dash-amber);
}

.editorial-dashboard-kpis article:nth-child(3) small {
  background: var(--dash-rose-soft);
  color: var(--dash-rose);
}

.editorial-dashboard-kpis article:nth-child(4) small {
  background: var(--dash-violet-soft);
  color: var(--dash-violet);
}

.editorial-dashboard-kpis article:nth-child(5) small {
  background: var(--dash-green-soft);
  color: var(--dash-green);
}

.editorial-dashboard-kpis strong {
  color: #101a2d;
  font-size: 2rem;
  line-height: 1;
  font-weight: 950;
}

.editorial-dashboard-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.editorial-dashboard-stack {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.editorial-dashboard-panel {
  padding: 15px;
  min-width: 0;
}

.editorial-dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.editorial-dashboard-panel h2 {
  margin: 0;
  color: #152037;
  font-size: 1.04rem;
  line-height: 1.2;
  font-weight: 950;
}

.editorial-dashboard-panel .editorial-engagement-grid {
  margin-top: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.editorial-dashboard-panel .editorial-engagement-grid article {
  border-color: #e5ebf3;
  border-radius: 8px;
  background: var(--dash-panel-soft);
  padding: 12px;
  gap: 7px;
}

.editorial-dashboard-panel .editorial-engagement-grid span {
  color: var(--dash-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.editorial-dashboard-panel .editorial-engagement-grid strong {
  color: #111b2d;
  font-size: 1.5rem;
  font-weight: 950;
}

.editorial-dashboard-panel .editorial-engagement-grid small {
  color: var(--dash-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.editorial-dashboard-page .editorial-action-list {
  gap: 9px;
}

.editorial-dashboard-page .editorial-action-tile {
  grid-template-columns: minmax(0, 1fr) 28px;
  min-height: 64px;
  border-color: #e5ebf3;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-dashboard-page .editorial-action-tile::after {
  content: ">";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f0f4f9;
  color: #56657a;
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  font-weight: 900;
}

.editorial-dashboard-page .editorial-action-tile strong {
  grid-column: 1;
  font-size: 0.88rem;
}

.editorial-dashboard-page .editorial-action-tile span {
  grid-column: 1;
  font-size: 0.78rem;
}

.editorial-dashboard-page .editorial-compact-list {
  gap: 9px;
}

.editorial-dashboard-page .editorial-compact-item,
.editorial-dashboard-page .editorial-empty-state-compact {
  border-color: #e5ebf3;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-dashboard-page .editorial-compact-item h3 {
  margin: 10px 0 6px;
  font-size: 0.92rem;
}

.editorial-dashboard-page .editorial-compact-item p {
  font-size: 0.78rem;
}

.editorial-dashboard-page .editorial-compact-item .editorial-post-meta {
  margin-top: 10px;
  gap: 6px;
  font-size: 0.76rem;
}

.editorial-dashboard-page .editorial-campaign-dashboard-empty,
.editorial-dashboard-page .editorial-campaign-dashboard-headline,
.editorial-dashboard-page .editorial-campaign-dashboard-grid article {
  border-radius: 8px;
}

.editorial-dashboard-page .editorial-campaign-dashboard-headline {
  background: var(--dash-blue-soft);
  border-color: rgba(52, 104, 215, 0.18);
}

.editorial-dashboard-page .editorial-campaign-dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.editorial-dashboard-page .editorial-notice {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .editorial-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .editorial-dashboard-sidebar {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(202, 212, 225, 0.78);
    grid-template-columns: auto minmax(180px, 260px) minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: start;
  }

  .editorial-dashboard-side-card {
    display: none;
  }

  .editorial-dashboard-nav {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .editorial-dashboard-nav p {
    display: none;
  }

  .editorial-dashboard-hero-grid,
  .editorial-dashboard-content {
    grid-template-columns: 1fr;
  }

  .editorial-dashboard-panel .editorial-engagement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .editorial-dashboard-main,
  .editorial-dashboard-sidebar {
    padding: 18px 14px;
  }

  .editorial-dashboard-sidebar {
    grid-template-columns: 1fr;
  }

  .editorial-dashboard-nav {
    grid-template-columns: 1fr;
  }

  .editorial-dashboard-topbar,
  .editorial-dashboard-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .editorial-dashboard-hero-card {
    grid-template-columns: 1fr;
  }

  .editorial-dashboard-account,
  .editorial-dashboard-hero-actions {
    justify-content: flex-start;
  }

  .editorial-dashboard-filter-bar,
  .editorial-dashboard-kpis,
  .editorial-dashboard-panel .editorial-engagement-grid,
  .editorial-dashboard-page .editorial-campaign-dashboard-grid,
  .editorial-dashboard-health-card .editorial-status-summary {
    grid-template-columns: 1fr;
  }

  .editorial-dashboard-filter-bar .editorial-secondary-btn {
    width: 100%;
  }
}

/* ==========================================
   Editorial post editor SaaS surface
   ========================================== */

.editorial-editor-saas-page .editorial-dashboard-create {
  color: var(--dash-brand-deep);
}

.editorial-editor-saas-page [hidden] {
  display: none !important;
}

.editorial-editor-saas-form {
  display: grid;
  gap: 16px;
}

.editorial-editor-status-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(202, 212, 225, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--dash-shadow-soft);
  padding: 12px;
}

.editorial-editor-status-meta,
.editorial-editor-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editorial-editor-status-actions {
  justify-content: flex-end;
}

.editorial-editor-pill {
  min-height: 28px;
  border-radius: 999px;
  background: #eef3f8;
  color: #4b5b70;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-editor-pill strong {
  color: #263246;
}

.editorial-editor-pill.is-ok {
  background: var(--dash-green-soft);
  color: var(--dash-green);
}

.editorial-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.editorial-editor-left,
.editorial-editor-aside-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.editorial-editor-aside-panel {
  position: sticky;
  top: 18px;
}

.editorial-editor-saas-page .editorial-form-section,
.editorial-editor-side-card {
  border: 1px solid rgba(202, 212, 225, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--dash-shadow-soft);
  padding: 15px;
}

.editorial-editor-saas-page .editorial-form-section {
  display: grid;
  gap: 14px;
}

.editorial-editor-saas-page .editorial-form-section-head {
  margin-bottom: 0;
}

.editorial-editor-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.editorial-editor-step {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--dash-brand-soft);
  color: var(--dash-brand-deep);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 950;
}

.editorial-editor-saas-page .editorial-section-eyebrow {
  color: var(--dash-brand-deep);
  font-size: 0.68rem;
}

.editorial-editor-saas-page .editorial-form-section-head h3 {
  margin-top: 5px;
  color: #152037;
  font-size: 1.06rem;
  font-weight: 950;
}

.editorial-editor-saas-page .editorial-form-section-head p {
  max-width: none;
  margin-top: 5px;
  color: var(--dash-muted);
  font-size: 0.84rem;
}

.editorial-editor-saas-page .editorial-form label {
  color: #526074;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editorial-editor-saas-page .editorial-form input,
.editorial-editor-saas-page .editorial-form select,
.editorial-editor-saas-page .editorial-form textarea {
  border-color: #d9e2ed;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  min-height: 46px;
  font-size: 0.88rem;
  font-weight: 750;
}

.editorial-editor-saas-page .editorial-form input:focus,
.editorial-editor-saas-page .editorial-form select:focus,
.editorial-editor-saas-page .editorial-form textarea:focus,
.editorial-editor-saas-page .editorial-rich-editor:focus,
.editorial-editor-saas-page .editorial-rich-editor.ql-container.ql-snow:focus-within {
  border-color: var(--dash-brand);
  box-shadow: 0 0 0 4px rgba(14, 143, 139, 0.12);
}

.editorial-editor-saas-page .editorial-form-grid {
  gap: 12px;
}

.editorial-editor-saas-page .editorial-form-grid-wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
}

.editorial-editor-saas-page .editorial-rich-field {
  margin-top: 0;
}

.editorial-editor-saas-page .editorial-rich-field-head {
  border-color: #d9e2ed;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  padding: 8px;
}

.editorial-editor-saas-page .editorial-rich-toolbar {
  border: 0;
  background: transparent;
  padding: 0;
}

.editorial-editor-saas-page .editorial-rich-toolbar.ql-toolbar.ql-snow {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.editorial-editor-saas-page .editorial-rich-toolbar.ql-toolbar.ql-snow .ql-header.ql-picker {
  width: 112px;
}

.editorial-editor-saas-page .editorial-rich-toolbar.ql-toolbar.ql-snow button,
.editorial-editor-saas-page .editorial-rich-toolbar.ql-toolbar.ql-snow .ql-picker-label,
.editorial-editor-saas-page .editorial-rich-toolbar button {
  border-color: #d9e2ed;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
}

.editorial-editor-saas-page .editorial-rich-editor,
.editorial-editor-saas-page .editorial-rich-editor.ql-container.ql-snow {
  min-height: 240px;
  border-color: #d9e2ed;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
}

.editorial-editor-saas-page .editorial-form-grid-media {
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
}

.editorial-editor-saas-page .editorial-hero-upload-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.editorial-editor-saas-page .editorial-hero-feedback {
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(225, 247, 244, 0.72), rgba(255, 255, 255, 0.94));
}

.editorial-editor-saas-page .editorial-hero-feedback__thumb {
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(14, 143, 139, 0.92), rgba(52, 104, 215, 0.82));
  color: #ffffff;
}

.editorial-editor-saas-page .editorial-delivery-mode-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.editorial-editor-saas-page .editorial-delivery-mode-card {
  min-height: 112px;
  border-color: #e3e9f2;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-editor-saas-page .editorial-delivery-mode-card:hover,
.editorial-editor-saas-page .editorial-delivery-mode-card:focus-visible,
.editorial-editor-saas-page .editorial-delivery-mode-card.is-active {
  border-color: rgba(14, 143, 139, 0.36);
  background: var(--dash-brand-soft);
  box-shadow: none;
}

.editorial-editor-saas-page .editorial-delivery-mode-card span {
  color: var(--dash-soft);
  font-size: 0.64rem;
}

.editorial-editor-saas-page .editorial-delivery-mode-card strong {
  color: #172033;
  font-size: 0.84rem;
}

.editorial-editor-saas-page .editorial-delivery-mode-card small {
  color: var(--dash-muted);
  font-size: 0.72rem;
}

.editorial-editor-saas-page .editorial-delivery-config-card,
.editorial-editor-saas-page .editorial-delivery-guardrails article,
.editorial-editor-saas-page .editorial-pregnancy-week-panel {
  border-color: #e3e9f2;
  border-radius: 8px;
  background: var(--dash-panel-soft);
}

.editorial-editor-saas-page .editorial-toggle-row {
  border-color: #e3e9f2;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.editorial-editor-saas-page .editorial-toggle-row span {
  color: #172033;
  font-size: 0.84rem;
  text-transform: none;
}

.editorial-editor-side-card {
  min-width: 0;
}

.editorial-editor-side-card .editorial-dashboard-panel-head {
  margin-bottom: 12px;
}

.editorial-editor-side-card h2 {
  margin: 0;
  color: #152037;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 950;
}

.editorial-editor-side-card p {
  margin: 5px 0 0;
  color: var(--dash-muted);
  font-size: 0.82rem;
}

.editorial-editor-phone-preview {
  position: relative;
  margin: 0 auto;
  max-width: 332px;
  min-height: 410px;
  border: 10px solid #101828;
  border-radius: 26px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.18);
}

.editorial-editor-phone-preview::before {
  content: "IMAGEM";
  display: grid;
  place-items: center;
  height: 116px;
  margin: 0 0 16px;
  background: linear-gradient(135deg, rgba(14, 143, 139, 0.88), rgba(52, 104, 215, 0.78));
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.editorial-editor-phone-preview h3,
.editorial-editor-phone-preview p,
.editorial-editor-phone-preview .editorial-preview-chips,
.editorial-editor-phone-preview .editorial-preview-rich-body,
.editorial-editor-phone-preview .editorial-preview-sections,
.editorial-editor-phone-preview .editorial-preview-meta {
  margin-left: 16px;
  margin-right: 16px;
}

.editorial-editor-phone-preview h3 {
  color: #172033;
  font-size: 1.22rem;
  line-height: 1.16;
}

.editorial-editor-phone-preview p {
  color: #526074;
  font-size: 0.84rem;
  line-height: 1.55;
}

.editorial-editor-phone-preview .editorial-target-chip {
  border: 0;
  background: var(--dash-brand-soft);
  color: var(--dash-brand-deep);
}

.editorial-editor-saas-page .editorial-validation-panel {
  padding: 14px;
}

.editorial-editor-saas-page .editorial-validation-list {
  gap: 9px;
}

.editorial-editor-saas-page .editorial-validation-item {
  border-color: #e3e9f2;
  border-radius: 8px;
  background: #ffffff;
  grid-template-columns: 25px minmax(0, 1fr);
}

.editorial-editor-saas-page .editorial-validation-item::before {
  content: "i";
  grid-row: 1 / span 2;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: var(--dash-blue-soft);
  color: var(--dash-blue);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 950;
}

.editorial-editor-saas-page .editorial-validation-item strong,
.editorial-editor-saas-page .editorial-validation-item span {
  grid-column: 2;
}

.editorial-editor-saas-page .editorial-validation-item.is-ok::before {
  content: "OK";
  background: var(--dash-green-soft);
  color: var(--dash-green);
}

.editorial-editor-saas-page .editorial-validation-item.is-warning::before {
  content: "!";
  background: var(--dash-amber-soft);
  color: var(--dash-amber);
}

.editorial-editor-saas-page .editorial-validation-item.is-error::before {
  content: "!";
  background: var(--dash-rose-soft);
  color: var(--dash-rose);
}

.editorial-editor-saas-page .editorial-form-actions {
  position: static;
  margin: 0;
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.editorial-editor-saas-page .editorial-form-actions button,
.editorial-editor-saas-page .editorial-form-actions .editorial-primary-btn,
.editorial-editor-saas-page .editorial-form-actions .editorial-secondary-btn,
.editorial-editor-saas-page .editorial-form-actions .editorial-danger-btn {
  width: 100%;
  justify-content: center;
}

.editorial-editor-saas-page .editorial-form-actions .editorial-primary-btn {
  border-color: var(--dash-brand);
  background: var(--dash-brand);
  color: #ffffff;
}

.editorial-editor-saas-page .editorial-danger-btn {
  border-color: rgba(195, 61, 105, 0.30);
  background: var(--dash-rose-soft);
  color: var(--dash-rose);
}

.editorial-editor-saas-page .editorial-workflow-guide {
  margin-top: 12px;
  border: 1px solid rgba(109, 90, 199, 0.18);
  border-radius: 8px;
  background: var(--dash-violet-soft);
  padding: 11px;
}

.editorial-editor-saas-page .editorial-workflow-guide span {
  border: 0;
  background: transparent;
  padding: 0;
  color: #5546a1;
  font-size: 0.78rem;
  line-height: 1.45;
}

.editorial-editor-saas-page .editorial-notice {
  margin-top: 0;
}

@media (max-width: 1240px) {
  .editorial-editor-grid {
    grid-template-columns: 1fr;
  }

  .editorial-editor-aside-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .editorial-editor-phone-preview {
    max-width: none;
  }

  .editorial-editor-saas-page .editorial-delivery-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .editorial-editor-aside-panel {
    grid-template-columns: 1fr;
  }

  .editorial-editor-saas-page .editorial-form-grid-wide,
  .editorial-editor-saas-page .editorial-form-grid-media,
  .editorial-editor-saas-page .editorial-hero-upload-row,
  .editorial-editor-status-bar {
    grid-template-columns: 1fr;
  }

  .editorial-editor-status-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .editorial-editor-saas-page .editorial-delivery-mode-grid,
  .editorial-editor-saas-page .editorial-delivery-config,
  .editorial-editor-saas-page .editorial-delivery-config .editorial-form-grid {
    grid-template-columns: 1fr;
  }

  .editorial-editor-section-title {
    gap: 10px;
  }

  .editorial-editor-step {
    width: 30px;
    height: 30px;
  }
}

/* ==========================================
   Editorial posts SaaS surface
   ========================================== */

.editorial-posts-saas-page [hidden] {
  display: none !important;
}

.editorial-posts-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: stretch;
}

.editorial-posts-hero-card,
.editorial-posts-health-card,
.editorial-posts-filter-bar,
.editorial-posts-list-panel,
.editorial-posts-insights-grid > article {
  border: 1px solid rgba(202, 212, 225, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--dash-shadow-soft);
}

.editorial-posts-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.editorial-posts-hero-card h2,
.editorial-posts-panel-head h2 {
  margin: 0;
  color: #152037;
  line-height: 1.18;
  font-weight: 950;
}

.editorial-posts-hero-card h2 {
  font-size: 1.35rem;
}

.editorial-posts-hero-card p,
.editorial-posts-panel-head p {
  margin: 7px 0 0;
  color: var(--dash-muted);
  line-height: 1.45;
  font-size: 0.86rem;
  font-weight: 700;
}

.editorial-posts-hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.editorial-posts-health-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 16px;
}

.editorial-posts-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.editorial-posts-card-head span {
  color: var(--dash-soft);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.editorial-posts-card-head strong {
  color: var(--dash-brand-deep);
  font-size: 0.82rem;
  font-weight: 950;
}

.editorial-posts-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.editorial-posts-kpis article {
  min-height: 78px;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background: var(--dash-panel-soft);
  padding: 12px;
}

.editorial-posts-kpis strong,
.editorial-posts-kpis span {
  display: block;
}

.editorial-posts-kpis strong {
  color: #111c31;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 950;
}

.editorial-posts-kpis span {
  margin-top: 8px;
  color: var(--dash-muted);
  font-size: 0.68rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.editorial-posts-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(4, minmax(132px, 0.7fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
}

.editorial-posts-filter-bar label,
.editorial-posts-filter-bar .editorial-search {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.editorial-posts-filter-bar span {
  color: #526074;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.editorial-posts-filter-bar select,
.editorial-posts-filter-bar input {
  min-height: 44px;
  border-color: #d9e2ed;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  font-size: 0.84rem;
  font-weight: 800;
}

.editorial-posts-saas-page .editorial-notice {
  margin: 0;
}

.editorial-posts-list-panel {
  padding: 15px;
  min-width: 0;
}

.editorial-posts-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.editorial-posts-panel-head h2 {
  font-size: 1.08rem;
}

.editorial-posts-view-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 5px;
  align-items: center;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background: var(--dash-panel-soft);
  padding: 4px;
}

.editorial-posts-view-tabs span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 8px 11px;
  color: var(--dash-muted);
  font-size: 0.74rem;
  font-weight: 950;
}

.editorial-posts-view-tabs span.is-active {
  background: #ffffff;
  color: var(--dash-brand-deep);
  box-shadow: var(--dash-shadow-soft);
}

.editorial-posts-list-head,
.editorial-posts-saas-page .editorial-post-row {
  display: grid;
  grid-template-columns: 98px minmax(220px, 1.35fr) minmax(220px, 0.86fr) minmax(190px, 0.72fr) 150px 126px;
  gap: 12px;
  align-items: center;
}

.editorial-posts-list-head {
  padding: 0 11px 6px;
  color: var(--dash-soft);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.editorial-posts-saas-page .editorial-post-grid {
  margin-top: 0;
  gap: 10px;
}

.editorial-posts-saas-page .editorial-post-card {
  border-color: #e3e9f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  padding: 10px;
}

.editorial-posts-saas-page .editorial-post-row {
  min-height: 156px;
}

.editorial-posts-saas-page .editorial-post-thumb {
  width: 82px;
  min-height: 82px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(14, 143, 139, 0.90), rgba(52, 104, 215, 0.86));
  color: #ffffff;
  font-size: 0.68rem;
}

.editorial-posts-saas-page .editorial-post-thumb img {
  min-height: 82px;
}

.editorial-posts-saas-page .editorial-post-thumb.is-empty {
  background: var(--dash-panel-soft);
  color: var(--dash-soft);
}

.editorial-posts-saas-page .editorial-post-main {
  align-self: start;
  padding-top: 4px;
}

.editorial-posts-saas-page .editorial-post-topline {
  gap: 7px;
}

.editorial-posts-saas-page .editorial-status-chip,
.editorial-posts-saas-page .editorial-target-chip {
  min-height: 25px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.66rem;
  font-weight: 950;
}

.editorial-posts-saas-page .editorial-post-card h3 {
  margin: 10px 0 7px;
  color: #111c31;
  font-size: 1rem;
  line-height: 1.22;
  font-weight: 950;
}

.editorial-posts-saas-page .editorial-post-card p {
  color: var(--dash-muted);
  font-size: 0.82rem;
  line-height: 1.42;
  font-weight: 650;
}

.editorial-posts-saas-page .editorial-post-operational,
.editorial-posts-saas-page .editorial-post-meta,
.editorial-posts-saas-page .editorial-post-consumption {
  align-self: start;
  color: var(--dash-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.editorial-posts-saas-page .editorial-post-operational,
.editorial-posts-saas-page .editorial-post-meta {
  gap: 7px;
}

.editorial-posts-saas-page .editorial-post-operational span,
.editorial-posts-saas-page .editorial-post-meta span {
  display: grid;
  gap: 3px;
}

.editorial-posts-saas-page .editorial-post-operational strong,
.editorial-posts-saas-page .editorial-post-meta strong {
  color: #111c31;
  font-size: 0.84rem;
  font-weight: 950;
}

.editorial-posts-saas-page .editorial-post-consumption {
  gap: 8px;
}

.editorial-posts-saas-page .editorial-post-consumption span {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
}

.editorial-posts-saas-page .editorial-post-consumption strong {
  color: #111c31;
  font-size: 1.12rem;
  font-weight: 950;
}

.editorial-posts-saas-page .editorial-post-consumption small {
  color: var(--dash-muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.editorial-posts-saas-page .editorial-row-actions {
  align-self: center;
  min-width: 0;
}

.editorial-posts-saas-page .editorial-row-actions .editorial-primary-btn,
.editorial-posts-saas-page .editorial-row-actions .editorial-secondary-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  justify-content: center;
}

.editorial-posts-saas-page .editorial-row-actions .editorial-primary-btn {
  border-color: var(--dash-brand);
  background: var(--dash-brand);
  color: #ffffff;
}

.editorial-posts-saas-page .editorial-pagination {
  border-top: 1px solid var(--dash-line);
  padding-top: 13px;
}

.editorial-posts-saas-page .editorial-pagination-actions button {
  border-radius: 8px;
}

.editorial-posts-saas-page .editorial-pagination-actions button:hover:not(:disabled),
.editorial-posts-saas-page .editorial-pagination-actions button.is-active {
  border-color: var(--dash-brand);
  background: var(--dash-brand-soft);
  color: var(--dash-brand-deep);
}

.editorial-posts-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.editorial-posts-insights-grid > article {
  padding: 15px;
  min-width: 0;
}

.editorial-posts-queue,
.editorial-posts-distribution,
.editorial-posts-shortcuts {
  display: grid;
  gap: 9px;
}

.editorial-posts-queue span,
.editorial-posts-distribution span,
.editorial-posts-shortcuts a {
  min-height: 38px;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background: var(--dash-panel-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--dash-muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.editorial-posts-queue strong,
.editorial-posts-distribution strong {
  color: #111c31;
  font-weight: 950;
}

.editorial-posts-shortcuts a {
  color: #2549c7;
}

.editorial-posts-saas-page .editorial-post-preview-dialog {
  border-radius: 8px;
}

@media (max-width: 1320px) {
  .editorial-posts-summary-grid,
  .editorial-posts-insights-grid {
    grid-template-columns: 1fr;
  }

  .editorial-posts-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-posts-list-head {
    display: none;
  }

  .editorial-posts-saas-page .editorial-post-row {
    grid-template-columns: 92px minmax(0, 1fr) minmax(220px, 0.72fr);
    align-items: start;
  }

  .editorial-posts-saas-page .editorial-post-operational,
  .editorial-posts-saas-page .editorial-post-meta,
  .editorial-posts-saas-page .editorial-post-consumption,
  .editorial-posts-saas-page .editorial-row-actions {
    grid-column: 2 / -1;
  }

  .editorial-posts-saas-page .editorial-post-operational,
  .editorial-posts-saas-page .editorial-post-meta,
  .editorial-posts-saas-page .editorial-post-consumption {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .editorial-posts-saas-page .editorial-row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .editorial-posts-summary-grid,
  .editorial-posts-hero-card,
  .editorial-posts-filter-bar,
  .editorial-posts-kpis,
  .editorial-posts-saas-page .editorial-post-row,
  .editorial-posts-saas-page .editorial-post-operational,
  .editorial-posts-saas-page .editorial-post-meta,
  .editorial-posts-saas-page .editorial-post-consumption,
  .editorial-posts-saas-page .editorial-row-actions {
    grid-template-columns: 1fr;
  }

  .editorial-posts-hero-actions,
  .editorial-posts-panel-head {
    justify-content: flex-start;
  }

  .editorial-posts-panel-head {
    flex-direction: column;
  }

  .editorial-posts-saas-page .editorial-post-operational,
  .editorial-posts-saas-page .editorial-post-meta,
  .editorial-posts-saas-page .editorial-post-consumption,
  .editorial-posts-saas-page .editorial-row-actions {
    grid-column: auto;
  }

  .editorial-posts-saas-page .editorial-post-thumb {
    width: 100%;
    min-height: 132px;
  }

  .editorial-posts-saas-page .editorial-post-thumb img {
    min-height: 132px;
  }

  .editorial-posts-saas-page .editorial-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}
