@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&display=swap');

:root {
  --brand: #0f766e;
  --brand-light: #ecfdf5;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --green: #16a34a; --green-bg: #dcfce7;
  --amber: #b45309; --amber-bg: #fef3c7;
  --blue: #1d4ed8; --blue-bg: #dbeafe;
  --red: #b91c1c; --red-bg: #fee2e2;

  /* Publikus (közérdekű adat-portál) egyedi tónusai — meleg papír és tinta,
     visszafogott arany ékezettel, a hivatali/archívum-hangulathoz */
  --pub-brand: #0f766e;
  --pub-brand-deep: #0a4c47;
  --pub-paper: #faf8f4;
  --pub-ink: #23201b;
  --pub-ink-muted: #6b6459;
  --pub-line: #e4ddd0;
  --pub-gold: #a9762c;
  --pub-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { display: flex; flex-direction: column; height: 100vh; }

.topnav {
  background: #fff; border-bottom: 1px solid var(--border); padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0; flex-wrap: wrap; row-gap: 6px; min-height: 52px;
}
.topnav-left, .topnav-right { display: flex; align-items: center; flex-wrap: wrap; }
.topnav-left { gap: 22px; }
.topnav-right { gap: 16px; }
.topnav .brand { font-weight: 700; font-size: 1.05rem; color: var(--brand); white-space: nowrap; }
.topnav-main { display: flex; gap: 18px; }
.topnav a { color: var(--text-muted); font-size: 0.88rem; padding: 6px 4px; white-space: nowrap; }
.topnav a.active, .topnav a:hover { color: var(--brand); text-decoration: none; }
.topnav a.active { font-weight: 600; }
.topnav-divider { width: 1px; height: 18px; background: var(--border); }
.topnav .user-info { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }

.content { padding: 20px 24px; flex: 1; min-height: 0; overflow-y: auto; }
.admin-footer {
  flex-shrink: 0; padding: 10px 24px; background: #fff; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 0.76rem; color: var(--text-muted);
}
.admin-footer a { color: var(--text-muted); text-decoration: underline; }
.admin-footer a:hover { color: var(--brand); }
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.content-header h1 { font-size: 1.4rem; margin: 0; }

.btn {
  display: inline-block; padding: 8px 16px; border-radius: 6px; border: none;
  background: var(--brand); color: #fff; cursor: pointer; font-size: 0.88rem; font-weight: 500;
}
.btn:hover { opacity: 0.9; text-decoration: none; color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--red); }
.btn-row { display: flex; gap: 10px; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.88rem; }
table.data-table th { color: var(--text-muted); font-weight: 600; font-size: 0.76rem; background: transparent; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: #f8fafc; }

.card { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 20px; }
.card h2 { font-size: 1.05rem; margin-top: 0; }

/* Irányítópult — hónapok szerint csoportosított tábla-nézet */
.board-group { margin-bottom: 26px; }
.board-group:last-child { margin-bottom: 0; }
.board-group-label {
  font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; padding-left: 12px;
  border-left: 4px solid; display: inline-block;
}
.board-group-0 .board-group-label { border-color: #3b82f6; color: #3b82f6; }
.board-group-1 .board-group-label { border-color: #8b5cf6; color: #8b5cf6; }
.board-meeting {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 14px; overflow: hidden;
}
.board-meeting-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: #f8fafc; border-bottom: 1px solid var(--border); font-weight: 600;
}
.board-meeting-date { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.board-table { width: 100%; border-collapse: collapse; }
.board-table th { text-align: left; padding: 6px 16px; font-size: 0.72rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.board-table td { padding: 8px 16px; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; }
.board-table tr:last-child td { border-bottom: none; }
.board-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.68rem; font-weight: 700;
}
.board-category { padding: 3px 9px; border-radius: 4px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.board-category-jegyzokonyv { background: #ede9fe; color: #5b21b6; }
.board-category-jelenleti_iv { background: #e0e7ff; color: #4338ca; }
.board-category-eloterjesztes { background: #dbeafe; color: #1d4ed8; }
.board-category-hanganyag { background: #d1fae5; color: #047857; }
.board-category-egyeb { background: #f1f5f9; color: #64748b; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; align-items: start; }
.card-grid .card { margin-bottom: 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-amber-strong { background: var(--amber); color: #fff; text-decoration: none; }
.badge-amber-strong:hover { opacity: 0.88; text-decoration: none; }
.badge-publikalva { background: var(--green-bg); color: var(--green); }
.badge-validalasra_var { background: var(--amber-bg); color: var(--amber); }
.badge-kitakarasra_var { background: var(--blue-bg); color: var(--blue); }
.badge-elutasitva { background: var(--red-bg); color: var(--red); }
.badge-feltoltve, .badge-feldolgozas_alatt { background: #f1f5f9; color: var(--text-muted); }
.badge-ules { background: var(--blue-bg); color: var(--blue); }
.badge-sent { background: var(--green-bg); color: var(--green); }
.badge-failed { background: var(--red-bg); color: var(--red); }
.badge-dry_run { background: #f1f5f9; color: var(--text-muted); }

.icon-btn { border: none; background: none; cursor: pointer; font-size: 1rem; }
.icon-btn.disabled { opacity: 0.3; cursor: not-allowed; }

.flash { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
.flash-info { background: var(--brand-light); color: var(--brand); }
.flash-error { background: var(--red-bg); color: var(--red); }

form.stacked label { display: block; margin: 12px 0 4px; font-size: 0.86rem; font-weight: 500; }
form.stacked input[type=text], form.stacked input[type=password], form.stacked input[type=email],
form.stacked input[type=date], form.stacked input[type=time], form.stacked input[type=number],
form.stacked select, form.stacked textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem;
}
form.stacked textarea { min-height: 90px; }

/* ============================================================
   PUBLIKUS OLDALAK — közérdekű adat-archívum megjelenése
   ============================================================ */

.pub-body { background: var(--pub-paper); color: var(--pub-ink); min-height: 100vh; display: flex; flex-direction: column; }

.pub-header {
  background: var(--pub-brand-deep);
  color: #fdfcf9;
}
.pub-header-title-row {
  max-width: 1100px; margin: 0 auto; padding: 16px 28px 10px;
}
.pub-brand {
  font-family: var(--pub-serif); font-size: 1.5rem; font-weight: 700;
  color: #fff; text-decoration: none; letter-spacing: 0.01em;
}
.pub-brand:hover { text-decoration: none; opacity: 0.92; }

.pub-header-nav-row {
  max-width: 1100px; margin: 0 auto; padding: 10px 28px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.pub-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-nav a, .pub-nav button, .pub-detail-search-btn {
  color: #d9ece9; font-size: 0.82rem; white-space: nowrap; text-decoration: none;
  padding: 6px 13px; border: 1px solid rgba(255,255,255,0.4); border-radius: 2px;
  background: transparent; cursor: pointer; font-family: inherit;
}
.pub-nav a:hover, .pub-nav button:hover, .pub-detail-search-btn:hover {
  color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); text-decoration: none;
}
.pub-nav .pub-nav-login { color: #fff; background: rgba(255,255,255,0.14); }
.pub-nav .pub-nav-login:hover { background: rgba(255,255,255,0.22); }
.pub-a11y-toggle[aria-pressed="true"] { background: var(--pub-gold); color: #fff; border-color: var(--pub-gold); }

.pub-search-group { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pub-search { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.pub-search input {
  width: 220px; padding: 8px 14px; border: 1px solid rgba(255,255,255,0.4); border-right: none; border-radius: 2px 0 0 2px;
  font-size: 0.86rem; background: rgba(255,255,255,0.14); color: #fff;
}
.pub-search input::placeholder { color: rgba(255,255,255,0.65); }
.pub-search input:focus { background: #fff; color: var(--pub-ink); outline: 3px solid var(--pub-gold); outline-offset: 1px; }
.pub-search input:focus::placeholder { color: var(--pub-ink-muted); }
.pub-search button {
  padding: 8px 18px; border-radius: 0 2px 2px 0; border: 1px solid var(--pub-gold); cursor: pointer;
  background: var(--pub-gold); color: #fff; font-size: 0.86rem; font-weight: 600;
}
.pub-search button:hover { background: #96682a; }
.pub-detail-search-btn { padding: 8px 13px; }

/* Alap, mindig látható fókusz-jelzés a publikus oldalakon — WCAG 2.4.7 */
.pub-body a:focus-visible,
.pub-body button:focus-visible,
.pub-body input:focus-visible,
.pub-body select:focus-visible {
  outline: 3px solid var(--pub-gold);
  outline-offset: 2px;
}
.pub-search button {
  padding: 8px 18px; border-radius: 0 2px 2px 0; border: none; cursor: pointer;
  background: var(--pub-gold); color: #fff; font-size: 0.86rem; font-weight: 600;
}
.pub-search button:hover { background: #96682a; }

.pub-main { max-width: 1100px; margin: 0 auto; padding: 40px 28px 60px; width: 100%; box-sizing: border-box; flex: 1; }

.pub-footer { background: #efe9db; border-top: 1px solid var(--pub-line); padding: 16px 28px; font-size: 0.78rem; color: var(--pub-ink-muted); flex-shrink: 0; }
.pub-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pub-footer a { color: var(--pub-ink-muted); text-decoration: underline; }
.pub-footer a:hover { color: var(--pub-brand); }
.pub-main h1 {
  font-family: var(--pub-serif); font-size: 1.6rem; font-weight: 600; margin: 0 0 28px;
}

.register-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pub-line); }
.register-item { border-bottom: 1px solid var(--pub-line); }
.register-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 18px 4px; text-decoration: none; color: inherit;
}
.register-link:hover { text-decoration: none; }
.register-link:hover .register-title { color: var(--pub-brand); }
.register-title {
  font-family: var(--pub-serif); font-size: 1.08rem; font-weight: 600; color: var(--pub-ink);
  flex: 1; min-width: 0;
}
.register-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.register-meta span {
  font-size: 0.78rem; color: var(--pub-ink-muted); white-space: nowrap;
}
.register-meta .register-tag {
  padding: 2px 9px; border-radius: 999px; background: #eee7d8; color: var(--pub-gold); font-weight: 600;
}

/* ============================================================
   AKADÁLYMENTES NÉZET — fekete háttér, citromsárga, félkövér
   szöveg (a Windows "High Contrast Black" sémájának logikája).
   Csak a body-ra rakott osztály váltja ki.
   ============================================================ */
body.a11y-mode {
  background: #000 !important;
  --pub-ink: #FFEE00;
  --pub-ink-muted: #FFD400;
  --pub-line: #7a6600;
  --pub-paper: #000000;
  --pub-brand-deep: #000000;
  --pub-gold: #FFEE00;
  --brand: #FFEE00;
  --brand-light: #1a1600;
  --text: #FFEE00;
  --text-muted: #FFD400;
  --bg: #000000;
  --border: #7a6600;
  font-size: 1.15em;
  line-height: 1.65;
  font-weight: 700;
}
body.a11y-mode, body.a11y-mode * { font-weight: 700 !important; }
body.a11y-mode a { color: #FFEE00 !important; text-decoration: underline; }
body.a11y-mode .register-title { font-weight: 700; }
body.a11y-mode .pub-a11y-toggle { border-width: 2px; color: #FFEE00; }
body.a11y-mode .pub-nav a:not(.pub-nav-login) { text-decoration: none; border-bottom: 1px solid #FFEE00; }

/* háttér-felületek egységesen feketék, jelvények/dobozok sárga kerettel */
body.a11y-mode .pub-header,
body.a11y-mode .pub-viewer-tabs,
body.a11y-mode .pub-viewer-body,
body.a11y-mode .card,
body.a11y-mode .pub-filters,
body.a11y-mode .register-item,
body.a11y-mode .pub-doc-info,
body.a11y-mode .pub-doc-viewer,
body.a11y-mode #viewer-render-area,
body.a11y-mode .att-table,
body.a11y-mode .att-view-header,
body.a11y-mode .att-companion-row td {
  background: #000 !important; border-color: #FFEE00 !important;
}
body.a11y-mode .att-action-btn {
  background: #FFEE00 !important; color: #000 !important;
}
body.a11y-mode .att-avail-ok, body.a11y-mode .att-avail-partial, body.a11y-mode .att-avail-none {
  color: #FFEE00 !important;
}
body.a11y-mode .badge, body.a11y-mode .register-tag {
  background: #000 !important; color: #FFEE00 !important; border: 1px solid #FFEE00 !important;
}
/* sárga hátterű elemeken (gombok) fekete legyen a szöveg a kontraszt miatt */
body.a11y-mode .pub-search button,
body.a11y-mode .pub-a11y-toggle[aria-pressed="true"],
body.a11y-mode .btn:not(.btn-secondary):not(.btn-danger) {
  background: #FFEE00 !important; color: #000 !important; border-color: #FFEE00 !important;
}
body.a11y-mode .btn-secondary, body.a11y-mode .btn-danger {
  background: #000 !important; color: #FFEE00 !important; border: 2px solid #FFEE00 !important;
}
body.a11y-mode select, body.a11y-mode input {
  background: #000 !important; color: #FFEE00 !important; border: 1px solid #FFEE00 !important;
}
body.a11y-mode *:focus, body.a11y-mode *:focus-visible {
  outline: 3px solid #FFEE00 !important; outline-offset: 2px !important;
}
body.a11y-mode *, body.a11y-mode *::before, body.a11y-mode *::after {
  transition: none !important; animation: none !important; scroll-behavior: auto !important;
}
body.a11y-mode .cal-other-month { background: #000 !important; }
body.a11y-mode .cal-event, body.a11y-mode .cal-event-closed { background: #FFEE00 !important; color: #000 !important; }
body.a11y-mode .cal-today .cal-daynum span { background: #FFEE00 !important; color: #000 !important; }

.pub-filters { margin-bottom: 28px; padding: 16px 18px; background: #fff; border: 1px solid var(--pub-line); }
.pub-filters-row { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.pub-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--pub-ink-muted); }
.pub-filters select, .pub-filters input[type="date"] {
  padding: 7px 10px; border: 1px solid var(--pub-line); background: #fff; color: var(--pub-ink); font-size: 0.85rem;
}
.pub-filters .btn { padding: 8px 20px; }
.pub-filters-reset { font-size: 0.8rem; color: var(--pub-ink-muted); align-self: center; }

/* Ülés-lista: lenyitható (details/summary), alapból zárt, kiemelt címsor */
.meeting-disclosure-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; cursor: pointer; list-style: none;
}
.meeting-disclosure-summary::-webkit-details-marker { display: none; }
.meeting-disclosure-summary::marker { content: ''; }
.meeting-disclosure-summary .register-title { font-size: 1.2rem; font-weight: 700; }
.meeting-disclosure-summary::after {
  content: '▸'; color: var(--pub-ink-muted); font-size: 1rem; margin-left: auto; flex-shrink: 0;
}
.meeting-disclosure[open] > .meeting-disclosure-summary::after { content: '▾'; }
.meeting-disclosure-meta { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--pub-ink-muted); flex-shrink: 0; }
.meeting-disclosure-body { padding: 0 4px 22px; }

/* Melléklet/dokumentum táblák (ülésnaptár alatt) — a saját arculathoz
   igazítva, sor-akciógombokkal és a kapcsolt fájlok csoportosításával */
.att-table { width: 100%; border-collapse: collapse; margin: 4px 0 6px; font-size: 0.85rem; }
.att-table th { text-align: left; padding: 6px 10px; font-size: 0.7rem; color: var(--pub-ink-muted); border-bottom: 1px solid var(--pub-line); font-weight: 600; }
.att-table td { padding: 8px 10px; border-bottom: 1px solid var(--pub-line); vertical-align: middle; }
.att-table tr:last-child td { border-bottom: none; }
.att-companion-row td { padding-left: 24px; background: #f8f6f0; font-size: 0.82rem; }
.att-table-actions { white-space: nowrap; text-align: right; }
.att-action-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 2px; background: var(--pub-brand); color: #fff; margin-left: 4px; text-decoration: none;
  font-size: 0.85rem;
}
.att-action-btn:hover { background: var(--pub-brand-deep); text-decoration: none; }
.att-avail { font-size: 0.78rem; }
.att-avail-ok { color: #15803d; }
.att-avail-partial { color: var(--pub-gold); }
.att-avail-none { color: var(--pub-ink-muted); }

/* Melléklet-megtekintő oldal fejléce */
.att-view-header {
  display: flex; align-items: center; gap: 20px; padding: 14px 28px;
  background: #fff; border-bottom: 1px solid var(--pub-line);
}
.att-view-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-view-title strong { font-family: var(--pub-serif); font-size: 1rem; }

/* Ülésnaptár — valódi hónap-rács */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cal-nav h2 { font-family: var(--pub-serif); font-size: 1.3rem; margin: 0; font-weight: 600; }
.cal-nav a { font-size: 0.88rem; white-space: nowrap; }
.cal-grid { width: 100%; border-collapse: collapse; margin-bottom: 44px; table-layout: fixed; }
.cal-grid th {
  padding: 8px 4px; font-size: 0.76rem; color: var(--pub-ink-muted); font-weight: 600;
  border-bottom: 1px solid var(--pub-line); text-align: left;
}
.cal-grid td {
  vertical-align: top; height: auto; min-height: 32px; padding: 3px 5px; border: 1px solid var(--pub-line);
  overflow: hidden;
}
.cal-other-month { background: #f2ede0; }
.cal-other-month .cal-daynum span { color: var(--pub-ink-muted); }
.cal-daynum { font-size: 0.72rem; margin-bottom: 1px; line-height: 1.2; }
.cal-today .cal-daynum span {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pub-brand-deep); color: #fff; border-radius: 50%; width: 17px; height: 17px; font-size: 0.68rem;
}
.cal-event {
  display: block; font-size: 0.66rem; padding: 1px 4px; margin-bottom: 1px; border-radius: 2px;
  background: var(--pub-brand); color: #fff; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4;
}
.cal-event:hover { background: var(--pub-brand-deep); text-decoration: none; }
.cal-event-closed { background: var(--pub-ink-muted); }

.cal-grid-wrap { overflow-x: auto; margin-bottom: 44px; }
@media (max-width: 700px) {
  .cal-grid { min-width: 560px; margin-bottom: 0; }
  .cal-grid td { min-height: 28px; font-size: 0.9em; }
}

.pub-empty { color: var(--pub-ink-muted); padding: 32px 4px; font-size: 0.95rem; }
.pub-footer-note { margin-top: 32px; font-size: 0.8rem; color: var(--pub-ink-muted); }
.pub-footer-note a { color: var(--pub-brand); }

/* Dokumentum-nézet: bal = megjelenítő (elsődleges), jobb = adat-sáv */
.pub-doc-layout { display: flex; gap: 0; flex: 1; min-height: 0; }
.pub-doc-viewer {
  flex: 1 1 62%; display: flex; flex-direction: column; background: #ece7dc; min-width: 0;
}
.pub-viewer-tabs { display: flex; gap: 2px; padding: 12px 20px 0; flex-shrink: 0; }
.pub-tab {
  padding: 9px 16px; border: none; background: transparent; color: var(--pub-ink-muted);
  font-size: 0.85rem; cursor: pointer; border-radius: 6px 6px 0 0;
}
.pub-tab.active { background: #fff; color: var(--pub-ink); font-weight: 600; }
.pub-viewer-body { flex: 1; min-height: 0; position: relative; overflow: auto; background: #fff; margin: 0 20px 20px; border-radius: 0 6px 6px 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pub-viewer-body #viewer-render-area { padding: 20px; background: #ece7dc; min-height: 100%; }
.pub-viewer-body #viewer-nopreview { padding: 32px; }
.pub-viewer-body #viewer-loading { padding: 32px; color: var(--pub-ink-muted); }

.pub-doc-info {
  flex: 0 0 38%; max-width: 420px; padding: 28px 32px; overflow-y: auto;
  border-left: 1px solid var(--pub-line); background: var(--pub-paper);
}
.pub-back {
  display: inline-block; margin-bottom: 20px; font-size: 0.85rem; color: var(--pub-ink-muted); text-decoration: none;
}
.pub-back:hover { color: var(--pub-brand); text-decoration: none; }
.pub-doc-info h1 { font-family: var(--pub-serif); font-size: 1.4rem; font-weight: 600; margin: 0 0 20px; line-height: 1.3; }
.pub-doc-meta { margin: 0 0 22px; }
.pub-doc-meta div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--pub-line); font-size: 0.85rem; }
.pub-doc-meta dt { color: var(--pub-ink-muted); margin: 0; }
.pub-doc-meta dd { margin: 0; font-weight: 500; text-align: right; }
.pub-doc-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pub-doc-actions .btn { text-align: center; }

@media (max-width: 860px) {
  .pub-doc-layout { flex-direction: column; min-height: auto; }
  .pub-doc-viewer { min-height: 60vh; }
  .pub-doc-info { flex: none; max-width: none; border-left: none; border-top: 1px solid var(--pub-line); }
  .pub-search input { width: 140px; }
  .register-link { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 32px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); width: 320px; }

.notice { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.doc-detail-layout { display: flex; gap: 20px; height: 100%; align-items: stretch; }
.doc-detail-left { flex: 0 0 42%; max-width: 42%; overflow-y: auto; padding-right: 6px; }
.doc-detail-right {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); overflow: hidden;
}
.viewer-header { padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.viewer-body { flex: 1; min-height: 0; position: relative; overflow: auto; }
.viewer-body iframe { width: 100%; height: 100%; border: none; display: block; }
#viewer-render-area { padding: 16px; background: #f1f5f9; min-height: 100%; }
#viewer-nopreview { padding: 24px; }
#viewer-text { padding: 20px; white-space: pre-wrap; line-height: 1.6; }
.attachment-card h2 { font-size: 0.95rem; }

@media (max-width: 900px) {
  .doc-detail-layout { flex-direction: column; height: auto; }
  .doc-detail-left, .doc-detail-right { flex: none; max-width: 100%; }
  .doc-detail-right { min-height: 500px; }
}
