:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #cfa190;
  --primaryText: #ffffff;
  --danger: #b91c1c;
  --dangerBg: #fff1f2;
  --shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.header {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

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

.syncStatusWrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.syncPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  color: #374151;
  white-space: nowrap;
}

.syncPill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}

.syncPill.ok {
  border-color: rgba(5, 150, 105, 0.25);
  background: rgba(16, 185, 129, 0.10);
}
.syncPill.ok::before {
  background: #10b981;
}

.syncPill.warn {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(245, 158, 11, 0.10);
}
.syncPill.warn::before {
  background: #f59e0b;
}

.syncPill.err {
  border-color: rgba(185, 28, 28, 0.25);
  background: rgba(244, 63, 94, 0.10);
}
.syncPill.err::before {
  background: #f43f5e;
}

.logoWrap {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(207, 161, 144, 0.35);
  background: #ffffff;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.logoImg {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
  display: none;
}

.logoFallback {
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #3a2a28;
}

.brandText h1 {
  margin: 0 0 4px 0;
  font-size: clamp(18px, 2.8vw, 24px);
  letter-spacing: 0.2px;
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.tabsBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 14px;
  background: #fff;
  flex-wrap: wrap;
}

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

.tabsActions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.tabBtn {
  height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #374151;
  font-weight: 750;
}

.tabBtn.isActive {
  background: rgba(207, 161, 144, 0.18);
  border-color: rgba(207, 161, 144, 0.35);
  color: #111827;
}

.tabPanel {
  display: none;
}

.tabPanel.isActive {
  display: block;
}

.section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 14px;
  background: #fff;
}

.sectionLight {
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
}

.sectionSummary {
  cursor: pointer;
  font-weight: 850;
  color: #374151;
  padding: 6px 2px;
}

.sectionBody {
  margin-top: 10px;
}

.sectionResults {
  border-color: rgba(207, 161, 144, 0.35);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.cardInner {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #fafafa);
}

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

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

.grid .span2 {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

.field.icon input,
.field.icon select,
.field.icon textarea {
  padding-left: 42px;
  background-repeat: no-repeat;
  background-position: 12px 50%;
  background-size: 18px 18px;
  background-image: var(--icon);
}

/* Icon library (inline SVG data URIs; no dependencies) */
.icon-money {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v10'/%3E%3Cpath d='M15 9.5c0-1.1-1.3-2-3-2s-3 .9-3 2 1.3 2 3 2 3 .9 3 2-1.3 2-3 2-3-.9-3-2'/%3E%3C/svg%3E");
}

.icon-nights {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a7 7 0 0 1-9-9 8 8 0 1 0 9 9Z'/%3E%3Cpath d='M7 20h6'/%3E%3C/svg%3E");
}

.icon-calendar {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}

.icon-doc {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6M9 17h6M9 9h2'/%3E%3C/svg%3E");
}

.icon-user {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.icon-mail {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E");
}

.icon-phone {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7 12.8 12.8 0 0 0 .7 2.8 2 2 0 0 1-.5 2.1L8.1 9.8a16 16 0 0 0 6 6l1.2-1.2a2 2 0 0 1 2.1-.5 12.8 12.8 0 0 0 2.8.7 2 2 0 0 1 1.8 2.1Z'/%3E%3C/svg%3E");
}

.icon-users {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.icon-bed {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v10'/%3E%3Cpath d='M21 7v10'/%3E%3Cpath d='M3 17h18'/%3E%3Cpath d='M5 7h14a2 2 0 0 1 2 2v4H3V9a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
}

.icon-percent {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='7' cy='7' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3C/svg%3E");
}

.icon-shield {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3C/svg%3E");
}

.icon-settings {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 0 1-1.4 3.4h-.2a1.7 1.7 0 0 0-1.8 1.2 2 2 0 0 1-3.8 0 1.7 1.7 0 0 0-1.8-1.2H10a2 2 0 0 1-1.4-3.4l.1-.1A1.7 1.7 0 0 0 9 15a1.7 1.7 0 0 0-1.2-1.8 2 2 0 0 1 0-3.8A1.7 1.7 0 0 0 9 7.6a1.7 1.7 0 0 0-.3-1.9l-.1-.1A2 2 0 0 1 10 2h.2a1.7 1.7 0 0 0 1.8-1.2 2 2 0 0 1 3.8 0 1.7 1.7 0 0 0 1.8 1.2h.2a2 2 0 0 1 1.4 3.4l-.1.1A1.7 1.7 0 0 0 19 7.6a1.7 1.7 0 0 0 1.2 1.8 2 2 0 0 1 0 3.8A1.7 1.7 0 0 0 19.4 15Z'/%3E%3C/svg%3E");
}

.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  resize: vertical;
  min-height: 90px;
}

.field input[readonly] {
  background: #f3f4f6;
}

.hint {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

button {
  height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
}

button.primary {
  background: var(--primary);
  color: var(--primaryText);
  border-color: var(--primary);
}

button.secondary {
  background: #fff;
  color: var(--text);
}

button.danger {
  background: var(--dangerBg);
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.25);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(207, 161, 144, 0.38);
  outline-offset: 2px;
}

.message {
  min-height: 18px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

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

.optionsRow {
  margin-top: 12px;
}

/* Toggle (reliable checkbox + label switch) */
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.toggle label {
  position: relative;
  padding-left: 58px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
}

.toggle label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: #f3f4f6;
  transition: background 140ms ease, border-color 140ms ease;
}

.toggle label::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.18);
  transition: transform 140ms ease;
}

.toggle input:checked + label::before {
  background: rgba(207, 161, 144, 0.6);
  border-color: rgba(207, 161, 144, 0.8);
}

.toggle input:checked + label::after {
  transform: translate(20px, -50%);
}

.toggle input:focus-visible + label::before {
  outline: 3px solid rgba(207, 161, 144, 0.38);
  outline-offset: 2px;
}

.presets {
  margin-bottom: 12px;
}

.presetRow {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.presetRow .field {
  flex: 1 1 260px;
}

.presetActions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.journal {
  border: 1px dashed #c7cbd4;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  position: relative;
}

.journalTitle {
  font-weight: 800;
  font-size: 13px;
  color: #374151;
}

.journalAmount {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.sectionResults .journalAmount {
  font-size: 30px;
}

.journal::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: var(--primary);
  opacity: 0.9;
}

.sectionTitle {
  font-weight: 900;
  font-size: 13px;
  color: #374151;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.sectionTitle.small {
  margin-top: 12px;
  font-weight: 800;
  font-size: 12px;
  color: var(--muted);
}

.checkGrid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.checkItem {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #374151;
}

.checkItem input {
  width: 18px;
  height: 18px;
}

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

.reportActions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

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

.summaryCard {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.summaryCard.isHidden {
  display: none;
}

.summaryLabel {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.35;
}

.summaryValue {
  margin-top: 6px;
  font-weight: 700;
  letter-spacing: 0;
  font-size: 16px;
  color: #111827;
}

.tableWrap {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.recordList {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.recordCard {
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.recordTop {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.recordTitle {
  font-weight: 850;
  letter-spacing: 0.2px;
}

.recordMeta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.badgeRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #f9fafb;
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
}

.badge.ok {
  border-color: rgba(5, 150, 105, 0.25);
  background: rgba(16, 185, 129, 0.10);
}

.badge.warn {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(245, 158, 11, 0.10);
}

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

.kv {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: #fafafa;
}

.kv .k {
  font-size: 11px;
  color: var(--muted);
}

.kv .v {
  margin-top: 6px;
  font-weight: 800;
  letter-spacing: 0;
  font-size: 15px;
}

.recordActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.recordActions button {
  flex: 1 1 140px;
}

/* Modal */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  z-index: 1000;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  z-index: 1001;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px 14px;
  border-bottom: 1px solid var(--border);
}

.modalTitle {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 16px;
}

.modalSubtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.modalBody {
  padding: 14px;
}

.modalGrid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.modalPayRow {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fbfbfb;
}

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

.modalPayRowTitle {
  font-weight: 950;
}

.modalPayRowGrid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.miniInput {
  width: 100%;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  font-size: 13px;
  margin-top: 6px;
  background: #fff;
}

.historyRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(17, 24, 39, 0.10);
}

.historyRow:last-child {
  border-bottom: none;
}

.miniBtn {
  height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

@media (min-width: 760px) {
  .recordGrid {
    grid-template-columns: 1fr 1fr 1fr;
  }

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

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

.ownerReportPreview {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.ownerReportPrint {
  display: none;
}

/* Owner report document styles (screen + print) */
.ownerDoc {
  color: #111827;
}

.ownerDocHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(207, 161, 144, 0.55);
  margin-bottom: 12px;
}

.ownerDocLogo {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(207, 161, 144, 0.35);
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ownerDocLogo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.ownerDocTitle {
  font-weight: 950;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.ownerDocMeta {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

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

.ownerTotals .box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.ownerTotals .k {
  font-size: 11px;
  color: #6b7280;
}

.ownerTotals .v {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 900;
}

.ownerTable {
  width: 100%;
  border-collapse: collapse;
}

.ownerTable th,
.ownerTable td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: top;
}

.ownerTable th {
  text-align: left;
  font-size: 11px;
  color: #374151;
  background: #fbfbfb;
  border-top: 1px solid var(--border);
  letter-spacing: 0.2px;
}

.ownerNote {
  margin-top: 10px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

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

@media print {
  /* Print: only show owner report print container */
  body {
    background: #fff;
  }

  .container,
  .header,
  form#calculatorForm > *:not(#ownerReportPrint) {
    display: none !important;
  }

  #ownerReportPrint {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ownerReportPrint .ownerDocHeader {
    border-bottom-color: #cfa190;
  }

  .ownerTable th {
    position: static;
  }
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

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

.table th {
  position: sticky;
  top: 0;
  background: #fbfbfb;
  z-index: 1;
  font-weight: 900;
  font-size: 12px;
  color: #374151;
}

.table tr:last-child td {
  border-bottom: none;
}

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #f9fafb;
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
}

.pill.warn {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(245, 158, 11, 0.10);
}

.journalMeta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.footer {
  margin-top: 14px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 760px) {
  .metaGrid {
    grid-template-columns: 1fr 1fr;
  }

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

  .grid .span2 {
    grid-column: 1 / -1;
  }

  .results {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }

  .journal {
    grid-column: 1 / -1;
  }

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

  .filters {
    grid-template-columns: 2fr 1fr 1fr;
    align-items: end;
  }

  .reportActions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .summaryGrid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 520px) {
  .header {
    padding: 16px;
  }

  .brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .syncStatusWrap {
    margin-left: 0;
  }

  .logoWrap {
    width: 78px;
    height: 78px;
    border-radius: 18px;
  }

  .logoImg {
    padding: 10px;
  }

  .subhead {
    max-width: 34ch;
    margin: 0 auto;
  }

  .actions button {
    width: 100%;
  }

  .presetActions {
    width: 100%;
  }

  .presetActions button {
    flex: 1 1 auto;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 14px;
  }

  .card {
    padding: 14px;
  }
}
