/* Owner dashboard. Palette and shell match the approved overview mockup. */
body:has(.dash-app) {
  margin: 0;
  background: #F5F1E9;
}

.dash-app {
  min-height: 100vh;
  background: #F5F1E9;
  color: #29262A;
  font: 16px/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.dash-app * { box-sizing: border-box; }

.dash-top {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: #FFFDF8;
  border-bottom: 1px solid #D8D0C5;
  padding: 12px 28px;
}

.dash-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  color: #51364C;
  text-decoration: none;
}

.dash-logo span { color: #885934; }

.dash-org,
.dash-search {
  border: 1px solid #D8D0C5;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #68616B;
  background: #fff;
}

.dash-search { width: 300px; max-width: 100%; margin-left: 12px; }

.dash-spacer { flex: 1; }

.dash-acct {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.dash-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ECE4EA;
  color: #51364C;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.dash-signout-form { margin: 0; }

.dash-signout {
  background: none;
  border: 0;
  color: #68616B;
  font: 13px/1.4 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
}

.dash-shell { display: flex; min-height: calc(100vh - 120px); }

.dash-nav {
  width: 220px;
  flex: 0 0 220px;
  padding: 24px 14px;
  border-right: 1px solid #D8D0C5;
}

.dash-nav a,
.dash-nav .item {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: #29262A;
  text-decoration: none;
  margin-bottom: 2px;
}

.dash-nav a.on,
.dash-nav .item.on {
  background: #ECE4EA;
  color: #51364C;
  font-weight: 600;
}

.dash-nav small {
  display: block;
  color: #68616B;
  font-size: 11px;
  margin: 18px 12px 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dash-role-note { padding: 0 12px; }

.dash-main { flex: 1; min-width: 0; padding: 30px 36px; }

.dash-main h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 6px;
}

.dash-ctx { color: #68616B; max-width: 760px; margin: 0; }

.dash-prog {
  display: flex;
  gap: 0;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.dash-prog > li { flex: 1; min-width: 0; }

.dash-prog > div,
.dash-prog > a,
.dash-prog > li > a,
.dash-prog > li > div {
  display: block;
  box-sizing: border-box;
  width: 100%;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-top: 4px solid #D8D0C5;
  font-size: 13px;
  color: #A9A1AA;
  text-decoration: none;
}

.dash-prog > li > a.act,
.dash-prog > li > a.done,
.dash-prog > li > a.cur {
  color: #51364C;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.dash-prog .act { color: #68616B; }

.dash-prog .cur {
  border-color: #51364C;
  color: #51364C;
  font-weight: 700;
}

.dash-prog span { display: block; font-size: 13px; }

.dash-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.dash-card {
  background: #FFFDF8;
  border: 1px solid #D8D0C5;
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}

.dash-card p { margin: 0; }

.dash-big {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: normal;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.dash-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.dash-side { display: grid; gap: 18px; align-content: start; }

.dash-renewals-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-renewals-head h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 22px;
  margin: 0;
}

.dash-table-wrap { overflow-x: auto; max-width: 100%; }

.dash-table { width: 100%; border-collapse: collapse; margin-top: 10px; }

.dash-table th {
  text-align: left;
  font-size: 12px;
  color: #68616B;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px;
  border-bottom: 1px solid #D8D0C5;
}

.dash-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #EAE3D8;
  vertical-align: top;
}

.dash-owner-note {
  display: block;
  margin-top: 2px;
  color: #68616B;
  font-size: 13px;
}

.dash-pill {
  display: inline-block;
  white-space: nowrap;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  background: #EEEAE3;
  color: #68616B;
}

.dash-btn {
  display: inline-block;
  white-space: nowrap;
  background: #51364C;
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
}

.dash-btn2 {
  background: #fff;
  color: #51364C;
  border: 1px solid #51364C;
  padding: 5px 12px;
}

.dash-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  font-weight: 600;
}

.dash-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #EAE3D8;
  font-size: 14px;
}

.dash-foot {
  color: #68616B;
  font-size: 12px;
  margin-top: 26px;
  border-top: 1px solid #D8D0C5;
  padding-top: 12px;
}

.dash-app :focus-visible {
  outline: 2px solid #51364C;
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .dash-shell { flex-direction: column; }
  .dash-nav {
    width: auto;
    flex: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid #D8D0C5;
  }
  .dash-nav a,
  .dash-nav .item { margin-bottom: 0; }
  .dash-nav small,
  .dash-role-note { flex: 1 0 100%; }
  .dash-summary { grid-template-columns: 1fr 1fr; }
  .dash-body { grid-template-columns: 1fr; }
  .dash-main { padding: 20px 16px; }
  .dash-search { margin-left: 0; }
  .renew-layout { grid-template-columns: 1fr; }
  .renew-summary { position: static; }
  .term-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-app * { transition: none !important; }
}

.dash-table tr.dash-row { position: relative; }
.dash-table tr.dash-row > td { position: static; }
a.dash-row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.dash-pill.c { background: #F3E6DA; color: #885934; }

.dash-btn.lg { padding: 10px 18px; text-decoration: none; }
.dash-btn2.lg { padding: 9px 16px; }
a.dash-btn { text-decoration: none; }

.renew-context { max-width: 760px; }
.renew-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}
.renew-stack { display: grid; gap: 18px; }
.renew-summary { position: sticky; top: 20px; }
.renew-kv {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr) auto;
  align-items: center;
}
.renew-kv > div { padding: 10px 8px 10px 0; border-bottom: 1px solid #EAE3D8; }
.renew-note { margin-top: 14px; }
.renew-qty {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.renew-label { display: block; font-weight: 600; margin-bottom: 6px; }
.renew-input {
  width: 180px;
  max-width: 100%;
  box-sizing: border-box;
  font: 18px/1.4 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #29262A;
  background: #fff;
  border: 2px solid #51364C;
  border-radius: 6px;
  padding: 6px 12px;
}
.renew-readonly { border-color: #D8D0C5; background: #FFFDF8; }
.renew-current { padding-bottom: 10px; }
.renew-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.renew-save { margin-top: 14px; }
.renew-error { color: #B42318; font-size: 16px; margin: 12px 0 0; }
.renew-next { background: #F7F2F6; }
.renew-stack h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 24px;
  margin: 0 0 6px;
}

.renew-stack h2.term-title { font-size: 26px; }

.dash-prog .done {
  border-color: #885934;
  color: #29262A;
}

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

.term-card.is-viewing { border: 2px solid #51364C; }

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

.term-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 24px;
  margin: 0;
}

.term-per { font-size: 14px; }

.term-figures { margin-top: 10px; }

.term-hold {
  padding: 8px 0;
  border-bottom: 1px solid #EAE3D8;
  font-size: 14px;
}

.term-schedule { margin-top: 8px; }

.term-year {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
}

.term-approval { margin-top: 8px; }

.term-taxes {
  margin-top: 8px;
  color: #29262A;
  font-size: 16px;
  line-height: 1.5;
}

.term-billing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.term-choice {
  width: 100%;
  margin-top: 14px;
  text-align: center;
  box-sizing: border-box;
}

.term-table-card { margin-top: 18px; }

.term-table-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 19px;
  margin: 0 0 8px;
}

.term-note { margin-top: 12px; }

.renew-next a { color: #51364C; font-weight: 600; }

.renew-help {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
