:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #6e6a61;
  --soft: #f7f4ee;
  --panel: #fffdf8;
  --paper: #ffffff;
  --line: #e7e0d3;
  --line-strong: #d6ccbc;
  --accent: #2f6f73;
  --accent-2: #d86142;
  --accent-3: #315c9d;
  --warning: #b77b18;
  --danger: #b54545;
  --success: #2f7d55;
  --shadow: 0 18px 42px rgba(47, 38, 22, 0.12);
  --shadow-soft: 0 8px 22px rgba(47, 38, 22, 0.08);
  --radius: 8px;
  --sidebar: 272px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(47, 111, 115, 0.13), transparent 42%),
    linear-gradient(315deg, rgba(216, 97, 66, 0.12), transparent 40%),
    var(--soft);
}

.auth-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-brand {
  margin-bottom: 26px;
}

.auth-copy h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.05;
}

.auth-copy p {
  margin: 10px 0 22px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-alert {
  margin: 0 0 16px;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 680;
}

.auth-alert.danger {
  border: 1px solid #f0c5c5;
  background: #fff2f2;
  color: var(--danger);
}

.auth-alert.success {
  border: 1px solid #bbdbc7;
  background: #eff8f2;
  color: var(--success);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  padding: 18px;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #b7d2cf;
  border-radius: 8px;
  background: #e7f3f0;
  color: var(--accent);
  font-weight: 800;
}

.brand-title {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
}

.brand-subtitle {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-list,
.nav-list,
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-button,
.nav-button,
.user-row,
.notification-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.board-button:hover,
.nav-button:hover,
.user-row:hover,
.notification-row:hover {
  background: #f2ede4;
}

.board-button.active,
.nav-button.active {
  border-color: #cbdedb;
  background: #e9f4f1;
  color: #244f52;
}

.board-color-dot,
.user-avatar,
.member-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 780;
}

.board-color-dot {
  width: 12px;
  height: 12px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.member-avatar {
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  font-size: 10px;
}

.board-meta {
  min-width: 0;
}

.board-name,
.user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 680;
}

.board-count,
.user-role,
.notification-time,
.tiny-muted {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-form {
  display: grid;
  gap: 8px;
}

.sidebar-footer {
  margin-top: auto;
}

.pill-button,
.icon-button,
.ghost-button,
.primary-button,
.danger-button,
.soft-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border-radius: var(--radius);
  padding: 8px 11px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
  white-space: nowrap;
}

.pill-button:hover,
.icon-button:hover,
.ghost-button:hover,
.primary-button:hover,
.danger-button:hover,
.soft-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(47, 111, 115, 0.2);
  font-weight: 730;
}

.soft-button {
  border: 1px solid var(--line);
  background: #f4efe6;
  color: var(--ink);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fffaf2;
  color: var(--ink);
}

.danger-button {
  border: 1px solid #efd0d0;
  background: #fff4f4;
  color: var(--danger);
}

.pill-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}

.pill-button.active {
  border-color: #b7d2cf;
  background: #e8f3f1;
  color: #244f52;
}

.mini-button,
.icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 7px 9px;
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--paper);
}

.main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.88);
  padding: 14px 22px;
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.06;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
  padding: 3px 8px;
}

.chip.strong {
  border-color: #b7d2cf;
  background: #e9f4f1;
  color: #244f52;
}

.chip.warning {
  border-color: #efd6a9;
  background: #fff6df;
  color: #7e5516;
}

.chip.danger {
  border-color: #efc8c8;
  background: #fff0f0;
  color: #904141;
}

.chip.success {
  border-color: #c6dfcf;
  background: #eef8f1;
  color: #326948;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(570px, 52vw);
}

.search-box {
  position: relative;
  flex: 1 1 220px;
}

.search-box input,
.field,
.field textarea,
.field select,
.sidebar-form input,
.inline-input,
.mini-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.search-box input,
.sidebar-form input,
.inline-input,
.mini-input {
  height: 38px;
  padding: 9px 11px;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  padding: 10px 11px;
}

.field select,
.field input {
  height: 38px;
  padding: 8px 10px;
}

.search-box input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.sidebar-form input:focus,
.inline-input:focus,
.mini-input:focus {
  border-color: #9bc6c1;
  box-shadow: 0 0 0 3px rgba(47, 111, 115, 0.12);
}

.board-surface {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 22px;
}

.column {
  display: flex;
  flex: 0 0 318px;
  max-height: calc(100vh - 112px);
  min-height: 220px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-soft);
}

.column.private {
  border-color: #ecc898;
  background: #fffaf0;
}

.column.drop-target {
  border-color: #8abcb6;
  box-shadow: 0 0 0 4px rgba(47, 111, 115, 0.12);
}

.column-header {
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding: 13px;
}

.column-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.column h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
}

.column-actions {
  display: flex;
  gap: 6px;
}

.column-body {
  display: flex;
  min-height: 88px;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 12px;
}

.add-card-form,
.add-column-card,
.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
  padding: 10px;
}

.add-column-card {
  flex: 0 0 296px;
}

.card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 11px;
  box-shadow: 0 4px 12px rgba(50, 39, 21, 0.07);
  cursor: grab;
}

.card:active {
  cursor: grabbing;
}

.card.dragging {
  opacity: 0.5;
}

.card-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.32;
}

.card-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-labels,
.label-row,
.card-footer,
.member-stack,
.checkline,
.attachment-row,
.order-mini-grid,
.comment-meta,
.modal-actions,
.row-actions,
.inline-tools {
  display: flex;
  align-items: center;
}

.card-labels,
.label-row,
.card-footer,
.order-mini-grid,
.modal-actions,
.row-actions,
.inline-tools {
  flex-wrap: wrap;
  gap: 8px;
}

.label-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.label-token {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  padding: 3px 7px;
}

.member-stack {
  margin-left: auto;
}

.member-stack .member-avatar + .member-avatar {
  margin-left: -8px;
}

.due-chip {
  font-size: 11px;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.screen {
  padding: 22px;
}

.screen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-soft);
}

.panel-header,
.panel-body {
  padding: 16px;
}

.panel-header {
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  display: grid;
  gap: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

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

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.full {
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: stretch end;
  background: rgba(38, 34, 27, 0.28);
}

.modal {
  display: grid;
  width: min(760px, 100vw);
  height: 100vh;
  grid-template-rows: auto 1fr;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.modal-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.modal-body {
  display: grid;
  gap: 18px;
  overflow-y: auto;
  padding: 18px 20px 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.compact-card h3 {
  margin: 0;
  font-size: 14px;
}

.checkline {
  gap: 9px;
  min-height: 30px;
}

.checkline input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.checkline span {
  flex: 1;
  overflow-wrap: anywhere;
}

.checkline.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.attachment-row,
.comment-row,
.order-card,
.activity-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.attachment-row {
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
}

.comment-row,
.activity-row {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.comment-meta {
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.comment-text {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.mention,
.order-link {
  border-radius: 5px;
  padding: 1px 4px;
  font-weight: 720;
}

.mention {
  background: #e9f4f1;
  color: #25595c;
}

.order-link {
  background: #fff1d4;
  color: #8a5716;
}

.order-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.order-card h4 {
  margin: 0;
  font-size: 15px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
  font-size: 12px;
}

.order-line:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
}

.toast-notification {
  border-left: 5px solid var(--accent);
  padding-left: 13px;
}

.toast-notification.calm {
  border-color: #cbdedb;
  border-left-color: var(--accent);
  background: #fbfffd;
}

.toast-notification.strong {
  border-color: #e0b9a5;
  border-left-color: var(--accent-2);
  background: #fff8f2;
  box-shadow: 0 14px 36px rgba(216, 97, 66, 0.18);
  animation: toast-attention 260ms ease-out;
}

@keyframes toast-attention {
  from {
    transform: translateY(8px) scale(0.98);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

.hidden {
  display: none !important;
}

.divider {
  height: 1px;
  background: var(--line);
}

.kbd {
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  padding: 1px 5px;
  color: var(--muted);
  font-size: 11px;
}

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

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    min-width: 0;
  }

  .column {
    flex-basis: 292px;
    max-height: none;
  }

  .screen-grid,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 100vw;
  }
}

@media (max-width: 640px) {
  .topbar,
  .board-surface,
  .screen {
    padding: 14px;
  }

  .toolbar,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pill-button,
  .primary-button,
  .ghost-button,
  .soft-button,
  .danger-button {
    width: 100%;
  }
}

/* Trello-like board skin */
:root {
  --ink: #172b4d;
  --muted: #5e6c84;
  --soft: #e95a9b;
  --panel: #f1f2f4;
  --paper: #ffffff;
  --line: #d9dee7;
  --line-strong: #bdc4d2;
  --accent: #0c66e4;
  --accent-2: #ff9f1a;
  --accent-3: #7f1d62;
  --warning: #ff9f1a;
  --danger: #c9372c;
  --success: #1f845a;
  --shadow: 0 18px 42px rgba(23, 43, 77, 0.18);
  --shadow-soft: 0 1px 1px rgba(9, 30, 66, 0.22);
  --radius: 10px;
}

body {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(200, 42, 143, 0.92) 0%, rgba(232, 84, 154, 0.94) 40%, rgba(255, 106, 80, 0.96) 100%),
    #e95a9b;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, #d64aa9 0%, #ea6497 48%, #ff6952 100%);
}

.layout {
  display: grid;
  height: 100vh;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  overflow: hidden;
}

.globalbar {
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: #861150;
  color: #fff;
  padding: 7px 14px;
  box-shadow: 0 1px 2px rgba(24, 4, 19, 0.24);
}

.window-dots {
  display: flex;
  gap: 9px;
  padding-right: 4px;
}

.window-dots span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(58, 0, 35, 0.9);
}

.brand {
  flex: 0 0 auto;
  gap: 10px;
  min-height: 42px;
  color: #fff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #861150;
  font-size: 13px;
  font-weight: 900;
}

.brand-title {
  color: #fff;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-subtitle {
  display: none;
}

.global-search {
  flex: 1 1 min(760px, 42vw);
  max-width: 860px;
  margin-left: 4px;
}

.global-search input {
  height: 42px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 9px 16px;
  font-size: 16px;
}

.global-search input::placeholder {
  color: rgba(255, 255, 255, 0.86);
}

.global-search input:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.create-button,
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 9px 18px;
  font-weight: 730;
  cursor: pointer;
}

.create-button:hover,
.share-button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.global-spacer {
  flex: 1 1 auto;
}

.global-boards,
.global-people {
  display: flex;
  align-items: center;
  min-width: 0;
}

.global-boards {
  gap: 6px;
  max-width: 28vw;
  overflow: hidden;
}

.global-people .member-avatar + .member-avatar,
.board-people .member-avatar + .member-avatar {
  margin-left: -7px;
}

.board-button {
  width: auto;
  min-width: 0;
  min-height: 42px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.92);
  padding: 9px 12px;
}

.board-button:hover,
.board-button.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.board-button .board-name {
  max-width: 150px;
}

.board-count {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.top-icon {
  position: relative;
  min-width: 40px;
  min-height: 40px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  padding: 7px 10px;
  font-weight: 760;
}

.top-icon:hover,
.top-icon.has-alert {
  background: rgba(255, 255, 255, 0.18);
}

.top-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 999px;
  background: #ff5630;
  color: #fff;
  font-size: 10px;
}

.current-user-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-user-control .mini-input {
  width: 124px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 8px 12px;
  font-size: 15px;
}

.current-user-name {
  display: inline-flex;
  align-items: center;
}

.current-user-control .ghost-button {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.current-user-control .mini-input option {
  color: var(--ink);
}

.member-avatar,
.user-avatar {
  border-color: rgba(255, 255, 255, 0.92);
}

.main {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: 86px minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  position: relative;
  top: auto;
  z-index: 25;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(145, 20, 89, 0.46);
  color: #fff;
  padding: 14px 18px;
  backdrop-filter: blur(10px);
}

.boardbar-left {
  min-width: 0;
}

.topbar h1 {
  color: #fff;
  font-size: 18px;
  font-weight: 780;
}

.topbar-meta {
  gap: 7px;
  margin-top: 7px;
}

.toolbar {
  min-width: 0;
}

.board-toolbar {
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
}

.chip {
  min-height: 22px;
  border-color: rgba(9, 30, 66, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: #44546f;
  font-size: 12px;
  padding: 2px 8px;
}

.topbar .chip {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.topbar .chip.strong,
.topbar .chip.warning {
  color: #fff;
}

.globalbar .sync-chip {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 760;
}

.globalbar .sync-chip.success::before,
.globalbar .sync-chip.warning::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.globalbar .sync-chip.success {
  color: #dcfff1;
}

.globalbar .sync-chip.warning {
  color: #ffe2bd;
}

.pill-button {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 9px 14px;
}

.pill-button.active,
.pill-button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.share-button {
  background: rgba(222, 235, 255, 0.92);
  color: #172b4d;
}

.filter-strip {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-strip .pill-button {
  flex: 0 0 auto;
}

.filter-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: currentColor;
  font-size: 12px;
  font-weight: 760;
  padding: 0 6px;
}

.pill-button.active .filter-count {
  background: rgba(255, 255, 255, 0.34);
}

.board-surface {
  height: 100%;
  min-height: 0;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 6px 88px;
  scroll-padding-inline: 6px;
}

.board-surface::-webkit-scrollbar {
  height: 13px;
}

.board-surface::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.14);
}

.board-surface::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.column {
  flex: 0 0 274px;
  max-height: calc(100vh - 158px);
  min-height: 88px;
  border: 0;
  border-radius: 10px;
  background: #f1f2f4;
  box-shadow: none;
}

.column.private {
  border: 2px solid rgba(255, 196, 0, 0.44);
  background: #f6f2e9;
}

.column.drop-target {
  border-color: rgba(12, 102, 228, 0.8);
  box-shadow: 0 0 0 3px rgba(12, 102, 228, 0.22);
}

.column.column-dragging {
  opacity: 0.62;
}

.column.column-drop-before {
  box-shadow: -5px 0 0 #0c66e4;
}

.column.column-drop-after {
  box-shadow: 5px 0 0 #0c66e4;
}

.column-header {
  gap: 5px;
  border-bottom: 0;
  background: transparent;
  padding: 12px 12px 5px;
  cursor: grab;
  user-select: none;
}

.column-header:active {
  cursor: grabbing;
}

.column-title-row {
  align-items: center;
  gap: 8px;
}

.column h2 {
  flex: 1;
  color: #172b4d;
  font-size: 14px;
  font-weight: 760;
}

.column-count {
  color: #626f86;
  font-size: 13px;
  font-weight: 700;
}

.column-meta {
  display: flex;
  min-height: 18px;
  flex-wrap: wrap;
  gap: 5px;
}

.column-flag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  background: rgba(255, 196, 0, 0.22);
  color: #6a4b00;
  font-size: 11px;
  padding: 1px 7px;
}

.column-actions {
  flex: 0 0 auto;
}

.column .icon-button {
  min-width: 28px;
  min-height: 28px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: #626f86;
  padding: 2px 7px;
}

.column .icon-button:hover {
  background: #dcdfe4;
  transform: none;
}

.column-body {
  gap: 8px;
  padding: 5px 8px 8px;
}

.card {
  gap: 7px;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.24);
}

.card:hover {
  outline: 2px solid rgba(12, 102, 228, 0.16);
}

.card-title {
  color: #172b4d;
  font-size: 14px;
  font-weight: 650;
}

.card-description {
  color: #626f86;
  font-size: 12px;
}

.attachment-preview-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}

.attachment-thumb {
  display: inline-grid;
  width: 34px;
  height: 28px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  background: #f7f8f9;
  color: #44546f;
  font-size: 9px;
  font-weight: 800;
}

.attachment-thumb.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-thumb.extra {
  background: #e9f2ff;
  color: #0c66e4;
}

.label-dot {
  width: 42px;
  height: 8px;
  border-radius: 999px;
}

.card-footer {
  gap: 5px;
}

.card-footer .chip {
  min-height: 20px;
  border: 0;
  border-radius: 4px;
  background: #f4f5f7;
  font-size: 11px;
  padding: 2px 6px;
}

.card-footer .chip.warning {
  background: #ffebe6;
  color: #ae2a19;
}

.card-footer .chip.success {
  background: #dcfff1;
  color: #216e4e;
}

.add-card-form,
.add-column-card,
.empty-state {
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px;
}

.add-card-form {
  padding-top: 0;
}

.add-card-form input,
.add-column-card input {
  height: 36px;
  border-color: transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
  box-shadow: inset 0 0 0 1px rgba(9, 30, 66, 0.08);
}

.add-card-form input::placeholder,
.add-column-card input::placeholder {
  color: #5e6c84;
}

.add-card-form .soft-button,
.add-column-card .soft-button {
  justify-content: flex-start;
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: #44546f;
  padding: 7px 8px;
}

.add-card-form .soft-button::before,
.add-column-card .soft-button::before {
  content: "+";
  font-size: 20px;
  line-height: 1;
}

.add-card-form .soft-button:hover,
.add-column-card .soft-button:hover {
  background: #dcdfe4;
  transform: none;
}

.add-column-card {
  flex: 0 0 274px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
}

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 24px);
  border: 1px solid rgba(9, 30, 66, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(9, 30, 66, 0.24);
  padding: 8px;
  transform: translateX(-50%);
}

.bottom-dock .nav-button {
  width: auto;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #44546f;
  padding: 7px 10px;
}

.bottom-dock .nav-button:hover {
  background: #f1f2f4;
}

.bottom-dock .nav-button.active {
  background: #e9f2ff;
  color: #0c66e4;
}

.bottom-dock .nav-icon {
  color: currentColor;
  font-weight: 800;
}

.bottom-dock .chip {
  min-height: 18px;
  padding: 1px 6px;
  font-size: 11px;
}

.screen {
  height: 100%;
  overflow: auto;
  padding: 18px 18px 88px;
}

.notification-detail {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: #fff;
  color: #172b4d;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.notification-detail + .notification-detail {
  margin-top: 8px;
}

.notification-detail:hover {
  border-color: #b8c7e6;
  background: #f7faff;
}

.notification-detail.unread {
  border-color: #cce0ff;
  background: #e9f2ff;
}

.notification-detail span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-detail strong,
.notification-detail small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-detail small {
  color: #626f86;
  font-size: 12px;
}

.notification-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf2;
  padding: 12px;
}

.notification-toggle {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
}

.segmented-control {
  display: inline-flex;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 3px;
}

.segment-button {
  flex: 1;
  min-height: 32px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 720;
}

.segment-button:hover {
  background: #f4efe6;
}

.segment-button.active {
  background: #e9f4f1;
  color: #244f52;
  box-shadow: inset 0 0 0 1px #b7d2cf;
}

@media (max-width: 980px) {
  .notification-settings {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .notification-toggle {
    align-self: stretch;
  }
}

.chat-screen {
  overflow: hidden;
}

.chat-layout {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.chat-groups-panel,
.chat-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.chat-groups-panel .panel-body {
  overflow: auto;
}

.chat-group-list {
  display: grid;
  gap: 8px;
}

.chat-group-button {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: #fff;
  color: #172b4d;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.chat-group-button:hover,
.chat-group-button.active {
  border-color: #cce0ff;
  background: #e9f2ff;
}

.chat-group-button strong,
.chat-group-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-button small {
  color: #626f86;
  font-size: 12px;
}

.group-member-picker {
  display: grid;
  max-height: 180px;
  overflow: auto;
  gap: 4px;
}

.chat-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.chat-message {
  display: grid;
  max-width: 78%;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.chat-message.mine {
  align-self: flex-end;
  border-color: #cce0ff;
  background: #e9f2ff;
}

.chat-message .comment-text {
  color: #172b4d;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid #dfe1e6;
  background: #fff;
  padding: 12px;
}

.chat-compose textarea {
  min-height: 46px;
  max-height: 140px;
  resize: vertical;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
}

.modal {
  background: #f7f8f9;
}

.modal-header {
  background: #fff;
}

.photo-avatar {
  overflow: hidden;
  background: #dfe1e6;
}

.photo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mention-menu {
  position: fixed;
  z-index: 300;
  display: grid;
  width: 250px;
  gap: 3px;
  border: 1px solid rgba(9, 30, 66, 0.18);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(9, 30, 66, 0.28);
  padding: 6px;
}

.mention-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  background: transparent;
  color: #172b4d;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.mention-menu button:hover,
.mention-menu button.active {
  background: #e9f2ff;
}

.mention-menu small {
  display: block;
  color: #626f86;
  font-size: 11px;
}

.readonly-note {
  border-color: #cce0ff;
  background: #e9f2ff;
  color: #0c3f86;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .layout {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
  }

  .globalbar {
    height: auto;
    flex-wrap: wrap;
    padding: 8px;
  }

  .global-search {
    order: 10;
    flex-basis: 100%;
    margin-left: 0;
  }

  .global-boards {
    max-width: 100%;
  }

  .main {
    height: auto;
    min-height: calc(100vh - 72px);
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .board-toolbar {
    justify-content: flex-start;
  }

  .column {
    flex-basis: 274px;
    max-height: calc(100vh - 166px);
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-screen {
    overflow: auto;
  }

  .chat-groups-panel,
  .chat-panel {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .global-people,
  .global-boards {
    display: none;
  }

  .current-user-control .mini-input {
    width: 78px;
  }

  .board-surface {
    padding: 10px 8px 86px;
  }

  .bottom-dock {
    gap: 2px;
    padding: 6px;
  }

  .bottom-dock .nav-button {
    padding: 7px 8px;
  }

  .bottom-dock .nav-button .chip {
    display: none;
  }

  .chat-message {
    max-width: 100%;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }
}
