/* Portal de catálogos Aquore — basado en el diseño de Claude Design */
:root {
  --ink: #10292C;
  --deep: #0B3B40;
  --teal: #12A9B3;
  --teal-d: #0E8F98;
  --teal-dd: #0B5E66;
  --mist: #E8F5F6;
  --mist-2: #F2FAFA;
  --page: #F5F9F9;
  --line: #E1EEEF;
  --line-2: #CFE6E8;
  --text-2: #3E5E62;
  --text-3: #5B777B;
  --danger: #B03A3A;
  --danger-line: #F0CACA;
  --error-line: #D98080;
  --cover-bg: #DCEFF1;
  --spine: linear-gradient(90deg, rgba(0,0,0,.22) 0, rgba(255,255,255,.18) 2%, rgba(0,0,0,.08) 4%, transparent 9%), linear-gradient(160deg, rgba(255,255,255,.16), transparent 40%);
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-d); text-decoration: none; }
a:hover { color: var(--teal-dd); }
input, select, textarea, button { font-family: inherit; }
[hidden] { display: none !important; }
body.no-scroll { overflow: hidden; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@keyframes aqIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aqToast { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes aqFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aqPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.app { min-height: 100vh; background: var(--page); display: flex; flex-direction: column; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }

/* ── Header ─────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { padding-top: 12px; padding-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: clamp(30px, 5vw, 40px); width: auto; display: block; mix-blend-mode: multiply; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.pill-btn {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff;
  color: var(--deep); font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background .2s, border-color .2s;
}
.pill-btn__dot { width: 8px; height: 8px; border-radius: 50%; background: #B8CFD1; transition: background .2s; }
.pill-btn.is-on { background: #E3F4F5; border-color: var(--teal); }
.pill-btn.is-on .pill-btn__dot { background: var(--teal); }
.pill-btn:hover { border-color: var(--teal); }

.primary-btn {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--teal); color: #fff;
  font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background .2s;
}
.primary-btn:hover { background: var(--teal-d); }
.primary-btn__plus { font-size: 18px; line-height: 1; }

.edit-banner {
  background: var(--ink); color: #CFF0F2; font-size: 13px; text-align: center; padding: 8px 16px; letter-spacing: .02em;
}
.edit-banner__exit {
  margin-left: 10px; border: 1px solid rgba(207,240,242,.35); background: transparent; color: #CFF0F2;
  border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer;
}
.edit-banner__exit:hover { background: rgba(207,240,242,.12); }

/* ── Hero ───────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--mist); }
.hero__ring {
  position: absolute; right: -180px; top: -220px; width: 640px; height: 640px; border-radius: 50%;
  border: 44px solid rgba(18,169,179,.09); pointer-events: none;
}
.hero__inner {
  position: relative;
  padding-top: clamp(36px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px);
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 64px);
}
.hero__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--teal-d); font-weight: 500; }
.eyebrow--sm { font-size: 12px; letter-spacing: .18em; }
.eyebrow--danger { color: var(--danger); }
.hero__title {
  margin: 0; font-weight: 300; font-size: clamp(40px, 7vw, 80px); line-height: .98; letter-spacing: -.01em;
  color: var(--deep); text-wrap: balance;
}
.hero__title span { color: var(--teal); }
.hero__lead { margin: 0; font-size: clamp(16px, 2vw, 19px); line-height: 1.55; color: var(--text-2); max-width: 46ch; text-wrap: pretty; }

.search {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px;
  height: 54px; padding: 0 8px 0 20px; max-width: 520px; box-shadow: 0 6px 24px rgba(11,59,64,.06);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--teal); box-shadow: 0 6px 24px rgba(11,59,64,.10); }
.search svg { flex: 0 0 auto; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); height: 100%;
  -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: #8AA3A6; }
.search__clear { border: 0; background: var(--mist); color: var(--deep); border-radius: 999px; height: 38px; padding: 0 14px; font-size: 13px; cursor: pointer; }
.search__clear:hover { background: #D7EEF0; }

.hero__stack-wrap { flex: 1 1 300px; max-width: 440px; margin: 0 auto; width: 100%; }
.hero__stack { position: relative; width: 100%; aspect-ratio: 1 / .92; }
.hero__book.cover {
  position: absolute; width: 52%; aspect-ratio: 210 / 297; border-radius: 2px 6px 6px 2px; overflow: hidden; background: #D7EEF0;
  box-shadow: 0 30px 50px -20px rgba(11,59,64,.45), 0 4px 10px rgba(11,59,64,.12);
  transition: transform .4s ease; animation: aqFade .7s ease backwards;
}
.hero__book.cover:hover { transform: rotate(0deg) translateY(-8px) !important; z-index: 5 !important; }

/* ── Covers ─────────────────────────────────── */
.cover { position: relative; overflow: hidden; background: var(--cover-bg); }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover__spine { position: absolute; inset: 0; pointer-events: none; background: var(--spine); }
.cover__hit { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; padding: 0; }

/* Portada generada cuando no hay imagen */
.cover__gen {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 12% 11% 10%; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, #12A9B3 0%, #0E8F98 45%, #0B3B40 100%);
}
.cover__gen::before {
  content: ""; position: absolute; right: -38%; top: -22%; width: 110%; aspect-ratio: 1; border-radius: 50%;
  border: 14px solid rgba(255,255,255,.12);
}
.cover__gen::after {
  content: ""; position: absolute; left: -30%; bottom: -30%; width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.cover__gen-brand { position: relative; font-size: clamp(9px, 1.1vw, 12px); letter-spacing: .38em; text-transform: uppercase; font-weight: 500; opacity: .9; }
.cover__gen-title { position: relative; font-weight: 300; font-size: clamp(16px, 2.1vw, 26px); line-height: 1.05; text-wrap: balance; overflow-wrap: anywhere; }
.cover__gen-cat { position: relative; font-size: clamp(8px, .9vw, 11px); letter-spacing: .2em; text-transform: uppercase; opacity: .8; margin-top: 6px; }
.cover__gen--placeholder { background: linear-gradient(160deg, #D7EEF0, #C3E4E7); color: var(--deep); }
.cover__gen--placeholder::before { border-color: rgba(18,169,179,.14); }

/* Cambio de portada en modo gestión */
.cover__swap {
  position: absolute; inset: 0; border: 0; padding: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  text-align: center; background: rgba(11,59,64,0); color: #fff; font-size: 13px; line-height: 1.35; font-weight: 500;
  outline: 2px dashed rgba(18,169,179,.85); outline-offset: -8px; transition: background .2s;
}
.cover__swap span { opacity: 0; transition: opacity .2s; background: rgba(11,59,64,.85); padding: 8px 12px; border-radius: 10px; }
.cover__swap:hover, .cover__swap.is-drag { background: rgba(11,59,64,.35); }
.cover__swap:hover span, .cover__swap.is-drag span, .cover__swap.is-busy span { opacity: 1; }
.cover__swap.is-busy { background: rgba(11,59,64,.5); cursor: progress; }
.cover__swap.is-busy span { animation: aqPulse 1.2s ease infinite; }

/* ── Library ────────────────────────────────── */
.library { flex: 1; padding-top: clamp(28px, 4vw, 48px); padding-bottom: 80px; }
.library__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.library__head h2 { margin: 0; font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); color: var(--deep); }
.library__count { font-size: 14px; color: var(--text-3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 0 28px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--deep);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--teal); }
.chip.is-on { background: var(--deep); color: #fff; border-color: var(--deep); }

.empty { padding: 64px 20px; text-align: center; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: 16px; background: #fff; line-height: 1.6; }
.empty strong { display: block; color: var(--deep); font-weight: 500; font-size: 18px; margin-bottom: 4px; }
.empty button { margin-top: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, calc(50% - 10px)), 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(16px, 2.6vw, 32px);
}
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: aqIn .5s ease backwards; }
.card__cover {
  aspect-ratio: 210 / 297; border-radius: 2px 6px 6px 2px;
  box-shadow: 0 22px 36px -20px rgba(11,59,64,.45), 0 2px 6px rgba(11,59,64,.10);
  transition: transform .35s ease, box-shadow .35s ease;
}
.card__cover:hover { transform: translateY(-6px) rotate(-.8deg); box-shadow: 0 34px 50px -22px rgba(11,59,64,.5), 0 6px 14px rgba(11,59,64,.12); }
.is-edit .card__cover:hover { transform: none; }
.card__new {
  position: absolute; top: 10px; right: 10px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; pointer-events: none; z-index: 2;
}
.card__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card__cat { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-d); font-weight: 500; }
.card__title {
  all: unset; cursor: pointer; font-size: clamp(16px, 1.8vw, 19px); font-weight: 500; line-height: 1.25; color: var(--deep);
  text-wrap: pretty; overflow-wrap: anywhere;
}
.card__title:hover { color: var(--teal-d); }
.card__title:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 2px; }
.card__meta { font-size: 13px; color: var(--text-3); }
.card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.card__pdf {
  flex: 1 1 auto; height: 42px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--deep); color: #fff;
  font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s;
}
.card__pdf:hover { background: var(--teal); color: #fff; }
.card__docs {
  flex: 0 0 auto; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--deep);
  font-size: 13px; cursor: pointer; transition: border-color .2s;
}
.card__docs:hover { border-color: var(--teal); }

/* Skeleton */
.card--skel .card__cover { background: #E3F0F1; box-shadow: none; animation: aqPulse 1.4s ease infinite; }
.skel-line { height: 12px; border-radius: 6px; background: #E3F0F1; animation: aqPulse 1.4s ease infinite; }

/* ── Footer ─────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer__inner {
  padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 12px 24px;
  justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-3);
}

/* ── Modals ─────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(8,40,44,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.overlay--top { z-index: 70; }
.modal {
  position: relative; background: #fff; border-radius: 18px; max-height: calc(100dvh - 24px); overflow: auto;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); animation: aqIn .3s ease both;
}
.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--mist-2); color: var(--deep); font-size: 22px; cursor: pointer; line-height: 1;
}
.modal__close--float { background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.modal__close:hover { background: var(--mist); }

.modal--detail { width: min(980px, 100%); display: flex; flex-wrap: wrap; }
.detail__visual { flex: 1 1 280px; background: var(--mist); padding: clamp(28px, 4vw, 48px); display: flex; align-items: center; justify-content: center; }
.detail__cover {
  width: min(300px, 70%); aspect-ratio: 210 / 297; border-radius: 2px 6px 6px 2px; background: #D7EEF0;
  box-shadow: 0 30px 50px -20px rgba(11,59,64,.45); transform: rotate(-2deg);
}
.detail__body { flex: 1.4 1 340px; min-width: 0; padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 20px; }
.detail__heading { display: flex; flex-direction: column; gap: 8px; padding-right: 40px; }
.detail__heading h3 { margin: 0; font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.08; color: var(--deep); text-wrap: balance; overflow-wrap: anywhere; }
.detail__meta { font-size: 14px; color: var(--text-3); }
.detail__desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; white-space: pre-line; }

.download-btn {
  height: 56px; border-radius: 12px; border: 0; background: var(--teal); color: #fff; font-size: 16px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s; padding: 0 16px; text-align: center;
}
.download-btn:hover { background: var(--teal-d); color: #fff; }
.detail__view { align-self: center; font-size: 14px; margin-top: -10px; }

.label-caps { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.detail__attach { display: flex; flex-direction: column; gap: 10px; }
.detail__noattach { font-size: 14px; color: var(--text-3); padding: 14px 0; }
.attach-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.attach-list:empty { display: none; }
.attach {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; transition: background .15s;
}
.attach + .attach { border-top: 1px solid var(--line); }
.attach:hover { background: var(--mist-2); color: inherit; }
.attach__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach__name { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach__size { font-size: 12px; color: var(--text-3); }
.attach svg { flex: 0 0 auto; }

.badge {
  flex: 0 0 auto; min-width: 52px; height: 30px; border-radius: 7px; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  display: flex; align-items: center; justify-content: center; padding: 0 8px;
}
.badge--sheet { background: #DDF3EA; color: #16704C; }
.badge--pdf { background: #E3F4F5; color: var(--teal-dd); }
.badge--other { background: #ECEFF5; color: #3D4A66; }
.badge--solid { background: var(--teal); color: #fff; width: 52px; }
.badge--plus { background: #E3F4F5; color: var(--teal-dd); font-size: 18px; width: 52px; letter-spacing: 0; }
.badge--sm { height: 26px; border-radius: 6px; }

.detail__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.outline-btn {
  flex: 1 1 180px; height: 46px; border-radius: 12px; border: 1px solid var(--deep); background: #fff; color: var(--deep);
  font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s;
}
.outline-btn:hover { background: var(--deep); color: #fff; }
.ghost-btn {
  flex: 1 1 160px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--deep);
  font-size: 14px; cursor: pointer; transition: border-color .2s;
}
.ghost-btn:hover { border-color: var(--teal); }
.ghost-btn--lg { flex: 0 1 auto; height: 50px; padding: 0 22px; font-size: 15px; }
.danger-btn {
  flex: 0 0 auto; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--danger-line); background: #fff;
  color: var(--danger); font-size: 14px; cursor: pointer; transition: background .2s;
}
.danger-btn:hover { background: #FBEFEF; }
.danger-btn--lg { height: 50px; padding: 0 22px; font-size: 15px; font-weight: 500; background: var(--danger); color: #fff; border-color: var(--danger); }
.danger-btn--lg:hover { background: #962F2F; }
.danger-btn:disabled { opacity: .6; cursor: progress; }

/* Upload form */
.modal--form { width: min(720px, 100%); padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; gap: 22px; }
.modal--login { width: min(440px, 100%); padding: clamp(22px, 4vw, 36px); display: flex; flex-direction: column; gap: 20px; }
.form__heading { display: flex; flex-direction: column; gap: 6px; padding-right: 44px; }
.form__heading h3 { margin: 0; font-weight: 400; font-size: clamp(24px, 3vw, 32px); color: var(--deep); overflow-wrap: anywhere; }
.confirm__note { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.form__top { display: flex; flex-wrap: wrap; gap: 20px; }
.cover-drop {
  flex: 0 0 150px; aspect-ratio: 210 / 297; border: 1.5px dashed #9FD8DD; border-radius: 6px; background: var(--mist-2);
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; position: relative; overflow: hidden; margin: 0 auto;
  transition: border-color .2s, background .2s;
}
.cover-drop:hover, .cover-drop.is-drag { border-color: var(--teal); background: #E8F7F8; }
.cover-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-drop__empty { padding: 12px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.cover-drop__empty span { font-size: 12px; color: var(--text-3); }
.form__fields { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.form__row { display: flex; flex-wrap: wrap; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.field--cat { flex: 1 1 150px; }
.field--ed { flex: 1 1 120px; }
.field input, .field select, .field textarea {
  height: 46px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 14px; font-size: 16px; color: var(--ink);
  outline: none; background: #fff; transition: border-color .2s; width: 100%;
}
.field select { padding: 0 10px; }
.field textarea { height: auto; padding: 10px 14px; resize: vertical; min-height: 66px; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field.has-error input { border-color: var(--error-line); }
.field__error { color: var(--danger); font-size: 12px; }

.file-drop {
  border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-drop--pdf { background: var(--mist-2); border-color: #9FD8DD; }
.file-drop--pdf.has-file { border-color: var(--teal); }
.file-drop--pdf.has-error { border-color: var(--error-line); }
.file-drop:hover, .file-drop.is-drag { border-color: var(--teal); background: #E8F7F8; }
.file-drop__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-drop__name { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-drop__hint { font-size: 12px; color: var(--text-3); }
.file-drop.has-error .file-drop__hint { color: var(--danger); }
.docs { display: flex; flex-direction: column; gap: 10px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.doc-row__name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row__size { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.doc-row__rm { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--mist-2); color: var(--deep); cursor: pointer; flex: 0 0 auto; font-size: 16px; }
.doc-row__rm:hover { background: var(--mist); }

.progress { display: flex; flex-direction: column; gap: 6px; }
.progress__bar { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.progress__bar span { display: block; height: 100%; width: 0; background: var(--teal); border-radius: inherit; transition: width .2s; }
.progress__label { font-size: 13px; color: var(--text-3); }
.form__error { background: #FBEFEF; color: var(--danger); border: 1px solid var(--danger-line); border-radius: 10px; padding: 12px 14px; font-size: 14px; }

.form__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.submit-btn {
  flex: 1 1 200px; max-width: 280px; height: 50px; border-radius: 12px; border: 0; background: var(--teal); color: #fff;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s, opacity .2s;
}
.submit-btn:hover { background: var(--teal-d); }
.submit-btn:disabled { opacity: .6; cursor: progress; }
.submit-btn--full { max-width: none; flex: 0 0 auto; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--deep); color: #fff;
  padding: 14px 20px; border-radius: 12px; font-size: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px);
  animation: aqToast .25s ease both;
}
.toast.is-error { background: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Edición */
.edit-btn {
  flex: 0 0 auto; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--teal); background: #E3F4F5;
  color: var(--deep); font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .2s;
}
.edit-btn:hover { background: #D2EEF0; }
.cover-drop__rm {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: var(--deep); font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.cover-drop__rm:hover { background: #fff; color: var(--danger); }
.doc-row__tag { font-size: 11px; color: var(--teal-d); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }

/* Enlace del PDF (CDN) */
.link-field {
  border: 1.5px dashed #9FD8DD; border-radius: 12px; background: var(--mist-2); padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  transition: border-color .2s;
}
.link-field:focus-within { border-color: var(--teal); border-style: solid; }
.link-field.has-file { border-color: var(--teal); }
.link-field.has-error { border-color: var(--error-line); }
.link-field__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.link-field__label { font-size: 15px; color: var(--ink); }
.link-field input {
  width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; padding: 0 12px;
  font-size: 15px; color: var(--ink); outline: none;
}
.link-field input:focus { border-color: var(--teal); }
.link-field__hint { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.link-field.has-error .link-field__hint { color: var(--danger); }
.detail__link { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--mist-2); }
.detail__link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.detail__link-row input {
  flex: 1 1 220px; min-width: 0; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font-size: 14px; color: var(--ink); outline: none; background: #fff;
}
.detail__link-row input:focus { border-color: var(--teal); }
.detail__link-row .ghost-btn { flex: 0 0 auto; padding: 0 18px; height: 44px; }

/* Formato cuadrado */
.card__frame { aspect-ratio: 210 / 297; display: flex; flex-direction: column; justify-content: flex-end; }
.card__frame > .card__cover { width: 100%; }
.card__cover.is-square, .hero__book.cover.is-square, .detail__cover.is-square, .cover-drop.is-square { aspect-ratio: 1 / 1; border-radius: 3px; }
.hero__book.cover.is-square { width: 58%; }
.detail__cover.is-square { width: min(340px, 84%); }
.cover-drop.is-square { flex-basis: 180px; }
.form__top > .cover-drop { align-self: flex-start; }
.cover-drop { transition: border-color .2s, background .2s, aspect-ratio .2s, flex-basis .2s; }

.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink); user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__ui {
  flex: 0 0 auto; position: relative; width: 42px; height: 24px; border-radius: 999px; background: #CFE0E2; transition: background .2s;
}
.toggle__ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.toggle input:checked + .toggle__ui { background: var(--teal); }
.toggle input:checked + .toggle__ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--teal); outline-offset: 2px; }
.toggle__text { display: flex; flex-direction: column; gap: 1px; }
.toggle__text small { font-size: 12px; color: var(--text-3); }

/* Cerrar sesión de acceso */
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--deep);
  display: flex; align-items: center; justify-content: center; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--teal); color: var(--teal-d); }
