@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --ink: #202321;
  --muted: #788078;
  --line: #e4e8e2;
  --paper: #f6f7f3;
  --card: #fff;
  --green: #2b5d49;
  --mint: #dce9df;
  --orange: #d97949;
  --yellow: #f4e7ad;
  --red: #c85a57;
  --shadow: 0 18px 50px rgba(38, 55, 43, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, sans-serif;
}
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #203d31;
}
.auth-screen[hidden] {
  display: none;
}
.auth-card {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 24px 70px #0003;
}
.auth-screen.onboarding {
  align-items: start;
  overflow: auto;
  padding: 48px 24px;
  background: radial-gradient(circle at 10% 0%, #37614f 0, transparent 42%), #203d31;
}
.auth-screen.onboarding .auth-card {
  width: min(760px, 100%);
  padding: 38px;
}
.auth-card form.onboarding-form {
  gap: 0;
  margin-top: 28px;
}
.form-section {
  border-top: 1px solid var(--line);
  padding: 23px 0;
}
.form-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.form-section h2 {
  margin: 0 0 5px;
  font-size: 15px;
  letter-spacing: -0.04em;
}
.form-section p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.form-kicker {
  display: block;
  color: var(--orange);
  font: 500 10px "DM Mono", monospace;
  letter-spacing: 0.1em;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field-wide {
  grid-column: 1 / -1;
}
.onboarding-submit {
  width: 100%;
  padding: 13px 16px;
  margin-top: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.auth-card .brand-mark {
  display: grid;
  background: #203d31;
  color: #f4e7ad;
  margin-bottom: 22px;
}
.auth-card h1 {
  font-size: 30px;
  letter-spacing: -0.07em;
  margin: 0 0 8px;
}
.auth-card form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}
.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
.auth-card label input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  outline: none;
  font-size: 12px;
}
.auth-card label select,
.auth-card label textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  outline: none;
  font-size: 12px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}
.auth-card label input:focus,
.auth-card label select:focus,
.auth-card label textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #2b5d4914;
}
.password-field {
  position: relative;
  display: flex;
}
.password-field input {
  width: 100%;
  padding-right: 42px !important;
}
.password-toggle {
  position: absolute;
  right: 5px;
  top: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  line-height: 1;
  font-size: 14px;
}
.password-toggle:hover {
  color: var(--green);
}
.auth-switch {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 11px;
  margin-top: 18px;
  padding: 0;
}
.auth-error {
  color: var(--red);
  font-size: 11px;
  min-height: 16px;
  margin: 12px 0 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.app-shell[hidden] {
  display: none;
}
.sidebar {
  background: #203d31;
  color: #eef3ea;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 10px 34px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid #ffffff59;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #f4e7ad;
  font-weight: 800;
}
.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.04em;
}
.brand small,
.profile-avatar + div small {
  display: block;
  color: #9eb4a5;
  font-size: 10px;
  margin-top: 3px;
}
.eyebrow {
  color: var(--orange);
  font:
    500 10px "DM Mono",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
}
.sidebar .eyebrow {
  color: #88a495;
  margin: 0 12px 10px;
}
.location-picker {
  margin: 0 10px 16px;
  color: #9eb4a5;
  font-size: 10px;
}
.location-picker select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #ffffff24;
  border-radius: 7px;
  padding: 8px;
  color: #eef3ea;
  background: #294c3d;
  font-size: 11px;
}
.location-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.settings-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 12px;
}
.settings-tab.active {
  border-bottom-color: var(--green);
  color: var(--green);
  font-weight: 700;
}
.settings-panel > .panel {
  max-width: 100%;
}
.integration-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}
.integration-panel h2 {
  margin: 0 0 6px;
}
.integration-panel .muted {
  max-width: 620px;
  margin-bottom: 12px;
}
.integration-panel > .button {
  margin-left: auto;
  white-space: nowrap;
}
.integration-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f3ff;
  color: #4264c5;
  font-weight: 800;
  font-size: 20px;
}
.company-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.profile-section {
  min-width: 0;
}
.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
}
.profile-details span,
.profile-list > strong {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.profile-details strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}
.profile-list {
  display: grid;
  gap: 9px;
  padding: 20px;
}
.profile-list > span,
.user-row {
  border-bottom: 1px solid #edf0ec;
  padding-bottom: 9px;
  font-size: 12px;
}
.user-row span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
@media (max-width: 900px) {
  .company-profile-grid,
  .profile-details {
    grid-template-columns: 1fr;
  }
}
.table-subline {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.sidebar nav {
  display: grid;
  gap: 3px;
}
.sidebar nav button {
  border: 0;
  background: none;
  color: #b8cbbd;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}
.sidebar nav button:hover,
.sidebar nav button.active {
  background: #37614f;
  color: #fff;
}
.sidebar nav .settings-parent {
  color: #b8cbbd;
  cursor: default;
}
.settings-chevron {
  float: right;
  color: #9eb4a5;
  font-size: 12px;
  transition: transform 0.2s ease;
}
.settings-parent[aria-expanded="false"] .settings-chevron {
  transform: rotate(180deg);
}
.sidebar nav .settings-subitem {
  margin-left: 18px;
  padding-left: 12px;
  border-left: 1px solid #ffffff2b;
  color: #9eb4a5;
  font-size: 12px;
}
.sidebar nav .settings-subitem:hover,
.sidebar nav .settings-subitem.active {
  background: #37614f;
  color: #fff;
}
.sidebar nav span {
  display: inline-block;
  width: 25px;
  color: #d6e3d7;
}
.sidebar nav b {
  float: right;
  background: var(--orange);
  color: #fff;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 9px;
}
.sidebar-footer {
  border-top: 1px solid #ffffff20;
  margin-top: auto;
  padding: 18px 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.logout-button {
  margin-left: auto;
  border: 1px solid #ffffff26;
  border-radius: 7px;
  background: transparent;
  color: #b8cbbd;
  padding: 7px 9px;
  font-size: 16px;
}
.logout-button:hover {
  border-color: #ffffff66;
  color: #fff;
}
.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e6b98b;
  color: #4a3024;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.main {
  width: 100%;
  max-width: 1500px;
  margin: 0;
  align-self: start;
  padding: 34px clamp(20px, 4vw, 58px);
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 27px;
}
.page-header h1 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.07em;
  line-height: 1;
  margin: 0 0 8px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
}
.button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--ink);
}
.button.primary {
  border: 0;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px #2b5d4930;
}
.button.subtle:hover,
.button:hover {
  border-color: #b9cbbd;
}
.header-actions {
  display: flex;
  gap: 8px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 20px;
}
.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 19px;
  box-shadow: var(--shadow);
}
.metric label {
  color: var(--muted);
  font-size: 11px;
}
.metric strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.07em;
  margin: 13px 0 5px;
}
.metric small {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.8fr);
  gap: 20px;
}
.right-stack {
  display: grid;
  gap: 20px;
  align-content: start;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel h2 {
  font-size: 15px;
  letter-spacing: -0.04em;
  margin: 0 0 4px;
}
.appointment-list {
  padding: 6px 21px 20px;
}
.appointment {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #edf0ec;
}
.appointment:last-child {
  border: 0;
}
.time {
  font:
    500 12px "DM Mono",
    monospace;
  color: var(--muted);
}
.person {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex: none;
  background: #e6c49f;
}
.person strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.status {
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.confirmed {
  background: var(--mint);
  color: #2f674f;
}
.pending {
  background: var(--yellow);
  color: #876b22;
}
.warning {
  background: var(--yellow);
  color: #876b22;
}
.danger {
  background: #f6d9d7;
  color: var(--red);
}
.finance-chart {
  min-height: 210px;
  display: flex;
  align-items: end;
  gap: clamp(12px, 3vw, 34px);
  padding: 25px 24px 20px;
  overflow-x: auto;
}
.chart-column {
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.chart-column strong {
  color: var(--green);
  font-size: 10px;
  white-space: nowrap;
}
.chart-bar {
  width: 34px;
  min-height: 8px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--orange), var(--green));
}
.chart-column span {
  color: var(--muted);
  font: 10px "DM Mono", monospace;
}
.receipts-calendar {
  display: grid;
  gap: 0;
  padding: 4px 22px 12px;
}
.receipt-event {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #edf0ec;
}
.receipt-event:last-child {
  border-bottom: 0;
}
.receipt-date strong,
.receipt-company strong {
  display: block;
  font-size: 12px;
}
.receipt-date small,
.receipt-company small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.receipt-event.received .receipt-date strong {
  color: var(--green);
}
.receipt-event.due .receipt-date strong {
  color: var(--orange);
}
.receipt-value {
  font-size: 13px;
  white-space: nowrap;
}
.conversation {
  padding: 15px 21px;
  border-bottom: 1px solid #edf0ec;
  display: flex;
  gap: 10px;
}
.conversation:last-child {
  border: 0;
}
.conversation p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.conversation-body {
  min-width: 0;
  flex: 1;
}
.conversation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.conversation-actions .button {
  padding: 6px 9px;
  font-size: 10px;
}
.modal:has(.conversation-modal) {
  width: min(620px, 100%);
}
.message-thread {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 0 16px;
}
.message-bubble {
  max-width: 78%;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
}
.message-bubble.inbound {
  background: #f0f3ef;
  justify-self: start;
}
.message-bubble.outbound {
  background: var(--mint);
  justify-self: end;
}
.message-bubble small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 5px;
}
.conversation time {
  font:
    10px "DM Mono",
    monospace;
  color: #a3aaa3;
}
.quick-actions {
  display: grid;
  gap: 9px;
  padding: 18px 21px 21px;
}
.quick-actions button {
  border: 1px dashed #cbd7cb;
  border-radius: 7px;
  background: #f8fbf7;
  color: var(--green);
  padding: 12px;
  text-align: left;
  font-size: 11px;
}
.quick-actions button:hover {
  background: var(--mint);
}
.view {
  display: none;
}
.view.active {
  display: block;
  animation: rise 0.25s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font:
    500 10px "DM Mono",
    monospace;
  text-transform: uppercase;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 20px;
  border-bottom: 1px solid #edf0ec;
}
tr:last-child td {
  border: 0;
}
.search {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  width: 220px;
  font-size: 11px;
  outline: none;
}
.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.skeleton {
  height: 126px;
  border-radius: 10px;
  background: linear-gradient(90deg, #edf0ec, #fff, #edf0ec);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #203d31;
  color: #fff;
  padding: 13px 16px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: var(--shadow);
  transform: translateY(140%);
  transition: 0.25s;
  z-index: 10;
}
.toast.show {
  transform: none;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #182a335e;
  display: grid;
  place-items: start center;
  padding: 20px;
  overflow-y: auto;
  z-index: 5;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto 0;
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 24px 70px #0003;
}
.modal:has(.tenant-editor) {
  width: min(700px, 100%);
}
.tenant-editor .form-section {
  padding: 0 0 18px;
  margin-bottom: 18px;
}
.tenant-editor .form-section + .form-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.modal h2 {
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: -0.06em;
}
.close {
  border: 0;
  background: none;
  font-size: 24px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  gap: 13px;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
label input,
label select,
label textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  outline: none;
  font-size: 12px;
  color: var(--ink);
  background: #fff;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.dropzone {
  border: 1px dashed #b9cbbd;
  padding: 25px;
  text-align: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}
.import-format {
  background: #f8fbf7;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font: 11px "DM Mono", monospace;
  padding: 10px 12px;
}
.download-template {
  display: inline-block;
  margin: 2px 0 14px;
  text-decoration: none;
}
.dropzone input {
  margin-top: 12px;
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 12px 14px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .brand {
    padding: 0;
  }
  .sidebar .eyebrow {
    display: none;
  }
  .sidebar-footer {
    display: flex;
    margin-top: 0;
    padding: 0 0 0 8px;
    border-top: 0;
    flex-shrink: 0;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 3px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 9px 10px;
  }
  .sidebar nav span {
    display: none;
  }
  .main {
    padding: 25px 16px;
  }
  .auth-screen.onboarding .auth-card {
    padding: 28px 22px;
  }
  .onboarding-grid {
    grid-template-columns: 1fr;
  }
  .field-wide {
    grid-column: auto;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .page-header {
    display: block;
  }
  .page-header .button {
    margin-top: 17px;
  }
  .header-actions {
    margin-top: 17px;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 14px;
  }
  .metric strong {
    font-size: 23px;
  }
  .appointment {
    grid-template-columns: 52px 1fr;
  }
  .appointment .status {
    grid-column: 2;
    justify-self: start;
    margin-top: -10px;
  }
  .panel-head {
    padding: 16px;
  }
  .appointment-list {
    padding-left: 16px;
    padding-right: 16px;
  }
  .search {
    width: 150px;
  }
}
