:root {
  --navy: #1e3a5f;
  --navy-dark: #152b48;
  --accent: #2c5a8c;
  --ink: #172f4a;
  --muted: #667178;
  --border: #d5d9d8;
  --canvas: #faf9f6;
  --radius: 6px;
  --gold: #b18a48;
  --font-ui: Inter, Arial, sans-serif;
  font-family: var(--font-ui);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--accent);
}
.loading {
  padding: 15vh 10%;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--navy-dark);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  width: 242px;
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  z-index: 5;
}
.wordmark {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.7px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.wordmark .mark {
  display: grid;
  place-items: center;
  background: #fff1;
  border: 1px solid #ffffff30;
  border-radius: 9px;
  width: 36px;
  height: 36px;
  color: #d5c190;
  font-size: 19px;
}
.side-sub {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #b9c8da;
  margin: 10px 0 36px;
}
.nav-group {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #96aac5;
  margin: 22px 12px 10px;
}
.nav button {
  border: 0;
  background: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #c7d2e3;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 13px;
}
.nav button:hover {
  background: #ffffff0b;
}
.nav button.active {
  background: #ffffff13;
  color: #fff;
  box-shadow: inset 3px 0 #c5ac78;
}
.ico {
  display: inline-flex;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.ico svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.server-pill {
  color: #b6ccde;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #66b5a0;
}
.side-note {
  color: #849bb8;
  font-size: 11px;
  margin-top: 9px;
}
.user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 22px;
  margin-top: 20px;
  border-top: 1px solid #ffffff16;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5d8bb;
  color: #3c3b37;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}
.user input {
  width: 140px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 12px;
  padding: 3px;
}
.user small {
  color: #9eb0c8;
  display: block;
  font-size: 10px;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 70px;
  background: #ffffffbd;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  gap: 15px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb strong {
  color: var(--navy);
  font-weight: 500;
  margin-left: 10px;
}
.subnav {
  display: flex;
  gap: 4px;
  padding: 0 38px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}
.subnav button {
  border: 0;
  background: none;
  padding: 13px 14px 11px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.subnav button:hover {
  color: var(--navy);
}
.subnav button.active {
  color: var(--navy);
  font-weight: 600;
  border-bottom-color: #c5ac78;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.status-pill {
  padding: 5px 10px;
  border: 1px solid #dce7e1;
  color: #397963;
  border-radius: 30px;
  font-size: 11px;
  background: #f5fbf7;
}
.status-pill.off {
  color: #8d6927;
  border-color: #ece0c5;
  background: #fffaf0;
}
.version {
  font-size: 10px;
  color: var(--muted);
}
.workspace {
  padding: 32px 38px 60px;
  max-width: 1700px;
  margin: auto;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 27px;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 7px;
}
.page-header h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1.12;
  color: var(--navy-dark);
}
.page-header p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
  font-size: 13px;
}
.header-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-top: 6px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}
.btn:hover {
  background: #f2f5f8;
}
.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn.primary:hover {
  background: #274d78;
}
.btn.soft {
  background: #eaf1f9;
  border-color: #d5e0ef;
  color: #244e80;
}
.btn.link {
  border: 0;
  background: none;
  padding-left: 0;
  color: var(--accent);
}
.btn.small {
  min-height: 29px;
  padding: 4px 9px;
  font-size: 11px;
}
.btn.danger {
  color: #a44b43;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.editor-layout,
.brand-layout {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(340px, 0.95fr);
  gap: 24px;
  align-items: start;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 {
  font-size: 16px;
  margin: 0 0 5px;
  font-weight: 600;
  color: var(--navy);
}
.card h3 {
  font-size: 13px;
  margin: 0 0 13px;
  color: var(--navy);
}
.card > h2,
.card > h3,
.card-head > h2,
.studio-element > h3,
.login > h1,
dialog > h2 {
  font-family: var(--font-ui);
  font-weight: 900;
  letter-spacing: -.025em;
}
.card-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.card-head h2 {
  margin: 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 16px;
}
.field {
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 7px;
  color: #52617a;
}
input,
select,
textarea {
  border: 1px solid #dce2e9;
  border-radius: 6px;
  background: #fff;
  padding: 10px 11px;
  color: var(--ink);
  width: 100%;
  font-size: 12px;
  min-height: 38px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6a91bf;
  box-shadow: 0 0 0 3px #2b6cb010;
  outline: 0;
}
textarea {
  resize: vertical;
  line-height: 1.75;
}
.body-editor {
  min-height: 285px;
  font-size: 13px;
}
.hint {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 400;
  font-size: 12px;
  margin: 14px 0;
}
.check input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin-top: 3px;
  flex-shrink: 0;
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.type {
  padding: 12px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  min-height: 76px;
}
.type .ico {
  display: block;
  margin-bottom: 9px;
  color: #637891;
}
.type.selected {
  background: #edf3fa;
  border-color: #84a2c7;
  color: var(--navy);
}
.ai-area {
  background: #f7f9fc;
  border: 1px solid #e5ebf3;
  border-radius: 9px;
  padding: 15px;
}
.ai-area textarea {
  background: white;
  min-height: 90px;
}
.ai-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.source-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #edf3fa;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  color: var(--navy);
  margin: 5px 5px 0 0;
}
.source-chip button {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}
.preview-panel {
  position: sticky;
  top: 20px;
  border: 1px solid var(--border);
  background: #e9edf2;
  border-radius: var(--radius);
  overflow: hidden;
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.preview-bar strong {
  font-size: 11px;
  color: var(--navy);
  font-weight: 500;
}
.preview-scroll {
  height: 700px;
  overflow: auto;
  padding: 26px 18px;
}
.preview-scroll .paper {
  zoom: 0.62;
  margin: auto;
}
.preview-caption {
  padding: 12px 17px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid #dce3eb;
  background: #f8fafc;
}
.paper {
  background: #fff;
  width: 210mm;
  min-height: 297mm;
  box-shadow: 0 5px 25px #1b304915;
  padding: var(--paper-margin, 23mm);
  color: var(--paper-ink, #26364a);
  font-family: var(--paper-font, Arial), sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 11pt;
  line-height: 1.5;
}
.paper.letter {
  width: 215.9mm;
  min-height: 279.4mm;
}
.paper-header {
  border-bottom: 1.5pt solid var(--paper-primary);
  padding-bottom: 7mm;
  margin-bottom: 8mm;
  color: var(--paper-primary);
  min-height: 25mm;
}
.paper-header img {
  height: auto;
  max-height: 24mm;
  object-fit: contain;
  object-position: left center;
}
.paper-date {
  text-align: left;
  font-size: 10pt;
  margin-bottom: 7mm;
}
.paper-recipient {
  margin-bottom: 6mm;
}
.paper h2 {
  color: var(--paper-primary);
  font-family: var(--paper-heading, Arial);
  font-size: 15pt;
  line-height: 1.4;
  margin: 0 0 7mm;
}
.paper h3 {
  font-family: var(--paper-heading, Arial);
  color: var(--paper-primary);
  font-size: 12pt;
  margin: 5mm 0 3mm;
}
.paper p {
  margin: 0 0 2.5mm;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.paper-signature {
  padding-top: 8mm;
  font-weight: 600;
}
.paper-footer {
  margin-top: auto;
  padding-top: 6mm;
  border-top: 1pt solid var(--paper-primary);
  font-size: 8pt;
  overflow-wrap: anywhere;
}
.paper-content {
  padding-bottom: 12mm;
}
.paper-footer div {
  font-size: 7pt;
  color: #7b8492;
  padding-top: 4mm;
}
.notice {
  background: #fff9ed;
  border: 1px solid #eee3c7;
  color: #856827;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.notice.info {
  background: #f0f5fb;
  color: #4d688a;
  border-color: #dde7f3;
}
.badge {
  font-size: 10px;
  border: 1px solid #dde4ee;
  color: #667c97;
  background: #f6f8fb;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.badge.aprobado {
  color: #39745f;
  background: #f0f8f4;
  border-color: #d7eadd;
}
.badge.pendiente {
  color: #896d37;
  background: #fff8e9;
  border-color: #f2e5c6;
}
.studio-statusbar {
  margin: 0 0 12px;
}
.guide-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.guide-swatch {
  margin: 0;
}
.guide-swatch span {
  display: block;
  height: 64px;
  border-radius: 8px;
  border: 1px solid #dde4ee;
}
.guide-swatch figcaption {
  margin-top: 6px;
  font-size: 12px;
}
.guide-swatch code {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.guide-type-display {
  font-family: Barlow, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 6px;
}
.guide-type-body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  color: #52606d;
  margin: 0;
}
.guide-frames {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.guide-frame-wrap {
  margin: 0;
  width: 180px;
}
.guide-frame-wrap figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.guide-frame {
  position: relative;
  background: #f5f7fa;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  overflow: hidden;
}
.guide-frame p,
.guide-frame small,
.guide-frame img,
.guide-logo-fallback,
.guide-rule,
.guide-safe {
  position: absolute;
}
.guide-frame p {
  left: 8%;
  margin: 0;
  font-family: Barlow, sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.15;
  color: #1e3a5f;
}
.guide-frame small {
  left: 8%;
  color: #52606d;
  font-size: 9px;
}
.guide-rule {
  left: 0;
  right: 0;
  height: 4px;
  background: #1e3a5f;
}
.guide-frame img,
.guide-logo-fallback {
  object-fit: contain;
}
.guide-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1px dashed #1e3a5f;
  font-size: 9px;
  color: #1e3a5f;
}
.guide-safe {
  left: 0;
  right: 0;
  background: rgba(30, 58, 95, 0.08);
}
.guide-safe.top {
  top: 0;
  height: 14%;
}
.guide-safe.bottom {
  bottom: 0;
  height: 20%;
}
.guide-rules {
  font-size: 14px;
  line-height: 1.45;
}
.status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #dde4ee;
  color: #667c97;
  background: #f6f8fb;
  white-space: nowrap;
  vertical-align: middle;
}
.status-badge.review {
  color: #896d37;
  background: #fff8e9;
  border-color: #f2e5c6;
}
.status-badge.approved {
  color: #39745f;
  background: #f0f8f4;
  border-color: #d7eadd;
}
.status-badge.issued {
  color: #2a5b8f;
  background: #eef4fb;
  border-color: #cfe0f2;
}
.save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 6px;
}
.save-row small {
  font-size: 10px;
  color: var(--muted);
}
.empty {
  padding: 65px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e2;
  border-radius: 12px;
}
.empty .ico {
  height: 35px;
  width: 35px;
  color: #8ea1b9;
  margin-bottom: 13px;
}
.empty h2 {
  font-size: 17px;
  color: var(--navy);
  margin: 0 0 7px;
}
.empty p {
  color: var(--muted);
  font-size: 12px;
  max-width: 390px;
  margin: 0 auto 20px;
}
.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  align-items: center;
}
.search-row input {
  max-width: 430px;
}
.count {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
}
.doc-list {
  display: grid;
  gap: 12px;
}
.doc-card {
  display: flex;
  align-items: center;
  gap: 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.doc-icon {
  width: 41px;
  height: 47px;
  display: grid;
  place-items: center;
  background: #edf3f9;
  color: var(--navy);
  border-radius: 7px;
}
.doc-info {
  flex: 1;
  min-width: 0;
}
.doc-info h3 {
  font-size: 14px;
  color: var(--navy);
  margin: 0 0 5px;
}
.doc-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.source-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 192px;
}
.source-card h3 {
  line-height: 1.5;
  font-size: 13px;
  margin-top: 14px;
}
.source-card .source-path {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}
.source-card .actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 24px;
  margin-bottom: 25px;
}
.tabs button {
  border: 0;
  background: none;
  padding: 11px 0 14px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: 600;
}
.logo-preview {
  border: 1px dashed #d0d9e5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 145px;
  margin: 15px 0;
  background: #fafbfc;
}
.logo-preview img {
  width: 200px;
  max-height: 100px;
  object-fit: contain;
}
.upload-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.upload-row input[type='file'] {
  padding: 7px;
  font-size: 11px;
}
.color-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  padding: 9px;
  border-radius: 7px;
}
.color-field input[type='color'] {
  width: 32px;
  height: 31px;
  min-height: 0;
  border: 0;
  padding: 0;
  background: none;
}
.color-field span {
  font-size: 12px;
  font-family: Consolas, monospace;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}
.settings-grid .card {
  margin-bottom: 20px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f5;
  font-size: 12px;
}
.detail-row span:first-child {
  color: var(--muted);
}
.detail-row span:last-child {
  text-align: right;
  max-width: 65%;
  overflow-wrap: anywhere;
}
.detail-row:last-child {
  border: 0;
}
.mini-stats {
  display: flex;
  gap: 25px;
  margin: 20px 0;
}
.mini-stats strong {
  font-size: 27px;
  font-weight: 500;
  color: var(--navy);
  display: block;
  line-height: 1.2;
}
.mini-stats small {
  font-size: 10px;
  color: var(--muted);
}
.history-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.65fr) minmax(340px, 1fr);
  gap: 24px;
}
.revision-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.revision-list button {
  border: 1px solid var(--border);
  background: white;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}
.revision-list button.active {
  border-color: #769ac4;
  color: var(--navy);
  background: #eaf1fa;
}
.event {
  border-left: 2px solid #dee7f1;
  padding: 0 0 15px 15px;
  font-size: 11px;
}
.event strong {
  display: block;
  font-weight: 500;
  color: var(--navy);
}
.event small {
  color: var(--muted);
  font-size: 10px;
}
.comment {
  background: #f6f8fb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  white-space: pre-wrap;
}
.comment small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.export-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.pdf-frame {
  width: 100%;
  height: 680px;
  border: 0;
  background: white;
}
.login {
  max-width: 410px;
  margin: 12vh auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}
.login h1 {
  font-size: 25px;
  color: var(--navy);
}
.login .field {
  margin-bottom: 18px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 25px;
  background: var(--navy-dark);
  color: white;
  border-radius: 9px;
  padding: 13px 20px;
  font-size: 12px;
  box-shadow: 0 4px 30px #1f345830;
  max-width: 480px;
  display: none;
  z-index: 30;
}
#toast.show {
  display: block;
}
#toast.error {
  background: #8f453e;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 80px #0003;
  padding: 26px;
  max-width: 820px;
  width: calc(100vw - 40px);
  color: var(--ink);
}
dialog::backdrop {
  background: #182c4566;
}
dialog h2 {
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.source-text {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.8;
  max-height: 58vh;
  overflow: auto;
  background: #f7f9fc;
  padding: 18px;
  border-radius: 8px;
}
.source-picker {
  max-height: 45vh;
  overflow: auto;
  margin-top: 14px;
}
.source-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 12px;
}
.source-option input {
  width: 16px;
  height: 16px;
  min-height: 0;
}
.source-option small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gap {
  margin-top: 17px;
}
.mobile-brand {
  display: none;
}
.helper-path {
  font-family: Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.success {
  color: #397963;
}
.hidden {
  display: none !important;
}
.paper-header,
.paper-footer {
  border-color: var(--paper-accent, var(--paper-primary));
}
.paper-tagline {
  font-size: 8pt;
  margin-top: 3mm;
}
.pdf-pages {
  height: 690px;
  overflow: auto;
  padding: 16px;
  text-align: center;
}
.pdf-pages canvas {
  display: block;
  margin: 0 auto 18px;
  background: #fff;
  box-shadow: 0 2px 8px #152b4817;
  max-width: 100%;
}
.pdf-page-label {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 9px;
}
@media (min-width: 1550px) {
  .preview-scroll .paper {
    zoom: 0.76;
  }
}
@font-face {
  font-family: Barlow;
  src: url('/fonts/Barlow-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/fonts/Barlow-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/fonts/Barlow-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/fonts/Barlow-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/SourceSans3-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/SourceSans3-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/SourceSans3-It.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/SourceSans3-BoldIt.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
.tabs {
  overflow: auto;
  white-space: nowrap;
}
.tabs button {
  flex-shrink: 0;
}
.template-summary {
  padding: 14px;
  background: #f5f8fc;
  border-radius: 8px;
}
.template-summary strong,
.template-summary span,
.template-summary small {
  display: block;
}
.template-summary span {
  font-size: 12px;
  margin-top: 4px;
}
.template-summary small {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.style-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
  padding: 2px;
}
.style-choice {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  padding: 10px;
  text-align: left;
  color: var(--navy);
  min-width: 0;
}
.style-choice.selected,
.logo-tile.selected {
  background: #edf4fc;
  border-color: #6489b5;
  box-shadow: 0 0 0 1px #6489b5;
}
.style-choice strong {
  font-size: 11px;
  display: block;
  font-weight: 600;
}
.style-choice span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.upload-area {
  background: #f7faff;
  border: 1px dashed #aabed8;
  border-radius: 9px;
  text-align: center;
  padding: 22px 12px;
  cursor: pointer;
}
.upload-area strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
}
.upload-area span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin: 7px 0 12px;
}
.upload-area input {
  font-size: 10px;
}
.logo-bank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.logo-tile {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  padding: 8px;
  color: var(--navy);
  min-width: 0;
}
.logo-tile strong,
.logo-tile small {
  display: block;
  padding: 0 4px;
  overflow-wrap: anywhere;
}
.logo-tile strong {
  font-size: 11px;
  margin-top: 9px;
}
.logo-tile small {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0;
}
.logo-art {
  height: 122px;
  background: #f8f9fb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}
.logo-art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-art.dark {
  background: #172c47;
}
.logo-art small {
  position: absolute;
  bottom: 3px;
  font-size: 9px;
  color: #738097;
}
.logo-art.dark small {
  color: #bbc9da;
}
.logo-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.paper-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8pt 0 12pt;
}
.paper-table td,
.paper-table th {
  border: 1px solid #cbd5e0;
  padding: 5pt !important;
  vertical-align: top;
}
.paper-table th {
  background: #dce6f2;
}
.paper .selected-style {
  outline: 1.2pt dashed #b19660;
  outline-offset: 3pt;
}
.brand-layout .preview-panel {
  top: 15px;
}
details summary {
  font-size: 11px;
  cursor: pointer;
  color: var(--navy);
}
@media (max-width: 1180px) {
  .sidebar {
    width: 205px;
    padding: 25px 14px;
  }
  .shell {
    grid-template-columns: 205px 1fr;
  }
  .workspace {
    padding: 28px 25px;
  }
  .topbar,
  .subnav {
    padding: 0 25px;
  }
  .editor-layout,
  .brand-layout {
    grid-template-columns: minmax(300px, 1fr) minmax(295px, 0.9fr);
    gap: 17px;
  }
  .card {
    padding: 18px;
  }
  .preview-scroll {
    padding: 20px 9px;
    height: 670px;
  }
  .preview-scroll .paper {
    zoom: 0.5;
  }
  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .type-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .type {
    font-size: 10px;
  }
  .type .ico {
    height: 16px;
    width: 16px;
  }
  .tabs {
    gap: 20px;
  }
}
@media (max-width: 900px) {
  .editor-layout,
  .brand-layout,
  .history-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
  }
  .preview-scroll {
    height: 600px;
  }
  .preview-scroll .paper {
    zoom: 0.64;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .page-header {
    flex-wrap: wrap;
  }
  .doc-meta {
    flex-wrap: wrap;
    justify-content: end;
  }
  .type-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 600px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: auto;
    padding: 16px 15px 8px;
  }
  .wordmark {
    font-size: 19px;
  }
  .side-sub,
  .side-bottom,
  .nav-group {
    display: none;
  }
  .nav {
    display: flex;
    gap: 4px;
    margin-top: 13px;
    overflow: auto;
  }
  .nav button {
    white-space: nowrap;
    width: auto;
    gap: 6px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .nav button .ico {
    width: 14px;
    height: 14px;
  }
  .nav button.active {
    box-shadow: inset 0 -2px #c5ac78;
  }
  .topbar {
    height: 48px;
    padding: 0 18px;
  }
  .subnav {
    padding: 0 8px;
  }
  .top-tools {
    gap: 8px;
  }
  .version {
    display: none;
  }
  .workspace {
    padding: 23px 16px 45px;
  }
  .page-header h1 {
    font-size: 24px;
  }
  .page-header p {
    font-size: 12px;
  }
  .header-actions {
    width: 100%;
  }
  .library-grid {
    grid-template-columns: 1fr;
  }
  .fields {
    gap: 15px 12px;
  }
  .preview-scroll .paper {
    zoom: 0.4;
  }
  .preview-scroll {
    height: 500px;
    padding: 16px 6px;
  }
  .card {
    padding: 17px;
  }
  .doc-card {
    padding: 15px;
    flex-wrap: wrap;
  }
  .doc-meta {
    width: 100%;
    justify-content: start;
    margin-left: 57px;
  }
  .tabs {
    gap: 18px;
  }
  .tabs button {
    font-size: 11px;
  }
  .ai-footer {
    flex-wrap: wrap;
  }
  .search-row {
    flex-wrap: wrap;
  }
  .count {
    margin-left: 0;
  }
  .type {
    min-height: 65px;
  }
  .type-grid {
    gap: 6px;
  }
  .type .ico {
    margin-bottom: 6px;
  }
  .pdf-frame {
    height: 540px;
  }
  #toast {
    right: 15px;
    left: 15px;
    bottom: 15px;
  }
  .paper h2 {
    overflow-wrap: anywhere;
  }
}
/* Marketing: composition workspace, independently versioned from documents. */
.m-preview-dialog {
  border: 1px solid #dce3e9;
  border-radius: 16px;
  padding: 22px;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  color: var(--ink);
  background: white;
}
.m-preview-dialog::backdrop {
  background: #15253788;
}
.m-preview-dialog .m-preview-area {
  margin-bottom: 16px;
}
.marketing-tabs {
  margin-bottom: 24px;
}
.m-work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 24px;
  align-items: start;
}
.m-right {
  min-width: 0;
}
.m-preview {
  position: relative;
}
.m-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.m-preview-top span {
  color: var(--muted);
}
.m-preview-area {
  display: flex;
  justify-content: center;
  padding: 22px 4px;
  background: #f1f3f5;
  margin-top: 16px;
  border-radius: 10px;
}
.m-artboard {
  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: 430px;
  max-height: 610px;
  overflow: hidden;
  box-shadow: 0 6px 22px #10203018;
}
.m-artboard:has(.m-safe) {
  max-width: 310px;
}
.m-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.m-logo {
  position: absolute;
  line-height: 0;
  z-index: 2;
}
.m-logo img {
  width: 100%;
  height: auto;
}
.m-safe {
  position: absolute;
  left: 0;
  right: 0;
  background: #24374930;
  border: 1px dashed #526478;
  color: white;
  font: 11px Arial;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}
.m-safe.top {
  top: 0;
  height: 14%;
}
.m-safe.bottom {
  bottom: 0;
  height: 20%;
}
.m-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  color: #586779;
  gap: 12px;
}
.m-empty span {
  font-size: 20px;
  max-width: 240px;
  line-height: 1.4;
}
.m-empty small {
  font-size: 12px;
  max-width: 200px;
}
.m-generate-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.m-approval {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.m-job,
.m-memory-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--line, #e4e8ec);
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 8px;
}
.m-job small,
.m-memory-entry small {
  font-size: 11px;
  color: var(--muted);
}
.m-job p {
  font-size: 12px;
  margin: 0;
}
.m-assets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.m-assets img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  background: #f0f3f5;
}
.m-assets small {
  display: block;
  font-size: 10px;
  margin: 6px 0;
}
.m-campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.m-campaign-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 8px;
  border: 1px solid #e3e8ed;
  background: white;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink);
}
.m-campaign-card:hover {
  border-color: var(--accent);
}
.m-campaign-card img,
.m-card-placeholder {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f0f3f5;
  border-radius: 8px;
}
.m-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a7888;
}
.m-campaign-card span,
.m-campaign-card small {
  font-size: 12px;
  color: var(--muted);
}
#m-sourceIds {
  width: 100%;
}
.m-memory-entry > div {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.m-memory-entry p {
  margin: 0;
  white-space: pre-wrap;
}
.m-right .row {
  flex-wrap: wrap;
}
@media (max-width: 1100px) {
  .m-work-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .m-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .m-right .card {
    margin-bottom: 0;
  }
}
@media (max-width: 650px) {
  .m-right {
    display: block;
  }
  .m-right .card {
    margin-bottom: 20px;
  }
  .m-preview-top {
    flex-direction: column;
  }
  .m-generate-actions .btn {
    width: 100%;
  }
}
/* Relevamiento and creative memory share the application's brand and spacing. */
.review-list {
  display: grid;
  gap: 16px;
}
.review-list .card {
  margin-bottom: 0;
}
.review-filters {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
}
.review-finding {
  border-top: 1px solid var(--border, #dbe2eb);
  padding: 20px 0;
}
.review-finding h3 {
  margin: 12px 0 8px;
}
.review-finding p {
  line-height: 1.6;
}
.review-finding details {
  margin-top: 12px;
}
.review-finding summary,
.roadmap-grid summary,
.review-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
}
.review-finding .helper-path {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.capability-grid,
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.capability-grid > div,
.roadmap-grid > div {
  border-top: 1px solid var(--border, #dbe2eb);
  padding-top: 14px;
}
.capability-grid strong {
  display: block;
  margin-bottom: 8px;
}
.memory-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-list .helper-path {
  overflow-wrap: anywhere;
}
#creative-artifact {
  max-width: 100%;
}
.review-list p {
  line-height: 1.6;
}
@media (max-width: 900px) {
  .review-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .review-filters,
  .capability-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
}

/* Local Inter, optical size 18: same files used by exports. */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Black.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-BlackItalic.ttf") format("truetype"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-ExtraBold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-ExtraBoldItalic.ttf") format("truetype"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-ExtraLight.ttf") format("truetype"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-ExtraLightItalic.ttf") format("truetype"); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-LightItalic.ttf") format("truetype"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-MediumItalic.ttf") format("truetype"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBoldItalic.ttf") format("truetype"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Thin.ttf") format("truetype"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-ThinItalic.ttf") format("truetype"); font-weight: 100; font-style: italic; font-display: swap; }
/* Búsqueda común en todos los desplegables, incluidos los formularios dinámicos. */
select:not([multiple]){padding-right:44px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23576b80' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='4.2'/%3E%3Cpath d='m10 10 4 4'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 19px center!important}
.vbt-select-popup{position:fixed;inset:auto;margin:0;padding:10px;border:1px solid var(--border,#cbd4df);border-radius:7px;background:#fff;color:var(--ink,#233448);box-shadow:0 8px 28px #152b4933;font:400 14px var(--font-ui,Arial,sans-serif);overflow:hidden;box-sizing:border-box;z-index:2147483647;display:flex;flex-direction:column;gap:8px}
.vbt-select-popup:not(:popover-open){display:none}.vbt-select-heading{font-size:11px;font-weight:600;color:var(--muted,#64748b);padding:2px 3px;overflow-wrap:anywhere}
.vbt-select-popup>input{width:100%;min-height:42px;flex:0 0 auto;box-sizing:border-box;border:1px solid var(--accent,#245689);border-radius:4px;padding:10px 12px;font:inherit;background:#fff;color:inherit}
.vbt-select-options{overflow-y:auto;min-height:0;overscroll-behavior:contain}.vbt-select-options>button{display:block;text-align:left;white-space:normal;overflow-wrap:anywhere;width:100%;padding:11px 12px;border:0;border-radius:3px;background:#fff;color:inherit;font:inherit;cursor:pointer}
.vbt-select-options>button:hover,.vbt-select-options>button.active{background:#edf3f8}.vbt-select-options>button[aria-selected=true]{font-weight:700;color:var(--accent,#245689)}.vbt-select-options>button:disabled{opacity:.45;cursor:default}.vbt-select-options small{display:block;font-size:11px;font-weight:400;color:var(--muted,#64748b);margin-top:4px}
.vbt-select-status{flex:0 0 auto;font-size:11px;color:var(--muted,#64748b);margin:0;padding:2px 3px;line-height:1.5}
