@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+2000-206F, U+20AC, U+2190-2199, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  color: #2a2a2a;
  background: #f9f9f9;
  --text: #2a2a2a;
  --muted: #858585;
  --accent: #2a2a2a;
  --line: #e8e8e8;
  --soft: #f3f3f3;
  --danger: #a04e40;
  color-scheme: light;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 6px;
  min-width: 0;
  padding: 10px 12px;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #9d9d9d;
  box-shadow: 0 0 0 2px #eaeaea;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #959595;
  outline-offset: 3px;
}
input[type="checkbox"] {
  accent-color: #454545;
  box-shadow: none;
}
input[type="date"],
input[type="month"] {
  max-width: 100%;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.25;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  line-height: 1.6;
}
small {
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}
.muted {
  color: var(--muted);
}
.small-text {
  font-size: 12px;
}
.full {
  width: 100%;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 7px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.btn.primary {
  color: white;
  background: #2a2a2a;
  border: 1px solid #2a2a2a;
}
.btn.primary:hover {
  background: #474747;
}
.btn.secondary {
  border: 1px solid #dedede;
  background: white;
}
.btn.secondary:hover {
  background: var(--soft);
}
.btn.small {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn.text-danger {
  color: var(--danger);
  padding-left: 0;
}
.icon-button,
.tiny-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}
.icon-button {
  width: 36px;
  height: 36px;
}
.tiny-icon {
  width: 26px;
  height: 26px;
  color: var(--muted);
}
.icon-button:hover,
.tiny-icon:hover {
  background: var(--soft);
}
.text-button {
  font-size: 12px;
  color: #787878;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
}
.text-button:hover {
  color: #2b2b2b;
}
.subtle-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: 12px;
  color: var(--muted);
}
.subtle-link .icon {
  width: 15px;
  height: 15px;
}
.mobile-only {
  display: none;
}
.form-error {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.5;
}
.wordmark {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.8px;
  width: 100%;
  text-align: left;
}
.logo-mark {
  background: #2a2a2a;
  color: white;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
  border-radius: 7px;
  padding-bottom: 3px;
}
.personal-label {
  color: #9a9a9a;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: auto;
}
.app-shell {
  min-height: 100dvh;
  display: flex;
}
.sidebar {
  width: 230px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #f3f3f3;
  border-right: 1px solid var(--line);
  padding: 27px 17px 16px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow-y: auto;
}
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 28px 4px 20px;
  color: #848484;
  font-size: 12px;
  text-align: left;
}
.sidebar-search .icon {
  width: 16px;
}
.sidebar-search kbd {
  margin-left: auto;
  font: 10px Inter;
  color: #a4a4a4;
}
.primary-nav {
  display: grid;
  gap: 3px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 39px;
  text-align: left;
  padding: 9px 11px;
  font-size: 13px;
  border-radius: 6px;
  color: #747474;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
}
.nav-item:hover {
  background: #ececec;
}
.nav-item.active {
  background: #e7e7e7;
  color: #292929;
  font-weight: 500;
}
.nav-count {
  margin-left: auto;
  font-size: 11px;
  color: #8f8f8f;
}
.nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: #999999;
  padding: 0 10px;
  margin: 28px 0 7px;
}
.space-nav {
  display: grid;
  gap: 1px;
}
.space-row {
  display: flex;
  align-items: center;
  min-width: 0;
}
.space-row .nav-item {
  gap: 9px;
  min-width: 0;
}
.space-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.expand-space {
  width: 20px;
  color: #a2a2a2;
  flex-shrink: 0;
  padding: 0;
}
.expand-space .icon {
  width: 12px;
}
.expand-space.expanded .icon {
  transform: rotate(90deg);
}
.page-tree {
  padding: 3px 0 4px 24px;
}
.tree-page {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 6px;
  color: #848484;
  font-size: 12px;
  text-align: left;
  border-radius: 5px;
  min-width: 0;
}
.tree-page span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-page .icon {
  width: 14px;
  height: 14px;
}
.tree-page:hover,
.tree-page.active {
  background: #e9e9e9;
  color: #2c2c2c;
}
.tree-indent {
  padding-left: 13px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.sidebar-bottom > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
}
.sync-state {
  font-size: 10px;
  color: #9a9a9a;
  padding-left: 3px;
}
.main-panel {
  margin-left: 230px;
  width: calc(100% - 230px);
  min-width: 0;
}
.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}
.topbar-left {
  color: #7a7a7a;
}
.topbar-right {
  gap: 18px;
}
.desktop-date {
  font-size: 11px;
  color: #9c9c9c;
}
.reminder-count {
  font-size: 9px;
  position: absolute;
  top: 0;
  right: 0;
}
.topbar #remindersButton {
  position: relative;
  color: #949494;
}
.content-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 36px 60px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}
.date-label {
  display: block;
  font-size: 11px;
  color: #939393;
  margin-bottom: 9px;
}
.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}
.quick-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 12px;
  color: #6a6a6a;
}
.quick-actions button:hover {
  border-color: #bbbbbb;
}
.quick-actions .icon {
  width: 16px;
  height: 16px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.dashboard-main,
.dashboard-aside {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.surface {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  padding: 21px 22px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.quiet-count {
  color: #9f9f9f;
  font-size: 12px;
  font-weight: 400;
  margin-left: 6px;
}
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  padding: 0 0 21px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3px;
}
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 0 7px;
  border-radius: 7px;
  min-width: 0;
  color: #979797;
  font-size: 10px;
  border: 1px solid transparent;
}
.week-day b {
  font-size: 14px;
  font-weight: 500;
  color: #595959;
}
.week-day.active {
  background: #323232;
  color: #bcbcbc;
}
.week-day.active b {
  color: white;
}
.day-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c6c6c6;
}
.week-day:hover:not(.active) {
  background: var(--soft);
}
.task-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  border-bottom: 1px solid #efefef;
  padding: 16px 0;
  min-width: 0;
}
.task-row:last-child {
  border-bottom: 0;
}
.task-complete {
  width: 17px;
  height: 17px;
  border: 1px solid #cacaca;
  border-radius: 4px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-complete .icon {
  width: 11px;
  height: 11px;
  opacity: 0;
}
.task-complete:hover .icon {
  opacity: 0.5;
}
.task-complete.done {
  background: #7d7d7d;
  border-color: #7d7d7d;
  color: white;
}
.task-complete.done .icon {
  opacity: 1;
}
.task-content {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 0;
  display: block;
}
.task-title {
  font-size: 13px;
  line-height: 1.55;
  display: block;
  overflow-wrap: anywhere;
}
.task-title.done {
  color: #9e9e9e;
  text-decoration: line-through;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #9c9c9c;
  margin-top: 5px;
}
.task-meta .icon {
  height: 12px;
  width: 12px;
}
.task-meta .overdue {
  color: #af7960;
}
.task-priority {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b0936c;
  margin-top: 7px;
  flex-shrink: 0;
}
.task-open {
  width: 22px;
  min-height: 24px;
  color: #a8a8a8;
  padding: 0;
}
.task-open .icon {
  width: 14px;
}
.status-pill {
  font-size: 10px;
  border-radius: 4px;
  background: #f3f3f3;
  color: #909090;
  padding: 3px 6px;
  white-space: nowrap;
}
.status-pill.blocked {
  background: #faf2e8;
  color: #b08c5c;
}
.task-section-label {
  font-size: 11px;
  font-weight: 500;
  color: #aa8663;
  padding: 17px 0 0;
}
.unverified-pill {
  color: #ad926d;
}
.add-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #999999;
  font-size: 12px;
  width: 100%;
  padding: 15px 0 0;
  text-align: left;
}
.add-row .icon {
  width: 15px;
}
.empty-state {
  padding: 28px 0;
  text-align: center;
  color: #9c9c9c;
  font-size: 12px;
  line-height: 1.7;
}
.empty-state strong {
  display: block;
  font-weight: 500;
  color: #838383;
  font-size: 13px;
  margin-bottom: 6px;
}
.empty-state .icon {
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  color: #b7b7b7;
}
.finance-glance .section-head {
  margin-bottom: 21px;
}
.balance-figure {
  font-size: 31px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 9px 0 5px;
  font-variant-numeric: tabular-nums;
}
.finance-glance > p {
  font-size: 11px;
  line-height: 1.6;
}
.money-summary {
  margin: 23px 0 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  font-size: 11px;
}
.money-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.money-summary span {
  color: #929292;
}
.money-summary b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.recent-page {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid #f1f1f1;
  text-align: left;
}
.recent-page:last-child {
  border: 0;
}
.page-glyph {
  display: grid;
  place-items: center;
  width: 32px;
  height: 37px;
  background: #f4f4f4;
  border-radius: 4px;
  flex-shrink: 0;
  color: #949494;
}
.page-glyph .icon {
  width: 17px;
}
.page-info {
  min-width: 0;
  flex: 1;
}
.page-info strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-info small {
  font-size: 10px;
  color: #a5a5a5;
  display: block;
  margin-top: 5px;
}
.recent-page > .icon {
  width: 14px;
  color: #b1b1b1;
}
.template-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 0;
  text-align: left;
}
.template-choice + .template-choice {
  border-top: 1px solid var(--line);
}
.template-choice .icon {
  color: #a1a1a1;
  width: 20px;
}
.template-choice strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.template-choice small {
  font-size: 10px;
  color: #ababab;
  display: block;
  margin-top: 5px;
}
.import-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #a78e6c;
  padding: 1px 4px;
}
.import-notice .icon {
  width: 16px;
}
.import-notice button {
  margin-left: auto;
}
.spaces-section {
  margin-top: 32px;
}
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.space-tile {
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-width: 0;
}
.space-tile:hover {
  border-color: #bebebe;
}
.space-tile .icon {
  width: 21px;
  color: #939393;
}
.space-tile strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.space-tile small {
  font-size: 10px;
  color: #a7a7a7;
  margin-top: 5px;
  display: block;
}
.task-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.tabs {
  display: flex;
  gap: 21px;
  overflow-x: auto;
}
.tabs button {
  white-space: nowrap;
  font-size: 12px;
  color: #999999;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  border-color: #353535;
  color: #353535;
  font-weight: 500;
}
.view-switch {
  display: flex;
  gap: 3px;
  padding-bottom: 8px;
}
.view-switch button {
  padding: 7px;
  color: #a3a3a3;
  border-radius: 5px;
  display: flex;
}
.view-switch .icon {
  width: 16px;
  height: 16px;
}
.view-switch button.active {
  background: #ebebeb;
  color: #7b7b7b;
}
.filter-row,
.notes-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.filter-row select,
.notes-controls select {
  font-size: 12px;
  max-width: 200px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding-left: 11px;
  min-width: 100px;
  flex: 1;
}
.search-field .icon {
  width: 15px;
  color: #a9a9a9;
}
.search-field input {
  background: none;
  box-shadow: none;
  border: 0;
  padding: 10px 8px;
  width: 100%;
  font-size: 12px;
}
.quick-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  margin-bottom: 16px;
}
.quick-form > .icon {
  color: #a3a3a3;
  width: 17px;
}
.quick-form input {
  flex: 1;
  padding: 11px 0;
  box-shadow: none;
  border: 0;
  font-size: 13px;
}
.list-caption {
  font-size: 10px;
  color: #a9a9a9;
  margin-top: 13px;
}
.task-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 15px;
}
.board-column {
  background: #f1f1f1;
  border-radius: 7px;
  padding: 11px;
}
.board-column h3 {
  font-size: 11px;
  color: #929292;
  margin: 2px 0 14px;
}
.board-column .task-row {
  padding: 13px 10px;
  background: white;
  border: 1px solid #e7e7e7;
  border-radius: 6px;
  margin-bottom: 8px;
  gap: 8px;
}
.board-column .task-meta {
  font-size: 9px;
}
.board-column .task-open,
.board-column .status-pill {
  display: none;
}
.board-column .task-title {
  font-size: 12px;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.segmented {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
}
.calendar-surface {
  padding: 0;
  overflow: hidden;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  font-size: 10px;
  color: #9d9d9d;
  text-align: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.calendar-day {
  height: 91px;
  text-align: left;
  padding: 8px;
  border-right: 1px solid #f1f1f1;
  border-bottom: 1px solid #f1f1f1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day.other-month {
  color: #c4c4c4;
  background: #fdfdfd;
}
.calendar-day.selected {
  background: #f1f1f1;
}
.calendar-day.today .calendar-number {
  background: #383838;
  color: white;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  margin-top: -3px;
  margin-left: -4px;
}
.calendar-chip {
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f0f0f0;
  padding: 3px 4px;
  border-radius: 3px;
  display: block;
  width: 100%;
  color: #949494;
}
.calendar-chip.payment {
  background: #f5f0e7;
  color: #a28b6b;
}
.calendar-day.selected .calendar-chip {
  background: white;
}
.calendar-count {
  font-size: 9px;
  color: #ababab;
}
.calendar-agenda {
  align-self: start;
}
.calendar-agenda .task-title {
  font-size: 12px;
}
.calendar-agenda .task-open,
.calendar-agenda .status-pill {
  display: none;
}
.notes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.note-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  text-align: left;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}
.note-card:hover {
  border-color: #c0c0c0;
}
.note-card .icon {
  color: #9f9f9f;
}
.note-card strong {
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}
.note-card small {
  font-size: 10px;
  color: #ababab;
  margin-top: auto;
}
.page-path {
  font-size: 10px;
  color: #a4a4a4;
  margin-top: -10px;
}
.space-actions {
  display: flex;
  gap: 24px;
  margin: -4px 0 20px;
}
.notes-empty {
  grid-column: 1/-1;
  padding: 55px 20px;
  background: white;
  border: 1px dashed #e1e1e1;
  border-radius: 8px;
  text-align: center;
  color: #a5a5a5;
}
.notes-empty p {
  margin: 8px 0 18px;
  font-size: 12px;
}
.notes-empty strong {
  font-weight: 500;
  color: #868686;
}
.mobile-nav,
.sidebar-backdrop {
  display: none;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-box {
  width: min(340px, 100%);
}
.login-box .wordmark {
  margin-bottom: 48px;
}
.login-box h1 {
  font-size: 26px;
  margin-bottom: 10px;
}
.login-box > p {
  font-size: 13px;
}
.login-form {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}
.login-form label {
  font-size: 12px;
  color: #898989;
}
.login-form input {
  min-height: 43px;
}
.login-form button {
  margin-top: 5px;
}
dialog {
  border: 1px solid #e4e4e4;
  box-shadow: 0 18px 80px #1d1d1d30;
  border-radius: 12px;
  padding: 0;
  background: white;
  color: var(--text);
}
dialog::backdrop {
  background: #2d2d2d3b;
  backdrop-filter: blur(2px);
}
.task-dialog {
  width: min(610px, calc(100% - 32px));
  max-height: 90dvh;
}
.compact-dialog {
  width: min(420px, calc(100% - 32px));
  max-height: 90dvh;
}
.dialog-body,
.compact-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.dialog-header h2 {
  font-size: 17px;
}
.dialog-scroll {
  overflow: auto;
  padding: 22px 23px;
  display: grid;
  gap: 17px;
  overscroll-behavior: contain;
}
.dialog-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 23px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.dialog-spacer {
  flex: 1;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: #8b8b8b;
  min-width: 0;
}
.field input,
.field select,
.field textarea {
  color: var(--text);
  font-size: 13px;
  width: 100%;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.task-details {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.task-details summary {
  font-size: 12px;
  color: #9c9c9c;
  cursor: pointer;
  padding: 3px 0;
}
.task-details[open] summary {
  margin-bottom: 15px;
}
.checklist-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.inline-add {
  font-size: 11px;
  color: #989898;
  display: flex;
  align-items: center;
  gap: 5px;
}
.inline-add .icon {
  width: 14px;
}
.checklist-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
}
.checklist-row input[type="text"] {
  flex: 1;
  font-size: 12px;
}
.checklist-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
}
.remove-check {
  width: 25px;
  color: #b1b1b1;
}
.remove-check .icon {
  width: 14px;
}
.history-area {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.history-items {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}
.history-event strong {
  font-size: 11px;
  font-weight: 400;
  display: block;
}
.history-event span {
  display: block;
  font-size: 10px;
  color: #ababab;
  margin-top: 3px;
}
.review-task {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  line-height: 1.5;
  color: #a68962;
}
.create-options {
  padding: 9px;
}
.create-options button {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  padding: 15px 13px;
  font-size: 13px;
  border-radius: 6px;
}
.create-options button:hover {
  background: var(--soft);
}
.create-options .icon {
  color: #9e9e9e;
}
.create-options kbd {
  margin-left: auto;
  font: 10px Inter;
  color: #b4b4b4;
}
.expense-amount {
  font-size: 11px;
  color: #9f9f9f;
  display: grid;
  gap: 7px;
}
.expense-amount input {
  font-size: 34px;
  letter-spacing: -1px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  border-radius: 0;
  box-shadow: none;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: #3a3a3a;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  max-width: min(420px, 90vw);
  font-size: 12px;
  z-index: 100;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: 0 5px 20px #2d2d2d20;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  background: #8d5845;
}
.finance-page {
  display: grid;
  gap: 22px;
}
.fin-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
}
.fin-hero h1 span {
  display: none;
}
.fin-month-label {
  display: grid;
  gap: 6px;
  font-size: 10px;
  color: #8b8b8b;
}
.fin-month-label input {
  padding: 8px 10px;
  font-size: 12px;
  min-width: 0;
}
.fin-warning {
  background: #f8f4ed;
  border: 1px solid #ece2d2;
  color: #9b8261;
  padding: 12px 15px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.6;
}
.fin-muted,
.fin-help {
  color: #8e8e8e;
  font-size: 12px;
  line-height: 1.6;
}
.fin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
.fin-metric {
  padding: 22px;
  display: grid;
  gap: 12px;
  min-width: 0;
  border-right: 1px solid var(--line);
}
.fin-metric:last-child {
  border: 0;
}
.fin-metric span {
  font-size: 10px;
  color: #888888;
}
.fin-metric strong {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.8px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.fin-metric small {
  font-size: 10px;
  color: #9c9c9c;
  line-height: 1.5;
}
.fin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.fin-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 22px;
  display: grid;
  gap: 18px;
  min-width: 0;
}
.fin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-hint {
  font-size: 10px;
  color: #9f9f9f;
}
.fin-stack {
  display: grid;
  gap: 2px;
}
.fin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  min-width: 0;
}
.fin-item:last-child {
  border: 0;
}
.fin-item > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.fin-item strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.fin-item small {
  font-size: 10px;
  color: #9b9b9b;
  margin-top: 5px;
  display: block;
  line-height: 1.5;
}
.fin-item b {
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fin-item-end {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
}
.fin-confirm {
  font-size: 10px;
  padding: 6px 0 6px 6px;
  color: #8d8d8d;
  min-height: 30px;
}
.fin-confirm:hover {
  color: #3a3a3a;
}
.fin-voided b {
  text-decoration: line-through;
  color: #ababab;
}
.fin-goal {
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}
.fin-goal:last-child {
  border: 0;
}
.fin-goal-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.fin-goal-header strong {
  font-weight: 500;
}
.fin-goal-header span {
  color: #8c8c8c;
}
.fin-progress {
  display: block;
  width: 100%;
  height: 5px;
  accent-color: #7f7f7f;
  margin: 13px 0;
}
.fin-goal-sub {
  font-size: 11px;
  color: #959595;
  margin: 9px 0;
}
.fin-reserve-form {
  display: flex;
  gap: 8px;
}
.fin-reserve-form input {
  width: 120px;
}
.fin-reserve-form button {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}
.fin-form {
  display: grid;
  gap: 15px;
}
.fin-form label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: #828282;
  min-width: 0;
}
.fin-form input,
.fin-form select {
  width: 100%;
  font-size: 13px;
  min-width: 0;
}
.fin-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fin-form .review-task {
  display: flex;
}
.fin-form .review-task input {
  width: auto;
}
.fin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fin-detail {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  min-width: 0;
}
.fin-detail summary {
  font-size: 12px;
  color: #848484;
  cursor: pointer;
  min-height: 25px;
}
.fin-detail[open] summary {
  margin-bottom: 16px;
}
.fin-recurring {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.fin-journal-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.fin-capture {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
  min-width: 0;
}
.fin-capture pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.fin-screenshot {
  max-width: 100%;
  max-height: 350px;
  display: block;
  margin: 10px 0;
  object-fit: contain;
}
#finTxHeading,
#finJournalHeading,
#finReconcileAccount {
  scroll-margin-top: 85px;
}
.document-editor {
  max-width: 820px;
  margin: 0 auto;
}
.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 11px;
  color: #939393;
}
.document-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.document-breadcrumb button {
  font-size: 11px;
  color: #898989;
  padding: 0;
}
.document-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.document-actions .icon {
  width: 17px;
}
.document-title {
  border: 0 !important;
  box-shadow: none !important;
  background: none;
  width: 100%;
  font-size: 32px !important;
  font-weight: 600;
  letter-spacing: -0.8px;
  resize: none;
  line-height: 1.3;
  padding: 10px 0 18px;
  border-radius: 0;
}
.document-status {
  font-size: 10px;
  color: #959595;
  white-space: nowrap;
}
.document-notice {
  font-size: 12px;
  line-height: 1.6;
  background: #faf4e8;
  border-radius: 7px;
  padding: 12px;
  margin-bottom: 15px;
  color: #9d8158;
}
.document-notice button {
  font-size: 11px;
  text-decoration: underline;
  margin-left: 9px;
}
.document-blocks {
  margin-top: 12px;
  min-height: 220px;
}
.block-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  position: relative;
  margin: 3px -28px 3px -32px;
  padding: 0 28px 0 0;
}
.block-tools {
  position: relative;
  flex-shrink: 0;
  width: 26px;
}
.block-handle {
  width: 26px;
  min-height: 35px;
  color: #ababab;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
}
.block-handle::-webkit-details-marker {
  display: none;
}
.block-row:hover .block-handle,
.block-tools[open] .block-handle,
.block-handle:focus-visible {
  opacity: 1;
}
.block-content {
  min-width: 0;
  flex: 1;
}
.block-text {
  display: block;
  resize: none;
  overflow: hidden;
  width: 100%;
  font-size: 14px;
  line-height: 1.8;
  border: 0;
  box-shadow: none !important;
  border-radius: 0;
  background: transparent;
  padding: 5px 0;
  min-height: 36px;
}
.block-text:focus {
  border: 0;
  outline: none;
}
.block-text::placeholder {
  color: #b9b9b9;
}
.block-heading1 .block-text {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.4px;
  padding-top: 16px;
  line-height: 1.4;
}
.block-heading2 .block-text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
  padding-top: 12px;
  line-height: 1.5;
}
.block-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.block-list-marker {
  padding-top: 10px;
  color: #959595;
  font-size: 13px;
}
.block-checkbox {
  margin-top: 12px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.block-quote .block-content {
  border-left: 3px solid #cccccc;
  padding-left: 15px;
  margin: 8px 0;
  font-style: italic;
}
.block-divider hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.block-menu {
  position: absolute;
  top: 33px;
  left: 0;
  z-index: 20;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 9px 30px #2f2f2f20;
  min-width: 190px;
  padding: 6px;
  max-height: 360px;
  overflow: auto;
}
.block-menu button {
  width: 100%;
  text-align: left;
  padding: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 4px;
}
.block-menu button:hover {
  background: var(--soft);
}
.block-menu .icon {
  width: 14px;
}
.block-menu-label {
  font-size: 10px;
  color: var(--muted);
  padding: 8px;
}
.document-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.document-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  min-height: 34px;
  padding: 7px 9px;
  color: #8a8a8a;
  border-radius: 5px;
}
.document-button:hover {
  background: var(--soft);
}
.document-icon-button {
  padding: 7px;
  width: 32px;
}
.document-button[aria-pressed="true"] {
  color: #a18351;
  background: #faf5e9;
}
.document-options {
  position: relative;
}
.document-options > summary {
  list-style: none;
}
.document-options > summary::-webkit-details-marker {
  display: none;
}
.document-options[open] > div {
  position: absolute;
  right: 0;
  top: 36px;
  background: white;
  border: 1px solid var(--line);
  padding: 6px;
  min-width: 190px;
  box-shadow: 0 8px 30px #2f2f2f20;
  border-radius: 7px;
  z-index: 20;
}
.document-options[open] > div > button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}
.document-children,
.document-related {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.document-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.document-child {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  font-size: 13px;
  text-align: left;
}
.document-child .icon {
  width: 16px;
  color: #909090;
}
.block-table-scroll {
  overflow-x: auto;
}
.block-table-grid {
  border-collapse: collapse;
  width: 100%;
  min-width: 260px;
  margin: 10px 0;
}
.block-table-grid td,
.block-table-grid th {
  border: 1px solid var(--line);
  padding: 0;
}
.block-table-grid input,
.block-table-grid textarea {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  min-width: 90px;
}
.block-link-fields {
  display: grid;
  gap: 5px;
}
.block-url {
  font-size: 12px;
}
.block-link-open {
  font-size: 11px;
  color: #868686;
  padding: 4px 0;
}
.block-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
}
.attachment-preview {
  display: block;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  margin: 10px 0;
  border-radius: 6px;
}
.attachment-link {
  font-size: 12px;
  color: #818181;
}
.document-move-dialog,
.document-copy-dialog {
  width: min(450px, 90vw);
  padding: 23px;
}
.document-move-dialog form,
.document-copy-dialog form {
  display: grid;
  gap: 15px;
}
.document-move-dialog select {
  width: 100%;
}
.document-copy-dialog textarea {
  width: 100%;
  min-height: 280px;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 205px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .main-panel {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  .content-wrap {
    padding: 28px 26px 55px;
  }
  .topbar {
    padding: 0 26px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
  }
  .surface {
    padding: 18px;
  }
  .dashboard-main,
  .dashboard-aside {
    gap: 16px;
  }
  .spaces-grid {
    gap: 10px;
  }
  .space-tile {
    padding: 14px;
  }
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .calendar-agenda .task-open {
    display: block;
  }
  .notes-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fin-metric {
    border-bottom: 1px solid var(--line);
  }
  .fin-metric:nth-child(2) {
    border-right: 0;
  }
  .fin-metric:nth-child(3) {
    border-bottom: 0;
  }
  .fin-journal-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s;
    width: 265px;
    padding-top: calc(24px + env(safe-area-inset-top));
    bottom: 0;
    z-index: 60;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: #23232360;
    z-index: 55;
    display: block;
  }
  .main-panel {
    margin-left: 0;
    width: 100%;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    height: 58px;
    padding: 0 17px;
    position: sticky;
    top: 0;
    background: #f9f9f9f2;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e8e8e880;
  }
  .topbar-left {
    gap: 5px;
    font-size: 12px;
  }
  .topbar-right {
    gap: 5px;
  }
  #topAddButton,
  .desktop-date {
    display: none;
  }
  .content-wrap {
    padding: 25px 18px calc(105px + env(safe-area-inset-bottom));
  }
  .page-heading {
    margin-bottom: 22px;
  }
  h1 {
    font-size: 28px;
    letter-spacing: -0.7px;
  }
  .date-label {
    font-size: 10px;
    margin-bottom: 7px;
  }
  .quick-actions {
    gap: 8px;
    margin-bottom: 22px;
  }
  .quick-actions button {
    flex: 1;
    justify-content: center;
    padding: 10px 9px;
    font-size: 12px;
    min-height: 42px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .dashboard-main,
  .dashboard-aside {
    gap: 16px;
  }
  .dashboard-aside {
    grid-template-columns: minmax(0, 1fr);
  }
  .surface {
    padding: 18px;
    border-radius: 9px;
  }
  .week-strip {
    gap: 4px;
  }
  .week-day {
    padding: 9px 0 8px;
    font-size: 10px;
    gap: 6px;
  }
  .week-day b {
    font-size: 14px;
  }
  .section-head {
    margin-bottom: 15px;
  }
  .section-head h2 {
    font-size: 14px;
  }
  .task-title {
    font-size: 13px;
  }
  .task-row {
    padding: 16px 0;
  }
  .task-complete {
    width: 19px;
    height: 19px;
    margin-top: 2px;
  }
  .task-meta {
    font-size: 10px;
    gap: 6px;
  }
  .task-open {
    min-height: 30px;
  }
  .status-pill {
    display: none;
  }
  .finance-glance .balance-figure {
    font-size: 30px;
    margin: 8px 0;
  }
  .money-summary {
    margin: 18px 0;
    font-size: 12px;
  }
  .spaces-section {
    margin-top: 25px;
  }
  .spaces-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .space-tile {
    padding: 16px;
    gap: 17px;
  }
  .import-notice {
    line-height: 1.5;
    flex-wrap: wrap;
  }
  .import-notice span {
    flex: 1;
    min-width: 120px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    background: #fffffff5;
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--line);
    z-index: 40;
    align-items: center;
    justify-content: space-around;
    gap: 5px;
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
    min-width: 0;
    min-height: 46px;
    font-size: 9px;
    color: #a1a1a1;
    letter-spacing: 0;
  }
  .mobile-nav .icon {
    width: 20px;
    height: 20px;
  }
  .mobile-nav button.active {
    color: #323232;
  }
  .mobile-nav .mobile-add {
    background: #323232;
    color: white;
    flex: 0 0 43px;
    min-height: 43px;
    border-radius: 50%;
    margin: 0 6px;
  }
  .filter-row,
  .notes-controls {
    flex-wrap: wrap;
  }
  .filter-row .search-field,
  .notes-controls .search-field {
    flex-basis: 100%;
  }
  .filter-row select,
  .notes-controls select {
    flex: 1;
    max-width: 100%;
    font-size: 13px;
  }
  .notes-controls .btn {
    font-size: 12px;
  }
  .task-controls {
    gap: 5px;
  }
  .tabs {
    gap: 16px;
  }
  .tabs button {
    font-size: 11px;
  }
  .view-switch .icon {
    width: 14px;
    height: 14px;
  }
  .view-switch button {
    padding: 6px;
  }
  .task-board {
    grid-template-columns: repeat(5, 230px);
  }
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .calendar-toolbar .muted {
    font-size: 9px;
  }
  .calendar-day {
    height: 69px;
    padding: 6px;
    gap: 4px;
  }
  .calendar-chip {
    height: 4px;
    font-size: 0;
    padding: 0;
    border-radius: 2px;
    background: #a7a7a7;
  }
  .calendar-chip.payment {
    background: #c6b9a0;
  }
  .calendar-day.selected .calendar-chip {
    background: #bababa;
  }
  .calendar-count {
    font-size: 8px;
  }
  .calendar-agenda {
    margin-top: 1px;
  }
  .notes-list {
    gap: 11px;
  }
  .note-card {
    padding: 16px;
    min-height: 135px;
  }
  .note-card strong {
    font-size: 13px;
  }
  .space-actions {
    gap: 15px;
    flex-wrap: wrap;
  }
  .task-dialog,
  .compact-dialog {
    width: 100%;
    max-width: 100%;
    border-radius: 15px 15px 0 0;
    max-height: 93dvh;
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    border-bottom: 0;
  }
  .dialog-body,
  .compact-dialog > form {
    max-height: 93dvh;
  }
  .dialog-scroll {
    padding: 20px;
    gap: 16px;
  }
  .dialog-header {
    padding: 17px 20px;
  }
  .dialog-footer {
    padding: 15px 20px calc(15px + env(safe-area-inset-bottom));
    gap: 9px;
  }
  .dialog-header h2 {
    font-size: 16px;
  }
  .field input,
  .field select,
  .field textarea,
  .fin-form input,
  .fin-form select,
  .fin-month-label input,
  .fin-reserve-form input,
  .quick-form input,
  .search-field input,
  .login-form input {
    font-size: 16px;
    min-height: 44px;
  }
  .field-grid {
    gap: 12px;
  }
  .field {
    font-size: 11px;
  }
  .field textarea {
    min-height: 90px;
  }
  .btn {
    min-height: 40px;
  }
  .create-options button {
    padding: 17px 13px;
  }
  .compact-dialog > .create-options {
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
  }
  .expense-amount input {
    font-size: 38px;
  }
  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom));
    font-size: 12px;
  }
  .fin-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .fin-hero h1 {
    font-size: 28px;
  }
  .fin-month-label input {
    width: 145px;
    font-size: 13px;
    min-height: 38px;
  }
  .fin-metric {
    padding: 15px;
    gap: 10px;
  }
  .fin-metric strong {
    font-size: 23px;
  }
  .fin-metric small {
    font-size: 9px;
  }
  .fin-panel {
    padding: 18px;
    gap: 17px;
  }
  .fin-panel h2 {
    font-size: 14px;
  }
  .fin-confirm {
    min-height: 40px;
    font-size: 11px;
  }
  .fin-journal-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fin-panel-head .section-hint {
    font-size: 9px;
  }
  .fin-form-row {
    gap: 12px;
  }
  .fin-detail summary {
    min-height: 38px;
    line-height: 1.5;
    padding: 7px 0;
  }
  .fin-reserve-form input {
    width: 130px;
  }
  .fin-reserve-form button {
    font-size: 11px;
    flex: 1;
  }
  .fin-actions .btn {
    font-size: 11px;
    padding: 8px 10px;
  }
  .fin-help {
    font-size: 11px;
  }
  .fin-recurring {
    grid-template-columns: minmax(0, 1fr);
  }
  .document-toolbar {
    margin-bottom: 20px;
    align-items: flex-start;
    gap: 8px;
  }
  .document-title {
    font-size: 29px !important;
    line-height: 1.35;
  }
  .document-actions {
    gap: 1px;
  }
  .document-status {
    font-size: 9px;
  }
  .document-blocks {
    margin-top: 5px;
  }
  .block-row {
    margin: 3px -5px 3px -14px;
    padding-right: 5px;
  }
  .block-tools {
    width: 22px;
  }
  .block-handle {
    opacity: 1;
    width: 22px;
  }
  .block-text {
    font-size: 16px;
    line-height: 1.7;
  }
  .block-menu button {
    padding: 11px 9px;
  }
  .block-link input,
  .block-table-grid input {
    font-size: 16px;
  }
  .document-footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .document-footer select {
    font-size: 16px;
  }
  .document-editor select {
    max-width: 100%;
    font-size: 16px;
  }
  .attachment-preview {
    max-height: 350px;
  }
  .document-child {
    font-size: 13px;
    min-height: 44px;
  }
}
@media (max-width: 359px) {
  .content-wrap {
    padding-left: 13px;
    padding-right: 13px;
  }
  .surface {
    padding: 15px;
  }
  .section-head h2 {
    font-size: 13px;
  }
  .text-button {
    font-size: 11px;
  }
  .task-controls {
    flex-wrap: wrap;
  }
  .view-switch {
    margin-left: auto;
  }
  .fin-form-row,
  .field-grid,
  .notes-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .fin-metric strong {
    font-size: 20px;
  }
  .fin-month-label input {
    width: 134px;
  }
  .topbar {
    padding: 0 12px;
  }
  .space-tile {
    padding: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.template-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 0;
}
.template-row + .template-row {
  border-top: 1px solid var(--line);
}
.template-row strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.template-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.template-row > svg {
  width: 13px;
  color: #aaa;
  margin-left: auto;
}
.template-icon {
  width: 31px;
  height: 35px;
  display: grid;
  place-items: center;
  background: #f4f4f0;
  border-radius: 5px;
  color: #777;
}
.template-icon .icon {
  width: 17px;
}
.board-column select {
  font-size: 11px;
  padding: 6px;
  width: 100%;
  margin-top: 8px;
}
.search-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: 80dvh;
}
.search-dialog .dialog-header {
  padding: 13px 16px;
}
.search-dialog .search-field {
  border: 0;
}
.search-dialog .dialog-scroll {
  max-height: 62dvh;
  display: block;
}
.search-dialog .recent-page {
  padding: 13px 0;
}
.search-dialog .task-row {
  padding: 13px 0;
}
@media (max-width: 760px) {
  .dashboard-main,
  .dashboard-aside {
    display: contents;
  }
  .day-plan {
    order: 1;
  }
  .finance-glance {
    order: 2;
  }
  .dashboard-main > .surface:not(.day-plan) {
    order: 3;
  }
  .dashboard-aside > .surface:not(.finance-glance) {
    order: 4;
  }
  .import-notice {
    order: 5;
  }
  .empty-state {
    padding: 19px 0;
  }
  .search-dialog {
    width: 100%;
    max-width: 100%;
    position: fixed;
    inset: 0 0 auto;
    margin: 0;
    border-radius: 0 0 12px 12px;
    padding-top: env(safe-area-inset-top);
  }
  .search-dialog input {
    font-size: 16px;
  }
}
.board-card {
  flex-wrap: wrap;
}
.board-card select {
  flex-basis: 100%;
  font-size: 11px;
  padding: 6px;
  margin-left: 25px;
  margin-top: 2px;
  border: 1px solid #ecece8;
}
.task-meta,
.date-label,
.nav-section-title,
.page-info small,
.space-tile small,
.document-status,
.list-caption,
.note-card small,
.page-path,
.section-hint,
.fin-help,
.fin-muted,
.fin-item small,
.fin-metric span,
.fin-metric small,
.fin-goal-sub,
.fin-form label,
.field {
  color: #74766f;
}
.task-meta {
  font-size: 11px;
}
.template-row small {
  color: #777970;
}
.document-notice {
  color: #836542;
}
.document-notice button {
  color: inherit;
}
.board-card {
  display: grid !important;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
}
.board-card select {
  grid-column: 2;
}
.board-card .task-priority {
  display: none;
}
.document-footer > .block-tools {
  width: auto;
}
.document-footer summary {
  white-space: nowrap;
}
