@font-face {
  font-family: Inter;
  src: url(/assets/inter-greek.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0370-03FF, U+1F00-1FFF;
}
@font-face {
  font-family: Inter;
  src: url(/assets/inter-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF;
}
:root {
  --ink: #172325;
  --muted: #586666;
  --paper: #f5f6f2;
  --line: #dce1dc;
  --blue: #284bd0;
  --blue-soft: #edf1ff;
  color: var(--ink);
  background: var(--paper);
  font:
    15px/1.5 Inter,
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #476bee;
  outline-offset: 3px;
}
#main:focus {
  outline: none;
}
.skip {
  position: absolute;
  z-index: 5;
  left: 1rem;
  top: -100px;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 1rem;
}
.brand {
  width: 100px;
  height: auto;
  display: block;
}
h1,
h2,
h3 {
  font-weight: 580;
  line-height: 1.13;
  letter-spacing: -0.043em;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(34px, 4vw, 60px);
}
h2 {
  font-size: clamp(21px, 2.1vw, 29px);
}
h3 {
  font-size: 17px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--muted);
  margin-bottom: 10px;
}
.gate {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  min-height: 100svh;
  background: #fafaf7;
}
.gate-form {
  padding: clamp(28px, 5vw, 82px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 46px;
}
.gate-form header .brand {
  width: 114px;
}
.gate-center {
  width: 100%;
  max-width: 435px;
  align-self: center;
}
.gate-center h1 {
  font-size: clamp(38px, 4.4vw, 70px);
}
.intro {
  margin: 14px 0 30px;
  color: var(--muted);
  font-size: 17px;
}
.stack {
  display: grid;
  gap: 17px;
}
.stack .primary {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
}
.help,
.gate footer {
  font-size: 13px;
  color: var(--muted);
}
.help {
  margin-top: 22px;
}
.gate footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.gate-art {
  position: relative;
  margin: 16px 16px 16px 0;
  overflow: hidden;
  border-radius: 20px;
  background: #d3d9d4;
  min-height: 420px;
}
.gate-art img {
  height: 100%;
  width: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}
.primary,
.button,
.quiet,
.logout,
.close {
  border-radius: 8px;
  line-height: 1.3;
  font-weight: 560;
}
.primary,
.button {
  border: 1px solid transparent;
  padding: 11px 16px;
  min-height: 42px;
}
.primary {
  background: var(--blue);
  color: white;
}
.primary:hover {
  background: #1b3aaa;
}
.button {
  background: white;
  border-color: #cdd5d0;
  color: var(--ink);
}
.button:hover,
.quiet:hover,
.logout:hover {
  background: #edf1ee;
}
.quiet,
.logout,
.close {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 8px;
}
.close {
  font-size: 24px;
  color: var(--muted);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field span,
.checks legend {
  font-size: 13px;
  font-weight: 580;
  color: #364444;
}
.field input,
.field select,
.field textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid #bdc7c1;
  border-radius: 7px;
  background: #fff;
  padding: 11px;
  color: var(--ink);
}
.field textarea {
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline-color: var(--blue);
}
.error {
  color: #982d21;
  font-size: 14px;
}
.error:empty {
  display: none;
}
.loading,
.problem {
  padding: 32px;
}
.problem > * {
  margin-bottom: 14px;
}
.topbar,
.main-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.bar-inner,
.main-nav > div,
.workspace {
  width: min(1216px, 100%);
  margin: 0 auto;
  padding-inline: clamp(17px, 4vw, 56px);
}
.bar-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 19px;
}
.space-name {
  font-size: 14px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.identity strong,
.identity small {
  display: block;
  font-size: 13px;
}
.identity small {
  font-size: 11px;
  color: var(--muted);
}
.avatar,
.monogram {
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 600;
  background: #e8ede8;
  color: #354b41;
  border-radius: 9px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
}
.monogram {
  width: 42px;
  height: 42px;
}
.logout {
  color: var(--muted);
  font-size: 13px;
}
.main-nav > div,
.tabs,
.status-nav,
.tools,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.main-nav > div,
.tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}
.main-nav a,
.tabs a,
.status-nav a,
.pagination a {
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a {
  color: var(--muted);
  padding: 14px 5px 12px;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  margin-right: 15px;
}
.main-nav a.selected {
  border-color: var(--blue);
  color: var(--ink);
  font-weight: 600;
}
.workspace {
  padding-block: clamp(27px, 4vw, 60px) 80px;
}
.pagehead,
.panel-head,
.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pagehead {
  margin-bottom: 26px;
}
.back {
  display: inline-block;
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 13px;
}
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 25px;
}
.metrics:empty {
  display: none;
}
.metric {
  position: relative;
  flex: 1;
  min-width: 155px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 17px 19px;
  text-decoration: none;
}
.metric span,
.balance span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.metric strong,
.balance strong {
  display: block;
  font-size: 30px;
  font-weight: 570;
  letter-spacing: -0.045em;
  margin-top: 8px;
}
.metric i {
  position: absolute;
  right: 14px;
  top: 15px;
  color: var(--blue);
  font-style: normal;
}
.metric:hover {
  border-color: #a5b2dd;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.panel + .panel {
  margin-top: 16px;
}
.panel-head,
.filters,
.item,
.directory-row,
.thread-meta,
.reply-action,
.facts,
.empty,
.note,
.balance,
.status-nav,
.pagination {
  padding: 18px clamp(15px, 2.3vw, 29px);
}
.panel-head {
  border-bottom: 1px solid var(--line);
  min-height: 72px;
}
.panel-head h2 {
  font-size: 22px;
}
.filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.15fr auto;
  gap: 12px;
  align-items: end;
  background: #fafbf8;
  border-bottom: 1px solid var(--line);
}
.directory-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}
.directory-row:hover {
  background: #f7f9ff;
}
.directory-row + .directory-row,
.item + .item {
  border-top: 1px solid var(--line);
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-main strong,
.row-main small {
  display: block;
  overflow-wrap: anywhere;
}
.row-main small,
.row-meta,
.item-meta {
  color: var(--muted);
  font-size: 13px;
}
.row-meta {
  font-size: 11px;
}
.row-meta b {
  font-weight: 540;
}
.arrow {
  color: var(--blue);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  background: #eef0ec;
  color: #40514a;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.badge.customer,
.badge.active,
.badge.done {
  background: #e2f1e7;
  color: #23593a;
}
.badge.lead,
.badge.waiting {
  background: #fbefd8;
  color: #76501a;
}
.badge.progress,
.badge.open {
  background: var(--blue-soft);
  color: #2e4590;
}
.tabs {
  gap: 4px;
  padding-bottom: 9px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tabs a,
.status-nav a {
  padding: 7px 11px;
  font-size: 13px;
  border-radius: 6px;
  color: var(--muted);
}
.tabs .current,
.status-nav .on {
  background: #e4e9fb;
  color: #263f9d;
  font-weight: 600;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.facts dt {
  font-size: 12px;
  color: var(--muted);
}
.facts dd {
  font-weight: 520;
  overflow-wrap: anywhere;
}
.item-meta {
  margin-top: 5px;
}
.prose,
.note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prose {
  margin-top: 9px;
}
.empty {
  color: var(--muted);
  padding-block: 30px;
}
.status-nav {
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  gap: 3px;
}
.credit {
  color: #1e6b45;
}
.balance {
  background: #f2f5fc;
  border-bottom: 1px solid var(--line);
}
.thread-meta {
  color: var(--muted);
  font-size: 14px;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.pagination a {
  color: var(--blue);
}
dialog {
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 14px;
  width: min(560px, calc(100% - 24px));
  max-height: 88svh;
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #14232780;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
dialog p {
  margin-block: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.wide {
  grid-column: 1/-1;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 20px;
}
.checks {
  display: grid;
  gap: 9px;
  border: 0;
  padding: 0;
}
.checks legend {
  margin-bottom: 10px;
}
.checks input {
  accent-color: var(--blue);
}
#notice:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  z-index: 2;
}
@media (max-width: 760px) {
  .tabs {
    flex-wrap: wrap;
  }
  .gate {
    grid-template-columns: 1fr;
  }
  .gate-form {
    min-height: 100svh;
  }
  .gate-art {
    display: none;
  }
  .space-name {
    display: none;
  }
  .bar-inner {
    gap: 10px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters .field:first-child {
    grid-column: 1/-1;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    min-width: 125px;
  }
  .tools {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .row-meta {
    display: none;
  }
}
@media (max-width: 480px) {
  .bar-inner {
    min-height: 62px;
  }
  .brand {
    width: 76px;
  }
  .identity .avatar {
    display: none;
  }
  .identity strong {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .main-nav a {
    font-size: 12px;
    margin-right: 3px;
  }
  .pagehead,
  .panel-head {
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .monogram {
    display: none;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .item-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .metric {
    min-width: 105px;
    padding: 12px;
  }
  .metric i {
    display: none;
  }
  .metric span {
    font-size: 12px;
  }
  .metric strong {
    font-size: 23px;
  }
  .directory-row {
    gap: 8px;
  }
  .gate-form {
    padding: 24px;
  }
  .gate footer {
    flex-wrap: wrap;
  }
}
button.identity {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 4px;
}
button.identity:hover {
  background: #f0f3ef;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  align-items: start;
}
.dashboard-panels .panel,
.next-steps .panel {
  margin: 0;
}
.panel-head .back {
  margin: 0;
}
.next-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.excerpt {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.late,
.when {
  font-size: 12px;
  white-space: nowrap;
}
.late {
  color: #8d3c25;
}
.dashboard-panels .directory-row {
  align-items: flex-start;
}
.dashboard-panels .row-main small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 760px) {
  .main-nav > div {
    flex-wrap: wrap;
    gap: 0 6px;
  }
  .main-nav a {
    margin-right: 0;
  }
}
