/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #08090b;
  --bg-soft: #0c0d10;
  --surface: #15161a;
  --surface-2: #1b1d22;
  --surface-3: #22242b;
  --surface-elevated: #17181d;
  --surface-translucent: rgba(8, 9, 11, 0.78);
  --column-base: #101115;
  --card-bg: #17181d;
  --card-border: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-faint: rgba(255, 255, 255, 0.055);
  --text: #f2f3f5;
  --text-secondary: #a2a6b1;
  --text-tertiary: #858a99;
  --text-quaternary: #7e8393;
  --accent: #8b7cf6;
  --accent-strong: #7c6cf2;
  --accent-soft: rgba(139, 124, 246, 0.14);
  --accent-border: rgba(139, 124, 246, 0.38);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.12);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.32), 0 10px 28px rgba(0, 0, 0, 0.2);
  --shadow-popover: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.25);
  --shadow-modal: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --scroll-thumb: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-soft: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e8ebf0;
  --surface-elevated: #ffffff;
  --surface-translucent: rgba(247, 248, 250, 0.82);
  --column-base: #eef1f5;
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, 0.085);
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-faint: rgba(15, 23, 42, 0.06);
  --text: #12151c;
  --text-secondary: #5c6472;
  --text-tertiary: #5f6775;
  --text-quaternary: #656d7c;
  --accent: #6c5ce7;
  --accent-strong: #5b4bdb;
  --accent-soft: rgba(108, 92, 231, 0.1);
  --accent-border: rgba(108, 92, 231, 0.32);
  --danger: #c81e42;
  --danger-soft: rgba(229, 72, 97, 0.09);
  --success: #166534;
  --success-soft: rgba(22, 101, 52, 0.1);
  --warning: #d97706;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 14px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 2px 6px rgba(15, 23, 42, 0.07), 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-popover: 0 14px 44px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 32px 90px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --scroll-thumb: rgba(15, 23, 42, 0.18);
  color-scheme: light;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

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

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 440px at 12% -8%, rgba(139, 124, 246, 0.12), transparent 62%),
    radial-gradient(760px 380px at 96% -4%, rgba(34, 211, 238, 0.06), transparent 60%);
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(900px 440px at 12% -8%, rgba(108, 92, 231, 0.07), transparent 62%),
    radial-gradient(760px 380px at 96% -4%, rgba(34, 211, 238, 0.05), transparent 60%);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

::selection {
  background: rgba(139, 124, 246, 0.32);
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-quaternary);
  background-clip: content-box;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-bottom-color: var(--border-strong);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* ------------------------------------------------------------------ */
/* Botões                                                              */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    filter 0.15s ease;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: rgba(255, 255, 255, 0.13);
  background: linear-gradient(180deg, #9283ff 0%, #6f5df0 100%);
  color: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(251, 113, 133, 0.32);
  background: linear-gradient(180deg, #f8617a, #e04561);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn-danger:hover {
  filter: brightness(1.06);
}

.btn-danger-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-tertiary);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn .icon {
  width: 17px;
  height: 17px;
}

/* ------------------------------------------------------------------ */
/* Topbar                                                              */
/* ------------------------------------------------------------------ */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  animation: app-in 0.35s ease both;
}

@keyframes app-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  flex: none;
  gap: 13px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-translucent);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  border-radius: 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: linear-gradient(145deg, #9485ff 0%, #6552e8 100%);
  color: #fff;
  box-shadow:
    0 2px 8px rgba(101, 82, 232, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.brand-name span {
  margin-left: 2px;
  color: var(--text-tertiary);
  font-weight: 520;
}

.topbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.workspace-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(139, 124, 246, 0.28), rgba(34, 211, 238, 0.14)),
    var(--surface-2);
  color: var(--text);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.workspace-name {
  overflow: hidden;
  max-width: 110px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-plan {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-quaternary);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-spacer {
  flex: 1;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(360px, 31vw);
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.search:focus-within {
  border-color: var(--accent-border);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  width: 15px;
  height: 15px;
  margin: 0 8px 0 11px;
  color: var(--text-tertiary);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
}

.search input::placeholder {
  color: var(--text-tertiary);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 5px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-tertiary);
}

.search-clear:hover {
  background: var(--surface-3);
  color: var(--text);
}

.search-clear .icon {
  width: 13px;
  height: 13px;
}

.search-kbd {
  margin-right: 8px;
}

.search.has-query .search-kbd {
  display: none;
}

.search-highlight {
  padding: 0 1px;
  border-radius: 2px;
  background: rgba(250, 204, 21, 0.14);
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(250, 204, 21, 0.62);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

:root[data-theme="light"] .search-highlight {
  background: rgba(234, 179, 8, 0.2);
  text-decoration-color: rgba(161, 98, 7, 0.6);
}

.card-key .search-highlight {
  color: var(--text-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

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

/* ------------------------------------------------------------------ */
/* Cabeçalho do quadro                                                 */
/* ------------------------------------------------------------------ */

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 1680px;
  min-height: 0;
  margin: 0 auto;
}

.board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex: none;
  gap: 24px;
  padding: 26px 28px 19px;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--text-tertiary);
  font-size: 11.5px;
  font-weight: 500;
}

.breadcrumb-sep {
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--text-quaternary);
}

.title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.title-row h1 {
  font-size: clamp(23px, 2.2vw, 28px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--success) 16%, transparent);
}

.board-description {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: -0.005em;
}

.header-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
}

.filter-btn {
  padding-right: 9px;
}

.filter-btn .chevron {
  width: 13px;
  height: 13px;
  margin-left: 1px;
  opacity: 0.65;
}

.filter-btn.has-filters {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--text);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
}

.filter-count[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Toolbar do quadro                                                   */
/* ------------------------------------------------------------------ */

.board-toolbar {
  display: flex;
  align-items: center;
  flex: none;
  gap: 12px;
  min-height: 26px;
  padding: 0 28px 15px;
}

.board-stats {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  color: var(--text-tertiary);
  font-size: 11.5px;
  font-weight: 500;
}

.board-stats > .stat {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-stats strong {
  color: var(--text-secondary);
  font-weight: 650;
}

.stat-sep {
  width: 1px;
  height: 11px;
  background: var(--border);
}

.active-filters {
  display: flex;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  max-width: 210px;
  padding: 0 4px 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 520;
}

.active-filter .filter-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--tag-color, var(--accent));
}

.active-filter .filter-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-filter button {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
}

.active-filter button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.active-filter .icon {
  width: 11px;
  height: 11px;
}

.clear-filters {
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}

.clear-filters:hover {
  background: var(--accent-soft);
}

.shortcut-hint {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
  margin-left: auto;
  color: var(--text-quaternary);
  font-size: 10px;
  white-space: nowrap;
}

.shortcut-hint kbd {
  height: 17px;
  min-width: 17px;
  font-size: 9px;
}

.hint-sep {
  margin: 0 2px;
  opacity: 0.6;
}

/* ------------------------------------------------------------------ */
/* Board / colunas                                                     */
/* ------------------------------------------------------------------ */

.board {
  display: flex;
  align-items: flex-start;
  flex: 1;
  gap: 14px;
  min-height: 0;
  padding: 0 28px 26px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.column {
  --accent-column: #8b7cf6;
  display: flex;
  flex: 0 0 318px;
  flex-direction: column;
  width: 318px;
  max-height: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--column-base);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.022);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

:root[data-theme="light"] .column {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(15, 23, 42, 0.02);
}

.column.is-drop-target {
  border-color: color-mix(in srgb, var(--accent-column) 52%, transparent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent-column) 5%, transparent),
      transparent 34%
    ),
    var(--column-base);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-column) 10%, transparent);
}

.accent-violet {
  --accent-column: #8b7cf6;
}
.accent-blue {
  --accent-column: #60a5fa;
}
.accent-emerald {
  --accent-column: #34d399;
}
.accent-amber {
  --accent-column: #fbbf24;
}
.accent-rose {
  --accent-column: #fb7185;
}
.accent-cyan {
  --accent-column: #22d3ee;
}
.accent-slate {
  --accent-column: #94a3b8;
}

.column-header {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  padding: 12px 10px 9px 14px;
}

.column-title-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.column-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-column);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-column) 13%, transparent);
}

.column-title {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.008em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border-faint);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--text-tertiary);
  font-size: 9.5px;
  font-weight: 650;
}

.column-actions {
  display: flex;
  flex: none;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.column:hover .column-actions,
.column:focus-within .column-actions,
.column.is-drop-target .column-actions {
  opacity: 1;
}

.column-actions .icon-btn {
  width: 25px;
  height: 25px;
  border-radius: 6px;
}

.column-actions .icon-btn .icon {
  width: 14px;
  height: 14px;
}

.cards {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 64px;
  padding: 1px 10px 9px;
  overflow-x: hidden;
  overflow-y: auto;
}

.column-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin: 2px 0 4px;
  padding: 21px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-tertiary);
  font-size: 10.8px;
  line-height: 1.45;
  text-align: center;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.column-empty .icon {
  width: 19px;
  height: 19px;
  opacity: 0.65;
}

.column.is-drop-target .column-empty {
  border-color: color-mix(in srgb, var(--accent-column) 40%, transparent);
  background: color-mix(in srgb, var(--accent-column) 6%, transparent);
  color: var(--text-secondary);
}

.cards:has(.card-placeholder) .column-empty {
  display: none;
}

.column-add {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  margin: 0 8px 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11.2px;
  font-weight: 540;
  text-align: left;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.column-add .icon {
  width: 14px;
  height: 14px;
}

.column-add:hover {
  background: var(--surface-2);
  color: var(--text-secondary);
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: none;
  padding: 10px 11px 9px;
  border: 1px solid var(--card-border);
  border-radius: 11px;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  cursor: grab;
  touch-action: pan-y;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.card:focus-visible {
  border-color: var(--accent-border);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    var(--shadow-card);
}

.card.is-dragging {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 318px;
  margin: 0;
  cursor: grabbing;
  pointer-events: none;
  opacity: 0.98;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--accent-border);
  transition: none;
  will-change: transform;
}

:root[data-theme="light"] .card.is-dragging {
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.24),
    0 4px 14px rgba(15, 23, 42, 0.12),
    0 0 0 1px var(--accent-border);
}

.card-placeholder {
  flex: none;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 52%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  pointer-events: none;
  animation: placeholder-in 0.14s ease;
}

@keyframes placeholder-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.is-dragging {
  cursor: grabbing;
  user-select: none;
}

body.is-dragging .card:not(.is-dragging) {
  transition: none;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--priority-color) 18%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--priority-color) 10%, transparent);
  color: var(--priority-color);
  font-size: 8.8px;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1;
  text-transform: uppercase;
}

.priority-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.card-top-spacer {
  flex: 1;
}

.drag-handle,
.card-menu-btn {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-tertiary);
  opacity: 0;
  transition:
    opacity 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.drag-handle {
  cursor: grab;
  touch-action: none;
}

.drag-handle .icon,
.card-menu-btn .icon {
  width: 14px;
  height: 14px;
}

.drag-handle:hover,
.card-menu-btn:hover {
  background: var(--surface-2);
  color: var(--text-secondary);
}

.card:hover .drag-handle,
.card:hover .card-menu-btn,
.card:focus-within .drag-handle,
.card:focus-within .card-menu-btn {
  opacity: 1;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 12.8px;
  font-weight: 580;
  letter-spacing: -0.008em;
  line-height: 1.38;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-description {
  display: -webkit-box;
  overflow: hidden;
  margin-top: -1px;
  color: var(--text-secondary);
  font-size: 11.4px;
  font-weight: 420;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 1px;
}

.tag {
  display: inline-flex;
  align-items: center;
  max-width: 150px;
  height: 19px;
  padding: 0 6px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tag-color) 20%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--tag-color) 11%, transparent);
  color: var(--tag-color);
  font-size: 9.3px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-theme="light"] .tag,
:root[data-theme="light"] .selected-tag,
:root[data-theme="light"] .tag-suggestion {
  color: color-mix(in srgb, var(--tag-color) 40%, #111827);
}

:root[data-theme="light"] .priority-badge,
:root[data-theme="light"] .priority-option:has(input:checked) {
  color: color-mix(in srgb, var(--priority-color) 40%, #111827);
}

button.tag {
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

button.tag:hover {
  border-color: color-mix(in srgb, var(--tag-color) 40%, transparent);
  background: color-mix(in srgb, var(--tag-color) 18%, transparent);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  padding-top: 7px;
  border-top: 1px solid var(--border-faint);
}

.due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 10.1px;
  font-weight: 520;
  white-space: nowrap;
}

.due .icon {
  width: 11.5px;
  height: 11.5px;
}

.due.is-overdue {
  color: var(--danger);
}

.due.is-today {
  color: var(--warning);
}

.due.is-done {
  color: var(--success);
}

.card-key {
  flex: none;
  color: var(--text-quaternary);
  font-size: 9.2px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

/* ------------------------------------------------------------------ */
/* Adicionar coluna                                                    */
/* ------------------------------------------------------------------ */

.add-column {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 288px;
  gap: 8px;
  width: 288px;
  height: 46px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11.8px;
  font-weight: 550;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.add-column .icon {
  width: 15px;
  height: 15px;
}

.add-column:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Popovers / menus                                                    */
/* ------------------------------------------------------------------ */

.popover {
  position: fixed;
  z-index: 900;
  min-width: 208px;
  max-width: 320px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-popover);
  animation: pop-in 0.13s ease both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.2px;
  font-weight: 500;
  text-align: left;
}

.menu-item .icon {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
}

.menu-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.menu-item:hover .icon {
  color: var(--text-secondary);
}

.menu-item.is-danger {
  color: var(--danger);
}

.menu-item.is-danger .icon {
  color: currentColor;
}

.menu-item.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.menu-item:disabled {
  opacity: 0.35;
}

.menu-item:disabled:hover {
  background: transparent;
  color: var(--text-secondary);
}

.menu-item .menu-check {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--accent);
}

.menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: var(--border);
}

.menu-label {
  padding: 7px 9px 4px;
  color: var(--text-quaternary);
  font-size: 9.3px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.filter-popover {
  width: 312px;
  max-height: min(560px, calc(100dvh - 90px));
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

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

.popover-title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.link-btn {
  padding: 3px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}

.link-btn:hover {
  background: var(--accent-soft);
}

.link-btn:disabled {
  color: var(--text-quaternary);
}

.filter-group {
  padding: 11px 0;
  border-top: 1px solid var(--border-faint);
}

.filter-group-title {
  display: block;
  margin-bottom: 7px;
  color: var(--text-tertiary);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 520;
  transition:
    background-color 0.13s ease,
    border-color 0.13s ease,
    color 0.13s ease;
}

.filter-option:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.filter-option.is-active {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-option .dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--dot-color, currentColor);
}

.filter-option .tag-dot {
  width: 7px;
  height: 7px;
}

.filter-tags-empty {
  color: var(--text-tertiary);
  font-size: 10.8px;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Diálogos                                                            */
/* ------------------------------------------------------------------ */

.dialog {
  width: min(568px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(3, 4, 6, 0.64);
  -webkit-backdrop-filter: blur(7px) saturate(0.9);
  backdrop-filter: blur(7px) saturate(0.9);
  animation: backdrop-in 0.18s ease both;
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dialog[open] .dialog-card {
  animation: dialog-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dialog-sm {
  width: min(438px, calc(100vw - 32px));
}

.dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-modal);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: none;
  gap: 16px;
  padding: 20px 22px 0;
}

.dialog-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--text-tertiary);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.dialog-header h2 {
  font-size: 18px;
  font-weight: 660;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.dialog-header .icon-btn {
  margin: -5px -7px 0 0;
}

.dialog-body {
  padding: 18px 22px 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

.dialog-footer {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
  padding: 15px 22px 19px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-elevated) 92%, var(--bg));
}

.footer-spacer {
  flex: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11.3px;
  font-weight: 600;
  letter-spacing: -0.002em;
}

.field-label em {
  color: var(--danger);
  font-style: normal;
}

.field-label small {
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 450;
}

.field-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 13px;
}

.input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  border-color: var(--accent-border);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

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

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap .icon {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  pointer-events: none;
  transform: translateY(-50%);
}

.select {
  padding-right: 32px;
  appearance: none;
  cursor: pointer;
}

input[type="date"] {
  color-scheme: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
}

.priority-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.priority-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 10.8px;
  font-weight: 540;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease;
}

.priority-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.priority-option .priority-dot {
  background: var(--priority-color);
}

.priority-option:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.priority-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--priority-color) 38%, transparent);
  background: color-mix(in srgb, var(--priority-color) 11%, transparent);
  color: var(--priority-color);
}

.priority-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-editor:empty {
  display: none;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 23px;
  padding: 0 4px 0 7px;
  border: 1px solid color-mix(in srgb, var(--tag-color) 26%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--tag-color) 11%, transparent);
  color: var(--tag-color);
  font-size: 10.5px;
  font-weight: 600;
}

.selected-tag button {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: currentColor;
  opacity: 0.7;
}

.selected-tag button:hover {
  background: color-mix(in srgb, var(--tag-color) 16%, transparent);
  opacity: 1;
}

.selected-tag .icon {
  width: 11px;
  height: 11px;
}

.tag-add-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.tag-input {
  flex: 1;
  min-width: 100px;
  height: 34px;
}

.tag-palette {
  display: flex;
  flex: none;
  gap: 4px;
}

.swatch {
  position: relative;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch-color);
  transition: transform 0.12s ease;
}

.swatch:hover {
  transform: scale(1.16);
}

.swatch.is-active {
  border-color: var(--text);
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--surface-elevated);
}

.tag-add-button {
  flex: none;
  height: 34px;
  padding: 0 9px;
  font-size: 10.8px;
}

.tag-add-button .icon {
  width: 13px;
  height: 13px;
}

.tag-suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 20px;
  margin-top: 9px;
}

.suggestions-label {
  color: var(--text-tertiary);
  font-size: 9.7px;
  font-weight: 550;
}

.tag-suggestion {
  height: 20px;
  padding: 0 6px;
  border: 1px dashed var(--border-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--tag-color);
  font-size: 9.7px;
  font-weight: 550;
}

.tag-suggestion:hover {
  border-style: solid;
  border-color: color-mix(in srgb, var(--tag-color) 34%, transparent);
  background: color-mix(in srgb, var(--tag-color) 9%, transparent);
}

.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
}

.color-option {
  position: relative;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--color-value);
  transition:
    transform 0.13s ease,
    box-shadow 0.13s ease;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.is-selected {
  box-shadow:
    0 0 0 2px var(--surface-elevated),
    0 0 0 3.5px var(--color-value);
}

.color-option .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  color: #fff;
  stroke-width: 2.6;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.color-option.is-selected .icon {
  opacity: 1;
}

.confirm-card {
  width: 100%;
}

.confirm-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 22px 8px;
}

.confirm-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent);
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon .icon {
  width: 18px;
  height: 18px;
}

.confirm-body h2 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.confirm-body p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/* Toasts                                                              */
/* ------------------------------------------------------------------ */

.toasts {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  padding: 8px 9px 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-popover);
  color: var(--text);
  font-size: 11.8px;
  pointer-events: auto;
  animation: toast-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.is-leaving {
  animation: toast-out 0.16s ease forwards;
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

.toast-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}

.toast-icon.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast-icon .icon {
  width: 13px;
  height: 13px;
}

.toast-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-action {
  flex: none;
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 10.8px;
  font-weight: 650;
}

.toast-action:hover {
  background: var(--accent-soft);
}

.toast-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-tertiary);
}

.toast-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.toast-close .icon {
  width: 12px;
  height: 12px;
}

/* ------------------------------------------------------------------ */
/* Responsivo                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1160px) {
  .workspace-plan {
    display: none;
  }

  .search {
    width: min(320px, 30vw);
  }
}

@media (max-width: 920px) {
  .workspace-label {
    display: none;
  }

  .topbar-divider {
    display: none;
  }

  .shortcut-hint {
    display: none;
  }

  .column {
    flex-basis: 302px;
    width: 302px;
  }

  .add-column {
    flex-basis: 270px;
    width: 270px;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    gap: 9px 10px;
    padding: 10px 14px;
  }

  .topbar-spacer {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 6px;
  }

  .new-card-btn {
    width: 36px;
    padding: 0;
  }

  .new-card-btn span {
    display: none;
  }

  .search {
    order: 3;
    width: 100%;
    height: 37px;
  }

  .search input {
    font-size: 13px;
  }

  .search-kbd {
    display: none;
  }

  .board-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px 14px;
  }

  .title-row h1 {
    font-size: 23px;
  }

  .board-description {
    font-size: 12.3px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 0 0 auto;
  }

  #board-menu-button {
    margin-left: auto;
  }

  .board-toolbar {
    gap: 8px;
    padding: 0 16px 12px;
  }

  .board-stats {
    gap: 7px;
    font-size: 10.8px;
  }

  .active-filters {
    gap: 4px;
  }

  .active-filter {
    max-width: 160px;
    height: 22px;
    font-size: 9.8px;
  }

  .clear-filters {
    font-size: 9.8px;
  }

  .board {
    gap: 12px;
    padding: 0 16px 20px;
    scroll-snap-type: x proximity;
    scroll-padding-left: 16px;
  }

  .column {
    flex-basis: min(86vw, 330px);
    width: min(86vw, 330px);
    scroll-snap-align: start;
    border-radius: 14px;
  }

  .add-column {
    flex-basis: 240px;
    width: 240px;
    height: 44px;
  }

  .column-actions,
  .drag-handle,
  .card-menu-btn {
    opacity: 0.58;
  }

  .column-actions {
    opacity: 0.7;
  }

  .dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .dialog-card {
    max-height: calc(100dvh - 20px);
    border-radius: 15px;
  }

  .dialog-header {
    padding: 18px 18px 0;
  }

  .dialog-body {
    padding: 16px 18px 6px;
  }

  .dialog-footer {
    padding: 14px 18px 17px;
  }

  .toasts {
    bottom: 14px;
  }
}

@media (max-width: 540px) {
  .brand-name {
    font-size: 13.5px;
  }

  .theme-btn {
    width: 34px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .priority-picker {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .tag-input {
    flex-basis: 100%;
  }

  .tag-palette {
    margin-left: 1px;
  }

  .tag-add-button {
    margin-left: auto;
  }

  .dialog-footer {
    flex-wrap: wrap;
  }

  .dialog-footer .btn-primary,
  .dialog-footer #card-submit-button,
  .dialog-footer #column-submit-button {
    flex: 1;
  }

  .confirm-body {
    padding: 20px 18px 6px;
  }

  .active-filters {
    display: none;
  }

  .dialog-footer .btn-danger-ghost {
    order: 4;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
