:root {
  --brand: #003c4a;
  --brand-2: #0056b3;
  --brand-soft: #e8f1f3;
  --surface: #f3f6f7;
  --line: #e6ecee;
  --text: #191c1d;
  --muted: #6b7280;
  --card: #ffffff;
  --danger: #ba1a1a;
  --ok: #137333;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--surface); }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #003c4a 0%, #0a5a6b 55%, #f3f6f7 55%); }
.login-card { width: 100%; max-width: 400px; background: #fff; padding: 36px; border-radius: 16px; box-shadow: 0 18px 50px rgba(0,60,74,.18); }
.login-card h1 { margin: 0 0 8px; color: var(--brand); font-size: 22px; }
.login-card p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }

.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #fff; padding: 20px 14px 32px; display: flex; flex-direction: column; }
.brand { padding: 8px 12px 20px; }
.brand-mark { font-size: 11px; letter-spacing: .18em; opacity: .7; }
.brand h2 { margin: 4px 0 0; font-size: 18px; font-weight: 700; }
.brand-en { margin-top: 2px; font-size: 11px; font-weight: 500; letter-spacing: .04em; color: rgba(255,255,255,.55); }
.nav-group { margin: 8px 0 4px; padding: 10px 12px 6px; font-size: 11px; letter-spacing: .08em; color: rgba(255,255,255,.45); }
.nav-group span { display: block; margin-top: 2px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.nav-btn { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: rgba(255,255,255,.82); padding: 8px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; }
.nav-zh { display: block; font-size: 14px; line-height: 1.25; }
.nav-en { display: block; margin-top: 1px; font-size: 10px; letter-spacing: .03em; color: rgba(255,255,255,.5); }
.nav-btn.active, .nav-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-btn.active .nav-en, .nav-btn:hover .nav-en { color: rgba(255,255,255,.72); }
.side-foot { margin-top: auto; padding-top: 16px; }

.main { padding: 28px 32px 80px; overflow: auto; }
.notice { background: #fef3c7; color: #92400e; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
h1.page { margin: 0; font-size: 24px; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 400; }
.field-hint { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.field-hint .hint-where { display: block; color: #0f4c5c; }
.field-hint .hint-empty { display: block; margin-top: 2px; }
.form-sec { border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 8px; margin: 0 0 16px; background: #fbfcfd; }
.form-sec.later { background: #f7f7f8; border-style: dashed; }
.form-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.form-sec-h h3 { margin: 0; font-size: 15px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.now { background: #e6f4ea; color: var(--ok); }
.pill.later { background: #f1f3f4; color: #5f6368; }
.form-sticky {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  margin: 8px -20px -20px; padding: 14px 20px 16px; border-radius: 0 0 14px 14px; z-index: 2;
}
.editor-form { padding-bottom: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat .muted { margin-bottom: 6px; }
.stat b { font-size: 28px; color: var(--brand); display: block; line-height: 1.1; }
.interest-card { margin-top: 16px; }
.interest-card h2 { margin: 0 0 6px; font-size: 16px; }
.interest-card > p.muted { margin: 0 0 12px; }
.substat { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; }

label.field { display: block; margin-bottom: 14px; font-size: 13px; color: #374151; }
label.field > span, .field > span { display: block; margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); white-space: nowrap; }
.doc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-stat { background: #f4f7f8; border-radius: 12px; padding: 16px; }
.doc-stat span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.doc-stat b { font-size: 28px; color: var(--brand); display: block; line-height: 1.1; }
.layout-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #f8fbfc; margin: 8px 0; }
.layout-card input[type=text],
.layout-card textarea {
  width: 100%;
  box-sizing: border-box;
  display: block;
}
.rich-editor textarea,
textarea[hidden] {
  display: none !important;
}
.layout-card textarea.short { min-height: 72px; }
.layout-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.layout-card-h b { flex: 1; font-size: 14px; }
.layout-type { font-size: 11px; color: var(--muted); white-space: nowrap; }
.video-row { border-top: 1px solid #e6eef0; padding-top: 10px; margin-top: 10px; }
.home-doc-card { display: flex; flex-direction: column; gap: 10px; }
.home-doc-main { display: flex; gap: 12px; align-items: flex-start; }
.home-doc-main b { display: block; margin-bottom: 4px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f7fbfc; }

.tag { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 2px 8px; border-radius: 999px; font-size: 12px; margin: 0 4px 4px 0; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.badge.on { background: #e6f4ea; color: var(--ok); }
.badge.off { background: #f1f3f4; color: #5f6368; }
.badge.warn { background: #fff4e5; color: #b54708; }
.error { color: var(--danger); font-size: 13px; margin: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; }

.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #f3f4f6; border: 1px solid var(--line); display: block; }
.thumb.wide { width: 72px; height: 52px; }
.thumb.empty { display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 11px; }

.upload-box { border: 1px dashed #c5d4d8; background: #f8fbfb; border-radius: 12px; padding: 14px; display: flex; gap: 14px; align-items: flex-start; }
.upload-box img { width: 120px; height: 92px; object-fit: contain; border-radius: 10px; background: #fff; flex-shrink: 0; }
.upload-box .ph { width: 92px; height: 92px; border-radius: 10px; background: #eef3f4; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; flex-shrink: 0; }
.img-spec {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #eef5f6;
  border: 1px solid #d5e4e8;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #37555c;
}
.img-spec-size { font-weight: 700; color: var(--brand); font-size: 13px; }
.img-spec-meta, .img-spec-used { margin-top: 2px; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.editor-form { min-width: 0; }
.preview-col { position: sticky; top: 12px; height: calc(100vh - 24px); display: flex; flex-direction: column; min-height: 0; }
.preview-label { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 10px; letter-spacing: .04em; flex-shrink: 0; }
.preview-col .muted { flex-shrink: 0; }
#phone-mount { flex: 1; min-height: 0; display: flex; }
.phone {
  width: 360px;
  flex: 1;
  height: 100%;
  max-height: calc(100vh - 88px);
  min-height: 520px;
  margin: 0 auto;
  background: #111;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(0,60,74,.18);
  display: flex;
  flex-direction: column;
}
.phone-screen {
  flex: 1;
  min-height: 0;
  width: 100%;
  background: #f8fafb;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-bar { background: #fff; padding: 14px 16px 10px; text-align: center; font-weight: 700; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
.phone-bar.mp-header { background: #003c4a; color: #fff; padding: 8px 12px 10px; text-align: left; border-bottom: 0; }
.phone-wordmark { height: 18px; margin-bottom: 2px; }
.phone-wordmark img { height: 14px; display: block; }
.phone-nav { display: flex; align-items: center; min-height: 28px; }
.phone-back { width: 28px; color: #fff; font-size: 22px; line-height: 1; }
.phone-title { flex: 1; text-align: center; color: #fff; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-body { flex: 1; overflow: auto; background: #fff; min-height: 0; }
.phone-tabbar {
  flex-shrink: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid #e5e9eb;
  padding: 6px 4px 10px;
  z-index: 8;
  box-shadow: 0 -6px 16px rgba(0,60,74,.06);
}
.phone-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8a9ea4;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 4px 0;
}
.phone-tab.on { color: #003c4a; }
.phone-tab img { width: 22px; height: 22px; margin-bottom: 2px; display: block; }
.phone-tab b { font-size: 10px; font-weight: 400; line-height: 1.2; }
.phone-tab.on b { font-weight: 700; }
.phone-tab span { font-size: 8px; line-height: 1.2; margin-top: 1px; opacity: .85; }
.pv-home-nav { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.pv-home-cta { pointer-events: auto; cursor: pointer; font: inherit; }
.pv-home-more { background: none; border: 0; color: #5a7a82; font-size: 11px; font-weight: 400; cursor: pointer; padding: 0; }
.pv-cat { display: flex; gap: 14px; padding: 10px 16px 0; border-bottom: 1px solid #f3f4f6; overflow-x: auto; color: #6b7280; font-size: 12px; white-space: nowrap; }
.pv-cat .on { color: #111; font-weight: 700; border-bottom: 2px solid #003c4a; padding-bottom: 8px; }
.pv-filter { padding: 10px 16px; font-size: 12px; color: #4b5563; background: #f8fafb; border-bottom: 1px solid #f3f4f6; }
.pv-prod-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.pv-prod-thumb { width: 72px; height: 54px; background: #f8fafb; border-radius: 6px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pv-prod-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pv-prod-name { flex: 1; font-size: 13px; font-weight: 700; color: #111; }
.pv-ind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-ind-card { background: #f8fafb; border-radius: 8px; overflow: hidden; text-align: center; padding-bottom: 8px; }
.pv-ind-card img, .pv-ind-card .ph { width: 100%; height: 86px; object-fit: contain; background: #eef2f3; display: block; }
.pv-ind-card b { display: block; font-size: 12px; margin-top: 8px; }
.pv-ind-card span { font-size: 10px; color: #9ca3af; }
.pv-res-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e6f0f2; }
.pv-file { width: 36px; height: 36px; border-radius: 8px; background: #e6f0f2; color: #003c4a; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pv-res-info { flex: 1; min-width: 0; }
.pv-contact-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.pv-contact-row img { width: 22px; height: 22px; }
.pv-qr-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pv-qr-card { width: 100%; max-width: 180px; text-align: center; background: #f8fafb; border-radius: 10px; padding: 12px 8px; }
.pv-qr-card img { width: 108px; height: 108px; object-fit: contain; background: #fff; display: block; margin: 0 auto 8px; }
.pv-qr-ph { width: 108px; height: 108px; margin: 0 auto 8px; border: 1px dashed #b7c9cd; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #5a7a82; font-size: 11px; background: #e6f0f2; }
.pv-qr-card b { display: block; font-size: 12px; }
.pv-qr-card span { display: block; font-size: 11px; color: #5a7a82; margin-top: 4px; }
.pv-home-bar { background: #003c4a; color: #fff; font-weight: 700; font-size: 16px; padding: 14px 16px; }
.pv-home-screen { background: #fff; }
.pv-home-head { background: #003c4a; padding: 12px 16px 10px; flex-shrink: 0; }
.pv-home-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 28px; }
.pv-home-brand img { width: 28px; height: 28px; border-radius: 50%; background: #003c4a; }
.pv-home-brand b { color: #fff; font-size: 20px; font-weight: 700; }
.pv-home-search { position: relative; background: rgba(255,255,255,.16); border-radius: 999px; color: rgba(255,255,255,.55); font-size: 12px; padding: 8px 12px 8px 28px; }
.pv-home-search span:first-child { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.7); }
.pv-home-scroll { flex: 1; overflow: auto; padding: 0 16px 16px; background: #fff; min-height: 0; }
.pv-home-hero { position: relative; min-height: 120px; border-radius: 12px; overflow: hidden; background: #003c4a; color: #fff; margin: 12px 0 20px; }
.pv-home-hero img.pv-home-slide { display: none; width: 100%; height: auto; object-fit: contain; background: #003c4a; vertical-align: top; }
.pv-home-hero img.pv-home-slide.on { display: block; }
.pv-home-hero-body { position: absolute; left: 0; top: 0; z-index: 2; padding: 20px 16px; max-width: 62%; pointer-events: none; }
.pv-home-hero.has-img .pv-home-hero-body { max-width: none; width: 100%; height: 100%; box-sizing: border-box; background: linear-gradient(90deg, rgba(0,60,74,.42) 0%, rgba(0,60,74,.12) 58%, rgba(0,60,74,.04) 100%); }
.pv-home-hero-title { font-weight: 700; font-size: 17px; line-height: 1.25; max-width: 62%; }
.pv-home-cta { display: inline-block; margin-top: 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 5px 12px; font-size: 11px; background: rgba(255,255,255,.2); }
.pv-home-dots { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 3; display: flex; justify-content: center; gap: 5px; }
.pv-home-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); display: block; }
.pv-home-dots i.on { background: #fff; }
.pv-home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-bottom: 20px; }
.pv-home-nav { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pv-home-ico { width: 48px; height: 48px; border-radius: 12px; background: #e6f0f2; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.pv-home-ico img { width: 26px; height: 26px; }
.pv-home-ico img.is-wide { width: 36px; height: 36px; }
.pv-home-nav b { font-size: 13px; color: #1f2937; font-weight: 600; }
.pv-home-nav span { font-size: 10px; color: #6b7280; }
.pv-home-sec { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.pv-home-sec span { font-size: 11px; color: #5a7a82; font-weight: 400; }
.pv-home-doc { display: flex; gap: 12px; margin: 0 0 14px; }
.pv-home-doc img, .pv-home-doc .ph { width: 96px; height: 80px; object-fit: cover; border-radius: 8px; background: #e6f0f2; flex-shrink: 0; }
.pv-home-doc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; min-height: 80px; }
.pv-home-tag { font-size: 10px; padding: 2px 6px; background: #e6f0f2; color: #003c4a; border-radius: 3px; }
.pv-home-title { font-weight: 600; font-size: 14px; line-height: 1.4; color: #111; word-break: break-all; }
.pv-home-foot { display: flex; justify-content: space-between; font-size: 10px; color: #5a7a82; }
.pv-hero { width: 100%; max-height: 220px; height: auto; object-fit: contain; background: #eef2f3; display: block; }
.pv-hero.empty { display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; }
.pv-pad { padding: 16px; }
.pv-title { font-size: 22px; font-weight: 700; }
.pv-sub { font-size: 14px; font-weight: 600; color: #374151; margin: 6px 0 12px; }
.pv-tag { display: inline-block; background: #f0f4f5; color: var(--brand); padding: 4px 10px; border-radius: 6px; font-size: 11px; margin: 0 6px 6px 0; }
.pv-sec { margin: 16px 0; }
.pv-sec h4 { margin: 0 0 8px; font-size: 15px; }
.pv-adv { display: flex; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.pv-spec { display: flex; justify-content: space-between; border-bottom: 1px solid #f3f4f6; padding: 8px 0; font-size: 13px; }
.pv-card { display: flex; gap: 10px; background: #fff; padding: 10px; margin: 10px 12px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.pv-card img, .pv-card .ph { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: #f3f4f6; flex-shrink: 0; }
.pv-cta { color: var(--brand-2); font-size: 13px; font-weight: 600; margin-top: 6px; }
.pv-tabs { display: flex; gap: 16px; padding: 0 16px; background: #fff; border-bottom: 1px solid #f3f4f6; font-size: 13px; color: #6b7280; }
.pv-tabs b { color: var(--brand); border-bottom: 2px solid var(--brand); padding: 10px 0; display: inline-block; }
.pv-list-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.pv-list-row img { width: 44px; height: 44px; object-fit: contain; margin-right: 10px; }
.pv-bar { position: sticky; bottom: 0; background: #fff; padding: 10px 16px 16px; }
.pv-bar button { width: 100%; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px; }
.pdf-frame { width: 100%; height: 220px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.drawer-mask { position: fixed; inset: 0; background: rgba(16,24,32,.4); z-index: 20; display: flex; justify-content: flex-end; }
.drawer { width: min(480px, 100%); background: #fff; height: 100%; padding: 24px; overflow: auto; box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.drawer h2 { margin: 0 0 8px; }
.msg-box { background: #f6f8f9; border-radius: 12px; padding: 14px; white-space: pre-wrap; line-height: 1.6; margin: 16px 0; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: #fff; color: #374151; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip-wrap { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.chip-wrap .chip { border: 0; border-radius: 0; }
.chip-wrap:has(.chip.active) { border-color: var(--brand); background: var(--brand); }
.chip-wrap:has(.chip.active) .chip-x { background: var(--brand); color: rgba(255,255,255,.75); }
.chip-x { border: 0; background: #fff; color: #9ca3af; width: 28px; height: 32px; cursor: pointer; }
.chip-x:hover { color: var(--danger); background: #fff1f1; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin: 10px 0; }
.media-item { border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #f8fbfb; position: relative; }
.media-item img, .media-item video { width: 100%; height: 88px; object-fit: contain; background: #fff; display: block; }
.card-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.edit-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-chip { display: inline-flex; align-items: center; gap: 6px; background: #e6f0f2; color: #003c4a; border-radius: 999px; padding: 6px 8px 6px 12px; font-size: 13px; }
.edit-chip button { border: 0; background: transparent; color: #003c4a; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.media-card, .user-card, .evt-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,60,74,.04);
}
.media-card:hover, .user-card:hover, .evt-card:hover { border-color: #b7c9ce; box-shadow: 0 8px 20px rgba(0,60,74,.08); }
.evt-card img, .media-card img { width: 100%; height: 140px; object-fit: contain; background: #eef3f4; display: block; }
.evt-card .ph, .media-card .ph { height: 140px; background: #eef3f4; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.evt-card .body, .media-card .body { padding: 14px 16px 16px; }
.user-card { padding: 18px 18px 16px; cursor: pointer; }
.user-card .who { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.user-card h3 { margin: 0; font-size: 18px; }
.user-card .co { color: var(--brand); font-weight: 600; margin: 6px 0 10px; }
.user-card .kv { font-size: 13px; color: #4b5563; margin: 4px 0; }
.user-card .kv b { color: #111; font-weight: 600; min-width: 4em; display: inline-block; }

.doc-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }

.rich-editor { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; background: #f4f7f8; border-bottom: 1px solid var(--line); }
.rich-toolbar label { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; color: #374151; font-weight: 600; }
.rich-toolbar select, .rich-toolbar input[type=color] { width: auto; padding: 4px 6px; }
.rich-toolbar input[type=color] { width: 36px; height: 28px; padding: 2px; }
.rich-toolbar button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; }
.rich-area { min-height: 140px; padding: 12px; outline: none; line-height: 1.75; font-size: 14px; }
.rich-area:empty:before { content: attr(data-placeholder); color: #9ca3af; }
.rich-preview { font-size: 13px; line-height: 1.7; color: #374151; }
.rich-preview ul, .rich-preview ol { margin: 6px 0 6px 1.2em; padding: 0; }

@media (max-width: 1180px) {
  .editor { grid-template-columns: 1fr; }
  .preview-col { position: static; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: block; }
  .grid2 { grid-template-columns: 1fr; }
  .phone { transform: none; }
}
