/* Styles for the builder app itself (dashboard, editor, inbox). */
:root {
  --bg: #f6f7fb; --card: #ffffff; --text: #18181b; --muted: #6b7280; --line: #e4e6ee;
  --accent: #4f46e5; --accent-soft: #eef2ff; --danger: #dc2626; --ok: #16a34a; --warn: #d97706;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 'Inter', system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.8rem; margin: 0 0 .75rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { margin: 0 0 .4rem; }
code { background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; }
.container { width: min(1180px, 100% - 2rem); margin: 2rem auto 4rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.center-row { justify-content: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 .4rem; }
.req { color: var(--danger); }
.note { background: var(--accent-soft); border-radius: 8px; padding: .6rem .8rem; font-size: 13px; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 1.25rem; padding: 0 1.25rem; height: 60px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { font-weight: 800; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { color: var(--accent); }
.topnav { margin-left: auto; display: flex; gap: 1rem; align-items: center; white-space: nowrap; }
.topnav form { margin: 0; }
.linklike { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.editor-bar { display: flex; gap: .9rem; align-items: center; padding-left: 1.25rem; border-left: 1px solid var(--line); min-width: 0; overflow-x: auto; }
.editor-bar form { margin: 0; }
.editor-bar a { color: var(--muted); font-weight: 500; white-space: nowrap; }
.editor-bar a.active, .editor-bar a:hover { color: var(--text); text-decoration: none; }
.editor-bar a.active { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 2px; }
.editor-site { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 6px; font-weight: 700; }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: .55rem 1rem; font: 600 14px/1.2 'Inter', system-ui, sans-serif; cursor: pointer; text-align: center; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-sm { padding: .35rem .7rem; font-size: 13px; }
.btn-lg { padding: .8rem 1.5rem; font-size: 16px; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-publish { background: var(--ok); border-color: var(--ok); }
.danger { color: var(--danger) !important; }

/* Cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.form-wide { max-width: 760px; margin-bottom: 1.5rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.field > label { font-weight: 600; font-size: 14px; }
.field-check label { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { resize: vertical; }
.help { color: var(--muted); font-size: 12.5px; }
.error { color: var(--danger); font-size: 13px; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { background: var(--bg); border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; padding: .6rem; color: var(--muted); }
.input-prefix input { border-radius: 0 8px 8px 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.choice { display: flex; gap: .6rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; cursor: pointer; font-weight: 400 !important; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
details.optional { border-top: 1px solid var(--line); padding: 1rem 0; margin-bottom: 1rem; }
details.optional summary { cursor: pointer; font-weight: 600; margin-bottom: .75rem; }

/* Theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.theme-option { cursor: pointer; display: flex; flex-direction: column; gap: .35rem; font-weight: 500 !important; font-size: 13px; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatch { display: flex; justify-content: space-between; align-items: flex-end; height: 70px; border-radius: 10px; padding: .6rem; border: 2px solid var(--line); transition: .15s; }
.theme-option input:checked + .theme-swatch { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-option input:focus-visible + .theme-swatch { outline: 2px solid var(--accent); }
.sw-title { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.sw-dots { display: flex; gap: 3px; }
.sw-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }

/* Messages */
.messages { width: min(1180px, 100% - 2rem); margin: 1rem auto 0; }
.editor .messages { position: fixed; right: 1rem; bottom: 1rem; width: auto; max-width: 380px; z-index: 50; margin: 0; }
.msg { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-radius: 8px; background: var(--accent-soft); margin-bottom: .5rem; border: 1px solid #c7d2fe; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.msg-success { background: #ecfdf5; border-color: #a7f3d0; }
.msg-error { background: #fef2f2; border-color: #fecaca; }
.msg-close { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }

.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-live { background: #ecfdf5; color: var(--ok); border-color: #a7f3d0; }

/* Landing */
.auth-card { max-width: 420px; margin: 3rem auto; }
.landing-hero { padding: 5rem 0 3rem; text-align: center; background: radial-gradient(1200px 400px at 50% 0, #e0e7ff, var(--bg)); }
.landing-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); line-height: 1.1; letter-spacing: -.02em; }
.landing-hero .accent { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto 2rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.step span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: .5rem; }
.features-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

/* Templates gallery */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.gallery-filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.gallery-filters input { max-width: 300px; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .35rem .9rem; font: 500 13px 'Inter', sans-serif; cursor: pointer; color: var(--text); }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.chip span { opacity: .6; margin-left: .2rem; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin: 1rem 0 2rem; }
.tpl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.tpl-card:hover { box-shadow: 0 10px 30px rgba(20,20,60,.08); transform: translateY(-2px); }
.tpl-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--accent-soft); overflow: hidden; }
.tpl-cover img { width: 100%; height: 100%; object-fit: cover; }
.tpl-cover > span:first-child { display: grid; place-items: center; height: 100%; color: var(--muted); font-weight: 600; }
.tpl-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,15,40,.55); color: #fff; font-weight: 700; opacity: 0; transition: .2s; }
.tpl-cover:hover .tpl-hover { opacity: 1; }
.tpl-cover:hover { text-decoration: none; }
.tpl-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.tpl-body h3 { margin: 0; }
.tpl-body p { margin: 0; }
.tpl-body .row { margin-top: auto; padding-top: .5rem; }
.tags { display: flex; gap: .3rem; flex-wrap: wrap; }
.tags span { font-size: 11.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; color: var(--muted); }

/* Create site */
.create-layout { display: grid; grid-template-columns: minmax(0, 520px) 1fr; gap: 1.5rem; align-items: start; }
.create-preview { position: sticky; top: 80px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: calc(100vh - 110px); display: flex; flex-direction: column; }
.create-preview iframe { border: 0; width: 100%; flex: 1; }
.preview-chrome { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.preview-chrome span { width: 10px; height: 10px; border-radius: 50%; background: #d4d4d8; }
@media (max-width: 1000px) { .create-layout { grid-template-columns: 1fr; } .create-preview { position: static; height: 70vh; } }

/* Dashboard */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.site-card { display: flex; flex-direction: column; gap: .6rem; }
.site-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.site-card p { margin: 0; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.mini-stats a { background: var(--bg); border-radius: 8px; padding: .6rem .75rem; color: var(--text); display: flex; flex-direction: column; }
.mini-stats a:hover { text-decoration: none; background: var(--accent-soft); }
.mini-stats strong { font-size: 1.3rem; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.mini-stats a.has-new strong { color: var(--danger); }
.empty { text-align: center; padding: 3rem; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 2rem; }
.settings-nav { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: .2rem; }
.settings-nav a { color: var(--muted); padding: .4rem .6rem; border-radius: 6px; }
.settings-nav a:hover { background: #fff; color: var(--text); text-decoration: none; }
@media (max-width: 800px) { .settings-layout { grid-template-columns: 1fr; } .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
.settings-group { margin-bottom: 1rem; scroll-margin-top: 80px; }
.logo-preview { max-height: 60px; max-width: 220px; object-fit: contain; background: var(--bg); padding: .4rem; border-radius: 6px; }
.sticky-save { position: sticky; bottom: 0; padding: 1rem 0; background: linear-gradient(transparent, var(--bg) 30%); }
.danger-zone { border-color: #fecaca; margin-top: 1rem; scroll-margin-top: 80px; }
.danger-zone input { max-width: 240px; }
.checklist-card { margin-bottom: 1rem; }

/* Progress / checklist */
.progress { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: .5rem; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.checklist summary { cursor: pointer; list-style: none; }
.checklist summary::-webkit-details-marker { display: none; }
.checklist ul { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .4rem; font-size: 14px; }
.checklist li { display: flex; gap: .5rem; align-items: center; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.tick { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; color: #fff; flex-shrink: 0; }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); }

/* Editor */
.editor-layout { display: grid; grid-template-columns: 400px 1fr; height: calc(100vh - 60px); }
.panel { background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
.panel-block { padding: 1.1rem; border-bottom: 1px solid var(--line); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.panel-head h2 { margin: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hint { margin: 0 0 .5rem; }
.page-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.page-list li { display: flex; justify-content: space-between; align-items: center; border-radius: 6px; padding-right: .5rem; }
.page-list li a { display: block; padding: .45rem .6rem; color: var(--text); flex: 1; }
.page-list li a:hover { text-decoration: none; background: var(--bg); border-radius: 6px; }
.page-list li.active { background: var(--accent-soft); }
.page-list li.active a { color: var(--accent); font-weight: 600; }
.page-tools { display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start; }
.more-menu { position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu .menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 10; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.1); padding: .3rem; min-width: 210px; display: flex; flex-direction: column; }
.more-menu .menu button { text-align: left; background: none; border: 0; padding: .5rem .7rem; font: inherit; font-size: 14px; border-radius: 6px; cursor: pointer; color: var(--text); }
.more-menu .menu button:hover { background: var(--bg); }

.section-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.section-list li { display: flex; align-items: center; gap: .3rem; border: 1px solid var(--line); border-radius: 10px; padding: .35rem .4rem; background: #fff; transition: border-color .15s; }
.section-list li:hover { border-color: var(--accent); }
.section-list .sortable-ghost { opacity: .4; }
.handle { cursor: grab; color: var(--muted); padding: 0 .2rem; user-select: none; }
.section-link { display: flex; gap: .6rem; align-items: center; flex: 1; min-width: 0; color: var(--text); }
.section-link:hover { text-decoration: none; }
.section-link span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.section-link small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; font-size: 15px; }
.section-tools { display: flex; margin: 0; opacity: .3; transition: opacity .15s; }
.section-list li:hover .section-tools, .section-tools:focus-within { opacity: 1; }
.section-tools button { background: none; border: 0; cursor: pointer; padding: .2rem .3rem; color: var(--muted); font-size: 14px; border-radius: 4px; }
.section-tools button:hover { color: var(--text); background: var(--bg); }
.add-section-btn { border-style: dashed; }
.section-title { display: flex; align-items: center; gap: .5rem; }

.preview-pane { display: flex; flex-direction: column; background: #e9ebf2; min-width: 0; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; padding: .5rem 1rem; gap: 1rem; }
.device-toggle { display: flex; background: #fff; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; }
.device-toggle button { border: 0; background: none; padding: .35rem .8rem; cursor: pointer; font: inherit; font-size: 13px; }
.device-toggle button.active { background: var(--accent); color: #fff; }
.preview-frame-wrap { flex: 1; display: flex; justify-content: center; padding: 0 1rem 1rem; min-height: 0; }
#preview { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 10px; box-shadow: 0 4px 24px rgba(0,0,0,.08); transition: width .25s; }
#preview.mobile { width: 390px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--card); padding: .75rem 0; border-top: 1px solid var(--line); z-index: 2; }
.save-hint { margin-left: auto; }

/* Section picker dialog */
.picker { width: min(860px, 94vw); max-height: 86vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.picker::backdrop { background: rgba(15,15,40,.45); }
.picker form { display: flex; flex-direction: column; max-height: 86vh; }
.picker-head { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.picker-head h2 { margin: 0; white-space: nowrap; }
.picker-body { overflow-y: auto; padding: 1rem 1.25rem 1.5rem; }
.picker-group h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .5rem; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.picker-tile { display: flex; gap: .7rem; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .7rem; cursor: pointer; font: inherit; color: var(--text); }
.picker-tile:hover, .picker-tile:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.picker-tile span:last-child { display: flex; flex-direction: column; gap: .15rem; }
.picker-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }

/* Image & link pickers, list editor */
.image-picker { margin-top: .4rem; }
.thumbs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .35rem; max-height: 130px; overflow-y: auto; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; cursor: pointer; background: none; }
.thumb:hover { border-color: var(--accent); }
.thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 4px; display: block; }
.field-preview { width: 100%; max-height: 120px; object-fit: cover; border-radius: 6px; margin-top: .35rem; }
.items-json { display: none; }
.items-editor { display: flex; flex-direction: column; gap: .5rem; }
.item-card { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.item-card > summary { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; }
.item-card > summary::-webkit-details-marker { display: none; }
.item-card > summary .item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card > summary button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: .1rem .3rem; border-radius: 4px; font-size: 14px; }
.item-card > summary button:hover { background: #fff; color: var(--text); }
.item-fields { padding: .2rem .8rem .8rem; }
.item-fields .field { margin-bottom: .7rem; }
.item-fields label { font-size: 13px; }
.items-add { border: 1px dashed var(--line); background: #fff; border-radius: 10px; padding: .55rem; cursor: pointer; font: 600 13px 'Inter', sans-serif; color: var(--accent); }
.items-add:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Media */
.dropzone { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; border: 2px dashed var(--line); margin-bottom: 1.5rem; transition: .15s; }
.dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone p { margin: 0; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.asset { margin: 0; padding: .6rem; }
.asset img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.asset figcaption { display: flex; justify-content: space-between; margin-top: .5rem; }
.asset form { margin: 0; }

/* Inbox */
.inbox-filters { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.inbox-filters form { flex-wrap: nowrap; }
.inbox-filters select { width: auto; }
.inbox-list { padding: 0; overflow: hidden; }
.inbox-row { display: grid; grid-template-columns: 130px minmax(160px, 1.2fr) 2fr 100px 110px; gap: 1rem; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line); color: var(--text); }
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--bg); text-decoration: none; }
.inbox-row.is-new { background: #fafaff; }
.inbox-row.is-new .who strong::before { content: '● '; color: var(--accent); }
.inbox-row .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .inbox-row { grid-template-columns: 1fr auto; } .inbox-row .kind, .inbox-row .what { display: none; } }
.kind { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; justify-self: start; }
.kind-contact { background: #e0f2fe; color: #0369a1; }
.kind-booking { background: #fef3c7; color: #92400e; }
.kind-newsletter { background: #f3e8ff; color: #7e22ce; }
.status { font-size: 12px; font-weight: 600; }
.status-new { color: var(--accent); }
.status-confirmed, .status-done { color: var(--ok); }
.status-declined { color: var(--danger); }
.status-contacted { color: var(--muted); }
.pager { justify-content: center; margin-top: 1rem; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .detail-layout { grid-template-columns: 1fr; } }
.details { display: grid; grid-template-columns: 100px 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.message-body { background: var(--bg); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1rem; white-space: normal; }
.status-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.delete-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Insights */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat strong { font-size: 2rem; line-height: 1.1; }
.up { color: var(--ok); font-size: 13px; } .down { color: var(--danger); font-size: 13px; }
.bars { display: grid; grid-template-columns: repeat(30, 1fr); align-items: end; gap: 3px; height: 180px; margin-top: 1rem; }
.bar { height: 100%; display: flex; align-items: flex-end; }
.bar span { display: block; width: 100%; height: max(var(--h), 2px); background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.bar:hover span { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; margin-top: .4rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.table .num { text-align: right; }
.card + .card { margin-top: 1rem; }

@media (max-width: 960px) {
  .editor-layout { grid-template-columns: 1fr; height: auto; }
  .preview-pane { height: 80vh; }
  .editor-site, .editor-bar .badge { display: none; }
}

/* App footer & legal pages */
.app-footer { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; padding: 2rem 1rem 2.5rem; color: var(--muted); font-size: 13px; }
.app-footer a { color: var(--muted); }
.prose-page { max-width: 780px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); line-height: 1.7; }
.prose-page h2 { margin-top: 2rem; font-size: 1.2rem; }
.prose-page ul { padding-left: 1.25rem; }
.auth-card .field-check label { align-items: flex-start; }
.auth-card .field-check input { margin-top: .3rem; }
