@charset "UTF-8";
body.theme-dark {
  --tp-bg: #0b1020;
  --tp-surface: #131d38;
  --tp-surface-alt: #1c2a50;
  --tp-header-bg: rgba(11, 16, 32, 0.94);
  --tp-input-bg: #0e1732;
  --tp-backdrop: rgba(2, 5, 14, 0.72);
  --tp-toast-bg: #1c2a50;
  --tp-on-toast: #e8f0ff;
  --tp-text: #e8f0ff;
  --tp-muted: #93a6cc;
  --tp-border: #2a3d6e;
  --tp-accent: #5ad1ff;
  --tp-accent-strong: #8ae0ff;
  --tp-on-accent: #06182b;
  --tp-success: #7bdc8b;
  --tp-danger: #ff7b7b;
  --tp-danger-bg: rgba(255, 123, 123, 0.1);
  --tp-warning: #ffd479;
  --tp-warning-bg: rgba(255, 212, 121, 0.1);
  --tp-warning-text: #ffd479;
  --tp-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tp-font-display: "Courier New", Courier, monospace;
  --tp-font-mono: "Courier New", Courier, monospace;
  --tp-radius: 4px;
  --tp-radius-sm: 3px;
  --tp-shadow: 0 0 0 1px rgba(90, 209, 255, 0.14);
}
body.theme-dark .page-title, body.theme-dark .modal-title, body.theme-dark .drawer-title, body.theme-dark h1, body.theme-dark h2 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

*, *::before, *::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--tp-bg);
  color: var(--tp-text);
  font-family: var(--tp-font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

:target {
  scroll-margin-top: 80px;
}

body[data-dialog-open] {
  overflow: hidden;
}

[role=dialog][tabindex="-1"]:focus {
  outline: none;
}

h1, h2, h3, h4 {
  margin: 0 0 12px;
  font-family: var(--tp-font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.1rem;
}

h4 {
  font-size: 0.95rem;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--tp-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: underline;
}

code, kbd, .mono {
  font-family: var(--tp-font-mono);
  font-size: 0.9em;
}

.muted {
  color: var(--tp-muted);
}

.small {
  font-size: 0.875rem;
}

.tiny {
  font-size: 0.78rem;
}

.strong {
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

.strike {
  text-decoration: line-through;
}

.stack > * + * {
  margin-top: 12px;
}

.stack-sm > * + * {
  margin-top: 8px;
}

.stack-lg > * + * {
  margin-top: 24px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.row-between {
  justify-content: space-between;
}

.row-end {
  justify-content: flex-end;
}

.row-wrap {
  flex-wrap: wrap;
}

.row-top {
  align-items: flex-start;
}

.grow {
  flex: 1;
  min-width: 0;
}

.flex-none {
  flex: none;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.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;
}

.spacer-1 {
  height: 4px;
}

.spacer-3 {
  height: 12px;
}

.spacer-5 {
  height: 24px;
}

.divider {
  height: 1px;
  background: var(--tp-border);
  border: 0;
  margin: 16px 0;
}

.field {
  margin-bottom: 16px;
}

.field > label,
.label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tp-text);
}

.field-hint {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.field-error {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--tp-danger);
}

input:not([type]),
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=time],
input[type=datetime-local],
input[type=search],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: var(--tp-text);
  background: var(--tp-input-bg);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  border-color: var(--tp-accent);
}

input[aria-invalid=true], select[aria-invalid=true] {
  border-color: var(--tp-danger);
}

input:disabled, select:disabled, textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

.field-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-inline > .field {
  flex: 1 1 160px;
  margin-bottom: 0;
}

.field-narrow {
  width: 200px;
  max-width: 100%;
}

.field-inline > .field.field-narrow {
  flex: 0 0 200px;
}

.control-narrow {
  width: 200px;
  max-width: 100%;
}

.field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox input {
  width: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--tp-header-bg);
  border-bottom: 1px solid var(--tp-border);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 1180px;
  min-height: 60px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--tp-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tp-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-brand:hover {
  text-decoration: none;
  color: var(--tp-accent);
}

.site-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}

.nav-link {
  padding: 6px 10px;
  font-size: 0.9rem;
  color: var(--tp-text);
  text-decoration: none;
  border-radius: var(--tp-radius-sm);
}

.nav-link:hover {
  background: var(--tp-surface-alt);
  text-decoration: none;
}

.nav-link.active {
  color: var(--tp-accent);
  font-weight: 600;
}

.nav-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.nav-user {
  padding: 0 8px;
  font-size: 0.85rem;
  color: var(--tp-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .site-header-inner {
    gap: 8px;
    padding: 0 12px;
  }
  .nav-user {
    display: none;
  }
  .nav-link {
    padding: 6px 7px;
    font-size: 0.82rem;
  }
}
@media (max-width: 599px) {
  .site-brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.page-narrow {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.page-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--tp-muted);
  font-size: 0.9rem;
}

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

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  color: var(--tp-muted);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 767px) {
  .page, .page-narrow {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page-header {
    flex-direction: column;
  }
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--tp-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: none;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--tp-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--tp-text);
}

.tab:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.tab[aria-selected=true] {
  color: var(--tp-accent);
  font-weight: 600;
  border-bottom-color: var(--tp-accent);
}

.tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-size: 0.72rem;
  color: var(--tp-muted);
  background: var(--tp-surface-alt);
  border-radius: 999px;
}

@media (max-width: 767px) {
  .tabs {
    padding-right: 32px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
}
.grid {
  display: grid;
  gap: 12px;
}

.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-stats {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tp-text);
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--tp-accent);
  color: var(--tp-accent);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--tp-on-primary, var(--tp-on-accent));
  background: var(--tp-primary-bg, var(--tp-accent));
  border-color: var(--tp-primary-bg, var(--tp-accent));
}

.btn-primary:hover:not(:disabled) {
  color: var(--tp-on-primary, var(--tp-on-accent));
  background: var(--tp-primary-bg-strong, var(--tp-accent-strong));
  border-color: var(--tp-primary-bg-strong, var(--tp-accent-strong));
}

.btn-danger {
  color: var(--tp-danger);
  border-color: var(--tp-border);
}

.btn-danger:hover:not(:disabled) {
  color: var(--tp-on-accent);
  background: var(--tp-danger);
  border-color: var(--tp-danger);
}

.btn-ghost {
  background: none;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--tp-surface-alt);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
}

.btn-row {
  display: inline-flex;
  gap: 4px;
}

.btn-link {
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--tp-accent);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .btn {
    min-height: 44px;
  }
  .btn-sm {
    min-height: 40px;
  }
}
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  color: var(--tp-muted);
}

.password-toggle:hover {
  color: var(--tp-text);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.password-strength {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.password-strength span {
  flex: 1;
  height: 3px;
  background: var(--tp-border);
  border-radius: 999px;
  transition: background 160ms ease;
}

.password-strength[data-score="1"] span:nth-child(-n+1),
.password-strength[data-score="2"] span:nth-child(-n+2) {
  background: var(--tp-danger);
}

.password-strength[data-score="3"] span:nth-child(-n+3) {
  background: var(--tp-warning);
}

.password-strength[data-score="4"] span {
  background: var(--tp-success);
}

.card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 16px;
}

.card-tight {
  padding: 12px;
}

.card-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.card-link:hover {
  text-decoration: none;
  border-color: var(--tp-accent);
  transform: translateY(-1px);
}

.card-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.stat {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 12px;
}

.stat-value {
  font-family: var(--tp-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.progress {
  height: 6px;
  background: var(--tp-surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--tp-success);
  border-radius: 999px;
  transition: width 160ms ease;
}

.bar-track {
  height: 8px;
  background: var(--tp-surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  color: var(--tp-muted);
  white-space: nowrap;
  vertical-align: middle;
}

.badge-owner {
  color: var(--tp-accent);
  border-color: var(--tp-accent);
}

.badge-draft {
  color: var(--tp-muted);
}

.badge-published {
  color: var(--tp-success);
  border-color: var(--tp-success);
}

.badge-todo {
  color: var(--tp-muted);
}

.badge-done {
  color: var(--tp-success);
  border-color: var(--tp-success);
}

.badge-pending {
  color: var(--tp-warning-ink, var(--tp-warning));
  border-color: var(--tp-warning);
}

.chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 9px;
  font-size: 0.8125rem;
  color: var(--tp-muted);
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  white-space: nowrap;
}

.chip-charged {
  color: var(--tp-muted);
}

.chip-pending {
  color: var(--tp-warning-ink, var(--tp-warning));
  border-color: var(--tp-warning);
}

button.chip {
  cursor: pointer;
  font-family: inherit;
}

button.chip:hover {
  border-color: var(--tp-selected, var(--tp-accent));
}

button.chip[aria-pressed=true] {
  color: var(--tp-on-selected, var(--tp-on-accent));
  background: var(--tp-selected, var(--tp-accent));
  border-color: var(--tp-selected, var(--tp-accent));
}

.chip-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.chip-remove {
  padding: 0;
  margin-left: 2px;
  font-size: 0.85em;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.chip-remove:hover {
  color: var(--tp-danger);
}

.cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

@media (max-width: 767px) {
  button.chip {
    min-height: 36px;
    padding: 6px 12px;
  }
  .chip-group {
    gap: 8px;
  }
}
.table-wrap {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--tp-border);
  white-space: nowrap;
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tp-table-header-text, var(--tp-muted));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--tp-table-header, var(--tp-surface-alt));
  position: sticky;
  top: 0;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--tp-surface-alt);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .wrap {
  white-space: normal;
  min-width: 220px;
}

.table .actions {
  text-align: right;
}

.table .select-cell {
  width: 1%;
  padding-right: 0;
  text-align: center;
}

.table .select-cell input {
  cursor: pointer;
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tbody tr.clickable:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .table-wrap:has(> .table-cards) {
    overflow-x: visible;
  }
  .table.table-cards,
  .table.table-cards tbody {
    display: block;
  }
  .table.table-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .table.table-cards tbody tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 2px;
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--tp-border);
  }
  .table.table-cards tbody tr:last-child {
    border-bottom: 0;
  }
  .table.table-cards td {
    display: block;
    grid-column: 2;
    min-width: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
    border: 0;
  }
  .table.table-cards .select-cell {
    grid-column: 1;
    grid-row: 1/span 7;
    width: auto;
    padding-top: 2px;
    text-align: center;
  }
  .table.table-cards .select-cell input {
    width: 20px;
    height: 20px;
  }
  .table.table-cards .cell-title {
    grid-row: 1;
    font-weight: 600;
  }
  .table.table-cards .cell-chips {
    margin: 4px 0;
  }
  .table.table-cards .actions {
    grid-column: 3;
    grid-row: 1/span 2;
    text-align: right;
  }
  .table.table-cards td[data-label] {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
  }
  .table.table-cards td[data-label]::before {
    content: attr(data-label);
    color: var(--tp-muted);
  }
  .table.table-cards .cell-emphasis {
    font-weight: 600;
    color: var(--tp-text);
  }
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.pager-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pager-page {
  font-variant-numeric: tabular-nums;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--tp-backdrop);
  overflow-y: auto;
}

.modal {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  padding: 24px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.modal-wide {
  max-width: 680px;
}

.modal-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
}

.modal-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--tp-muted);
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--tp-text);
  background: var(--tp-surface-alt);
}

.modal-close:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

.modal-footer-split {
  justify-content: space-between;
}

@media (max-width: 767px) {
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: none;
    max-height: 92vh;
    border-radius: var(--tp-radius) var(--tp-radius) 0 0;
    padding: 16px;
  }
  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  background: var(--tp-backdrop);
}

.drawer {
  width: 100%;
  max-width: 520px;
  height: 100%;
  padding: 24px;
  overflow-y: auto;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border-left: 1px solid var(--tp-border);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
}

.drawer-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tp-border);
}

.drawer-title {
  margin: 0;
  font-size: 1.1rem;
}

.drawer-eyebrow {
  font-size: 0.75rem;
  color: var(--tp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--tp-border);
}

@media (max-width: 767px) {
  .drawer-backdrop {
    align-items: flex-end;
  }
  .drawer {
    max-width: none;
    height: 94vh;
    padding: 16px;
    border-left: 0;
    border-radius: var(--tp-radius) var(--tp-radius) 0 0;
  }
}
@media (min-width: 768px) {
  body.panels-popup .drawer-backdrop.panel-switchable {
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
  }
  body.panels-popup .drawer-backdrop.panel-switchable > .drawer {
    height: auto;
    max-height: calc(100vh - 32px);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  }
  body.panels-side .modal-backdrop.panel-switchable {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
  }
  body.panels-side .modal-backdrop.panel-switchable > .modal {
    max-width: 520px;
    max-height: none;
    height: 100%;
    border: 0;
    border-left: 1px solid var(--tp-border);
    border-radius: 0;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
  }
}
.toast-stack {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--tp-on-toast, var(--tp-on-accent));
  background: var(--tp-toast-bg);
  border-radius: var(--tp-radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: toast-in 180ms ease;
}

.toast-error {
  color: var(--tp-on-accent);
  background: var(--tp-danger);
}

.toast-success {
  color: var(--tp-on-accent);
  background: var(--tp-success);
}

.toast-region {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-error {
  display: flex;
  gap: 12px;
  align-items: center;
  pointer-events: auto;
}

.toast-close {
  flex: none;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font: inherit;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.toast-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
.alert {
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  background: var(--tp-surface-alt);
}

.alert-error {
  color: var(--tp-danger);
  border-color: var(--tp-danger);
  background: var(--tp-danger-bg);
}

.alert-warning {
  color: var(--tp-warning-text);
  border-color: var(--tp-warning);
  background: var(--tp-warning-bg);
}

.alert-info {
  color: var(--tp-muted);
}

.empty-state {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 32px 16px;
  text-align: center;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.empty-body {
  margin: 0 auto 16px;
  max-width: 380px;
  color: var(--tp-muted);
  font-size: 0.88rem;
}

.loading {
  padding: 32px;
  color: var(--tp-muted);
  font-size: 0.9rem;
  text-align: center;
}

.theme-selector {
  position: relative;
  flex: none;
}

.theme-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--tp-text);
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--tp-accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  display: none;
  min-width: 176px;
  padding: 4px;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.theme-dropdown.show {
  display: block;
}

.theme-option {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.87rem;
  color: var(--tp-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.theme-option:hover {
  background: var(--tp-surface-alt);
}

.theme-option:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.theme-option.active {
  color: var(--tp-accent);
  font-weight: 600;
}

.theme-option.active::after {
  content: "✓";
  margin-left: auto;
}

.theme-swatch {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 3px;
  border: 1px solid var(--tp-border);
}

.label-short {
  display: none;
}

@media (max-width: 767px) {
  .label-full {
    display: none;
  }
  .label-short {
    display: inline;
  }
}
.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  margin: 0;
  list-style: none;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.autocomplete-option {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  padding: 7px 9px;
  font: inherit;
  font-size: 0.87rem;
  color: var(--tp-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.autocomplete-option:hover,
.autocomplete-option[aria-selected=true] {
  background: var(--tp-surface-alt);
}

.autocomplete-name {
  font-weight: 500;
}

.autocomplete-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--tp-muted);
  white-space: nowrap;
}

.autocomplete-status {
  padding: 9px;
  font-size: 0.82rem;
  color: var(--tp-muted);
}

.autocomplete-freetext {
  display: block;
  width: 100%;
  padding: 9px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--tp-muted);
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.autocomplete-freetext:hover {
  background: var(--tp-surface-alt);
  color: var(--tp-text);
}

.checklist {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}

.checklist-group-title {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tp-table-header-text, var(--tp-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--tp-table-header, var(--tp-surface-alt));
  border-bottom: 1px solid var(--tp-border);
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--tp-text);
}

.check-row-wrap {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--tp-border);
}

.check-row-wrap:last-child {
  border-bottom: 0;
}

.check-row-wrap:hover {
  background: var(--tp-surface-alt);
}

.select-box {
  display: flex;
  align-items: flex-start;
  padding: 12px 0 12px 16px;
  cursor: pointer;
}

.select-box input {
  cursor: pointer;
}

.check-status {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 32px;
  min-height: 44px;
  margin: 0;
  padding: 12px 0 0;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.check-status:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.check-status + .check-row {
  padding-left: 4px;
}

.check-main {
  flex: 1;
  min-width: 0;
}

.check-text {
  display: block;
  font-size: 0.94rem;
  font-weight: 500;
}

.check-row.is-done .check-text {
  color: var(--tp-muted);
  text-decoration: line-through;
}

.check-note {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.check-side {
  flex: none;
}

.plan-card {
  padding: 12px;
  margin-bottom: 8px;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
}

.plan-when {
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.plan-desc {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 2px 0;
}

.plan-cost {
  font-size: 0.82rem;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .select-box {
    min-width: 44px;
    min-height: 44px;
    padding-right: 8px;
  }
  .check-status {
    width: 44px;
  }
}
.timeline-day {
  margin-bottom: 24px;
}

.timeline-date {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 8px;
  padding-bottom: 8px;
  font-size: 1rem;
  border-bottom: 2px solid var(--tp-border);
}

.timeline-date-count {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--tp-muted);
}

.timeline-entries {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}

.timeline-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--tp-border);
}

.timeline-entry:last-child {
  border-bottom: 0;
}

.select-box-tight {
  padding: 0;
  flex: none;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
}

.timeline-entry:hover {
  background: var(--tp-surface-alt);
}

.timeline-time {
  flex: none;
  width: 92px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-desc {
  font-size: 0.94rem;
  font-weight: 500;
}

.timeline-meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.timeline-cost {
  flex: none;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.timeline-actions {
  flex: none;
}

@media (max-width: 767px) {
  .timeline-entry {
    flex-wrap: wrap;
  }
  .timeline-time {
    width: auto;
  }
  .timeline-actions, .timeline-cost {
    margin-left: auto;
  }
  .select-box-tight {
    padding: 12px;
    margin: -12px;
  }
}
.weather-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.weather-card-wide {
  grid-column: 1/-1;
}

.weather-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 8px 12px;
  background: var(--tp-weather-bg, var(--tp-surface-alt));
  min-width: 0;
}

.weather-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.weather-place {
  font-size: 0.9rem;
  font-weight: 500;
}

.weather-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--tp-muted);
}

.weather-line-muted {
  font-size: 0.78rem;
}

.weather-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.weather-temps {
  font-size: 0.9rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--tp-text);
}

.weather-condition {
  color: var(--tp-muted);
}

.weather-note {
  margin-top: 2px;
}

.weather-badge {
  padding: 1px 4px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-badge-typical {
  border-color: var(--tp-weather-typical-border, var(--tp-border));
  color: var(--tp-weather-typical-fg, var(--tp-muted));
}

@media (max-width: 767px) {
  .weather-locations {
    grid-template-columns: minmax(0, 1fr);
  }
}
.budget-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(160px, 200px) 1fr;
  align-items: start;
}

.budget-total-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.budget-rates-note {
  flex: none;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--tp-muted);
  text-align: right;
}

.budget-total-value {
  font-family: var(--tp-font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.budget-native-totals {
  margin-top: 4px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.budget-pie {
  width: 100%;
  max-width: 190px;
  margin: 0 auto;
}

.budget-pie canvas {
  display: block;
}

.budget-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.budget-legend-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.budget-legend-swatch {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.budget-legend-label {
  flex: 1;
  min-width: 0;
}

.budget-legend-percent {
  flex: none;
  min-width: 3.2em;
  text-align: right;
  color: var(--tp-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.budget-legend-amount {
  flex: none;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1179px) {
  .budget-summary {
    grid-template-columns: 1fr;
  }
}
/**
 * Settle Expenses — who owes whom, under the budget table.
 *
 * Colour is never the only signal here. The sign travels in the text (the
 * figure itself, and "+"/"−" on a detail line) and the heading of the popup
 * says it in words, so the table reads correctly in monochrome and to anyone
 * who does not distinguish the two hues.
 */
.settle {
  margin-top: 24px;
}

.settle-note {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.settle-net-positive {
  color: var(--tp-success, var(--tp-text));
  font-weight: 600;
}

.settle-net-negative {
  color: var(--tp-danger, var(--tp-text));
  font-weight: 600;
}

.settle-net-level {
  color: var(--tp-muted);
}

.settle-lines {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.settle-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--tp-border);
}

.settle-line:last-child {
  border-bottom: 0;
}

.settle-line-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settle-line-desc {
  overflow-wrap: anywhere;
}

.settle-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.settle-line-amount {
  flex: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settle-totals {
  margin: 0;
  padding-top: 12px;
  border-top: 2px solid var(--tp-border);
}

.settle-totals > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 2px 0;
}

.settle-totals dt {
  color: var(--tp-muted);
  font-size: 0.9rem;
}

.settle-totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settle-totals-net {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--tp-border);
}

.settle-totals-net dt {
  color: var(--tp-text);
  font-weight: 600;
}

.auth-wrap {
  padding-top: 32px;
}

.auth-logo {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 8px;
}

.auth-title {
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--tp-muted);
  font-size: 0.88rem;
  text-align: center;
}

.auth-footnote {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  text-align: center;
}

.trip-card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

.trip-card-dates {
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.trip-card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.trip-card-progress {
  margin-top: 12px;
}

.trip-card-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 0.75rem;
  color: var(--tp-muted);
}

.trip-card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tp-border);
}

.trip-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.trip-head-title {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.trip-head-meta {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--tp-muted);
}

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

.section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 1.1rem;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toolbar select {
  width: auto;
  padding: 5px 9px;
  font-size: 0.85rem;
}

.needs-planning-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--tp-border);
}

.needs-planning-row:last-child {
  border-bottom: 0;
}

.member-name {
  display: flex;
  gap: 8px;
  align-items: center;
}

.member-email-only {
  font-style: italic;
  color: var(--tp-muted);
}

.coord-inputs {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.coord-hint {
  grid-column: 1/-1;
  margin: 0;
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.publish-url {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  margin: 12px 0;
  font-family: var(--tp-font-mono);
  font-size: 0.82rem;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  word-break: break-all;
}

.publish-request-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--tp-border);
}

.publish-request-row:last-child {
  border-bottom: 0;
}

@media (max-width: 767px) {
  .trip-head {
    flex-direction: column;
  }
  .coord-inputs {
    grid-template-columns: 1fr;
  }
}
.publish-own-page {
  margin: 12px 0;
}

.publish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
