:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --bg: #090c12;
  --surface: #10151e;
  --surface-raised: #151b26;
  --surface-soft: #0d1118;
  --line: rgba(183, 204, 231, 0.12);
  --line-strong: rgba(183, 204, 231, 0.2);
  --text: #edf3fa;
  --muted: #8895a7;
  --muted-strong: #b3bfce;
  --cyan: #55e6d3;
  --violet: #a992ff;
  --orange: #ffad68;
  --green: #72e4a6;
  --red: #ff6f87;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgba(85, 230, 211, 0.07), transparent 28rem),
    radial-gradient(circle at 95% 0%, rgba(169, 146, 255, 0.08), transparent 32rem),
    var(--bg);
}

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

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.56;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

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

.noise {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(85, 230, 211, 0.4);
  border-radius: 9px;
  background: rgba(85, 230, 211, 0.08);
  box-shadow: inset 0 0 18px rgba(85, 230, 211, 0.05);
}

.brand-mark span {
  position: absolute;
  width: 2px;
  height: 13px;
  border-radius: 2px;
  background: var(--cyan);
}

.brand-mark span:first-child {
  transform: translateX(-5px) rotate(-28deg);
}

.brand-mark span:nth-child(2) {
  height: 17px;
}

.brand-mark span:last-child {
  transform: translateX(5px) rotate(28deg);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.17em;
}

.login-view {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.login-card {
  position: relative;
  width: min(100%, 520px);
  overflow: hidden;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(150deg, rgba(20, 27, 39, 0.97), rgba(11, 15, 22, 0.98));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
}

.login-card::after {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--violet);
  content: "";
  filter: blur(110px);
  opacity: 0.13;
  pointer-events: none;
}

.brand-login {
  margin-bottom: 68px;
}

.login-copy h1,
.workspace-header h1 {
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 4.7rem);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.login-copy > p:last-child {
  max-width: 390px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 17px;
}

.login-form label,
.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-form small {
  color: #667386;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: rgba(5, 8, 13, 0.68);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input,
select {
  height: 47px;
  padding: 0 14px;
}

textarea {
  min-height: 110px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #566173;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(85, 230, 211, 0.56);
  background: rgba(8, 13, 20, 0.95);
  box-shadow: 0 0 0 3px rgba(85, 230, 211, 0.08);
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 11px;
  font-weight: 720;
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--cyan);
  color: #06100f;
  background: var(--cyan);
  box-shadow: 0 10px 32px rgba(85, 230, 211, 0.12);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 38px rgba(85, 230, 211, 0.18);
}

.full-button {
  width: 100%;
  margin-top: 4px;
}

.full-button span {
  margin-left: auto;
  font-size: 1.2rem;
}

.secondary-button {
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  color: var(--muted-strong);
  background: var(--surface-raised);
}

.danger-button {
  padding: 0 15px;
  border: 1px solid rgba(255, 111, 135, 0.3);
  color: #ff94a6;
  background: rgba(255, 111, 135, 0.08);
}

.text-button {
  padding: 0 12px;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
}

.link-button {
  text-decoration: none;
}

.form-error {
  min-height: 1.2em;
  margin: 0;
  color: #ff8ca0;
  font-size: 0.82rem;
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 25px 0 0;
  color: #667386;
  font-size: 0.73rem;
}

.secure-note span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(114, 228, 166, 0.6);
}

.app-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 18, 0.8);
  backdrop-filter: blur(22px);
}

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

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

#sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(114, 228, 166, 0.5);
}

#sync-dot[data-state="syncing"] {
  background: var(--orange);
}

#sync-dot[data-state="offline"] {
  background: var(--red);
}

.icon-button,
.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  background: rgba(16, 21, 30, 0.86);
}

.icon-button {
  border-radius: 10px;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.avatar {
  border-color: rgba(169, 146, 255, 0.35);
  border-radius: 50%;
  color: #ddd5ff;
  background: rgba(169, 146, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-menu {
  position: relative;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #121821;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.4);
}

.profile-popover p {
  margin: 4px 6px 11px;
  color: var(--muted);
  font-size: 0.75rem;
}

.profile-popover button {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted-strong);
  background: transparent;
  text-align: left;
}

.profile-popover button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.workspace {
  width: min(1800px, 100%);
  margin: 0 auto;
  padding: 48px 32px 60px;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 42px;
}

.workspace-header h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.workspace-subtitle {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.header-stats {
  display: flex;
  flex: none;
  gap: 10px;
}

.header-stats > div {
  display: grid;
  min-width: 92px;
  gap: 3px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(16, 21, 30, 0.65);
}

.header-stats strong {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.15rem;
}

.header-stats span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 680;
}

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

.search-control {
  position: relative;
  display: flex;
  max-width: 440px;
  flex: 1;
  align-items: center;
}

.search-control svg {
  position: absolute;
  left: 14px;
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-control input {
  padding-right: 60px;
  padding-left: 42px;
  background: rgba(16, 21, 30, 0.7);
}

.search-control kbd {
  position: absolute;
  right: 10px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #6f7c8e;
  background: rgba(255, 255, 255, 0.025);
  font-family: inherit;
  font-size: 0.68rem;
}

.select-control {
  width: 150px;
}

.select-control select {
  background: rgba(16, 21, 30, 0.7);
}

.toolbar .primary-button {
  margin-left: auto;
}

.filter-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.77rem;
}

.filter-note button {
  margin-left: 6px;
  border: 0;
  color: var(--cyan);
  background: transparent;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 13px;
  align-items: start;
}

.board-column {
  min-width: 0;
  padding: 14px 10px 10px;
  border: 1px solid rgba(183, 204, 231, 0.08);
  border-radius: 17px;
  background: rgba(12, 16, 23, 0.66);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px 15px;
}

.column-header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.column-header h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.column-signal {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.signal-violet {
  color: var(--violet);
  background: var(--violet);
}

.signal-cyan {
  color: var(--cyan);
  background: var(--cyan);
}

.signal-orange {
  color: var(--orange);
  background: var(--orange);
}

.signal-green {
  color: var(--green);
  background: var(--green);
}

.column-count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 6px;
  color: #758295;
  background: rgba(255, 255, 255, 0.04);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.65rem;
}

.column-add {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #6f7c8e;
  background: transparent;
  font-size: 1.15rem;
}

.column-add:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.column-body {
  display: grid;
  min-height: 180px;
  align-content: start;
  gap: 9px;
  border-radius: 12px;
  transition: background 160ms ease;
}

.column-body.drop-ready {
  min-height: 260px;
}

.column-body.drag-over {
  background: rgba(85, 230, 211, 0.035);
}

.task-card {
  position: relative;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(150deg, rgba(22, 28, 40, 0.98), rgba(15, 20, 29, 0.98));
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.13);
  cursor: grab;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    opacity 150ms ease;
}

.task-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: #708095;
  content: "";
  opacity: 0.75;
}

.task-card.priority-high::before {
  background: var(--orange);
}

.task-card.priority-urgent::before {
  background: var(--red);
  box-shadow: 0 0 15px rgba(255, 111, 135, 0.5);
}

.task-card.priority-low::before {
  background: #687488;
  opacity: 0.45;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.task-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.category-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(169, 146, 255, 0.17);
  border-radius: 6px;
  color: #b9abef;
  background: rgba(169, 146, 255, 0.07);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.075em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.task-edit {
  width: 27px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  color: #687588;
  background: transparent;
  letter-spacing: 0.1em;
}

.task-edit:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.task-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
  font-weight: 670;
  letter-spacing: -0.018em;
  line-height: 1.35;
}

.task-description {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.task-tag {
  color: #69778b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.62rem;
}

.task-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 17px;
}

.priority-label,
.due-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #748195;
  font-size: 0.64rem;
  font-weight: 680;
}

.priority-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #708095;
}

.priority-high .priority-dot {
  background: var(--orange);
}

.priority-urgent .priority-dot {
  background: var(--red);
}

.priority-low .priority-dot {
  background: #586478;
}

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

.due-date svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.due-date.due-today {
  color: var(--orange);
}

.due-date.overdue {
  color: var(--red);
}

.empty-column {
  display: grid;
  min-height: 140px;
  place-content: center;
  place-items: center;
  border: 1px dashed rgba(183, 204, 231, 0.08);
  border-radius: 12px;
  color: #4c5869;
}

.empty-column span {
  font-size: 1.2rem;
}

.empty-column p {
  margin: 8px 0 0;
  font-size: 0.7rem;
}

.modal {
  width: min(calc(100% - 28px), 680px);
  max-height: min(90vh, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text);
  background: #111720;
  box-shadow: 0 45px 150px rgba(0, 0, 0, 0.68);
}

.modal::backdrop {
  background: rgba(3, 5, 9, 0.74);
  backdrop-filter: blur(9px);
}

.modal form,
.archive-modal > section,
.users-modal > section {
  padding: 28px;
}

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

.modal-header h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.modal-header > div > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 1.35rem;
  line-height: 1;
}

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

.form-grid .wide-field {
  grid-column: 1 / -1;
}

.form-grid small {
  color: #667386;
  font-weight: 500;
}

.modal .form-error {
  margin-top: 14px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.modal-footer > div {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.archive-modal {
  width: min(calc(100% - 28px), 760px);
}

.users-modal {
  width: min(calc(100% - 28px), 880px);
}

.password-modal {
  width: min(calc(100% - 28px), 540px);
}

.single-column {
  grid-template-columns: 1fr;
}

.users-list {
  display: grid;
  max-height: 300px;
  gap: 8px;
  overflow: auto;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 15, 0.35);
}

.user-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(85, 230, 211, 0.2);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(85, 230, 211, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-identity h3 {
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.role-badge,
.account-status {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.role-badge {
  color: #b9abef;
}

.account-status {
  color: var(--green);
}

.account-status.disabled {
  color: var(--red);
}

.user-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.mini-button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.66rem;
  font-weight: 680;
}

.mini-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.mini-button.danger {
  color: #e88da0;
}

.current-user-label {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.64rem;
}

.add-user-form {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 10, 15, 0.35);
}

.section-label {
  margin-bottom: 15px;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.user-form-grid {
  grid-template-columns: 1fr 1.25fr 0.8fr;
}

.form-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
}

.modal-hint {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.archive-list {
  display: grid;
  max-height: 48vh;
  gap: 8px;
  overflow: auto;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 15, 0.35);
}

.archive-item h3 {
  margin: 8px 0 3px;
  font-size: 0.9rem;
}

.archive-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.archive-empty,
.archive-loading {
  display: grid;
  min-height: 260px;
  place-content: center;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.archive-empty > span {
  color: var(--violet);
  font-size: 2rem;
}

.archive-empty h3 {
  margin: 13px 0 5px;
  color: var(--text);
}

.archive-empty p {
  margin: 0;
  font-size: 0.8rem;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 17px;
  transform: translateY(25px);
  border: 1px solid rgba(114, 228, 166, 0.28);
  border-radius: 11px;
  color: #bcefd2;
  background: rgba(16, 30, 25, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast[data-mode="error"] {
  border-color: rgba(255, 111, 135, 0.3);
  color: #ffc0cb;
  background: rgba(39, 18, 24, 0.97);
}

@media (max-width: 1180px) {
  .board {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 62px;
    padding: 0 18px;
  }

  .sync-state {
    display: none;
  }

  .workspace {
    padding: 34px 18px 45px;
  }

  .workspace-header {
    display: block;
    margin-bottom: 31px;
  }

  .workspace-header h1 {
    font-size: 3rem;
  }

  .header-stats {
    margin-top: 24px;
  }

  .header-stats > div {
    min-width: 0;
    flex: 1;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .search-control {
    max-width: none;
    flex-basis: 100%;
  }

  .search-control kbd {
    display: none;
  }

  .select-control {
    flex: 1;
  }

  .toolbar .primary-button {
    margin-left: 0;
  }

  .board {
    grid-template-columns: repeat(4, minmax(82vw, 1fr));
    margin-right: -18px;
    padding-right: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .board-column {
    scroll-snap-align: start;
  }

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

  .form-grid .wide-field {
    grid-column: auto;
  }

  .modal form,
  .archive-modal > section,
  .users-modal > section {
    padding: 22px 18px;
  }

  .user-form-grid {
    grid-template-columns: 1fr;
  }

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

  .user-actions {
    justify-content: flex-start;
  }

  .archive-item {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .login-view {
    padding: 0;
  }

  .login-card {
    min-height: 100vh;
    padding: 30px 23px;
    border: 0;
    border-radius: 0;
  }

  .brand-login {
    margin-bottom: 74px;
  }

  .topbar .brand > span:last-child {
    display: none;
  }

  .header-stats > div {
    padding: 12px;
  }

  .toolbar .primary-button {
    padding: 0 13px;
  }

  .modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-footer > div {
    width: 100%;
    margin-left: 0;
  }

  .modal-footer > div > * {
    flex: 1;
  }

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

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