:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #22243e;
  background: #f6f7fc;
  --ink: #22243e;
  --muted: #5a627b;
  --border: #e3e5ef;
  --purple: #5535c8;
  --purple-dark: #4224a6;
  --purple-light: #eeebfe;
  --sidebar: #1c1935;
  --shadow: 0 3px 9px #2b25510b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
:focus-visible { outline: 3px solid #8b71ff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.16; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -.052em; font-weight: 750; }
h2 { font-size: 1.25rem; letter-spacing: -.035em; }
h3 { font-size: 1rem; }
p { line-height: 1.55; }
small { font-size: .875rem; }
.muted { color: var(--muted); }
.icon { width: 1.25rem; height: 1.25rem; display: block; flex: none; }
.skip { position: fixed; z-index: 2; top: .5rem; left: .5rem; background: white; padding: .75rem; transform: translateY(-150%); }
.skip:focus { transform: none; }

.authenticated { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); color: #f5f2ff; padding: 1.65rem 1rem 1.15rem; }
.brand { display: inline-flex; gap: .75rem; align-items: center; font-weight: 750; font-size: 1.18rem; letter-spacing: -.03em; white-space: nowrap; }
.sidebar .brand { margin: 0 .55rem 2.35rem; }
.brand-mark { width: 2.42rem; height: 2.42rem; background: #6b49e6; border-radius: .62rem; color: white; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0 #ffffff36; }
.brand-mark .icon { width: 1.35rem; height: 1.35rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav a { display: flex; gap: .75rem; align-items: center; border-radius: .58rem; color: #d0cee1; padding: .76rem .83rem; font-size: .94rem; font-weight: 600; }
.sidebar nav a:hover, .sidebar nav a.active { color: white; background: #ffffff15; }
.sidebar nav a.active { box-shadow: inset 3px 0 #9b80fd; }
.sidebar nav a.active svg { color: #c5b4ff; }
.sidebar-footer { border-top: 1px solid #ffffff1f; margin-top: auto; padding: .86rem .25rem 0; display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.identity { display: flex; align-items: center; gap: .57rem; min-width: 0; }
.identity-name { min-width: 0; }
.identity-name strong, .identity-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-name strong { font-size: .87rem; }
.identity-name small { color: #c4bfd9; font-size: .81rem; margin-top: .15rem; }
.avatar { width: 2.15rem; height: 2.15rem; background: #eae4fb; color: #5638b7; display: grid; place-items: center; border-radius: 50%; flex: none; font-weight: 720; font-size: .92rem; }
.logout, .icon-button { display: grid; place-items: center; background: transparent; color: inherit; border: 0; border-radius: .4rem; width: 2rem; height: 2rem; padding: 0; flex: none; }
.logout:hover { background: #ffffff1b; color: white; }
.icon-button:hover:not(:disabled) { background: var(--purple-light); color: var(--purple-dark); }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; gap: .65rem; min-height: 4.25rem; background: white; border-bottom: 1px solid var(--border); color: var(--muted); padding: .8rem clamp(1.15rem, 3.45vw, 3.5rem); font-size: .9rem; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: .48rem; }
.topbar .icon { width: 1.04rem; height: 1.04rem; }
.topbar .crumb { color: #797d93; }
.topbar .current { color: var(--ink); font-weight: 650; }
.topbar a:hover { color: var(--purple); }
.main { max-width: 1510px; margin-inline: auto; padding: clamp(1.4rem, 3.4vw, 3.5rem) clamp(1.15rem, 3.45vw, 3.5rem) 4rem; }
.guest-header { background: white; border-bottom: 1px solid var(--border); padding: .8rem clamp(1.15rem, 3.45vw, 3.5rem); }
.guest-main { max-width: 1220px; }
.guest-main > .empty { max-width: 42rem; margin: 2rem auto; }
.heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; align-items: center; margin-bottom: 1.8rem; }
.heading > div:first-child { min-width: 0; }
.heading p { color: var(--muted); margin-top: .55rem; overflow-wrap: anywhere; }
.dashboard-heading { background: linear-gradient(110deg, #f0ebff, #faf8ff 66%, #e8e2ff); border: 1px solid #ded4fb; border-radius: 1rem; padding: clamp(1.15rem, 3vw, 2rem); margin-bottom: 1.2rem; }
.dashboard-heading h1 { color: #30204d; }
.dashboard-heading p { color: #57506c; }

.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: .5rem; padding: .68rem 1.02rem; min-height: 2.72rem; border: 1px solid transparent; border-radius: .56rem; font-size: .93rem; font-weight: 680; line-height: 1.3; }
.button .icon { width: 1.1rem; height: 1.1rem; }
.primary { color: white; background: var(--purple); box-shadow: 0 2px 3px #4425a325; }
.primary:hover:not(:disabled) { background: var(--purple-dark); }
.secondary { color: #433189; background: white; border-color: #dcd7f2; }
.secondary:hover:not(:disabled) { background: var(--purple-light); border-color: #b6a9e8; }
.actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .65rem; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; margin-bottom: 1.55rem; }
.stat, .panel { background: white; border: 1px solid var(--border); border-radius: .85rem; box-shadow: var(--shadow); min-width: 0; }
.stat { padding: 1.17rem; display: flex; gap: .85rem; align-items: center; }
.stat:hover { border-color: #b9a9f0; }
.stat[aria-current] { border-color: #ab97eb; box-shadow: 0 0 0 1px #ab97eb; }
.stat-icon, .empty-icon, .file-icon { display: grid; place-items: center; flex: none; border-radius: .64rem; width: 2.65rem; height: 2.65rem; }
.stat-icon.purple, .empty-icon, .file-icon { background: var(--purple-light); color: var(--purple); }
.stat-icon.amber { background: #fff2de; color: #91570c; }
.stat-icon.green { background: #e3f5ed; color: #166749; }
.stat-label { display: block; color: var(--muted); font-weight: 600; font-size: .875rem; }
.stat strong { display: block; font-size: 1.67rem; letter-spacing: -.05em; margin-top: .14rem; }
.collection { overflow: hidden; }
.collection-header { padding: 0 1.1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .45rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 1.18rem; }
.tabs a { white-space: nowrap; color: var(--muted); padding: 1rem .1rem .89rem; border-bottom: 3px solid transparent; font-size: .89rem; font-weight: 640; }
.tabs a[aria-current], .tabs a:hover { color: var(--purple); }
.tabs a[aria-current] { border-color: var(--purple); }
.search { display: flex; align-items: center; padding-inline: .55rem; gap: .3rem; margin-block: .42rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--muted); }
.search .icon { width: 1rem; height: 1rem; }
.search input { border: none; width: 9.5rem; min-width: 0; padding-inline: .3rem; background: transparent; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { text-transform: uppercase; letter-spacing: .045em; font-size: .81rem; font-weight: 690; color: var(--muted); background: #fafaff; }
td, th { padding: .87rem 1.1rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
td time, .progress-label { color: var(--muted); white-space: nowrap; font-size: .9rem; }
.table-action { min-height: 2.25rem; padding: .36rem .72rem; }
.row-progress, .request-progress { display: grid; gap: .36rem; }
progress { width: 100%; min-width: 4.25rem; height: .45rem; appearance: none; border: 0; border-radius: 1rem; overflow: hidden; background: #ece8f8; accent-color: var(--purple); }
progress::-webkit-progress-bar { background: #ece8f8; }
progress::-webkit-progress-value { background: var(--purple); border-radius: 1rem; }
progress::-moz-progress-bar { background: var(--purple); border-radius: 1rem; }
.document-link { display: flex; align-items: center; gap: .65rem; min-width: 9rem; }
.document-link strong { font-size: .95rem; display: block; overflow-wrap: anywhere; }
a.document-link:hover strong { color: var(--purple); }
.document-link small { color: var(--muted); display: block; margin-top: .19rem; overflow-wrap: anywhere; }
.file-icon { width: 2.25rem; height: 2.25rem; }
.status { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 1rem; padding: .28rem .59rem; font-size: .82rem; font-weight: 670; line-height: 1.2; }
.status.borrador { color: #4d5570; background: #eeeff5; }
.status.enviado { color: #84510d; background: #fff1db; }
.status.completado { color: #166247; background: #e2f6eb; }
.empty { display: grid; justify-items: center; gap: .63rem; text-align: center; padding: 3.25rem 1.15rem; }
.empty .empty-icon { width: 3.2rem; height: 3.2rem; margin-bottom: .4rem; }
.empty .empty-icon .icon { width: 1.52rem; height: 1.52rem; }
.empty p { color: var(--muted); max-width: 34rem; }
.empty .button { margin-top: .5rem; }
.no-results { padding: 1rem; }

.padded { padding: 1.22rem; }
.form-panel { max-width: 42rem; }
.form-stack { display: grid; gap: .94rem; }
h2 + .form-stack, p + .form-stack { margin-top: 1rem; }
.form-stack > label:not(.check-label) { display: grid; align-content: start; gap: .34rem; font-weight: 640; font-size: .92rem; }
input:not([type="checkbox"], [type="file"]), select, textarea { max-width: 100%; min-width: 0; color: var(--ink); font-size: 1rem; min-height: 2.52rem; padding: .48rem .63rem; border-radius: .45rem; border: 1px solid #d8dbea; background: white; }
.search input { border: none !important; background: transparent !important; font-size: .875rem !important; min-height: 2rem !important; }
input::placeholder, textarea::placeholder { color: #6a7088; }
select { appearance: none; padding-right: 1.9rem; background: linear-gradient(45deg, transparent 50%, #5d627a 50%) calc(100% - 16px) 53% / 5px 5px no-repeat, linear-gradient(135deg, #5d627a 50%, transparent 50%) calc(100% - 11px) 53% / 5px 5px no-repeat, white; }
textarea { width: 100%; resize: vertical; }
label small { font-weight: 400; color: var(--muted); line-height: 1.4; }
.file-picker { position: relative; border: 1.5px dashed #c7b9f1; background: #faf8ff; border-radius: .7rem; padding: 1.55rem 1rem; justify-items: center; text-align: center; cursor: pointer; }
.file-picker:hover, .file-picker:focus-within, .file-picker.file-dragging { border-color: var(--purple); background: #f2edff; }
.file-picker.file-selected { border-style: solid; }
.upload-form .notice { margin-bottom: 0; }
.file-picker input { position: absolute; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.file-picker strong { color: #4d33a4; word-break: break-word; }
.file-picker .muted { font-weight: 400; }
.team-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: .55rem; }
.notice { border: 1px solid #dfdeec; border-radius: .55rem; background: white; padding: .74rem .89rem; margin-bottom: 1rem; font-size: .94rem; overflow-wrap: anywhere; }
.notice.error { background: #fff2f1; color: #8d2f26; border-color: #f0cbc8; }
.notice.success { background: #effaf4; color: #175d45; border-color: #cae9d9; }
.prior-signatures { display: flex; align-items: center; gap: .5rem; }
.notice.inline { margin: .9rem 0 0; }

.document-heading .status { margin-bottom: .52rem; }
.document-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 350px); gap: 1rem; align-items: start; }
.document-workspace[data-mode="respond"] { grid-template-columns: minmax(0, 1fr); }
.document-workspace[data-mode="respond"] > * { width: 100%; max-width: 58rem; justify-self: center; }
.viewer { overflow: hidden; }
.mobile-edit-link { display: none; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: .62rem .85rem; gap: .4rem; font-size: .88rem; }
.viewer-bar > span, .pagination { display: flex; align-items: center; gap: .42rem; }
.viewer-bar { flex-wrap: wrap; }
.pagination { white-space: nowrap; color: var(--muted); }
.zoom-page { min-height: 2rem; padding: .3rem .58rem; font-size: .82rem; }
.sheet-instructions { padding: 0 .85rem .7rem; color: var(--muted); font-size: .9rem; }
.preview { background: #e8eaf4; padding: clamp(.65rem, 2vw, 1.28rem); overflow: auto; }
.placement-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; background: #f1ecff; border-block: 1px solid #ddd2fd; color: #42248e; padding: .55rem .85rem; font-size: .88rem; }
.placement-bar span { flex: 1 1 100%; }
.placement-bar .button { min-height: 2rem; padding: .3rem .65rem; font-size: .86rem; }
.placement-bar .text-button { padding: .48rem .4rem; }
.paper { width: fit-content; max-width: 100%; position: relative; margin-inline: auto; box-shadow: 0 3px 12px #2d315d25; background: white; }
.paper img { display: block; width: auto; max-width: 100%; max-height: 900px; height: auto; }
.paper.paper-expanded { width: max(115%, 700px); max-width: none; }
.paper-expanded img { width: 100%; max-height: none; }
.field-layer { position: absolute; inset: 0; pointer-events: none; }
.field-layer.placing { pointer-events: auto; cursor: crosshair; touch-action: none; outline: 2px solid #8c69ec; }
.field-mark { position: absolute; border: 1.5px solid #6644c9; border-radius: .23rem; background: #ece3ffbe; color: #44249d; display: grid; place-items: center; overflow: hidden; white-space: nowrap; font-size: .82rem; font-weight: 670; }
.field-mark span { max-width: 100%; padding-inline: .13rem; overflow: hidden; text-overflow: ellipsis; }
.field-mark.check { border-color: #197c66; color: #126557; background: #d0f4e7d1; }
.field-mark.texto { border-color: #3067ad; color: #244a7d; background: #deecffdc; }
.field-mark[style*="--recipient-hue"] {
  border-color: hsl(var(--recipient-hue) 58% 42%);
  color: hsl(var(--recipient-hue) 68% 24%);
  background: hsl(var(--recipient-hue) 79% 92% / .9);
}
.field-mark.dragging { border-style: dashed; }
.document-controls > p.muted { margin-top: .45rem; font-size: .93rem; }
.recipient-control { display: grid; gap: .38rem; padding: .7rem; background: #f7f5fe; border: 1px solid #e6dffc; border-radius: .6rem; }
.recipient-control > label { font-size: .92rem; font-weight: 640; }
.recipient-control > small { overflow-wrap: anywhere; }
.recipient-control .button { justify-self: start; min-height: 2.25rem; padding: .4rem .6rem; }
.signing-flow { margin-top: 1rem; }
.signing-flow > .button { margin-top: .6rem; }
.recipient-dot {
  display: grid; place-items: center; flex: none;
  width: 1.65rem; height: 1.65rem; border-radius: 50%;
  color: hsl(var(--recipient-hue, 264) 68% 24%);
  background: hsl(var(--recipient-hue, 264) 79% 90%);
  font-weight: 700; font-size: .83rem;
}
.signer-info, #fields-list .entry-link, #send-recipients li > :nth-child(2) { flex: 1; min-width: 0; }
.signer-actions { display: flex; gap: .08rem; }
.signer-actions .icon-button { width: 1.55rem; height: 1.7rem; }
.signer-actions .icon-button:disabled { opacity: .27; }
#fields-list .recipient-dot { width: .65rem; height: .65rem; }
#recipient-dialog details { margin: .9rem 0; padding: .65rem; border: 1px solid var(--border); border-radius: .5rem; }
#recipient-dialog summary, #no-saved-clients a { color: var(--purple-dark); cursor: pointer; }
#no-saved-clients a { text-decoration: underline; }
.field-empty { font-size: .88rem; padding-top: .46rem; }
.request-progress { margin-block: .75rem .6rem; color: var(--muted); font-size: .9rem; }
.request-progress progress { height: .55rem; }
.people-list .document-link { min-width: 0; }
.section-rule { height: 1px; background: var(--border); margin-block: 1.08rem; }
.field-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .32rem; }
.type-button { border: 1px solid var(--border); border-radius: .45rem; background: white; color: var(--ink); min-height: 3.5rem; display: grid; justify-items: center; align-content: center; gap: .2rem; font-size: .875rem; padding: .33rem .1rem; }
.type-button[aria-pressed="true"] { border-color: #ae99f4; background: var(--purple-light); color: var(--purple-dark); font-weight: 660; }
.check-label { display: flex; align-items: start; gap: .53rem; font-size: .91rem; line-height: 1.4; color: var(--ink); }
.check-label input { accent-color: var(--purple); margin: .15rem 0 0; flex: none; width: 1rem; height: 1rem; }
.entries { margin: .2rem 0 0; padding: 0; list-style-type: none; }
.entries > li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-bottom: 1px solid var(--border); padding: .53rem 0; }
.entries li strong, .entries li small { display: block; overflow-wrap: anywhere; }
.entries li strong { font-size: .9rem; }
.entries li small { color: var(--muted); margin-top: .17rem; font-size: .82rem; }
.entry-link { color: inherit; text-align: left; border: 0; padding: .1rem 0; background: transparent; }
.entry-link:hover { color: var(--purple); }
.remove { color: #686987; font-size: 1.22rem; }
.count { color: var(--purple-dark); background: var(--purple-light); border-radius: 1rem; min-width: 1.5rem; text-align: center; font-size: .82rem; padding: .14rem .35rem; }
.final-actions { margin-top: .95rem; gap: .55rem; }
.inline-field {
  position: absolute;
  container-type: size;
  display: grid;
  place-items: center;
  pointer-events: auto;
  border: 1px solid #7257c8;
  border-radius: .2rem;
  background: #f3eeffdd;
  color: #233b70;
}
.inline-field:focus-within { outline: 2px solid #5b37c8; outline-offset: 1px; z-index: 1; }
.inline-field:has([aria-invalid="true"]) { outline: 2px solid #b73e34; outline-offset: 1px; }
.inline-field.check { border-color: #197c66; background: #e6f9f2ee; cursor: pointer; }
.inline-field.check input { margin: 0; width: min(72cqw, 72cqh); height: min(72cqw, 72cqh); accent-color: #126557; cursor: pointer; }
.inline-field.texto { border-color: #3067ad; background: #ecf4ffeb; }
.inline-field textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: .06rem .2rem;
  resize: none;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #233b70;
  line-height: 1.15;
  font-size: clamp(.64rem, 54cqh, .96rem);
}
.inline-field textarea:focus-visible, .signature-open:focus-visible { outline: none; }
.signature-open { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; }
.signature-open:hover { background: #ece3ff; }
.signature-thumbnail { display: block; width: min(94cqw, 264cqh); height: auto; pointer-events: none; }
.signature-caption { position: absolute; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; font-size: clamp(.63rem, 43cqh, .87rem); }
.response-actions .actions { margin-top: .02rem; }
.text-button { color: var(--purple-dark); background: transparent; border: none; padding: .18rem 0; justify-self: start; font-size: .86rem; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.consent { padding: .65rem; border-radius: .45rem; background: var(--purple-light); }
dialog { width: min(29rem, calc(100% - 2rem)); border: 1px solid var(--border); border-radius: .85rem; padding: 1.3rem; color: var(--ink); }
dialog::backdrop { background: #1c193597; }
dialog p { margin: .55rem 0 1.1rem; }
.signature-dialog { width: min(50rem, calc(100% - 1rem)); padding: clamp(.85rem, 3vw, 1.45rem); max-height: calc(100% - 1rem); }
.signature-dialog p { color: var(--muted); }
#signature-surface {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .55rem;
  outline: 1px solid #b9a6ea;
  background: linear-gradient(#d9cdeb, #d9cdeb) 50% 77% / 86% 1px no-repeat, #fbfaff;
  cursor: crosshair;
  touch-action: none;
}
.signature-dialog-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
.signature-dialog-actions .actions { margin-left: auto; }
.send-recipients { max-height: 36vh; overflow-y: auto; margin-bottom: 1rem; }
#recipient-form .notice { margin: 0; }

.anonymous { min-height: 100vh; display: grid; place-items: center; padding: 1.3rem; background: radial-gradient(ellipse at 25% 10%, #eee9ff, #f7f7fc 49%, #f4f2ff); }
.public-main { width: min(100%, 52rem); }
.login-layout { min-height: 29rem; display: grid; grid-template-columns: 1fr .88fr; overflow: hidden; background: white; border: 1px solid #e5e0f3; border-radius: 1.1rem; box-shadow: 0 14px 50px #38247718; }
.login-card { padding: clamp(1.4rem, 4vw, 2.65rem); }
.login-card .brand { margin-bottom: 2.25rem; }
.login-card h1 { font-size: clamp(1.7rem, 4vw, 2.45rem); }
.login-card p { margin: .65rem 0 1.15rem; }
.login-card .button { margin-top: .3rem; }
.login-art { display: grid; place-items: center; overflow: hidden; position: relative; min-height: 16rem; background: radial-gradient(circle at 60% 39%, #7855e8, #482bb0 72%, #3d2691); }
.login-art::before, .login-art::after { content: ""; border: 1px solid #ffffff2e; border-radius: 50%; width: 20rem; height: 20rem; position: absolute; }
.login-art::after { width: 25rem; height: 25rem; }
.art-sheet { background: #fbfaff; width: min(50%, 9.6rem); aspect-ratio: 3/4; border-radius: .65rem; padding: 1.55rem 1rem; position: relative; transform: rotate(-13deg); box-shadow: 0 13px 40px #24146075; z-index: 1; }
.art-fold { position: absolute; right: 0; top: 0; width: 1.75rem; height: 1.75rem; border-bottom-left-radius: .35rem; background: #d5c8ff; }
.art-line { display: block; width: 90%; height: .3rem; background: #ded7f7; margin-block: .85rem; border-radius: 1rem; }
.art-line:nth-child(4) { width: 69%; }
.art-signature { display: grid; place-items: end; color: var(--purple); }
.art-signature .icon { width: 2.65rem; height: 2.65rem; }
.art-stamp { z-index: 1; position: absolute; top: 61%; left: 58%; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; color: #156051; background: #a6ecd8; box-shadow: 0 5px 20px #21174f44; }
.art-stamp .icon { width: 2.15rem; height: 2.15rem; }

@media (max-width: 1080px) {
  .authenticated { grid-template-columns: 192px 1fr; }
  .sidebar { padding-inline: .7rem; }
}

@media (min-width: 821px) {
  .document-workspace[data-mode="edit"] .viewer { position: sticky; top: .9rem; }
  .document-workspace[data-mode="edit"] .preview { max-height: calc(100vh - 9rem); }
}

@media (max-width: 820px) {
  .authenticated { display: block; }
  .sidebar { position: relative; height: auto; padding: .7rem .9rem; display: flex; flex-direction: row; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .5rem; }
  .sidebar .brand { margin: 0; font-size: 1rem; gap: .48rem; }
  .brand-mark { width: 2rem; height: 2rem; }
  .sidebar nav { display: flex; order: 3; width: 100%; }
  .sidebar nav a { padding: .49rem .63rem; font-size: .87rem; }
  .sidebar-footer { border: 0; margin: 0; padding: 0; }
  .identity-name { display: none; }
  .topbar { min-height: 3rem; }
  .document-workspace, .team-layout { grid-template-columns: minmax(0, 1fr); }
  .paper img { max-height: 76vh; }
  .document-workspace[data-mode="edit"] .document-controls { grid-row: 1; }
  .mobile-edit-link { display: block; width: fit-content; margin: 0 .85rem .7rem; color: var(--purple-dark); font-size: .88rem; text-decoration: underline; }
}

@media (max-width: 540px) {
  .heading { margin-bottom: 1.2rem; align-items: start; }
  .main { padding-inline: .8rem; }
  .stats { gap: .4rem; }
  .stat { padding: .45rem; gap: .28rem; flex-direction: column; align-items: flex-start; }
  .stat-label { font-size: .82rem; }
  .stat strong { font-size: 1.42rem; }
  .stat-icon { width: 1.7rem; height: 1.7rem; }
  .stat-icon .icon { width: 1.05rem; height: 1.05rem; }
  .collection-header { padding-inline: .6rem; }
  .tabs { gap: .52rem; }
  .tabs a { font-size: .82rem; padding-top: .8rem; }
  .login-layout { grid-template-columns: 1fr; min-height: 0; }
  .login-art { display: none; }
  .login-card .brand { margin-bottom: 1.4rem; }
}
