/* Components and page geometry. Shared palette and primitives live in theme.css. */
@layer layout {
  .mfa-setup-qr { display: block; max-inline-size: 100%; block-size: auto; margin-block: .75rem 1rem; }
  .community-kicker { color: var(--ui-accent); font-size: 10px; font-weight: 850; letter-spacing: 1.1px; }
  .community-public { margin-top: 35px; margin-bottom: 120px; }
  .community-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
  .community-toolbar h2 { margin: 7px 0px; color: var(--ui-muted); font-size: 27px; }
  .community-toolbar p { margin: 0px; color: var(--ui-muted); font-size: 13px; line-height: 1.7; }
  .community-toolbar > .button { flex-shrink: 0; }
  .community-message { margin: 12px 0px; padding: 13px 16px; border: 1px solid var(--ui-border); border-radius: 13px; background: var(--ui-surface); color: var(--ui-ok); font-size: 13px; line-height: 1.6; }
  .community-message.is-error { background: var(--ui-surface); border-color: var(--ui-border); color: var(--ui-danger); }
  .community-empty { padding: 35px 24px; border: 1px dashed var(--ui-border); border-radius: 18px; background: var(--ui-surface); color: var(--ui-muted); text-align: center; font-size: 14px; line-height: 1.8; }
  .community-help { font-size: 11px; line-height: 1.7; color: var(--ui-muted); }
  .community-form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
  .community-form-row { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 12px; }
  .community-admin-columns { display: grid; grid-template-columns: minmax(0px, 0.9fr) minmax(0px, 1.1fr); gap: 22px; align-items: start; }
  .community-admin-columns > *, .community-form-row > * { min-width: 0px; }
  .community-admin { max-width: 1460px; margin: 0px auto; }
  .ballot-list { display: grid; gap: 20px; }
  .ballot-card { padding: 27px; border: 1px solid var(--ui-border); border-radius: 22px; background: var(--ui-surface); box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 28px; min-width: 0px; }
  .ballot-card > h2 { margin: 12px 0px 10px; color: var(--ui-muted); font-size: 25px; line-height: 1.35; overflow-wrap: anywhere; }
  .ballot-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .ballot-status { padding: 5px 9px; border-radius: 20px; background: var(--ui-surface); color: var(--ui-ok); font-size: 11px; font-weight: 700; white-space: nowrap; }
  .ballot-intro { color: var(--ui-muted); font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
  .ballot-dates { color: var(--ui-muted); font-size: 11px; line-height: 1.6; }
  .ballot-total { display: block; margin: 16px 0px 10px; color: var(--ui-muted); font-size: 12px; }
  .ballot-ranking { margin: 0px 0px 20px; padding: 0px; list-style: none; display: grid; gap: 8px; }
  .ballot-result { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden; padding: 12px 13px 15px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-surface); min-width: 0px; }
  .ballot-result-copy { display: grid; gap: 4px; min-width: 0px; }
  .ballot-result-copy strong { color: var(--ui-muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  .ballot-result-copy > span { color: var(--ui-muted); font-size: 11px; }
  .ballot-result-value { flex-shrink: 0; color: var(--ui-accent); font-size: 11px; font-weight: 750; }
  .ballot-bar { position: absolute; bottom: 0px; left: 0px; height: 4px; background: linear-gradient(90deg,var(--ui-accent-strong),var(--ui-violet-strong)); }
  .ballot-vote fieldset { margin: 0px 0px 14px; padding: 0px; border: 0px; display: grid; gap: 7px; }
  .ballot-vote legend { margin-bottom: 10px; color: var(--ui-muted); font-size: 12px; font-weight: 750; }
  .ballot-choice { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--ui-border); border-radius: 11px; background: var(--ui-surface); color: var(--ui-muted); font-size: 13px; cursor: pointer; }
  .ballot-choice input { width: 17px; height: 17px; accent-color: var(--ui-accent); flex-shrink: 0; }
  .ballot-choice > span { overflow-wrap: anywhere; min-width: 0px; }
  .ballot-vote small { display: block; margin-top: 10px; }
  .community-pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }
  .community-pagination > span { color: var(--ui-muted); font-size: 12px; }
  .community-danger { color: var(--ui-danger) !important; }
  .community-admin button:disabled, .community-public button:disabled { opacity: 0.55; cursor: wait; }
  .community-mail { max-width: 850px; }
  .community-mail > p { color: var(--ui-muted); font-size: 13px; line-height: 1.8; }
  .community-mail hr { margin: 26px 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; border-image: none; border-top: 1px solid var(--ui-border); }
  .notification-bell { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 37px; padding: 8px 11px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-surface-2); color: var(--ui-text); font-size: 11px; font-weight: 750; cursor: pointer; }
  .notification-bell svg { width: 18px; height: 18px; fill: none; stroke: currentcolor; stroke-width: 1.8; }
  .notification-bell b { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0px 4px; border-radius: 20px; background: var(--ui-danger-strong); color: var(--ui-text); font-size: 10px; }
  .notification-widget [hidden] { display: none !important; }
  .notification-dialog { width: min(490px, -28px + 100vw); max-height: 80vh; padding: 23px; border: 1px solid var(--ui-border); border-radius: 22px; background: var(--ui-surface); color: var(--ui-muted); box-shadow: rgba(0, 0, 0, 0.267) 0px 20px 80px; }
  .notification-dialog::backdrop { background: color-mix(in srgb, var(--ui-bg) 33%, transparent); }
  .notification-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
  .notification-dialog h2 { margin: 7px 0px 17px; color: var(--ui-muted); font-size: 23px; }
  .notification-dialog header > button { border: 0px; border-radius: 10px; background: var(--ui-surface); color: var(--ui-muted); font-size: 23px; padding: 2px 10px; cursor: pointer; }
  .notification-tools { display: flex; gap: 9px; margin-bottom: 14px; }
  .notification-tools button, .notification-item > button { padding: 8px 10px; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface); color: var(--ui-muted); font-size: 11px; cursor: pointer; }
  .notification-list { max-height: 50vh; overflow-y: auto; display: grid; gap: 9px; }
  .notification-item { display: flex; align-items: center; gap: 9px; padding: 13px; border-top-color: ; border-top-style: ; border-top-width: ; border-right-color: ; border-right-style: ; border-right-width: ; border-bottom-color: ; border-bottom-style: ; border-bottom-width: ; border-image-source: ; border-image-slice: ; border-image-width: ; border-image-outset: ; border-image-repeat: ; border-left: 4px solid var(--ui-border-strong); border-radius: 13px; background: var(--ui-surface); }
  .notification-item.is-seen { border-left-color: var(--ui-border); background: var(--ui-surface); }
  .notification-item > a { display: grid; gap: 5px; flex: 1 1 0%; min-width: 0px; color: var(--ui-muted); text-decoration: none !important; }
  .notification-item strong { font-size: 13px; color: var(--ui-muted); line-height: 1.5; }
  .notification-item span { color: var(--ui-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
  .notification-item > button { flex-shrink: 0; }
  .notification-dialog > small { display: block; margin-top: 14px; color: var(--ui-muted); font-size: 11px; line-height: 1.7; }
  .admin-top .notification-widget { margin-left: auto; margin-right: 15px; }
  .recovery-card { max-width: 650px; }
  .recovery-card h2 { margin-top: 10px; }
  .recovery-card > p { font-size: 14px; line-height: 1.8; color: var(--ui-muted); }
  .recovery-card a { color: var(--ui-accent); }
  .community-form-row input { min-width: 0px; max-width: 100%; }
  @media (max-width: 1050px) {
    .community-admin-columns { grid-template-columns: minmax(0px, 1fr); }
    .community-form-row { grid-template-columns: minmax(0px, 1fr); }
  }
  @media (max-width: 700px) {
    .community-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
    .ballot-card { padding: 20px 16px; border-radius: 17px; }
    .ballot-card > h2 { font-size: 22px; }
    .ballot-top { align-items: flex-start; flex-wrap: wrap; }
    .ballot-choice { font-size: 12px; }
    .notification-dialog { padding: 17px; }
    .notification-dialog h2 { font-size: 20px; }
    .notification-item { padding: 11px 9px; }
    .notification-bell { justify-content: flex-start; }
    .admin-top .notification-widget { margin: 0px; }
    .admin-top { flex-wrap: wrap; }
    .community-pagination { gap: 10px; }
    .community-form-actions { align-items: stretch; flex-direction: column; }
    .community-public { margin-top: 22px; }
  }
  @media (min-width: 701px) {
    .admin-sidebar nav { min-height: 0px; overflow-y: auto; scrollbar-width: thin; }
  }
}
