/* PapelRojo — Estilos originales, sin frameworks ni compilación. */
:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #22283b;
  background: #f5f6fa;
  font-synthesis: none;
  --accent: #ed5853;
  --accent-dark: #d9423e;
  --ink: #22283b;
  --muted: #8c93a2;
  --line: #e8ebf1;
  --surface: #fff;
  --soft: #f7f8fb;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button,input,textarea,select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .38; cursor: not-allowed; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #f8b1ae; outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
svg { display: block; width: 19px; height: 19px; flex-shrink: 0; }
.app { height: 100dvh; min-height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 75px; min-height: 75px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 23px; gap: 22px; z-index: 15; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 227px; }
.brand-mark { width: 39px; height: 39px; background: var(--accent); border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-8deg); box-shadow: 0 7px 15px #ed58532c; }
.brand-mark span { width: 5px; height: 20px; border-radius: 4px; background: #fff; transform: rotate(18deg); }
.brand-mark span:nth-child(2) { height: 13px; transform: rotate(-15deg); opacity: .8; }
.brand-text { font-size: 20px; font-weight: 810; letter-spacing: -.8px; line-height: 1.01; }
.brand-text > span { color: var(--accent); }
.brand-text small { display: block; margin-top: 4px; font-size: 9px; font-weight: 700; letter-spacing: 2px; color: #969ba8; text-transform: uppercase; }
.doc-name { flex: 1; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #73798a; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.save-state { font-size: 11px; font-weight: 600; color: #949ba7; margin-right: 7px; }
.top-divider { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent; font-size: 12px; font-weight: 720; white-space: nowrap; transition: .15s background,.15s transform,.15s border-color; }
.btn:not(:disabled):active, .mini-btn:not(:disabled):active { transform: scale(.97); }
.btn svg { height: 16px; width: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 10px #ed585327; }
.btn-primary:not(:disabled):hover { background: var(--accent-dark); }
.btn-secondary { background: #fff; border-color: #e5e8ef; color: #414859; }
.btn-secondary:not(:disabled):hover { background: #f8f9fc; }
.btn-ghost { background: transparent; color: #5a6070; }
.btn-ghost:not(:disabled):hover { background: #f4f5f8; }
.btn-subtle { background: #f8f9fb; border-color: #e9ecf2; color: #555b6c; }
.btn-subtle:not(:disabled):hover { background: #eff1f6; }
.btn-xl { font-size: 14px; padding: 0 21px; min-height: 48px; border-radius: 12px; }
.icon-only { padding: 0; width: 36px; min-width: 36px; }
.main-layout { display: flex; flex: 1; min-height: 0; }
.tool-rail { width: 80px; min-width: 80px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 17px 8px 14px; gap: 6px; align-items: center; }
.rail-btn, .rail-link { width: 65px; height: 62px; display: flex; border: none; background: transparent; color: #6c7281; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border-radius: 12px; position: relative; }
.rail-btn:hover, .rail-link:hover { background: #f8f7f7; color: #35394a; }
.rail-btn.active { background: #fff0ef; color: var(--accent-dark); }
.rail-btn.active:before { content: ''; height: 25px; width: 3px; border-radius: 3px; position: absolute; left: -8px; top: 19px; background: var(--accent); }
.rail-btn small, .rail-link small { font-size: 10px; font-weight: 670; }
.rail-btn svg { width: 21px; height: 21px; }
.rail-link { color: #a1a4ae; }
.rail-spacer { flex: 1; }
.left-panel { width: 244px; min-width: 244px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.panel-top { padding: 25px 19px 18px; }
.eyebrow { font-size: 10px; font-weight: 760; color: #adb2bf; letter-spacing: 1.6px; }
.panel-top h2, .inspector-header h2 { font-size: 17px; font-weight: 780; letter-spacing: -.5px; margin: 9px 0 5px; }
.panel-top p, .inspector-header p { font-size: 11px; color: #979ca9; margin: 0; line-height: 1.6; }
.panel-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 0 13px; border-bottom: 1px solid var(--line); }
.panel-tab { background: none; border: none; border-bottom: 2px solid transparent; color: #979eab; padding: 13px 0; font-size: 12px; font-weight: 720; }
.panel-tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 17px 13px; }
.pages-list { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.page-card { width: 100%; padding: 10px; border: 1.5px solid #ebedf3; border-radius: 12px; background: #fff; text-align: left; transition: .18s; }
.page-card.active { background: #fffafa; border-color: #f3a49f; box-shadow: 0 4px 13px #f0555020; }
.page-preview { display: flex; justify-content: center; align-items: center; height: 122px; padding: 5px; background: #f5f6f9; border-radius: 7px; overflow: hidden; }
.page-preview img { object-fit: contain; max-height: 112px; max-width: 100%; box-shadow: 0 1px 7px #1017231a; }
.page-placeholder { height: 100px; width: 75px; background: white; border: 1px solid #eee; }
.page-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 11px; font-weight: 740; color: #626879; }
.page-card .page-dot { width: 6px; height: 6px; border-radius: 50%; background: #e9a09a; }
.page-controls { margin-top: 17px; }
.page-controls button { width: 100%; }
.sidebar-foot { padding: 12px 15px 19px; border-top: 1px solid var(--line); font-size: 10px; color: #a5abb7; display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.dot-online, .tag-dot { flex: none; width: 7px; height: 7px; background: #55bf91; border-radius: 50%; }
.layers-list { display: flex; flex-direction: column; gap: 8px; }
.layers-label { color: #a6acb8; font-weight: 720; font-size: 10px; letter-spacing: .9px; margin: 8px 4px; }
.layer-row { padding: 10px; border-radius: 9px; border: 1px solid #edf0f4; background: #fff; text-align: left; width: 100%; display: flex; gap: 8px; align-items: center; font-size: 11px; color: #626879; }
.layer-row svg { width: 16px; height: 16px; color: #9a9fab; }
.layer-row span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.layer-row.active { background: #fff2f1; border-color: #f4b8b6; color: #c44744; }
.workspace { background: #f5f6fa; flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.canvas-toolbar { height: 53px; flex-shrink: 0; background: #ffffffd9; border-bottom: 1px solid #edeff5; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; gap: 10px; }
.toolbar-left { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #838a99; font-weight: 570; }
.toolbar-icon { color: var(--accent); }
.toolbar-icon svg { width: 16px; height: 16px; }
.toggle-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 680; color: #737b8d; white-space: nowrap; cursor: pointer; }
.toggle-label input { accent-color: var(--accent); }
.workspace-scroll { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 35px 38px 64px; background-image: radial-gradient(#dfe2e9 0.65px, transparent 0.65px); background-size: 19px 19px; }
.welcome { width: min(100%, 660px); align-self: center; text-align: center; padding-bottom: 30px; }
.welcome-decoration { height: 164px; position: relative; display: flex; justify-content: center; align-items: center; }
.welcome-icon { position: relative; width: 114px; height: 126px; display: grid; place-items: center; background: #fff; border-radius: 21px; transform: rotate(-8deg); box-shadow: 0 14px 45px #4e576e19; border: 1px solid #edeff3; }
.welcome-icon svg { width: 61px; height: 61px; color: #ef7770; stroke-width: 1.25; }
.welcome-plus { position: absolute; right: -12px; bottom: 1px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #ed5853; color: #fff; font-size: 25px; box-shadow: 0 4px 12px #ed58534a; }
.floating-card { position: absolute; z-index: 1; display: flex; align-items: center; gap: 7px; background: white; padding: 10px 13px; border: 1px solid #eff0f3; border-radius: 12px; box-shadow: 0 9px 30px #55607620; font-size: 11px; font-weight: 700; color: #687080; }
.floating-card svg { width: 15px; height: 15px; color: #ea6660; }
.floating-one { left: 9%; top: 44px; transform: rotate(-7deg); }
.floating-two { right: 8%; bottom: 30px; transform: rotate(7deg); }
.welcome-tag { display: inline-flex; align-items: center; gap: 7px; color: #dd625a; background: #fff0ef; border: 1px solid #fbe2df; border-radius: 20px; padding: 7px 11px; font-size: 9px; font-weight: 810; letter-spacing: 1.4px; margin: 13px auto 10px; }
.welcome-tag .tag-dot { background: #ed5853; }
.welcome h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -1.9px; margin: 15px 0 11px; line-height: 1.15; }
.welcome > p { font-size: 14px; color: #9299a8; line-height: 1.85; max-width: 465px; margin: 0 auto 26px; }
.welcome-drop { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 13px auto 0; color: #a2a7b3; font-size: 11px; padding: 10px; border: 1.5px dashed transparent; border-radius: 9px; }
.welcome-drop.dragover { border-color: var(--accent); background: #ffefed; }
.welcome-drop svg { width: 14px; height: 14px; }
.welcome-points { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; color: #929ba9; font-size: 10px; }
.welcome-points span { display: inline-flex; align-items: center; gap: 5px; }
.welcome-points svg { width: 13px; height: 13px; color: #55b88b; }
.page-stage { flex: none; display: flex; align-items: flex-start; justify-content: center; margin: 0 auto; min-width: min-content; }
.page-wrap { position: relative; background: #fff; box-shadow: 0 9px 35px #2c344529, 0 1px 3px #2c34450f; border-radius: 2px; overflow: hidden; flex: none; }
#pdfCanvas { display: block; width: 100%; height: 100%; }
.overlay { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.source-hit { position: absolute; z-index: 3; cursor: text; border: 1px dashed transparent; border-radius: 2px; }
.show-zones .source-hit { border-color: #ea6c5f44; background: #f15d4907; }
.show-zones .source-hit:hover { background: #f15d4920; border-color: #ec7664a8; }
.source-hit.active { outline: 1px solid #e65e59; background: #ea51451d; border-color: #ea5145; }
.stage-object { position: absolute; z-index: 5; outline: 1px solid transparent; touch-action: none; cursor: move; }
.stage-object:hover { outline-color: #6d7cf489; }
.stage-object.selected { outline: 2px solid #706df0; outline-offset: 1px; z-index: 9; }
.object-text { display: block; white-space: pre-wrap; overflow: hidden; line-height: 1.17; word-break: break-word; user-select: none; padding: 0; }
.original-cover { position: absolute; z-index: 2; pointer-events: none; }
.object-image { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; }
.object-shape { width: 100%; height: 100%; }
.object-drawing { overflow: visible; width: 100%; height: 100%; pointer-events: none; }
.resize-handle { width: 10px; height: 10px; border: 2px solid white; border-radius: 3px; background: #706df0; box-shadow: 0 1px 6px #15152245; position: absolute; right: -6px; bottom: -6px; cursor: nwse-resize; }
.stage-inline-edit { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; outline: 1px solid #736df6; border: 0; background: #ffffffec; padding: 2px; z-index: 15; cursor: text; }
.draw-crosshair { cursor: crosshair; }
.bottom-toolbar { height: 51px; flex: none; display: flex; justify-content: space-between; align-items: center; background: #ffffffdf; border-top: 1px solid #edf0f4; padding: 0 24px; }
.bottom-group { display: flex; align-items: center; gap: 10px; }
.mini-btn { display: grid; place-items: center; border: 1px solid transparent; color: #697080; border-radius: 7px; width: 28px; height: 29px; background: transparent; }
.mini-btn:not(:disabled):hover { background: #f0f2f5; }
.mini-btn svg { width: 16px; height: 16px; }
.page-counter, .zoom-label { font-size: 11px; font-weight: 730; color: #6d7586; min-width: 49px; text-align: center; }
.inspector { width: 276px; min-width: 276px; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.inspector-header { padding: 26px 20px 19px; border-bottom: 1px solid var(--line); }
.inspector-header h2 { display: flex; align-items: center; justify-content: space-between; }
.inspector-header h2 svg { color: #b5bac6; }
.inspector-content { flex: 1; min-height: 0; overflow: auto; padding: 18px 19px; }
.inspector-empty { text-align: center; padding: 50px 6px; }
.inspector-empty-icon { width: 60px; height: 60px; background: #f8f8fb; border-radius: 19px; display: grid; place-items: center; color: #aaaeb8; margin: 0 auto 15px; }
.inspector-empty-icon svg { width: 29px; height: 29px; }
.inspector-empty h3 { font-size: 13px; margin-bottom: 6px; }
.inspector-empty p { font-size: 11px; line-height: 1.8; color: #9a9fac; }
.inspector-section { margin-bottom: 25px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.inspector-section:last-child { border: none; }
.inspector-title { font-size: 12px; font-weight: 780; margin: 0 0 16px; }
.field { margin-bottom: 13px; }
.field label { font-size: 11px; font-weight: 710; color: #767d8c; display: block; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #e5e9ef; background: #fbfcfd; border-radius: 8px; outline: none; color: #32394c; padding: 9px; font-size: 12px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #f5a09a; background: white; }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-field { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border: 1px solid #e5e9ef; border-radius: 8px; }
.color-field input[type=color] { border: none; width: 36px; padding: 0; height: 27px; background: transparent; }
.color-field span { font-size: 11px; font-weight: 650; color: #727a8c; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.inspector-actions .btn { flex: 1; }
.inspector-footnote { margin: 12px 0; line-height: 1.7; color: #9aa0ae; font-size: 10px; }
.inspector-footer { padding: 18px 20px; border-top: 1px solid var(--line); font-size: 10px; color: #a6abb7; }
.inspector-footer a { font-weight: 750; color: #e66c66; }
.empty-list { padding: 17px 8px; font-size: 11px; color: #a4aab7; text-align: center; line-height: 1.8; }
.toast-region { position: fixed; top: 84px; right: 21px; z-index: 100; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { max-width: 360px; padding: 12px 15px; border-radius: 10px; background: #303445; box-shadow: 0 10px 35px #171b3140; font-size: 12px; color: #fff; line-height: 1.5; animation: appear .2s ease-out; }
.toast.error { background: #b64142; }
@keyframes appear { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.modal-root { position: fixed; inset: 0; background: #1c25466f; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; width: min(92vw, 440px); padding: 23px; border-radius: 17px; box-shadow: 0 30px 80px #10152433; }
.modal h3 { margin-top: 0; font-size: 19px; }
.modal p { color: #7a8090; font-size: 12px; line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
@media (max-width: 1130px) { .brand { min-width: 173px; } .left-panel { width: 198px; min-width: 198px; } .inspector { width: 245px; min-width: 245px; } .save-state { display: none; } .canvas-toolbar { padding: 0 14px; } .workspace-scroll { padding: 22px 18px 55px; } }
@media (max-width: 850px) { .topbar { height: 63px; min-height: 63px; padding: 0 12px; gap: 10px; } .brand { min-width: 124px; } .brand-text { font-size: 16px; } .brand-mark { width: 34px; height: 34px; } .doc-name { display: none; } .desktop-label { display: none; } .top-actions .btn-secondary { padding: 0 11px; } .left-panel { width: 155px; min-width: 155px; } .panel-top { padding: 20px 11px 14px; } .inspector { width: 218px; min-width: 218px; } .tool-rail { width: 62px; min-width: 62px; padding-left: 4px; padding-right: 4px; } .rail-btn, .rail-link { width: 52px; } .rail-btn small, .rail-link small { font-size: 9px; } .toolbar-right { display: none; } .workspace-scroll { padding: 18px 13px 40px; } }
@media (max-width: 640px) { .app { height: 100dvh; min-height: 430px; } .brand { min-width: 112px; } .top-actions { gap: 3px; } .top-actions .icon-only, .top-divider { display: none; } .topbar .btn-primary { padding: 0 10px; } .topbar .btn-primary span:last-child { display: none; } .left-panel { display: none; } .inspector { position: fixed; z-index: 20; bottom: 49px; right: 0; height: min(44vh, 320px); width: 100%; min-width: 0; border-top: 1px solid #e9ebf0; box-shadow: 0 -7px 25px #1b223019; } .inspector-header { padding: 10px 15px; } .inspector-header h2 { margin: 2px 0; font-size: 14px; } .inspector-header .eyebrow, .inspector-header p, .inspector-footer { display: none; } .inspector-content { padding: 9px 14px; } .inspector-empty { padding: 3px; } .inspector-empty-icon { display: none; } .inspector-empty p { margin: 5px 0; } .inspector-section { margin-bottom: 12px; padding-bottom: 12px; } .inspector-section:first-child { display: block; } .tool-rail { width: 53px; min-width: 53px; gap: 3px; padding-top: 9px; } .rail-btn, .rail-link { width: 44px; height: 47px; gap: 2px; } .rail-btn small, .rail-link small { font-size: 7px; } .rail-btn svg { width: 19px; height: 19px; } .rail-link { display: none; } .workspace { padding-bottom: min(44vh, 320px); } .canvas-toolbar { height: 35px; font-size: 9px; } .toolbar-left { font-size: 9px; } .workspace-scroll { padding: 10px; } .bottom-toolbar { height: 45px; padding: 0 9px; } .welcome { padding: 15px 0; } .welcome-decoration { height: 100px; } .welcome-icon { transform: scale(.68) rotate(-8deg); } .floating-card { display: none; } .welcome h1 { font-size: 27px; } .welcome p { font-size: 11px; } .welcome-points { display: none; } }
