:root {
  --blue: #1F4E79;
  --blue-d: #163A5C;
  --lime: #99D030;
  --aqua: #3A9BC1;
  --ink: #1B2B36;
  --text: #33444F;
  --muted: #5B6B75;
  --line: #D6E4EA;
  --line2: #E6EEF2;
  --soft: #EAF4F7;
  --bg: #EEF3F6;
  --white: #FFFFFF;
  --danger: #C62828;
  --ok: #2E7D32;
  --top: 60px;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 50, 75, .14);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: Montserrat, system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; display: block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: #17310A; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.soft { background: var(--soft); border-color: var(--soft); color: var(--blue); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #FDECEC; border-color: #F5C2C2; }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 10px; font-size: 13px; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink); }
.ibtn:hover { background: var(--soft); }
.ibtn:disabled { opacity: .35; cursor: default; background: transparent; }
.ibtn.sm { width: 32px; height: 32px; }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto; background: radial-gradient(1200px 600px at 80% -10%, #2C5C8C 0%, transparent 60%), linear-gradient(160deg, #1F3550 0%, #15263A 100%); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.login-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card h1 { letter-spacing: .06em; }
.login-card h1 { margin: 0; text-align: center; font-size: 22px; color: var(--blue); }
.login-card > p { text-align: center; margin: 6px 0 18px; font-size: 14px; }
.login-card label, .field > label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.login-card .btn { margin-top: 22px; height: 48px; font-size: 15px; }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: none; cursor: pointer; opacity: .55; }
input.in, .login-card input, .field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(72, 184, 201, .22); }
.form-err { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #9B1C1C; font-size: 14px; }

/* ---------- app shell ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.top { height: var(--top); flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; background: #fff; border-bottom: 1px solid var(--line); z-index: 30; }
.top-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.top-title strong { font-size: 15px; color: var(--blue); white-space: nowrap; }
.status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.status.pending::before, .status.saving::before { background: #F2A900; }
.status.error::before { background: var(--danger); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.only-m, .only-s { display: none !important; }
.body { flex: 1; min-height: 0; display: flex; }

/* pages sidebar */
.pages { width: 232px; flex-shrink: 0; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.pages-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 14px; }
.count { color: var(--muted); font-weight: 500; }
.btn.add-page { margin: 0 16px 12px; width: auto; }
.page-list { flex: 1; overflow-y: auto; padding: 4px 12px 24px; display: flex; flex-direction: column; gap: 6px; }
.thumb { display: flex; gap: 10px; align-items: center; width: 100%; padding: 6px; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; text-align: left; }
.thumb:hover { background: var(--soft); }
.thumb.on { border-color: var(--aqua); background: #F0F8FA; }
.tmini { width: 76px; height: 107px; flex-shrink: 0; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(0, 50, 75, .08); position: relative; }
.tscale { width: 794px; height: 1123px; transform: scale(.0957); transform-origin: 0 0; pointer-events: none; }
.tinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tnum { font-size: 12px; font-weight: 800; color: var(--blue); }
.tlabel { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ttype { font-size: 11px; color: var(--muted); }

/* stage */
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.stage-bar { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--bg); flex-wrap: wrap; }
.stage-bar .sb-title { font-size: 14px; font-weight: 700; margin-right: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.stage-bar .sb-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.zoom { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.zoom span { min-width: 46px; text-align: center; font-size: 12px; font-weight: 600; }
.sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.canvas-wrap { flex: 1; min-height: 0; overflow: auto; padding: 8px 24px 40px; -webkit-overflow-scrolling: touch; }
.canvas-scale { margin: 0 auto; position: relative; }
.canvas { width: 794px; height: 1123px; transform-origin: 0 0; background: #fff; box-shadow: 0 4px 24px rgba(0, 50, 75, .16); }
.canvas [data-t] { cursor: pointer; }
.canvas.edit [data-t]:hover { outline: 3px dashed rgba(72, 184, 201, .9); outline-offset: 3px; }
.canvas [data-t].is-sel { outline: 4px solid var(--aqua) !important; outline-offset: 3px; }
.canvas.readonly [data-t] { cursor: default; }
.r-ph { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; background: repeating-linear-gradient(45deg, rgba(72, 184, 201, .08) 0 10px, rgba(72, 184, 201, .16) 10px 20px); border: 2px dashed rgba(0, 100, 141, .35); color: var(--blue); font-weight: 700; font-size: 15px; font-family: Montserrat, sans-serif; }
.r-add { font-size: 17px; border-radius: 12px; margin: 8px; }
.preview-banner { margin: 0 14px 6px; padding: 10px 14px; border-radius: 12px; background: #FFF6DB; border: 1px solid #F0D27A; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.preview-banner b { margin-right: auto; }

/* edit panel */
.panel { width: 360px; flex-shrink: 0; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-inner { flex: 1; overflow-y: auto; padding: 16px 18px 32px; }
.ph-head { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; }
.ph-head h2 { margin: 0; font-size: 17px; flex: 1; min-width: 0; }
.ph-sub { margin: -6px 0 14px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.field { margin-bottom: 14px; }
.field > label { margin-top: 0; }
.field .help { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.chk { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.4; margin: 6px 0 14px; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.group { border: 1px solid var(--line2); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.group h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.img-field { display: flex; gap: 12px; align-items: center; }
.img-prev { width: 84px; height: 84px; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line); background: #fff center/contain no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
.img-prev.round { border-radius: 50%; background-size: cover; }
.img-prev.wide { width: 120px; height: 72px; background-size: cover; }
.img-actions { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.list-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.list-btn:hover { background: var(--soft); border-color: var(--aqua); }
.list-btn .lb-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--soft) center/contain no-repeat; flex-shrink: 0; display: grid; place-items: center; color: var(--blue); }
.list-btn .lb-t { flex: 1; min-width: 0; }
.list-btn .lb-t b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-btn .lb-t small { color: var(--muted); font-size: 12px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.slot-btn { aspect-ratio: 3/4; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; padding: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; line-height: 1.25; text-align: left; overflow: hidden; }
.slot-btn:hover { border-color: var(--aqua); }
.slot-btn .si { flex: 1; background: center/contain no-repeat; border-radius: 6px; }
.slot-btn.empty { border-style: dashed; align-items: center; justify-content: center; color: var(--blue); font-weight: 700; font-size: 12px; text-align: center; background: #F7FBFC; }
.slot-btn span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.tip { padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--text); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.tip b { color: var(--blue); }
.mini-list .mi { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mini-list .mi .img-prev { width: 64px; height: 44px; border-radius: 8px; }
.mini-list .mi input { min-height: 40px; }

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100%; background: #fff; z-index: 60; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slideIn .2s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); font-size: 16px; flex-shrink: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 32px; }
.scrim { position: fixed; inset: 0; background: rgba(10, 30, 40, .4); z-index: 55; }
.v-day { margin: 18px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.v-item { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.v-item.cur { border-color: var(--aqua); background: #F0F8FA; }
.v-top { display: flex; align-items: baseline; gap: 8px; }
.v-time { font-weight: 800; color: var(--blue); font-size: 14px; }
.v-label { font-size: 14px; font-weight: 600; flex: 1; }
.v-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.v-kind { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--blue); margin-left: 4px; }
.v-kind.manual { background: #EAF6DA; color: #3D6B10; }
.v-act { display: flex; gap: 6px; margin-top: 10px; }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(10, 30, 40, .45); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 18px; padding: 22px 22px 18px; box-shadow: var(--shadow); }
.modal.wide { max-width: 620px; }
.modal h2 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.modal > p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.choice { display: flex; gap: 10px; margin-bottom: 14px; }
.choice label { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 700; }
.choice label small { font-weight: 500; color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice input { display: none; }
.choice label:has(input:checked) { border-color: var(--blue); background: #F0F8FA; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--blue); border-color: var(--blue); }
.u-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.u-row div { flex: 1; min-width: 0; }
.u-row small { color: var(--muted); }
.progress { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 14px 0 8px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--aqua)); transition: width .2s; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 460px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow); animation: fade .2s ease; }
.toast.err { background: #8E1B1B; }
.toast button { margin-left: auto; border: 0; background: rgba(255, 255, 255, .15); color: #fff; padding: 6px 10px; border-radius: 8px; font-weight: 700; cursor: pointer; }

/* hidden render host for PDF */
.pdf-render { position: fixed; left: 0; top: 0; width: 794px; z-index: -1; pointer-events: none; opacity: 1; }

.spin { width: 18px; height: 18px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: rot .8s linear infinite; }
.spin.dark { border-color: rgba(0, 100, 141, .2); border-top-color: var(--blue); }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .panel { width: 320px; }
  .pages { width: 200px; }
  .hide-l { display: none !important; }
}
@media (max-width: 900px) {
  :root { --top: 56px; }
  .only-m { display: inline-flex !important; }
  .hide-m { display: none !important; }
  .top { padding: 0 6px; gap: 2px; }
  .top-title strong { font-size: 14px; }
  .pages { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 60; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .pages.open { transform: none; }
  .page-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
  .thumb { flex-direction: column; align-items: stretch; gap: 6px; }
  .tmini { width: 100%; height: auto; aspect-ratio: 794/1123; }
  .tscale { transform: scale(var(--ts, .15)); }
  .ttype { display: none; }
  .stage-bar { padding: 6px 10px; }
  .canvas-wrap { padding: 4px 10px 90px; }
  .canvas.edit [data-t]:hover { outline: none; }
  .mnav { position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex !important; align-items: center; gap: 6px; padding: 6px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); z-index: 20; }
  .mnav-page { flex: 1; height: 40px; border: 0; background: var(--soft); border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--blue); cursor: pointer; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 40, 60, .2); z-index: 50; transform: translateY(105%); transition: transform .24s ease; }
  .panel.open { transform: none; }
  .sheet-grip { display: block !important; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex-shrink: 0; }
  .panel-inner { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
  .drawer { width: 100%; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .toasts { bottom: 86px; }
}
@media (max-width: 560px) {
  .hide-s { display: none !important; }
  .only-s { display: inline !important; }
  .top-title strong { display: none; }
  .btn.primary#btnPdf { padding: 0 12px; }
  #btnVersions { width: 40px; padding: 0; }
  .stage-bar .zoom { display: none; }
}

/* ---------- marca da ferramenta ---------- */
.mark { width: 56px; height: 56px; border-radius: 16px; display: inline-grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue) 0%, var(--aqua) 100%); box-shadow: 0 8px 18px rgba(31, 78, 121, .3); }
.mark svg { width: 28px; height: 28px; }
.mark.sm { width: 36px; height: 36px; border-radius: 10px; box-shadow: none; }
.mark.sm svg { width: 20px; height: 20px; }
.back-btn { text-decoration: none; padding: 0 10px; }

/* ---------- início (lista e cadastro de catálogos) ---------- */
.home { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.htop { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 24px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.hbrand { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink); white-space: nowrap; }
.hnav { display: flex; gap: 4px; flex: 1; }
.hnav a { padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.hnav a:hover { background: var(--soft); color: var(--ink); }
.hnav a.on { background: var(--soft); color: var(--blue); }
.huser { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hmain { flex: 1; overflow-y: auto; padding: 32px 24px 60px; }
.hwrap { max-width: 1180px; margin: 0 auto; }
.hhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.hhead h1 { margin: 0; font-size: 26px; }
.hhead p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.ccard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ccard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ccover { position: relative; aspect-ratio: 794/1123; max-height: 300px; overflow: hidden; background: var(--soft); display: flex; justify-content: center; cursor: pointer; border-bottom: 1px solid var(--line2); }
.ccover .tscale-wrap { height: 100%; aspect-ratio: 794/1123; overflow: hidden; position: relative; box-shadow: 0 2px 10px rgba(0, 40, 70, .15); }
.ccover .tscale-wrap > div { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform-origin: 0 0; pointer-events: none; }
.cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cbody h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cdot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.cmeta { font-size: 12.5px; color: var(--muted); }
.cbody .btn { margin-top: 10px; }
.cnew { border: 2px dashed var(--line); background: transparent; align-items: center; justify-content: center; gap: 10px; min-height: 300px; color: var(--blue); font-weight: 700; cursor: pointer; text-decoration: none; }
.cnew:hover { background: #fff; border-color: var(--aqua); }
.cnew .mark { width: 52px; height: 52px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

.reg { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.card-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card-box h2 { margin: 0 0 4px; font-size: 18px; }
.card-box > p.sub { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.color-in { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.color-in input[type=color] { width: 38px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.color-in input[type=text] { border: 0; min-height: 34px; padding: 0; font-family: monospace; font-size: 14px; text-transform: uppercase; box-shadow: none; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.prev-box { position: sticky; top: 0; }
.prev-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prev-pages .pp { aspect-ratio: 794/1123; position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 2px 12px rgba(0, 40, 70, .18); background: #fff; }
.prev-pages .pp > div { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform-origin: 0 0; }
.prev-cap { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.mtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.mtable td { padding: 12px 8px; border-top: 1px solid var(--line2); vertical-align: middle; }
.mtable td.act { text-align: right; white-space: nowrap; }
.mtable small { color: var(--muted); }

@media (max-width: 980px) {
  .reg { grid-template-columns: 1fr; }
  .prev-box { position: static; }
}
@media (max-width: 700px) {
  .htop { gap: 8px; padding: 0 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding-bottom: 6px; }
  .hbrand strong { display: none; }
  .hnav { order: 3; width: 100%; flex: none; }
  .hnav a { flex: 1; text-align: center; padding: 8px 6px; }
  .huser { margin-left: auto; }
  .hmain { padding: 20px 14px 50px; }
  .hhead h1 { font-size: 21px; }
  .cgrid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ccover { max-height: 220px; }
  .colors { grid-template-columns: 1fr; }
  .mtable td.act .btn { padding: 0 8px; }
}
a.btn { text-decoration: none; }
.logout-btn { color: var(--muted); margin-left: 4px; }
.logout-btn:hover { color: var(--danger); background: #FDECEC; }
