:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --topbar-bg: rgba(246, 247, 244, 0.94);
  --surface: #ffffff;
  --surface-soft: #eef4ef;
  --field: #ffffff;
  --item: #ffffff;
  --active: #f1f8f3;
  --line: #d8dfd8;
  --text: #17201a;
  --muted: #657168;
  --green: #1f7a4c;
  --green-dark: #155b38;
  --green-text: #155b38;
  --red: #b42318;
  --red-dark: #951b12;
  --amber: #ad6b00;
  --toast-bg: #17201a;
  --toast-text: #ffffff;
  --toast-line: #17201a;
  --shadow: 0 12px 34px rgba(23, 32, 26, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101610;
  --topbar-bg: rgba(16, 22, 16, 0.94);
  --surface: #182119;
  --surface-soft: #202d23;
  --field: #111a13;
  --item: #151f17;
  --active: #203827;
  --line: #334335;
  --text: #edf4ed;
  --muted: #a8b5aa;
  --green: #36a66b;
  --green-dark: #258653;
  --green-text: #82d7a8;
  --red: #d63a2f;
  --red-dark: #b72920;
  --amber: #e0a738;
  --toast-bg: #233126;
  --toast-text: #edf4ed;
  --toast-line: #4a5f4d;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 82px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  background: var(--green-dark);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  padding: 9px 10px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5L8 10l3.5-3.5' fill='none' stroke='%23a8b5aa' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

.fieldInvalid {
  border-color: var(--red);
}

.fieldHint {
  margin-top: 4px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.neutralHint {
  color: var(--muted);
}

.quickShareButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.quickShareButtons button {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
}

.quickShareButtons button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

#transferUnitSearch,
#transferOwnerSearch {
  margin-bottom: 6px;
}

.searchSelect {
  position: relative;
  display: block;
  width: 100%;
}

.searchSelectButton {
  position: relative;
  width: 100%;
  min-height: 0;
  justify-content: flex-start;
  overflow: hidden;
  color: var(--text);
  background: var(--field);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5L8 10l3.5-3.5' fill='none' stroke='%23a8b5aa' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  border: 1px solid var(--line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 10px;
  padding-right: 36px;
  line-height: 1.4;
}

.searchSelect.isOpen .searchSelectButton {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.searchSelectPanel {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  margin-top: -1px;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.searchSelectPanel input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.searchSelectOptions {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.searchSelectOptions button {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  white-space: normal;
}

.searchSelectOptions button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.searchSelectEmpty {
  padding: 10px;
  color: var(--muted);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandMark {
  width: 38px;
  height: 38px;
  border: 2px solid var(--green);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 46%, var(--green) 47% 53%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--green) 47% 53%, transparent 54%),
    var(--surface);
  overflow: hidden;
}

.brandMark.hasBrandLogo {
  border-color: var(--line);
  background: var(--surface);
}

.brandMark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 19px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.brand p,
.sectionHead p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.decisionDescription {
  width: 100%;
  max-width: none;
  margin-top: 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

html[data-description-scale="1"] .decisionDescription {
  font-size: 16px;
}

html[data-description-scale="2"] .decisionDescription {
  font-size: 18px;
}

html[data-description-scale="3"] .decisionDescription {
  font-size: 20px;
}

html[data-description-scale="4"] .decisionDescription {
  font-size: 22px;
}

.descriptionControls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.descriptionLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.textScaleControl {
  min-width: 92px;
}

.textScaleControl button {
  min-width: 46px;
}

.actorBar,
.actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.actorBar {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actorBar label {
  white-space: nowrap;
}

.actorBar input {
  width: 110px;
}

body[data-page="vote"] .tenantActorControl {
  display: none !important;
}

.iconBtn {
  min-width: 42px;
  width: 42px;
  padding: 0;
  font-size: 17px;
}

.accountMenuWrap {
  position: relative;
}

.accountMenuBtn {
  gap: 8px;
  max-width: 220px;
}

.accountIcon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--surface-soft);
  color: var(--green-text);
  font-size: 13px;
  line-height: 1;
}

html[data-theme="dark"] .accountIcon {
  background: color-mix(in srgb, var(--green) 24%, var(--surface-soft));
  color: var(--text);
}

.accountDisplayName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accountMenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px;
}

.accountMenu button {
  width: 100%;
}

.segmentedControl {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 90px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segmentedControl button {
  min-width: 44px;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
}

.segmentedControl button.active {
  background: var(--green);
  color: #fff;
}

.segmentedControl button:hover:not(:disabled),
.segmentedControl button:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
}

.segmentedControl button.active:hover:not(:disabled),
.segmentedControl button.active:focus-visible {
  background: var(--green);
  color: #fff;
}

.lookupRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, max-content);
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.lookupRow button {
  width: 100%;
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(280px, 320px);
  gap: 12px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px;
}

.voteLayout {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

.adminShellPanel {
  width: min(calc(100% - 48px), 1360px);
  max-width: 1360px;
  margin: 24px auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
}

.adminTabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.adminTabbar .secondaryBtn {
  flex: 0 1 auto;
  min-width: 132px;
  min-height: 40px;
  border-color: var(--line);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.adminTabbar .secondaryBtn:hover:not(:disabled),
.adminTabbar .secondaryBtn:focus-visible {
  border-color: var(--green);
  background: var(--surface-soft);
  color: var(--text);
}

.adminWorkspace {
  width: 100%;
  min-width: 0;
  padding: 0;
}

.adminView {
  width: 100%;
}

.adminSingleColumn {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.adminSingleColumn.ownershipColumn {
  max-width: none;
}

.adminSingleColumn.createDecisionColumn {
  max-width: none;
}

.overviewCards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.buildingOverview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overviewCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.overviewCard span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overviewCard strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.adminStandalonePanel {
  min-height: auto;
  width: 100%;
}

.sidePanel,
.mainPanel,
.adminPanel,
.workPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.sidePanel,
.mainPanel,
.adminPanel {
  min-height: calc(100vh - 96px);
  padding: 14px;
}

.voteShell {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.voteShell .layout {
  padding: 0;
}

.portalPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.voteTabbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.voteTabBtn {
  flex: 0 0 auto;
  border-color: var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 16px;
}

.voteTabBtn.active {
  border-color: var(--green);
  background: var(--active);
  color: var(--green-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent);
}

.voteTabBtn:hover:not(:disabled),
.voteTabBtn:focus-visible {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
  color: var(--green-text);
}

.voteTabBtn.active:hover:not(:disabled),
.voteTabBtn.active:focus-visible {
  background: var(--active);
  color: var(--green-text);
}

.voteTabPanel[hidden] {
  display: none !important;
}

.sectionHead {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.sectionHead.compact {
  align-items: center;
  padding: 12px 12px 0;
}

.pill {
  min-width: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--green-text);
  padding: 3px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.decisionList,
.contextList {
  display: grid;
  gap: 8px;
}

.decisionFilterLabel {
  margin-bottom: 12px;
}

.lookupRow {
  margin-bottom: 12px;
}

.decisionItem,
.contextItem {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  padding: 10px;
  min-width: 0;
}

.decisionItem {
  cursor: pointer;
  display: grid;
  gap: 5px;
  text-align: left;
}

.decisionItem.active {
  border-color: var(--green);
  background: var(--active);
}

.decisionItem strong,
.contextItem strong {
  display: block;
  margin-bottom: 5px;
}

.muted,
.decisionMeta,
.contextMeta {
  color: var(--muted);
  font-size: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.contentGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

.workPanel {
  box-shadow: none;
  min-height: 220px;
}

.contextList {
  padding: 12px;
}

.voteActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.secondaryBtn {
  border-color: var(--line);
  background: var(--field);
  color: var(--text);
}

.secondaryBtn:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--text);
}

body[data-page="vote"] .secondaryBtn:hover:not(:disabled),
body[data-page="vote"] .secondaryBtn:focus-visible {
  border-color: var(--green);
  background: var(--surface-soft);
  color: var(--text);
}

body[data-page="vote"] .accountMenu .secondaryBtn:hover:not(:disabled),
body[data-page="vote"] .accountMenu .secondaryBtn:focus-visible {
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
  color: var(--text);
}

.secondaryBtn.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.dangerBtn {
  border-color: var(--red);
  background: var(--red);
}

.dangerBtn:hover:not(:disabled) {
  background: var(--red-dark);
}

.tableWrap {
  overflow: auto;
  padding: 12px;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  table-layout: fixed;
}

.votesTable th:nth-child(1),
.votesTable td:nth-child(1) {
  width: 34%;
}

.votesTable th:nth-child(2),
.votesTable td:nth-child(2) {
  width: 30%;
}

.votesTable th:nth-child(3),
.votesTable td:nth-child(3) {
  width: 18%;
}

.votesTable th:nth-child(4),
.votesTable td:nth-child(4) {
  width: 18%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
}

[hidden] {
  display: none !important;
}

.form {
  display: grid;
  gap: 10px;
}

.formGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.adminPanel .lookupRow {
  margin-top: 5px;
}

.closeBox {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.adminSection {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.inlineAdminForm {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.createDecisionPanel {
  display: grid;
  gap: 16px;
}

.createDecisionForm {
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

.decisionEditForm {
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.ownershipTransferForm {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  margin-bottom: 0;
}

.ownershipTransferSection {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--amber) 60%, var(--line));
  border-radius: 14px;
  border-color: color-mix(in srgb, var(--amber) 60%, var(--line));
  background: color-mix(in srgb, var(--amber) 10%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 14%, transparent);
}

.ownershipTransferSection .buildingCardHead {
  margin-bottom: 0;
  padding-bottom: 4px;
}

.ownershipTransferSection .ownershipTransferForm[hidden] {
  display: none;
}

.ownershipTransferSection .ownershipTransferForm:not([hidden]) {
  margin-top: 14px;
}

.ownershipTransferSection input,
.ownershipTransferSection select,
.ownershipTransferSection textarea,
.ownershipTransferSection .searchSelectButton,
.ownershipTransferSection .searchSelectPanel,
.ownershipTransferSection .searchSelectOptions button {
  background-color: var(--field);
  border-color: var(--line);
  box-shadow: none;
}

.ownershipTransferSection select {
  color: var(--text);
  background-color: var(--field);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5L8 10l3.5-3.5' fill='none' stroke='%23a8b5aa' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  padding-right: 36px;
}

.ownershipTransferSection .searchSelectPanel {
  background: var(--surface);
}

.ownershipTransferSection .searchSelectOptions button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dangerHint {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--red) 55%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--red) 14%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 10%, transparent);
  color: color-mix(in srgb, var(--text) 92%, white 8%);
  font-size: 0.94rem;
}

.ownershipTransferSection .buildingToggleBtn {
  border-color: color-mix(in srgb, var(--amber) 60%, var(--line));
}

.ownershipTransferSection .buildingToggleBtn:hover,
.ownershipTransferSection .buildingToggleBtn:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
}

.selectedOwnershipPreview {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.selectedOwnershipHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.selectedOwnershipHeader span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.selectedOwnershipChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ownershipChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--accent-soft);
}

.formGridTriple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ownershipTableWrap {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ownershipSearchSection {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ownershipSearchSection .sectionHead {
  margin-bottom: 10px;
}

.ownershipSearchSection .sectionHead p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.ownershipSearchLabel {
  margin-bottom: 10px;
}

.ownershipFilterGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ownershipFilterSummary {
  display: grid;
  gap: 10px;
}

.ownershipFilterMeta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.ownershipSummaryCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 10px;
  align-items: start;
}

.ownershipSummaryCard {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.ownershipSummaryCard strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.ownershipSummaryCard .summaryMeta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.ownershipSummaryStats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ownershipSummaryStat {
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ownershipSummaryStat span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.ownershipSummaryStat strong {
  margin: 0;
  font-size: 1rem;
}

.ownershipSummaryUnits {
  display: grid;
  gap: 6px;
}

.ownershipSummaryUnit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ownershipSummaryUnitInfo {
  min-width: 0;
}

.ownershipSummaryUnitInfo strong,
.ownershipSummaryUnitShare strong {
  margin: 0;
}

.ownershipSummaryUnitInfo strong {
  display: block;
  overflow-wrap: anywhere;
}

.ownershipSummaryUnitInfo span,
.ownershipSummaryUnitShare span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.ownershipRelatedOwners {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 75%, transparent);
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  overflow-wrap: anywhere;
}

.ownershipSummaryUnitShare {
  text-align: right;
  white-space: nowrap;
  min-width: 120px;
}

.ownershipTable {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
}

.ownershipTable th,
.ownershipTable td {
  padding: 12px 14px;
}

.tableSortBtn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  white-space: normal;
  line-height: 1.2;
}

.tableSortBtn::after {
  content: "";
  min-width: 10px;
  margin-top: 1px;
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
}

.tableSortBtn.isActive::after {
  content: "▲";
}

.tableSortBtn.isActive[data-sort-direction="desc"]::after {
  content: "▼";
}

.tableSortBtn:hover,
.tableSortBtn:focus-visible {
  color: var(--accent);
}

.ownershipTable th:nth-child(1),
.ownershipTable td:nth-child(1) {
  width: 90px;
}

.ownershipTable th:nth-child(2),
.ownershipTable td:nth-child(2) {
  width: 270px;
}

.ownershipTable th:nth-child(3),
.ownershipTable td:nth-child(3) {
  width: 150px;
}

.ownershipTable th:nth-child(4),
.ownershipTable td:nth-child(4) {
  width: 230px;
}

.ownershipTable th:nth-child(5),
.ownershipTable td:nth-child(5) {
  width: 170px;
}

.ownershipTable th:nth-child(6),
.ownershipTable td:nth-child(6) {
  width: 135px;
}

.ownershipTable td {
  overflow-wrap: normal;
  word-break: normal;
}

.ownershipTable .muted {
  display: inline-block;
  margin-top: 3px;
}

.sectionHead.compact.adminSectionHead {
  padding: 0;
  margin-bottom: 10px;
}

.adminNotice {
  margin: 0 0 10px;
}

.councilSummary {
  min-height: 20px;
  line-height: 1.5;
  text-align: left;
  padding: 0;
}

.councilSection {
  display: grid;
  gap: 10px;
}

.councilSectionHead {
  padding: 0;
}

.councilSectionActions {
  display: flex;
  justify-content: flex-end;
}

.councilSectionActions button {
  min-width: 220px;
}

.councilMembersList {
  display: grid;
  gap: 10px;
}

.councilMemberCard {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.councilMemberGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.councilRemoveBtn {
  justify-self: start;
}

.checkboxRow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.checkboxRow input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.buildingList {
  display: grid;
  gap: 12px;
}

.buildingOverviewList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.buildingOverviewCard {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.buildingCard {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.buildingCardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.buildingCardActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.buildingCardInlineActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dangerGhostBtn {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  background: transparent;
  color: var(--red);
  font-size: 18px;
  line-height: 1;
}

.dangerGhostBtn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.dangerGhostBtn:hover,
.dangerGhostBtn:focus-visible {
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  border-color: var(--red);
  color: var(--red);
}

.dangerGhostBtn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  color: var(--muted);
  background: transparent;
}

.buildingDeleteHint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.buildingToggleBtn {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.buildingCardMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.buildingCardBody {
  display: grid;
  gap: 10px;
}

.buildingCardBody[hidden] {
  display: none;
}

.noticeBoardPanel {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.portalPanel.noticeBoardPanel {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.noticeAdminGrid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.noticeAdminListPanel,
.noticeEditorPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.noticeAdminListPanel {
  padding: 12px;
}

.noticeEditorPanel {
  padding: 12px;
}

.noticeList {
  display: grid;
  gap: 8px;
}

.noticeItem {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  padding: 10px;
}

#adminNoticeList .noticeItem {
  cursor: pointer;
}

.noticeButton {
  appearance: none;
  display: grid;
  justify-content: stretch;
  align-items: stretch;
  justify-items: stretch;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.noticeButton:hover:not(:disabled),
.noticeButton:focus-visible {
  border-color: var(--green);
  background: var(--active);
  color: var(--text);
}

.noticeButton.priority-2 {
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
}

.noticeButton.priority-3 {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  box-shadow: inset 3px 0 0 var(--red);
}

.noticeItem.active {
  border-color: var(--green);
  background: var(--active);
}

.noticeItemHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.noticeItemHead strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.noticeAnnouncementHead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.noticeAnnouncementHead strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.noticePriority {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.noticePriority.priority-2 {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  color: var(--amber);
}

.noticePriority.priority-3 {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  color: var(--red);
}

.noticeBody {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

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

.noticeMeta {
  color: var(--muted);
  font-size: 12px;
}

.urgentNoticeStrip {
  min-width: 0;
}

.urgentNoticeButton,
.featuredNoticeButton {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--amber) 55%, var(--line));
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 9%, var(--surface));
  color: var(--text);
  padding: 12px;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.urgentNoticeButton.priority-3,
.featuredNoticeButton.priority-3 {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
}

html[data-theme="dark"] .urgentNoticeButton,
html[data-theme="dark"] .featuredNoticeButton {
  background: color-mix(in srgb, var(--amber) 11%, var(--surface));
}

html[data-theme="dark"] .urgentNoticeButton.priority-3,
html[data-theme="dark"] .featuredNoticeButton.priority-3 {
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
}

.urgentNoticeButton strong,
.urgentNoticeButton small,
.featuredNoticeButton strong,
.featuredNoticeButton small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.urgentNoticeButton small,
.featuredNoticeButton small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.urgentNoticeButton:hover:not(:disabled),
.urgentNoticeButton:focus-visible,
.featuredNoticeButton:hover:not(:disabled),
.featuredNoticeButton:focus-visible {
  border-color: color-mix(in srgb, var(--amber) 70%, var(--line));
  border-left-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, var(--surface));
  color: var(--text);
}

.urgentNoticeButton.priority-3:hover:not(:disabled),
.urgentNoticeButton.priority-3:focus-visible,
.featuredNoticeButton.priority-3:hover:not(:disabled),
.featuredNoticeButton.priority-3:focus-visible {
  border-color: color-mix(in srgb, var(--red) 62%, var(--line));
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  color: var(--text);
}

html[data-theme="dark"] .urgentNoticeButton:hover:not(:disabled),
html[data-theme="dark"] .urgentNoticeButton:focus-visible,
html[data-theme="dark"] .featuredNoticeButton:hover:not(:disabled),
html[data-theme="dark"] .featuredNoticeButton:focus-visible {
  background: color-mix(in srgb, var(--amber) 15%, var(--surface));
  color: var(--text);
}

html[data-theme="dark"] .urgentNoticeButton.priority-3:hover:not(:disabled),
html[data-theme="dark"] .urgentNoticeButton.priority-3:focus-visible,
html[data-theme="dark"] .featuredNoticeButton.priority-3:hover:not(:disabled),
html[data-theme="dark"] .featuredNoticeButton.priority-3:focus-visible {
  background: color-mix(in srgb, var(--red) 15%, var(--surface));
  color: var(--text);
}

.readNoticeLink {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.noticeDetailDialog {
  max-width: 680px;
}

.noticeDetailBody {
  max-height: min(56vh, 520px);
  overflow: auto;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.issueReportPanel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.portalPanel.issueReportPanel {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.issueReportForm {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
}

.issueReportForm textarea {
  min-height: 96px;
}

.issueReportGrid {
  grid-template-columns: 1fr 1fr;
}

.issueReportListHead {
  margin-top: 2px;
}

.issueReportList {
  display: grid;
  gap: 8px;
}

.issueReportOpenBtn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 10px;
  width: 100%;
  min-height: 0;
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, var(--surface));
  color: var(--text);
  padding: 12px;
  text-align: left;
  white-space: normal;
}

.issueReportOpenBtn::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--green) 50%, var(--line));
  background: var(--surface);
  color: var(--green-text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.issueReportOpenBtn span {
  display: block;
  grid-column: 2;
  color: var(--green-text);
  font-weight: 850;
}

.issueReportOpenBtn small {
  display: block;
  grid-column: 2;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.35;
}

.issueReportOpenBtn:hover:not(:disabled),
.issueReportOpenBtn:focus-visible {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 11%, var(--surface));
  color: var(--text);
}

.issueReportOpenBtn:hover:not(:disabled)::before,
.issueReportOpenBtn:focus-visible::before {
  background: var(--surface);
  color: var(--green-text);
}

.issueReportOpenBtn:hover:not(:disabled) span,
.issueReportOpenBtn:focus-visible span {
  color: var(--green-text);
}

.issueReportOpenBtn:hover:not(:disabled) small,
.issueReportOpenBtn:focus-visible small {
  color: var(--muted);
}

.issueReportItem {
  appearance: none;
  display: grid;
  gap: 8px;
  justify-content: stretch;
  align-items: stretch;
  justify-items: stretch;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  color: inherit;
  padding: 10px;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.issueReportItem:hover:not(:disabled),
.issueReportItem:focus-visible {
  border-color: var(--green);
  background: var(--active);
  color: var(--text);
}

.adminIssueReportItem.active {
  border-color: var(--green);
  background: var(--active);
  box-shadow: inset 3px 0 0 var(--green);
}

.issueReportItem strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.issueReportPills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.issueStatus,
.issueSeverity {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.issueStatus-open {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  color: var(--green-text);
}

.issueStatus-triaged,
.issueStatus-in_progress {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  color: var(--amber);
}

.issueStatus-resolved {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  color: var(--green-text);
}

.issueStatus-closed,
.issueStatus-archived {
  border-color: color-mix(in srgb, var(--muted) 45%, var(--line));
  color: var(--muted);
}

.issueSeverity.severity-2 {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  color: var(--amber);
}

.issueSeverity.severity-3 {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  color: var(--red);
}

.issueMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}

.issueDetailDialog {
  max-width: 680px;
}

.issueReportDialog {
  width: min(640px, 100%);
  max-width: 640px;
}

.issueReportDialog .issueReportForm {
  margin-top: 14px;
  border: 0;
  background: transparent;
  padding: 0;
}

.issueDetailBody {
  max-height: min(52vh, 500px);
  overflow: auto;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.issueAdminGrid {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.issueAdminListPanel,
.issueEditorPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.issueFilterGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.issueDetailPanel {
  display: grid;
  gap: 12px;
}

.issueDetailPanel[hidden] {
  display: none;
}

.issueDetailSummary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  padding: 12px;
}

.issueDetailSummary h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.issueDetailDescription {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.issueDetailMetaGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.issueDetailMetaGrid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px;
}

.issueDetailMetaGrid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.issueDetailMetaGrid dd {
  margin: 3px 0 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.issueTriageForm {
  display: grid;
  gap: 12px;
}

.issueTriageForm.readonly input,
.issueTriageForm.readonly select,
.issueTriageForm.readonly textarea {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.issueEditorActions {
  align-items: stretch;
}

.activityToolbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(120px, 180px);
  gap: 12px;
  margin-bottom: 12px;
}

.activityFeedList {
  display: grid;
  gap: 10px;
}

.activitySummary {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.activitySummary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.compactText {
  margin: 0;
  font-size: 12px;
}

.noticeForm {
  padding-top: 4px;
}

.noticeForm.readonly input,
.noticeForm.readonly select,
.noticeForm.readonly textarea {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.noticeEditorMessage {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(143, 105, 35, 0.35);
  border-radius: 8px;
  background: rgba(241, 183, 74, 0.12);
  color: var(--amber);
  font-size: 13px;
}

.noticeEditorMessage.readonly {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.noticeEditorActions {
  flex-wrap: wrap;
}

.noticeEditorActions button {
  min-width: 112px;
}

.meetingAdminGrid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.meetingAdminListPanel,
.meetingEditorPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.meetingList {
  display: grid;
  gap: 8px;
}

.meetingItem {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}

.meetingItem:hover,
.meetingItem:focus-visible,
.meetingItem.active {
  border-color: var(--green);
  background: var(--active);
  color: var(--text);
  outline: none;
}

.meetingItemHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.meetingItemHead strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.meetingStatus-draft,
.meetingStatus-published,
.meetingStatus-completed,
.meetingStatus-archived {
  color: var(--text);
}

.meetingStatus-draft {
  border-color: color-mix(in srgb, var(--muted) 45%, var(--line));
  background: var(--surface-soft);
}

.meetingStatus-published {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
}

.meetingStatus-completed {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
}

.meetingStatus-archived {
  border-color: color-mix(in srgb, var(--muted) 55%, var(--line));
  background: color-mix(in srgb, var(--muted) 12%, var(--surface));
  color: var(--muted);
}

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

.meetingForm {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.meetingForm textarea {
  min-height: 96px;
  resize: vertical;
}

.meetingMinutesSection textarea {
  min-height: 220px;
}

.meetingForm.readonly input,
.meetingForm.readonly textarea,
.meetingForm.readonly select,
.meetingForm.archived input,
.meetingForm.archived textarea,
.meetingForm.archived select {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.meetingTimelineMeta {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  padding: 10px;
}

.meetingMetaValue {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meetingEditorActions {
  align-items: stretch;
  flex-wrap: wrap;
}

.meetingEditorActions button {
  min-width: 132px;
}

.suggestionAdminGrid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.suggestionAdminListPanel,
.suggestionEditorPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.suggestionFilterGrid,
.suggestionList,
.suggestionDetailPanel,
.suggestionAdminForm {
  display: grid;
  gap: 10px;
}

.suggestionItem {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}

.suggestionItem:hover,
.suggestionItem:focus-visible,
.suggestionItem.active {
  border-color: var(--green);
  background: var(--active);
  color: var(--text);
  outline: none;
}

.suggestionItemHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.suggestionItemHead strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.suggestionStatus-new,
.suggestionStatus-under_review,
.suggestionStatus-needs_more_info,
.suggestionStatus-accepted,
.suggestionStatus-goes_to_poll,
.suggestionStatus-goes_to_decision,
.suggestionStatus-planned,
.suggestionStatus-implemented,
.suggestionStatus-rejected,
.suggestionStatus-archived {
  color: var(--text);
}

.suggestionStatus-new,
.suggestionStatus-accepted,
.suggestionStatus-implemented {
  border-color: color-mix(in srgb, var(--green) 50%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
}

.suggestionStatus-under_review,
.suggestionStatus-needs_more_info,
.suggestionStatus-goes_to_poll,
.suggestionStatus-goes_to_decision,
.suggestionStatus-planned {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
}

.suggestionStatus-rejected,
.suggestionStatus-archived {
  border-color: color-mix(in srgb, var(--muted) 55%, var(--line));
  background: color-mix(in srgb, var(--muted) 12%, var(--surface));
  color: var(--muted);
}

.suggestionDetailSummary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  padding: 12px;
}

.suggestionDetailDescription {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.suggestionDetailMetaGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.suggestionDetailMetaGrid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.suggestionDetailMetaGrid dd {
  margin: 4px 0 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.suggestionAdminForm textarea {
  min-height: 140px;
  resize: vertical;
}

.suggestionAdminForm.readonly input,
.suggestionAdminForm.readonly textarea,
.suggestionAdminForm.readonly select,
.suggestionAdminForm.archived input,
.suggestionAdminForm.archived textarea,
.suggestionAdminForm.archived select {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.suggestionEditorActions {
  align-items: stretch;
  flex-wrap: wrap;
}

.suggestionEditorActions button {
  min-width: 136px;
}

.pollAdminGrid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.pollAdminListPanel,
.pollEditorPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.pollList,
.pollOptionsList,
.pollResultsList {
  display: grid;
  gap: 8px;
}

.pollItem {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}

.pollItem:hover,
.pollItem:focus-visible,
.pollItem.active {
  border-color: var(--green);
  background: var(--active);
  color: var(--text);
  outline: none;
}

.pollItemHead,
.pollOptionsHead,
.pollResultHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pollItemHead strong,
.pollResultHead strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pollStatus-draft,
.pollStatus-published,
.pollStatus-closed,
.pollStatus-archived {
  color: var(--text);
}

.pollStatus-draft {
  border-color: color-mix(in srgb, var(--muted) 45%, var(--line));
  background: var(--surface-soft);
}

.pollStatus-published {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
}

.pollStatus-closed {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
}

.pollStatus-archived {
  border-color: color-mix(in srgb, var(--muted) 55%, var(--line));
  background: color-mix(in srgb, var(--muted) 12%, var(--surface));
  color: var(--muted);
}

.pollForm {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.pollForm.readonly input,
.pollForm.readonly textarea {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.pollOptionsHead {
  align-items: center;
}

.pollOptionsHead > span {
  color: var(--text);
  font-weight: 800;
}

.pollOptionRow {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.pollOptionNumber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.smallBtn {
  min-height: 32px;
  padding: 7px 10px;
}

.pollEditorActions {
  align-items: stretch;
}

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

.pollResultItem {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  padding: 10px;
}

.pollResultHead span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pollResultBar {
  overflow: hidden;
  height: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.pollResultBar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), color-mix(in srgb, var(--green) 55%, var(--amber)));
}

.userPollPanel {
  display: grid;
  gap: 14px;
}

.userMeetingPanel {
  display: grid;
  gap: 14px;
}

.userSuggestionPanel {
  display: grid;
  gap: 14px;
}

.userSuggestionLayout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.userSuggestionListPanel,
.userSuggestionDetailPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.suggestionCreateForm {
  display: grid;
  gap: 12px;
}

.suggestionListHead {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.userSuggestionItem {
  cursor: pointer;
}

.userSuggestionItem .noticeMeta,
.userSuggestionItem .suggestionItemMetaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.userMeetingLayout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.userMeetingListPanel,
.userMeetingDetailPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.userMeetingItem {
  cursor: pointer;
}

.userMeetingItem .noticeMeta,
.meetingItemMetaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.meetingDetailPanel {
  display: grid;
  gap: 14px;
}

.meetingDetailPanel[hidden] {
  display: none;
}

.meetingDetailDescription,
.meetingDetailBody {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.meetingDetailMeta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meetingDetailMeta span {
  overflow-wrap: anywhere;
}

.meetingDetailMeta a {
  color: var(--green-text);
}

.meetingDetailMeta a:hover,
.meetingDetailMeta a:focus-visible {
  color: var(--green);
}

.meetingDetailSection {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.meetingDetailSection h4 {
  margin: 0;
  font-size: 14px;
}

.meetingDetailSectionHead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.userPollLayout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.userPollListPanel,
.userPollDetailPanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.userPollItem .noticeMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.pollDetailPanel {
  display: grid;
  gap: 12px;
}

.pollDetailPanel[hidden] {
  display: none;
}

.pollDetailDescription {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pollResponseForm,
.pollResponseOptions {
  display: grid;
  gap: 10px;
}

.pollResponseOption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--item);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}

.pollResponseOption:has(input:checked) {
  border-color: var(--green);
  background: var(--active);
}

.pollResponseOption input {
  margin-top: 3px;
}

.pollResponseOption strong,
.pollResponseOption span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pollResponseOption span span {
  margin-top: 3px;
  color: var(--green-text);
  font-size: 12px;
  font-weight: 800;
}

.pollResponseOption:has(input:disabled) {
  cursor: default;
}

.pollResponseActions {
  justify-content: flex-start;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 5, 0.68);
}

.modalOverlay[hidden] {
  display: none;
}

.confirmDialog {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  padding: 18px;
}

.confirmHead {
  display: grid;
  gap: 4px;
}

.confirmEyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.confirmChoice {
  display: grid;
  place-items: center;
  min-height: 76px;
  margin: 16px 0;
  border-radius: 8px;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.confirmChoice.yes {
  background: var(--green);
}

.confirmChoice.no {
  background: var(--red);
}

.confirmMessage {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.confirmMeta {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.confirmMeta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modalActions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 18px;
}

.modalActions button {
  min-height: 42px;
}

.modalActions .secondaryBtn:hover:not(:disabled),
.modalActions .secondaryBtn:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
}

.modalActions button:not(.secondaryBtn):hover:not(:disabled),
.modalActions button:not(.secondaryBtn):focus-visible {
  background: var(--green-dark);
  color: #fff;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--toast-line);
  border-radius: 8px;
  background: var(--toast-bg);
  color: var(--toast-text);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.tenantAuthGate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
}

body.tenantPortalLocked .actorBar,
body.tenantPortalLocked .adminShellPanel,
body.tenantPortalLocked .voteShell {
  visibility: hidden;
  pointer-events: none;
}

body.tenantPortalLocked .brand p {
  visibility: hidden;
}

.tenantAuthGate[hidden] {
  display: none;
}

.tenantAuthCard {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 24px;
}

.tenantAuthCard h2,
.tenantAuthCard h3 {
  margin: 0 0 8px;
}

.tenantMembershipList {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.tenantMembershipList button {
  display: grid;
  gap: 4px;
  text-align: left;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.tenantMembershipList button:hover {
  border-color: var(--green);
  background: var(--active);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.ok {
  color: var(--green-text);
  font-weight: 800;
}

.bad {
  color: var(--red);
  font-weight: 800;
}

.warn {
  color: var(--amber);
  font-weight: 800;
}

@media (max-width: 1500px) {
  .layout {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  }

  .voteLayout {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .adminPanel {
    grid-column: 1 / -1;
    min-height: auto;
  }
}

@media (max-width: 1180px) {
  .adminShellPanel {
    width: min(calc(100% - 32px), 1080px);
  }

  .contentGrid {
    grid-template-columns: 1fr;
  }

  .formGridTriple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .buildingOverview,
  .overviewCards,
  .councilMemberGrid,
  .buildingOverviewList {
    grid-template-columns: 1fr 1fr;
  }

  .ownershipFilterGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .noticeAdminGrid,
  .meetingAdminGrid,
  .suggestionAdminGrid,
  .pollAdminGrid,
  .userMeetingLayout,
  .userSuggestionLayout,
  .userPollLayout,
  .issueAdminGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .adminShellPanel {
    width: min(calc(100% - 24px), 860px);
    margin: 12px auto;
  }

  .adminTabbar {
    justify-content: center;
  }

  .adminTabbar .secondaryBtn {
    flex: 1 1 180px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidePanel,
  .mainPanel,
  .adminPanel {
    min-height: auto;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adminSingleColumn {
    width: 100%;
    max-width: 100%;
  }

  .buildingOverview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .actorBar,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    padding: 12px;
  }

  .brand {
    align-items: flex-start;
  }

  .actorBar input {
    width: 100%;
  }

  .segmentedControl {
    width: 100%;
  }

  .descriptionControls {
    align-items: stretch;
    flex-direction: column;
  }

  .lookupRow,
  .metrics,
  .formGrid,
  .formGridTriple,
  .issueReportGrid,
  .issueDetailMetaGrid,
  .suggestionDetailMetaGrid,
  .activityToolbar,
  .pollOptionRow,
  .overviewCards,
  .ownershipFilterGrid,
  .buildingOverview,
  .councilMemberGrid,
  .buildingOverviewList,
  .voteActions,
  .modalActions {
    grid-template-columns: 1fr;
  }

  .adminShellPanel {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 10px;
  }

  .noticeItemHead,
  .meetingItemHead,
  .suggestionItemHead,
  .urgentNoticeButton,
  .featuredNoticeButton,
  .issueReportOpenBtn,
  .noticeEditorActions,
  .meetingEditorActions,
  .suggestionEditorActions,
  .pollEditorActions,
  .issueEditorActions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .issueReportOpenBtn::before {
    display: none;
  }

  .issueReportOpenBtn span,
  .issueReportOpenBtn small {
    grid-column: auto;
  }

  .accountDisplayName {
    display: none;
  }

  .accountMenuBtn {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .noticeEditorActions button,
  .meetingEditorActions button,
  .pollEditorActions button,
  .issueEditorActions button {
    width: 100%;
  }

  .adminTabbar {
    gap: 6px;
  }

  .adminTabbar .secondaryBtn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .layout {
    padding: 8px;
    gap: 8px;
  }

  .sidePanel,
  .mainPanel,
  .adminPanel,
  .contextList,
  .tableWrap {
    padding: 10px;
  }

  .adminStandalonePanel {
    padding: 12px;
  }

  .ownershipTableWrap {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .ownershipTable,
  .ownershipTable thead,
  .ownershipTable tbody,
  .ownershipTable tr,
  .ownershipTable th,
  .ownershipTable td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .ownershipTable thead {
    display: none;
  }

  .ownershipTable tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--item);
    overflow: hidden;
  }

  .ownershipTable td {
    display: grid;
    grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .ownershipSummaryUnit {
    flex-direction: column;
    display: flex;
    align-items: flex-start;
  }

  .ownershipSummaryUnitShare {
    text-align: left;
    min-width: 0;
    white-space: normal;
  }

  .ownershipTable td:last-child {
    border-bottom: 0;
  }

  .ownershipTable td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .ownershipTable td:nth-child(1)::before {
    content: "Unit ID";
  }

  .ownershipTable td:nth-child(2)::before {
    content: "Jedinica";
  }

  .ownershipTable td:nth-child(3)::before {
    content: "Zgrada";
  }

  .ownershipTable td:nth-child(4)::before {
    content: "Vlasnik";
  }

  .ownershipTable td:nth-child(5)::before {
    content: "Konačni udio";
  }

  .ownershipTable td:nth-child(6)::before {
    content: "Glasački udio";
  }

  .ownershipTable td:nth-child(7)::before {
    content: "Izvor";
  }

  .metric strong {
    font-size: 18px;
  }
}

/* Decision audit trail */
.decisionAuditPanel {
  margin-top: 1.25rem;
}

.decisionAuditList {
  display: grid;
  gap: .9rem;
}

.auditEntry {
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.auditEntryHead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .65rem;
}

.auditEntryTitle {
  display: grid;
  gap: .25rem;
}

.auditEventBadge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: .22rem .6rem;
  font-size: .76rem;
  font-weight: 700;
  background: rgba(37, 99, 235, .10);
  color: rgb(30, 64, 175);
}

.auditEventName {
  font-weight: 700;
}

.auditEntryTime {
  white-space: nowrap;
  font-size: .84rem;
  opacity: .75;
}

.auditEntryMeta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .75rem;
}

.auditMetaPill {
  display: inline-flex;
  border-radius: 999px;
  padding: .22rem .55rem;
  background: rgba(15, 23, 42, .055);
  font-size: .78rem;
}

.auditEntryGrid {
  display: grid;
  grid-template-columns: minmax(130px, 220px) 1fr;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
}

.auditEntryGrid div {
  padding: .55rem .7rem;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.auditEntryGrid div:nth-child(odd) {
  font-weight: 700;
  background: rgba(241, 245, 249, .72);
}

.auditEntryGrid div:nth-child(even) {
  word-break: break-word;
}

.auditEntryGrid div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.auditRawJson {
  margin-top: .7rem;
}

.auditRawJson summary {
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  opacity: .8;
}

.auditRawJson pre {
  margin: .55rem 0 0;
  padding: .75rem;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(15, 23, 42, .06);
  font-size: .8rem;
}

@media (max-width: 760px) {
  .auditEntryHead {
    display: grid;
  }

  .auditEntryTime {
    white-space: normal;
  }

  .auditEntryGrid {
    grid-template-columns: 1fr;
  }

  .auditEntryGrid div:nth-child(odd) {
    border-bottom: 0;
    padding-bottom: .15rem;
  }

  .auditEntryGrid div:nth-child(even) {
    padding-top: .15rem;
  }
}

/* audit-dark-polish */
.decisionAuditPanel {
  margin-top: 1rem;
}

.decisionAuditPanel .sectionHead {
  align-items: center;
}

.decisionAuditPanel h3 {
  margin: 0;
  color: var(--text);
}

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

.decisionAuditList {
  display: grid;
  gap: .75rem;
}

.auditEntry {
  border: 1px solid rgba(128, 220, 160, .18);
  border-radius: 16px;
  padding: .9rem;
  background: rgba(10, 26, 17, .92);
  box-shadow: none;
}

.auditEntryHead {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .55rem;
}

.auditEntryTitle {
  display: grid;
  gap: .25rem;
}

.auditEventBadge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(82, 196, 120, .16);
  color: #8ee6a5;
}

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

.auditEntryTime {
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.auditEntryMeta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .65rem;
}

.auditMetaPill {
  display: inline-flex;
  border-radius: 999px;
  padding: .18rem .5rem;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  font-size: .74rem;
}

.auditEntryGrid {
  display: grid;
  grid-template-columns: minmax(145px, 210px) 1fr;
  border: 1px solid rgba(128, 220, 160, .13);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, .12);
}

.auditEntryGrid div {
  padding: .5rem .65rem;
  border-bottom: 1px solid rgba(128, 220, 160, .10);
  font-size: .78rem;
}

.auditEntryGrid div:nth-child(odd) {
  color: var(--muted);
  font-weight: 700;
  background: rgba(255, 255, 255, .035);
}

.auditEntryGrid div:nth-child(even) {
  color: var(--text);
  word-break: break-word;
}

.auditEntryGrid div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.auditRawJson {
  margin-top: .6rem;
}

.auditRawJson summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.auditRawJson pre {
  margin: .45rem 0 0;
  padding: .65rem;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  font-size: .76rem;
}

#decisionAuditBtn {
  min-width: auto;
  padding-left: .8rem;
  padding-right: .8rem;
}

@media (max-width: 760px) {
  .auditEntryHead {
    display: grid;
  }

  .auditEntryTime {
    white-space: normal;
  }

  .auditEntryGrid {
    grid-template-columns: 1fr;
  }

  .auditEntryGrid div:nth-child(odd) {
    border-bottom: 0;
    padding-bottom: .15rem;
  }

  .auditEntryGrid div:nth-child(even) {
    padding-top: .15rem;
  }
}

/* audit-mobile-actions-polish */
@media (max-width: 760px) {
  #adminViewDecisions .mainPanel > .sectionHead {
    display: grid;
    gap: .75rem;
  }

  #adminViewDecisions .mainPanel > .sectionHead .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    width: 100%;
  }

  #adminViewDecisions .mainPanel > .sectionHead .actions button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  #decisionAuditBtn {
    grid-column: 1 / -1;
  }

  #decisionAuditPanel .sectionHead {
    display: grid;
    gap: .5rem;
  }

  #decisionAuditPanel .sectionHead .actions {
    width: 100%;
  }

  #refreshDecisionAuditBtn {
    width: 100%;
  }
}

/* audit-theme-final-fix */

/* Light theme default */
.auditEntry {
  border: 1px solid rgba(15, 23, 42, .12);
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.auditEventBadge {
  background: rgba(34, 197, 94, .14);
  color: #166534;
}

.auditEventName {
  color: #111827;
}

.auditEntryTime {
  color: #64748b;
}

.auditMetaPill {
  background: rgba(15, 23, 42, .06);
  color: #475569;
}

.auditEntryGrid {
  border-color: rgba(15, 23, 42, .12);
  background: #ffffff;
}

.auditEntryGrid div {
  border-bottom-color: rgba(15, 23, 42, .08);
}

.auditEntryGrid div:nth-child(odd) {
  background: #f8fafc;
  color: #475569;
}

.auditEntryGrid div:nth-child(even) {
  color: #111827;
}

.auditRawJson summary {
  color: #475569;
}

.auditRawJson pre {
  background: #f8fafc;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, .08);
}

/* Dark theme override */
html[data-theme="dark"] .auditEntry {
  border: 1px solid rgba(128, 220, 160, .18);
  background: rgba(10, 26, 17, .92);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .auditEventBadge {
  background: rgba(82, 196, 120, .16);
  color: #8ee6a5;
}

html[data-theme="dark"] .auditEventName {
  color: var(--text);
}

html[data-theme="dark"] .auditEntryTime {
  color: var(--muted);
}

html[data-theme="dark"] .auditMetaPill {
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
}

html[data-theme="dark"] .auditEntryGrid {
  border-color: rgba(128, 220, 160, .13);
  background: rgba(0, 0, 0, .12);
}

html[data-theme="dark"] .auditEntryGrid div {
  border-bottom-color: rgba(128, 220, 160, .10);
}

html[data-theme="dark"] .auditEntryGrid div:nth-child(odd) {
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
}

html[data-theme="dark"] .auditEntryGrid div:nth-child(even) {
  color: var(--text);
}

html[data-theme="dark"] .auditRawJson summary {
  color: var(--muted);
}

html[data-theme="dark"] .auditRawJson pre {
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  border: 0;
}

/* admin-layout-wide-polish */

/* Iskoristi više dostupne širine na desktopu */
@media (min-width: 1200px) {
  .adminShell {
    max-width: min(1500px, calc(100vw - 96px));
  }

  #adminViewDecisions .layout {
    grid-template-columns:
      minmax(230px, 280px)
      minmax(620px, 1fr)
      minmax(240px, 300px);
  }
}

@media (min-width: 1550px) {
  .adminShell {
    max-width: min(1680px, calc(100vw - 120px));
  }

  #adminViewDecisions .layout {
    grid-template-columns:
      minmax(250px, 310px)
      minmax(760px, 1fr)
      minmax(260px, 330px);
  }
}

/* Gumbi u headeru odluke smiju se prelomiti umjesto da ispadnu iz okvira */
#adminViewDecisions .mainPanel > .sectionHead {
  align-items: flex-start;
}

#adminViewDecisions .mainPanel > .sectionHead .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: .5rem;
  max-width: 100%;
}

#adminViewDecisions .mainPanel > .sectionHead .actions button {
  flex: 0 1 auto;
  min-width: 0;
}

/* Na tablet/mobitel širini gumbi idu u urednu mrežu */
@media (max-width: 900px) {
  #adminViewDecisions .mainPanel > .sectionHead {
    display: grid;
    gap: .75rem;
  }

  #adminViewDecisions .mainPanel > .sectionHead .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  #adminViewDecisions .mainPanel > .sectionHead .actions button {
    width: 100%;
    white-space: normal;
  }

  #decisionAuditBtn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  #adminViewDecisions .mainPanel > .sectionHead .actions {
    grid-template-columns: 1fr;
  }
}

/* admin-ui-layout-final */

/* Stvarni admin wrapper je .adminShellPanel, ne .adminShell */
@media (min-width: 1181px) {
  .adminShellPanel {
    width: min(calc(100% - 48px), 1640px);
    max-width: 1640px;
  }
}

@media (min-width: 1500px) {
  .adminShellPanel {
    width: min(calc(100% - 72px), 1760px);
    max-width: 1760px;
  }
}

/* Stabilniji decision workspace */
@media (min-width: 1181px) {
  #adminViewDecisions .layout {
    grid-template-columns:
      minmax(230px, 290px)
      minmax(680px, 1fr)
      minmax(260px, 330px);
    align-items: start;
  }
}

@media (min-width: 1500px) {
  #adminViewDecisions .layout {
    grid-template-columns:
      minmax(250px, 320px)
      minmax(780px, 1fr)
      minmax(280px, 360px);
  }
}

/* Header odluke: naslov gore, akcije u vlastitom redu */
#adminViewDecisions .mainPanel > .sectionHead {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

#adminViewDecisions .mainPanel > .sectionHead > div:first-child {
  min-width: 0;
}

#adminViewDecisions .mainPanel > .sectionHead .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: .5rem;
  width: 100%;
  max-width: 100%;
}

#adminViewDecisions .mainPanel > .sectionHead .actions button {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

/* On medium screens, render buttons as a two-column grid. */
@media (max-width: 900px) {
  #adminViewDecisions .mainPanel > .sectionHead .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #adminViewDecisions .mainPanel > .sectionHead .actions button {
    width: 100%;
    white-space: normal;
  }

  #decisionAuditBtn {
    grid-column: 1 / -1;
  }
}

/* Na mobitelu jedan gumb po redu */
@media (max-width: 620px) {
  #adminViewDecisions .mainPanel > .sectionHead .actions {
    grid-template-columns: 1fr;
  }

  #decisionAuditBtn {
    grid-column: auto;
  }
}

/* Audit panel header također neka bude stabilan */
#decisionAuditPanel .sectionHead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
}

@media (max-width: 760px) {
  #decisionAuditPanel .sectionHead {
    grid-template-columns: 1fr;
  }

  #decisionAuditPanel .sectionHead .actions,
  #refreshDecisionAuditBtn {
    width: 100%;
  }
}
