:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --ink: #000000;
  --muted: #4b4b4b;
  --soft: #afafaf;
  --line: #e2e2e2;
  --accent: #000000;
  --warn: #8a5a00;
  --done: #137245;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
}

.sidebar {
  background: #000000;
  color: #ffffff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100svh;
}

.brand,
.property-switch,
.nav-item,
.sidebar-footer,
.topbar,
.page-head,
.section-head,
.timeline-list article,
.feed-item,
.document-item,
.request-row,
.contact-item,
.post-item,
.faq-item summary,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark,
.profile span,
.contact-avatar {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span,
.sidebar-footer {
  color: var(--soft);
  font-size: 13px;
  margin-top: 2px;
}

.property-switch {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000;
  border-radius: 999px;
  padding: 13px 16px;
  text-align: left;
}

.property-switch b,
.property-switch small {
  display: block;
}

.property-switch small {
  color: var(--muted);
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--soft);
  gap: 11px;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  color: #000000;
  background: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  gap: 10px;
  line-height: 1.35;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 72px;
  padding: 14px 28px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 4;
}

.menu-toggle {
  display: none;
}

.search {
  flex: 1;
  max-width: 760px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--surface-2);
  border-radius: 999px;
  min-height: 46px;
  padding: 0 16px;
}

.search svg {
  color: var(--muted);
  flex: 0 0 auto;
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

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

.icon-button,
.profile {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
}

.icon-button:hover,
.profile:hover {
  background: var(--surface-2);
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.profile {
  padding: 0;
}

.profile span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 12px;
}

.workspace {
  padding: 34px 38px 56px;
}

.view {
  display: none;
  animation: viewIn 180ms ease-out;
}

.view.is-active {
  display: block;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head {
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.page-head.compact {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 4.1vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.compact h1 {
  font-size: 36px;
}

h2 {
  font-size: 22px;
  margin-bottom: 0;
}

h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.page-head p:last-child,
.hero-panel p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.primary-action,
.secondary-action,
.text-button,
.filter,
.quick-panel button,
.topic {
  border-radius: 999px;
  border: 1px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  white-space: nowrap;
}

.primary-action {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.primary-action:hover {
  background: #242424;
}

.secondary-action,
.filter,
.topic {
  background: var(--surface-2);
  border-color: var(--surface-2);
  color: var(--ink);
}

.secondary-action:hover,
.filter:hover,
.topic:hover {
  background: #e2e2e2;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding-inline: 8px;
  text-decoration: underline;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-bottom: 30px;
}

.hero-panel {
  min-height: 280px;
  padding: 30px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(100deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.78) 48%, rgba(0, 0, 0, 0.2) 100%),
    url("assets/courtyard.svg") center right / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-panel .eyebrow,
.hero-panel p {
  color: #ffffff;
}

.hero-panel h2 {
  font-size: 32px;
  margin-bottom: 10px;
  max-width: 480px;
}

.progress {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.progress li {
  color: var(--soft);
  font-size: 13px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.progress span {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.progress .done span,
.progress .current span {
  background: #ffffff;
}

.progress .current {
  color: #ffffff;
  font-weight: 700;
}

.quick-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
  box-shadow: var(--shadow);
}

.quick-panel button {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.quick-panel button:hover {
  background: var(--surface-2);
}

.split,
.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-note {
  color: var(--muted);
  font-size: 14px;
}

.feed-list,
.document-list,
.request-table,
.contact-list,
.post-list,
.faq-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

.feed-item,
.document-item,
.request-row,
.contact-item,
.post-item,
.faq-item {
  background: #ffffff;
  border: 1px solid var(--line);
}

.feed-item,
.document-item,
.request-row,
.contact-item,
.post-item {
  padding: 15px;
  gap: 14px;
}

.feed-item:hover,
.document-item:hover,
.request-row:hover,
.contact-item:hover,
.post-item:hover,
.faq-item:hover {
  border-color: #000000;
}

.item-icon,
.contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink);
  flex: 0 0 auto;
}

.contact-avatar {
  background: #000000;
  color: #ffffff;
  font-size: 13px;
}

.item-body,
.contact-main {
  min-width: 0;
  flex: 1;
}

.item-body b,
.item-body span,
.meta,
.request-row small,
.document-item small {
  display: block;
}

.item-body b {
  margin-bottom: 4px;
}

.item-body span,
.meta,
.request-row small,
.document-item small,
.post-item p,
.faq-item p,
.contact-main p,
.contact-heading span,
.contact-heading small {
  color: var(--muted);
  line-height: 1.45;
}

.meta {
  font-size: 13px;
  margin-top: 7px;
}

.timeline-list article {
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-list article:first-child {
  padding-top: 0;
}

.timeline-list time {
  width: 72px;
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 800;
}

.timeline-list span {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.filter.is-active {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.request-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 130px 130px 42px;
}

.status {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--muted);
}

.status.open {
  color: var(--warn);
  background: #fff2ce;
}

.status.progress {
  color: var(--ink);
  background: var(--surface-2);
}

.status.done {
  color: var(--done);
  background: #e7f5ee;
}

.document-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 120px 42px;
  align-items: center;
}

.wide {
  max-width: 860px;
}

.contact-item {
  align-items: flex-start;
}

.contact-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.contact-main p {
  margin-bottom: 12px;
}

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

.contact-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  padding: 0 12px;
  font-size: 14px;
}

.contact-actions a:hover {
  background: #e2e2e2;
}

.community-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  gap: 22px;
}

.topic-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.topic {
  width: 100%;
  justify-content: flex-start;
}

.topic.is-active {
  background: #000000;
  color: #ffffff;
}

.post-item {
  display: block;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 9px;
}

.faq-item {
  overflow: hidden;
}

.faq-item summary {
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  font-weight: 800;
  cursor: pointer;
}

.faq-item summary::after {
  content: "+";
  color: var(--ink);
  font-size: 22px;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  padding: 0 16px 16px;
  margin: 0;
}

.request-modal {
  border: 0;
  padding: 0;
  width: min(620px, calc(100vw - 28px));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.request-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.modal-content {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.modal-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.modal-head h2 {
  font-size: 28px;
}

.modal-content label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  outline: 0;
  resize: vertical;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.upload-zone {
  min-height: 86px;
  place-items: center;
  border: 1px dashed #000000;
  background: var(--surface-2);
  color: var(--ink);
}

.upload-zone input {
  display: none;
}

.modal-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: #000000;
  color: #ffffff;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: 180ms ease;
  z-index: 8;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.nav-open .sidebar {
  transform: translateX(0);
}

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

  .sidebar {
    position: fixed;
    z-index: 10;
    width: 284px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .menu-toggle {
    display: grid;
  }

  .overview-grid,
  .split,
  .contacts-layout,
  .community-layout {
    grid-template-columns: 1fr;
  }

  .topic-list {
    display: flex;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 12px;
    gap: 10px;
  }

  .search {
    min-width: 0;
  }

  .workspace {
    padding: 24px 14px 42px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1,
  .compact h1 {
    font-size: 30px;
  }

  .hero-panel {
    padding: 22px;
  }

  .hero-panel h2 {
    font-size: 25px;
  }

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

  .request-row,
  .document-item {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .request-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .document-item small,
  .request-row > small:nth-of-type(2) {
    display: none;
  }

  .contact-heading,
  .contact-item {
    flex-direction: column;
  }

  .contact-actions a {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
  }
}
