:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-soft: #f2eadf;
  --text: #1d211d;
  --muted: #6d6f67;
  --line: #ddd6ca;
  --border: #ddd6ca;
  --accent: #1f6a5a;
  --accent-strong: #164f43;
  --gold: #b46f38;
  --terracotta: #c97852;
  --sand: #e7d7b7;
  --danger: #9b3832;
  --shadow: 0 18px 45px rgba(61, 53, 39, 0.12);
  --radius: 10px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(243, 241, 236, 0.96), rgba(243, 241, 236, 1)),
    radial-gradient(circle at 85% 0%, rgba(201, 120, 82, 0.16), transparent 34%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

::selection {
  background: rgba(31, 106, 90, 0.18);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.form-select:focus,
.notice-reply-form textarea:focus,
.admin-voting-form input:focus,
.admin-voting-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 106, 90, 0.12);
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 28px rgba(51, 43, 30, 0.05);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), #2b806e);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(31, 106, 90, 0.22);
  color: white;
  display: inline-flex;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.side-nav a {
  background: rgba(242, 234, 223, 0.72);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
  padding: 11px 12px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.side-nav a:hover {
  background: white;
  border-color: rgba(31, 106, 90, 0.35);
  color: var(--accent-strong);
}

.side-nav a.nav-active {
  background: white;
  border-color: rgba(31, 106, 90, 0.5);
  border-left: 3px solid var(--accent);
  color: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(31, 106, 90, 0.10);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d93025;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
  letter-spacing: 0;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.25);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(217, 48, 37, 0.08); }
}

.admin-indicator {
  background: #fff4d8;
  border: 1px solid #e2bf65;
  border-radius: 999px;
  color: #684600;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

main {
  margin: 0 auto;
  max-width: 1220px;
  padding: 32px;
  width: 100%;
}

main > section {
  margin-bottom: 24px;
}

main > section:last-child {
  margin-bottom: 0;
}

.home-hero {
  align-items: end;
  background-color: #1a2e28;
  background-image:
    linear-gradient(90deg, rgba(23, 29, 25, 0.82), rgba(23, 29, 25, 0.40) 48%, rgba(23, 29, 25, 0.10)),
    url("/static/images/svb-astat-hero.png");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  display: flex;
  min-height: clamp(430px, 62vh, 620px);
  overflow: hidden;
  padding: clamp(28px, 6vw, 68px);
}

.home-hero-content {
  max-width: 720px;
}

.home-hero .eyebrow {
  color: #f1d49c;
}

.home-hero {
  border-radius: var(--radius);
  margin-bottom: 0;
}

.home-hero h1 {
  color: white;
  font-size: clamp(48px, 8vw, 92px);
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.24);
}

.home-hero .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 24px;
  margin: 12px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
}

.info-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, 1fr);
  margin: -34px 24px 24px;
  overflow: hidden;
  position: relative;
}

.info-strip article {
  background: white;
  padding: 20px;
}

.info-strip span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-strip strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.info-strip small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.home-panels,
.public-home-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-panel {
  min-height: 190px;
}

.identity-card,
.portal-card {
  padding: 26px;
}

.identity-card h2,
.portal-card h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.public-nastenka,
.home-nastenka-preview {
  margin-bottom: 24px;
}

.home-notice-preview-list {
  display: grid;
  gap: 8px;
}

.home-notice-preview-item {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}

.home-notice-preview-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.home-notice-preview-item strong {
  display: block;
  margin: 4px 0 4px;
  font-size: 15px;
}

.home-notice-preview-item .notice-text {
  font-size: 13px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-nastenka-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.public-nastenka-header h2 {
  margin-bottom: 0;
}

.nastenka-form {
  display: none;
  margin-bottom: 16px;
}

.nastenka-form--visible {
  display: block;
}

.public-notice-list {
  display: grid;
  gap: 12px;
}

.public-notice-item {
  padding: 20px 22px;
}

.public-notice-meta {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.notice-author {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.sync-notice {
  background: #fff4d8;
  border: 1px solid #e2bf65;
  border-left: 4px solid #e2bf65;
  border-radius: 6px;
  color: #684600;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
  padding: 12px 14px;
}

.public-notice-item h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.public-notice-item .notice-text {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.notice-reactions {
  border-top: 1px solid var(--line);
  margin-top: 14px;
}

.notice-reactions-toggle {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
  padding: 10px 0 6px;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-reactions-toggle::-webkit-details-marker { display: none; }

.notice-reactions-toggle::before {
  content: "▸";
  font-size: 11px;
  transition: transform 0.15s;
}

details[open] .notice-reactions-toggle::before {
  transform: rotate(90deg);
}

.notice-comments {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 0;
}

.notice-comment {
  background: var(--surface-soft);
  border-radius: 6px;
  padding: 10px 12px;
}

.notice-comment-author {
  font-size: 13px;
  font-weight: 700;
  margin-right: 8px;
}

.notice-comment-time {
  font-size: 12px;
}

.notice-comment-body {
  font-size: 14px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.notice-reply-form {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
}

.notice-reply-form textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  padding: 9px 11px;
  resize: vertical;
  width: 100%;
}

.notice-reply-form button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  justify-self: start;
  padding: 9px 14px;
  transition: background 0.15s;
}

.notice-reply-form button:hover {
  background: var(--accent-strong);
}

.notice-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.notice-attachment:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.notice-attachment-icon {
  font-size: 15px;
}

.notice-login-hint {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  padding-top: 12px;
}

.notice-login-hint a {
  color: var(--accent);
  font-weight: 700;
}

.public-details {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.public-details div {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding-top: 10px;
}

.public-details dt {
  color: var(--muted);
  font-weight: 700;
}

.public-details dd {
  font-weight: 700;
  margin: 0;
  text-align: right;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 12px;
}

.public-contact {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 16px;
}

.public-contact span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.public-contact a {
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 700;
}

.hero {
  align-items: end;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 360px;
  padding: 48px 0;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1 {
  font-size: 56px;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: 760px;
}

.status-panel,
.panel,
.owner-badge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(59, 51, 38, 0.06);
  padding: 22px;
}

.status-dot {
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  margin-right: 8px;
  width: 10px;
}

.status-panel p,
.section p,
.page-heading p {
  color: var(--muted);
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 24px;
}

.metric-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(59, 51, 38, 0.05);
  padding: 22px;
}

.metric-grid span,
.owner-badge span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.metric-grid strong {
  font-size: 34px;
}

.section,
.page-heading,
.dashboard-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.button,
.small-button {
  background: var(--accent);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.02);
  color: white;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 12px 18px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.button:hover,
.small-button:hover {
  background: var(--accent-strong);
  box-shadow: 0 6px 16px rgba(31, 106, 90, 0.25);
  transform: translateY(-1px);
}

.small-button {
  font-size: 13px;
  padding: 8px 12px;
}

.secondary-small {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.list-header,
.owner-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1.6fr 1.4fr auto;
  padding: 14px 18px;
}

.list-header {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.owner-row {
  border-top: 1px solid var(--line);
}

.muted {
  color: var(--muted);
}

.back-link {
  color: var(--accent);
  display: inline-block;
  font-size: 14px;
  margin-bottom: 14px;
}

.dashboard-header h1 {
  font-size: 40px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 24px;
}

.big-number {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 8px;
}

.positive {
  color: var(--accent);
}

.negative {
  color: var(--danger);
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.4fr 1fr;
  margin-bottom: 24px;
}

.contact-section {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  margin: 0 0 24px;
}

.inline-link {
  color: var(--accent);
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  margin-top: 10px;
}

.owner-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.owner-section-nav a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 11px;
}

.owner-notice-board {
  margin-bottom: 24px;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-top: 12px;
}

.notice-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.table > div,
.payment-table > div {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.table > div:first-child {
  border-top: 0;
}

.payment-table > div {
  display: grid;
  grid-template-columns: 120px 180px minmax(0, 1fr) 120px;
}

.payment-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.statement-history {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.statement-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.statement-card-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.statement-card-head strong,
.statement-card-head span {
  display: block;
}

.statement-totals {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.statement-table > div {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 120px 120px 120px;
  padding: 10px 0;
}

.statement-table > div:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.statement-table span:not(:first-child) {
  text-align: right;
}

.contact-form {
  display: grid;
  gap: 8px;
}

.contact-form.compact {
  align-items: end;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-form.compact .full {
  grid-column: 1 / -1;
}

.contact-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea,
.form-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
}

.content-admin-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}

.contact-form button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  justify-self: start;
  margin-top: 8px;
  padding: 11px 14px;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.login-panel {
  max-width: 460px;
  width: 100%;
}

.login-panel h1 {
  font-size: 38px;
}

.error-text {
  color: var(--danger);
  font-weight: 700;
}

.success-text {
  color: var(--accent);
  font-weight: 700;
}

.small-note {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 18px;
}

.admin-request-list {
  display: grid;
  gap: 16px;
}

.request-card-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.status-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(140px, 1fr) auto;
}

.status-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  grid-column: 1 / -1;
}

.status-form select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 10px 12px;
}

.status-form button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 14px;
}

.request-change-grid {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  padding-top: 18px;
}

.request-change-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.request-change-grid strong {
  overflow-wrap: anywhere;
}

.request-note {
  background: var(--surface-soft);
  border-radius: 6px;
  margin: 18px 0 0;
  padding: 12px;
}

.status-pill {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 5px 9px;
}

.status-pill.active {
  background: #e2f5ec;
  border-color: #9bcdb6;
  color: var(--accent-strong);
}

.status-pill.scheduled {
  background: #fff4d8;
  border-color: #e2bf65;
  color: #684600;
}

.status-pill.closed {
  background: #f1f1f1;
  color: #555;
}

.voting-card {
  display: block;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.voting-card:hover {
  border-color: rgba(31, 106, 90, 0.4);
  box-shadow: 0 16px 40px rgba(59, 51, 38, 0.11);
}

.notice-text {
  line-height: 1.6;
  white-space: pre-wrap;
}

.success-panel {
  border-color: #9bcdb6;
}

.danger-panel {
  border-color: #e1aaa6;
}

.danger-button {
  background: var(--danger);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 14px;
}

.voting-rules-panel {
  background: #eef4ff;
  border: 1px solid #b6cff5;
  border-left: 4px solid #3b7dd8;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.voting-rules-panel h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a3a6b;
  margin: 0 0 12px;
}

.voting-rules-panel ul {
  margin: 0 0 18px;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}

.voting-rules-panel li {
  font-size: 14px;
  line-height: 1.55;
  color: #1e2d4a;
}

.voting-rules-legal {
  border-top: 1px solid #b6cff5;
  padding-top: 14px;
  margin-top: 4px;
}

.voting-rules-legal-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3b5a8a;
  margin: 0 0 10px;
}

.voting-rules-legal dl {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.voting-rules-legal dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: baseline;
}

.voting-rules-legal dt {
  font-size: 12px;
  font-weight: 700;
  color: #3b7dd8;
  white-space: nowrap;
}

.voting-rules-legal dd {
  font-size: 12px;
  line-height: 1.55;
  color: #2a3f5f;
  margin: 0;
  font-style: italic;
}

.voting-rules-legal-note {
  font-size: 12px;
  color: #3b5a8a;
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed #b6cff5;
}

.vote-form,
.admin-voting-form {
  display: grid;
  gap: 16px;
}

.vote-form fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
}

.vote-form legend {
  font-weight: 700;
  padding: 0 6px;
}

.vote-choice-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.vote-choice-row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.vote-choice-row label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
}

.vote-form label,
.admin-voting-form label {
  color: var(--text);
  font-weight: 700;
}

.vote-form button,
.admin-voting-form button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  justify-self: start;
  padding: 12px 16px;
}

.admin-voting-form input,
.admin-voting-form textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  margin-top: 6px;
  padding: 10px 12px;
  width: 100%;
}

.question-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.question-item {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.icon-button,
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.icon-button {
  background: var(--surface-soft);
  color: var(--text);
  min-width: 42px;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-button {
  background: var(--surface-soft);
  color: var(--accent-strong);
  justify-self: start;
  margin-top: 10px;
  padding: 10px 12px;
}

.two-cols {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.question-summary {
  display: grid;
  gap: 12px;
}

.question-summary div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.question-summary div:first-child {
  border-top: 0;
  padding-top: 0;
}

.question-summary p {
  margin: 6px 0 0;
}

.audit-list {
  display: grid;
  gap: 12px;
}

.audit-list > div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.audit-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.audit-list span {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.result-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-summary-grid div {
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 14px;
}

.result-summary-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.results-table-wrap {
  overflow-x: auto;
}

.results-table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

.results-table th,
.results-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.results-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.report-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.inline-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.inline-form label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.inline-form select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 9px 12px;
}

.report-toolbar button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
}

.voting-report {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
}

.advance-report {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
}

.report-header {
  align-items: flex-start;
  border-bottom: 2px solid var(--text);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
}

.report-header h1 {
  font-size: 28px;
  line-height: 1.18;
}

.report-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.report-meta {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 120px;
  padding: 10px 12px;
  text-align: right;
}

.report-meta span,
.report-details dt {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.report-section {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.report-section h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.report-title-section h2 {
  font-size: 24px;
}

.report-details {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin: 16px 0 0;
}

.report-details dd {
  margin: 0;
}

.report-question-list div {
  padding: 14px 0;
}

.summary-table,
.report-results-table {
  border-collapse: collapse;
  width: 100%;
}

.summary-table th,
.summary-table td,
.report-results-table th,
.report-results-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.summary-table th,
.report-results-table th {
  background: #f0f2ee;
  color: var(--text);
  font-size: 13px;
}

.summary-table td:not(:first-child) {
  text-align: center;
}

.advance-report-table td:last-child,
.advance-report-table th:last-child {
  text-align: right;
}

.receipt-cell {
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  word-break: break-all;
}

.account-table td {
  vertical-align: middle;
}

.account-subline {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
}

.table-button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  white-space: nowrap;
}

.secondary-table-button {
  background: var(--surface-soft);
  color: var(--accent-strong);
  display: inline-flex;
}

.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-button:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.contact-edit-panel {
  max-width: 620px;
}

.invitation-card {
  display: grid;
  gap: 12px;
}

.invitation-delivery-grid,
.print-invitation-grid {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 190px;
}

.copy-field {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 12px;
  width: 100%;
}

.print-invitation {
  line-height: 1.55;
}

.qr-box {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px;
  text-align: center;
}

.qr-box img {
  display: block;
  max-width: 160px;
  width: 100%;
}

.qr-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.invitation-url {
  background: var(--surface-soft);
  border-radius: 6px;
  overflow-wrap: anywhere;
  padding: 12px;
}

.bulk-print-toolbar {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.bulk-print-toolbar h1 {
  font-size: 40px;
}

.bulk-invitation-sheet {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bulk-invitation-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 150px;
  min-height: 260px;
  padding: 18px;
}

.bulk-invitation-card h2 {
  font-size: 19px;
  margin-bottom: 6px;
}

.bulk-invitation-card .qr-box img {
  max-width: 132px;
}

.report-footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding-top: 18px;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    position: static;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-nav a {
    text-align: center;
  }

  .section,
  .page-heading,
  .dashboard-header,
  .request-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    padding: 22px;
  }

  .hero,
  .info-strip,
  .home-panels,
  .public-home-grid,
  .metric-grid,
  .dashboard-grid,
  .split,
  .contact-section,
  .contact-form.compact,
  .request-change-grid,
  .result-summary-grid,
  .content-admin-grid,
  .status-form,
  .two-cols,
  .vote-choice-row,
  .vote-choice-row--3,
  .invitation-delivery-grid,
  .print-invitation-grid,
  .bulk-invitation-sheet,
  .bulk-invitation-card {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }

  .home-hero {
    min-height: 440px;
    padding: 28px;
  }

  .home-hero h1 {
    font-size: 54px;
  }

  .info-strip {
    margin: 14px 0 24px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .list-header {
    display: none;
  }

  .owner-row,
  .payment-table > div,
  .statement-card-head,
  .statement-table > div,
  .notice-item {
    grid-template-columns: 1fr;
  }

  .statement-card-head {
    display: grid;
  }

  .statement-totals,
  .statement-table span:not(:first-child) {
    text-align: left;
  }

  .notice-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  @page {
    margin: 14mm;
    size: A4 landscape;
  }

  body {
    background: white;
  }

  .sidebar,
  .report-toolbar,
  .bulk-print-toolbar,
  .invitation-card .button-row,
  .back-link {
    display: none;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .voting-report,
  .advance-report {
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .report-section {
    break-inside: avoid;
  }

  .bulk-invitation-sheet {
    display: block;
  }

  .bulk-invitation-card {
    break-inside: avoid;
    border: 1px solid #888;
    border-radius: 0;
    grid-template-columns: minmax(0, 1fr) 42mm;
    margin: 0 0 8mm;
    min-height: 72mm;
    page-break-inside: avoid;
  }

  .bulk-invitation-card .qr-box img {
    max-width: 38mm;
  }

  .bulk-invitation-card .invitation-url,
  .print-invitation .invitation-url {
    background: white;
    border: 1px solid #bbb;
  }

  .results-table-wrap {
    overflow: visible;
  }

  .results-table {
    min-width: 0;
  }
}

/* ──────────────────────────────────────────────
   FÓRUM
   ────────────────────────────────────────────── */

.forum-header {
  padding: var(--space-8) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.forum-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.forum-header-inner h1 {
  font-size: 1.6rem;
  margin: 0 0 var(--space-1);
}

.forum-body {
  padding: var(--space-4) var(--space-6) var(--space-8);
}

.forum-topic-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.forum-topic-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
}
.forum-topic-row--pinned {
  border-left: 3px solid var(--accent);
}

.forum-topic-main {
  flex: 1;
  min-width: 0;
}
.forum-topic-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.forum-topic-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.forum-topic-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.forum-topic-snippet {
  margin: var(--space-1) 0 var(--space-2);
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forum-topic-meta {
  font-size: .8rem;
  display: flex;
  gap: var(--space-2);
}

.forum-topic-stats {
  text-align: center;
  min-width: 3rem;
}
.forum-reply-count {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.forum-badge {
  font-size: .75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.forum-empty {
  padding: var(--space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* Formulár novej témy */
.forum-form-wrap {
  padding: var(--space-6);
  max-width: 680px;
}
.forum-form-panel h1 {
  font-size: 1.4rem;
  margin: 0 0 var(--space-5);
}

/* Vlákno */
.forum-thread {
  padding: var(--space-4) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
}
.forum-thread-title {
  font-size: 1.4rem;
  margin: var(--space-2) 0 var(--space-4);
}

.forum-post {
  padding: var(--space-5);
}
.forum-post--op {
  border-left: 3px solid var(--accent);
}

.forum-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.forum-post-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.forum-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.forum-post-body {
  line-height: 1.65;
  color: var(--text);
}

.forum-reply-panel h2 {
  font-size: 1.1rem;
  margin: 0 0 var(--space-4);
}
.forum-locked-notice {
  padding: var(--space-4);
  text-align: center;
}

/* Admin akcie v toolbare */
.forum-admin-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.small-button--danger {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}
.small-button--danger:hover {
  background: #a93226;
}

/* Paginácia */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-6);
}
.button--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.button--outline:hover {
  background: var(--accent);
  color: #fff;
}
