:root { --accent:#1255d9; --canvas:#f3f4f6; --surface:#fff; --ink:#172b4d; --line:#d9e2f2; }
/* Kea CRM design system: Avenir Next typography, layout, navigation, records, forms, galleries and responsive behaviour. */
@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNextLTPro-Regular.woff2") format("woff2");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font:
    16px "Avenir Next",
    "Avenir Next",
    Arial,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 15px;
  color: inherit;
}
button:hover {
  background: #edf3ff;
}
button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
button.text {
  border: 0;
  background: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
/* Fixed sidebar and workspace navigation. */
aside {
  width: 240px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.mark {
  background: var(--ink);
  color: var(--surface);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 36px;
}
.brand-sub {
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--muted, #52617a);
  margin-top: 10px;
}
.workspace {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 34px 0 27px;
  background: #f2f6ff;
  padding: 12px;
  border-radius: 9px;
  font-size: 15px;
}
.workspace > span {
  font-size: 15px;
}
small {
  display: block;
  font-size: 15px;
  color: var(--muted, #52617a);
  margin-top: 5px;
}
.navlabel {
  font-size: 15px;
  letter-spacing: 1.8px;
  color: var(--muted, #52617a);
  margin: 0 14px 12px;
}
nav button,
.sidebar-bottom > button {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  margin: 3px 0;
  padding: 12px 15px;
}
nav button.active {
  background: #eaf1ff;
  color: var(--ink);
  font-weight: bold;
}
nav button .count {
  float: right;
  background: #dce8ff;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 15px;
}
.sidebar-bottom {
  margin-top: auto;
}
.profile {
  border-top:0;
  margin-top: 18px;
  padding: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.profile button {
  padding: 4px;
  border: 0;
}
.avatar {
  display: inline-grid;
  place-items: center;
  background: #dfeaff;
  border: 2px solid white;
  border-radius: 50%;
  height: 36px;
  width: 36px;
  font-size: 15px;
  font-weight: bold;
  flex-shrink: 0;
}
main {
  margin-left: 240px;
}
/* Page header and account controls. */
header {
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  padding: 0 35px;
  gap: 16px;
  font-size: 15px;
  color: var(--muted, #52617a);
}
header #collapse {
  border: 0;
  padding: 5px;
}
.head-right {
  margin-left: auto;
  display: flex;
  gap: 20px;
  align-items: center;
}
.head-right button {
  padding: 4px 9px;
  border-radius: 50%;
}
.demo {
  font-size: 15px;
  color: var(--accent);
}
#content {
  padding: 34px 36px;
  min-height: calc(100vh - 140px);
}
.eyebrow {
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--muted, #52617a);
  text-transform: uppercase;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 27px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 8px 0;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
  color: var(--muted, #52617a);
  margin: 5px 0;
}
.pagehead p {
  font-size: 15px;
}
.actions {
  display: flex;
  gap: 10px;
}
/* Summary tiles and pipeline totals. */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 29px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 19px 21px;
}
.stat label {
  font-size: 15px;
  color: var(--muted, #52617a);
}
.stat strong {
  display: block;
  font-size: 27px;
  margin: 10px 0;
}
.stat small {
  font-size: 15px;
}
.stat.feature {
  background: #eaf1ff;
  border-color: #ccdfff;
}
.positive {
  color: #496647 !important;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}
.toolbar select,
.toolbar input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 15px;
}
.toolbar input {
  margin-left: auto;
  width: 210px;
}
.segmented {
  display: flex;
  background: #edf3ff;
  border-radius: 7px;
  padding: 3px;
}
.segmented button {
  border: 0;
  background: none;
  padding: 7px 13px;
  font-size: 15px;
}
.segmented button.selected {
  background: white;
  box-shadow: none;
}
.sectionline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.sectionline h2 {
  margin: 0;
  font-size: 18px;
}
.muted {
  color: var(--muted, #52617a);
  font-size: 15px;
}
/* Five-stage drag-and-drop board, with horizontal scrolling on narrower screens. */
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 15px;
  overflow: auto;
  margin-top: 22px;
  min-height: 430px;
}
.column {
  background: #edf3ff;
  border-radius: 10px;
  padding: 12px;
  min-height: 400px;
  border-top:0;
}
.columnhead {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 6px;
}
.columnhead span {
  font-size: 15px;
  background: white;
  border-radius: 4px;
  padding: 3px 6px;
}
.columnhead button {
  margin-left: auto;
  border: 0;
  padding: 0 3px;
  background: none;
  color: var(--muted, #52617a);
}
.colvalue {
  font-size: 15px;
  color: var(--muted, #52617a);
  margin-bottom: 14px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  margin-bottom: 11px;
  cursor: pointer;
  box-shadow: none;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.tag {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 6px;
  background: #eaf1ff;
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 10px;
}
.tag.commercial {
  background: #e8f6f5;
  color: #086c69;
}
.card h3 {
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 7px;
}
.card .location {
  font-size: 15px;
  color: var(--muted, #52617a);
}
.amount {
  font-size: 16px;
  font-weight: bold;
  margin: 14px 0;
}
.cardperson {
  font-size: 15px;
  color: var(--muted, #52617a);
  border-top:0;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mini {
  height: 23px;
  width: 23px;
  background: #eaf1ff;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
}
.next {
  font-size: 15px;
  color: var(--muted, #52617a);
  margin-top: 12px;
}
.next.overdue {
  color: #bb7956;
}
.hint {
  font-size: 15px;
  color: var(--muted, #52617a);
  margin-top: 18px;
}
/* Reusable white content panels and record tables. */
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
}
th {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted, #52617a);
  background: #f2f6ff;
}
td,
th {
  padding: 16px 13px;
  border-bottom: 1px solid #e3ebfa;
}
tbody tr:hover {
  background: var(--canvas);
  cursor: pointer;
}
.pill {
  font-size: 15px;
  border-radius: 20px;
  background: #eaf1ff;
  padding: 5px 9px;
  white-space: nowrap;
}
.row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid #e3ebfa;
}
.row:last-child {
  border: 0;
}
.row .push {
  margin-left: auto;
}
.row p {
  font-size: 15px;
}
.row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--ink);
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted, #52617a);
}
footer {
  font-size: 15px;
  color: var(--muted, #52617a);
  display: flex;
  justify-content: space-between;
  padding: 20px 36px;
}
/* Accessible modal forms and their backdrop. */
dialog {
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  padding: 28px;
  width: 600px;
  max-width: 94vw;
  max-height: 90vh;
}
dialog::backdrop {
  background: #152c5255;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialoghead h2 {
  margin: 0;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 16px;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  background: white;
  color: var(--ink);
}
textarea {
  min-height: 90px;
}
.full {
  grid-column: 1/-1;
}
.notice {
  background: #eff5ff;
  border: 1px solid #d4e3ff;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--accent);
  margin: 15px 0;
}
.dialogactions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 13px 22px;
  border-radius: 9px;
  display: none;
  z-index: 99;
}
.collapsed aside {
  width: 78px;
}
.collapsed .brand {
  font-size: 15px;
  padding: 0;
}
.collapsed .brand-sub,
.collapsed .workspace,
.collapsed .navlabel,
.collapsed .sidebar-bottom {
  display: none;
}
.collapsed nav button {
  font-size: 15px;
  padding: 15px;
}
.collapsed nav button::first-letter {
  font-size: 20px;
}
.collapsed main {
  margin-left: 78px;
}
.progress {
  height: 6px;
  background: #edf3ff;
  border-radius: 9px;
  margin-top: 12px;
  overflow: hidden;
}
.progress i {
  height: 100%;
  display: block;
  background: var(--accent);
}
.welcome {
  background: #eaf1ff;
  border-radius: 12px;
  padding: 27px;
  margin-bottom: 24px;
}
.property-icon {
  font-size: 30px;
  padding: 22px;
  background: #eaf1ff;
  border-radius: 10px;
}
.checklist {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  font-size: 15px;
}
.checklist input {
  accent-color: var(--ink);
}
.note {
  background: #f2f6ff;
  padding: 15px;
  border-radius: 9px;
  font-size: 15px;
  margin-top: 10px;
}
.auth {
  padding: 10px 20px;
}
.auth .mark {
  display: block;
  margin-bottom: 20px;
}
.danger {
  color: #ae6258;
}
.bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  font-size: 15px;
}
.bar i {
  height: 12px;
  background: var(--accent);
  border-radius: 4px;
  display: block;
}
@media (min-width: 1500px) {
  #content {
    max-width: 1600px;
    margin: auto;
  }
}
@media (max-width: 1100px) {
  aside {
    width: 200px;
  }
  main {
    margin-left: 200px;
  }
  #content {
    padding: 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .board {
    grid-template-columns: repeat(5, 220px);
  }
  .toolbar input {
    margin-left: 0;
  }
}
/* Compact layouts for phones and small tablets. */
@media (max-width: 760px) {
  aside {
    width: 70px;
    padding: 22px 9px;
  }
  .brand {
    font-size: 15px;
    padding: 0;
  }
  .brand-sub,
  .workspace,
  .navlabel,
  .sidebar-bottom {
    display: none;
  }
  nav {
    margin-top: 30px;
  }
  nav button {
    font-size: 15px;
    padding: 15px;
  }
  nav button::first-letter {
    font-size: 20px;
  }
  main {
    margin-left: 70px;
  }
  header {
    padding: 0 15px;
  }
  .demo {
    display: none;
  }
  #content {
    padding: 20px 15px;
  }
  .pagehead {
    align-items: flex-start;
    gap: 12px;
  }
  .pagehead .actions {
    flex-direction: column;
  }
  h1 {
    font-size: 26px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .toolbar input {
    width: 100%;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  footer {
    display: none;
  }
  .panel {
    padding: 15px;
    overflow: auto;
  }
  .head-right {
    gap: 10px;
  }
  .stat strong {
    font-size: 22px;
  }
}
@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNextLTPro-Bold.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}

/* Reference blue with bright, distinct workspace accents. */
:root {
  --kea-ink: var(--ink);
  --kea-paper: var(--canvas);
  --kea-blue: var(--accent);
  --kea-line: var(--line);
  --kea-muted: var(--muted, #52617a);
}
.mark {
  background: var(--accent);
  color: var(--surface);
}
.brand-sub {
  color: var(--accent);
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
button.primary:hover {
  background: #083ca9;
  border-color: #083ca9;
}
button:hover {
  background: #edf3ff;
}
nav button.active {
  background: #eaf1ff;
  color: var(--accent);
  box-shadow: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.card:hover {
  border-color: #83a9ef;
  box-shadow: none;
}
.tag {
  background: #eaf1ff;
  color: #104bbf;
}
.tag.commercial {
  background: #e4f6f3;
  color: #076a61;
}
.stats .stat {
  position: relative;
  overflow: hidden;
}
.stats .stat:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
}
.stats .stat:nth-child(2):before {
  background: #e64040;
}
.stats .stat:nth-child(3):before {
  background: #13a596;
}
.stats .stat:nth-child(4):before {
  background: #f2c83d;
}
.stats .stat:nth-child(1) strong {
  color: var(--accent);
}
.stats .stat:nth-child(2) strong {
  color: #b52636;
}
.stats .stat:nth-child(3) strong {
  color: #08776d;
}
.stat.feature {
  background: #fff9e3;
  border-color: #f0e3ac;
}
.stat.feature strong {
  color: #705400;
}
.column {
  background: #eef4ff;
}
.column:nth-child(2) {
  background: #f1efff;
}
.column:nth-child(3) {
  background: #fff8e5;
}
.column:nth-child(4) {
  background: #fff0ef;
}
.column:nth-child(5) {
  background: #eaf8f4;
}
.welcome {
  background: linear-gradient(110deg, #eaf1ff, #f2f6ff 70%, #e8f8f5);
  border: 1px solid #d6e4ff;
}
.avatar {
  background: #e1ebff;
  color: var(--accent);
}
.mini {
  background: #eaf1ff;
  color: var(--accent);
}
.sidebar-bottom .profile .avatar {
  background: #fff0ef;
  color: #b52636;
}
.property-icon {
  background: #eaf1ff;
  color: var(--accent);
}
.grid2 article:nth-child(3n + 2) .property-icon {
  background: #fff0ef;
  color: #c62c35;
}
.grid2 article:nth-child(3n + 3) .property-icon {
  background: #fff8dd;
  color: #80620c;
}
.progress i {
  background: var(--accent);
}
.bar:nth-of-type(2n) i {
  background: #13a596;
}
.bar:nth-of-type(3n) i {
  background: #e64040;
}
.next.overdue {
  color: #b52636;
}
.danger {
  color: #b52636;
}
.positive {
  color: #08776d !important;
}
#toast {
  background: var(--accent);
  color: var(--surface);
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
.wide-dialog {
  width: 1060px;
  max-width: 96vw;
  padding: 28px;
}
.collab-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.collab-top h2 {
  font-size: 24px;
}
.collab-tabs {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  margin: 22px 0;
}
.collab-tabs button {
  border: 0;
  border-radius: 8px 8px 0 0;
  background: none;
  padding: 13px 20px;
}
.collab-tabs button.selected {
  background: #eaf1ff;
  color: var(--accent);
  box-shadow: none;
}
.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.collab-grid .panel {
  min-width: 0;
}
.visible-label,
.private-label {
  display: inline-block;
  font-size: 15px;
  padding: 5px 8px;
  border-radius: 5px;
  font-weight: 400;
  vertical-align: middle;
}
.visible-label {
  color: #086b65;
  background: #e7f7f3;
}
.private-label {
  color: #61479c;
  background: #f0eaff;
}
.visibility-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted, #52617a);
}
.commission-amount {
  font-size: 32px;
  display: block;
  color: var(--accent);
}
.deal-stage {
  font-size: 23px;
  font-weight: bold;
  color: var(--accent);
}
.document-row {
  display: flex;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid #e3ebfa;
  padding: 18px 0;
}
.document-row b {
  font-size: 15px;
}
.document-buttons {
  margin-left: auto;
  display: flex;
  gap: 5px;
  flex-direction: column;
}
.document-buttons button {
  font-size: 15px;
  padding: 7px;
}
.file-icon {
  background: #edf3ff;
  border-radius: 8px;
  padding: 8px;
  color: var(--accent);
}
.object-id {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.kyc-item {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 25px;
  border-bottom: 1px solid #e3ebfa;
  padding: 21px 0;
}
.kyc-received {
  display: flex;
  gap: 12px;
  align-items: start;
  font-size: 15px;
}
.kyc-received input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  flex-shrink: 0;
}
.kyc-received small {
  line-height: 1.6;
  margin: 7px 0;
}
.kyc-files {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.kyc-files button,
.kyc-files select {
  font-size: 15px;
}
.status-missing,
.status-rejected {
  background: #fff0ef;
  color: #b52636;
}
.status-uploaded {
  background: #fff7db;
  color: #6d5500;
}
.status-accepted {
  background: #e4f6ef;
  color: #086d55;
}
.status-na {
  background: #eef1f6;
  color: var(--muted, #52617a);
}
.kyc-summary {
  margin: 18px 0;
  background: #edf3ff;
  border-radius: 8px;
  padding: 12px;
  color: var(--accent);
  font-size: 15px;
}
.shared-note {
  background: #f6f9ff;
  border: 1px solid #e3ebfa;
  border-radius: 10px;
  padding: 20px;
  margin: 18px 0;
}
.shared-note .pill {
  margin-left: 9px;
}
.shared-note p {
  white-space: pre-wrap;
  color: #263f63;
  margin: 15px 0;
}
.shared-note button {
  font-size: 15px;
}
.review-reason {
  font-size: 15px;
  color: #b52636;
}
.upload-panel {
  border: 2px solid var(--accent);
}
.client-entry {
  color: var(--accent);
  font-size: 15px;
}
.client-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 25px;
}
.client-shell header {
  padding: 0 0 20px;
  height: auto;
  background: transparent;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
}
.client-shell .brand {
  padding: 0;
}
.client-main {
  margin: 0;
  padding: 30px 0;
}
.client-deals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.client-card {
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.client-login {
  max-width: 490px;
  margin: 70px auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 35px;
}
.client-login button {
  width: 100%;
  margin: 8px 0;
}
.client-shell small {
  line-height: 1.6;
}
.client-error {
  color: #b52636;
  font-size: 15px;
  padding: 12px;
}
.client-stage {
  color: var(--accent);
  font-weight: bold;
}
.client-shell textarea {
  width: 100%;
}
.client-shell #clientStatus {
  font-size: 15px;
  color: var(--muted, #52617a);
}
.client-shell .document-row {
  overflow-wrap: anywhere;
}
.client-shell .pagehead {
  margin-top: 25px;
}
@media (max-width: 760px) {
  .collab-grid,
  .kyc-item,
  .client-deals {
    grid-template-columns: 1fr;
  }
  .collab-tabs {
    overflow: auto;
  }
  .collab-tabs button {
    padding: 11px;
    white-space: nowrap;
    font-size: 15px;
  }
  .wide-dialog {
    padding: 18px;
  }
  .collab-top {
    align-items: flex-start;
  }
  .collab-top h2 {
    font-size: 20px;
  }
  .client-shell {
    padding: 20px 15px;
  }
  .client-entry {
    display: none;
  }
  .document-row {
    flex-wrap: wrap;
  }
  .document-buttons {
    margin-left: 0;
    flex-direction: row;
  }
  .client-preview .row .actions {
    flex-direction: column;
  }
}
/* Property galleries use a consistent 8:5 crop; descriptions remain available to screen readers. */
.property-cover {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 9px;
  margin-bottom: 20px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.photo-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.photo-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.photo-card figcaption {
  padding: 16px;
  font-size: 15px;
}
.photo-card .actions {
  flex-wrap: wrap;
  margin-top: 12px;
}
.photo-card button {
  font-size: 15px;
  padding: 7px 10px;
}
@media (max-width: 760px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .photo-card img {
    height: auto;
    aspect-ratio: 8/5;
  }
  .property-cover {
    height: auto;
    aspect-ratio: 8/5;
  }
}

/* Demi and italic faces preserve the supplied Avenir Next shapes instead of browser synthesis. */
@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNextLTPro-Demi.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNextLTPro-It.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Reference KB identity; the application name remains Kea CRM. */
.brand {
  gap: 12px;
  font-size: 24px;
  font-weight: 600;
  padding: 0 8px;
  letter-spacing: 0;
  align-items: center;
}
.brand-logo {
  display: block;
  width: 50px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  display: block;
  border-left: 1px solid #c8d5e8;
  padding-left: 12px;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 21px;
  letter-spacing: -0.5px;
}
.brand-name small {
  font-size: 15px;
  letter-spacing: 1.3px;
  line-height: 1.5;
  margin-top: 6px;
  color: var(--muted, #52617a);
}
.auth-brand-logo {
  display: block;
  margin: 0 0 20px;
  object-fit: contain;
}
.collapsed .brand-name {
  display: none;
}
.collapsed .brand {
  padding: 0;
}
.collapsed .brand-logo {
  width: 42px;
}
@media (max-width: 760px) {
  aside .brand-name {
    display: none;
  }
  aside .brand {
    padding: 0;
  }
  aside .brand-logo {
    width: 42px;
  }
  .client-shell .brand-logo {
    width: 45px;
  }
  .client-shell .brand-name {
    font-size: 20px;
  }
}

/* Theme surfaces and solid navigation tiles retain readable contrast in both modes. */
body {background:var(--canvas);color:var(--ink)}
aside,header,.panel,.card,.deal-card,.client-card,dialog,button,input,select,textarea,table {background-color:var(--surface);color:var(--ink);border-color:var(--line)}
button.primary {background:var(--accent);border-color:var(--accent);color:#fff}
[data-theme="dark"] {color-scheme:dark;--muted:#bac8dc}
[data-theme="dark"] button.primary {color:#102031}
[data-theme="dark"] :is(.notice,.tag,.pill,.stat,.column,.kanban-column,thead,.checklist) {background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme="dark"] :is(p,small,label,h1,h2,h3,td,th,.muted){color:inherit}
[data-theme="dark"] :is(button:hover,button.active){background:#304462;color:#fff}
.nav-icon {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;border-radius:8px;color:#fff;background:#1255d9;font-size:21px;font-weight:700;margin-right:8px}
.nav-leads {background:#087c63}.nav-deals {background:#7840ca}.nav-contacts {background:#bd285a}.nav-properties {background:#00799d}.nav-activities {background:#aa550b}.nav-reports {background:#4e5ac2}.nav-sharing {background:#a12784}
.appearance .row {flex-wrap:wrap;gap:12px}.appearance select {margin-left:8px;max-width:230px}

/* Flat surfaces: vivid primary accents with white and light grey, never shadows. */
*,*::before,*::after {box-shadow:none !important}
html {scroll-behavior:smooth;scroll-padding-top:24px}
button,a,.card,.panel,.stat,input,select,textarea {
 transition:background-color 180ms ease,border-color 180ms ease,color 180ms ease,transform 180ms ease;
}
nav button.active {border-left:3px solid var(--accent)}
.collab-tabs button.selected {border-bottom:3px solid var(--accent)}
.nav-leads {background:#008859}.nav-deals {background:#7026e8}.nav-contacts {background:#df1858}.nav-properties {background:#0073d8}.nav-activities {background:#c34a00}.nav-reports {background:#363ee0}.nav-sharing {background:#b51ba0}
.stats .stat {border-top:0;}



@media (hover:hover) and (pointer:fine) {
 button:hover {transform:translateY(-2px);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
 button.primary:hover {background:color-mix(in srgb,var(--accent) 85%,#000);color:#fff}
 :is(.card,.panel,.stat):hover {transform:translateY(-3px);border-color:var(--accent)}
 nav button:hover {transform:translateX(3px)}
}
button:active {transform:translateY(0)}
button:disabled {transform:none;cursor:not-allowed}
button:focus-visible,a:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
dialog[open] {animation:dialog-arrive 200ms ease-out}
@keyframes dialog-arrive {from {opacity:.5;transform:translateY(8px)} to {opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion:reduce) {
 html {scroll-behavior:auto}
 *,*::before,*::after {animation:none !important;transition:none !important}
 button:hover,nav button:hover,:is(.card,.panel,.stat):hover {transform:none}
}

/* Pill actions and navigation. Labels are explicitly hidden in compact mode, never shrunk. */
button,.segmented button,.collab-tabs button,nav button {border-radius:999px}
nav button.active {border-left:0}
.sidebar-bottom {border-top:0}
.nav-icon {background:transparent !important;border-radius:0;width:24px;height:24px;color:#1255d9}
.nav-leads {color:#008859}.nav-deals {color:#7026e8}.nav-contacts {color:#df1858}.nav-properties {color:#0073d8}.nav-activities {color:#c34a00}.nav-reports {color:#363ee0}.nav-sharing {color:#b51ba0}
.ui-icon {width:22px;height:22px;flex-shrink:0;vertical-align:middle}
nav button {display:flex;align-items:center;gap:8px;min-height:46px;text-align:left}
nav button .count {margin-left:auto}
.sidebar-bottom button {display:flex;align-items:center;gap:10px}
small {font-size:15px}
.collapsed nav button {font-size:15px;padding:12px;justify-content:center}
.collapsed nav .nav-text,.collapsed nav .count {display:none}
.collapsed .nav-icon {margin:0}
@media(max-width:760px){nav button {font-size:15px;padding:12px;justify-content:center}nav .nav-text,nav .count{display:none}.nav-icon{margin:0}}
[data-theme="dark"] .nav-icon {color:var(--accent)}
/* Flat dashboard summaries, without decorative strips or hover outlines. */
.stats .stat,.stats .stat:hover {border:0;outline:0}
.stats .stat::before,.stats .stat::after {display:none;content:none}
/* One consistent radius on the enlarged record detail dialog. */
dialog.record-dialog {width:900px;max-width:94vw;border-radius:20px;overflow:auto}
/* Resizable desktop sidebar. A collapsed sidebar expands over the workspace on hover. */
:root {--sidebar-width:260px}
@media(min-width:761px){
 aside {width:var(--sidebar-width);transition:width 200ms ease}
 main {margin-left:var(--sidebar-width);transition:margin-left 200ms ease}
 .collapsed aside {width:78px}
 .collapsed main {margin-left:78px}
 .collapsed.sidebar-peek aside {width:var(--sidebar-width);z-index:50}
 .collapsed.sidebar-peek :is(.brand-name,.workspace,.navlabel,.sidebar-bottom,.nav-text) {display:block}
 .collapsed.sidebar-peek .brand {font-size:21px}
 .collapsed.sidebar-peek nav button {justify-content:flex-start}
 .collapsed.sidebar-peek nav .count {display:inline}
}
.workspace {display:block;font-size:15px;background:transparent;padding:16px 0;white-space:normal}
.sidebar-resize {position:absolute;right:0;top:0;bottom:0;width:7px;cursor:col-resize;touch-action:none}
.sidebar-resize:hover,.sidebar-resize:focus-visible {background:var(--accent)}
.resizing-sidebar,.resizing-sidebar * {cursor:col-resize!important;user-select:none}
.resizing-sidebar aside,.resizing-sidebar main {transition:none}
@media(max-width:760px){.sidebar-resize{display:none}}
/* Card clone tracks the pointer; hit-testing remains on the underlying stage. */
.board .card {touch-action:pan-y}
.drag-preview {position:fixed!important;z-index:1000;pointer-events:none;transform:rotate(2deg)!important;transition:none!important;margin:0!important;opacity:.95}
.column.drop-target {background:color-mix(in srgb,var(--accent) 12%,var(--surface))}
@media(prefers-reduced-motion:reduce){aside,main{transition:none}.drag-preview{transform:none!important}}

/* Never hide a failed cloud save behind an optimistic success toast. */
#cloudStatus {max-width:360px;white-space:normal;font-size:15px;margin-left:12px}
.save-failed #content {pointer-events:none;opacity:.55}
.save-failed #cloudStatus {color:#bd123c;font-weight:700}
