:root {
  --bg: #f7f4ec;
  --ink: #1c2a2a;
  --ink-soft: #425151;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --line: rgba(35, 52, 52, 0.12);
  --teal: #0f7b79;
  --teal-soft: #dcf3f2;
  --amber: #d88a1d;
  --amber-soft: #fff3dc;
  --accent: #0f7b79;
  --accent-soft: #dcf3f2;
  --shadow: 0 14px 34px rgba(16, 41, 41, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 12%, rgba(216, 138, 29, 0.12), transparent 38%),
    radial-gradient(circle at 91% 4%, rgba(15, 123, 121, 0.1), transparent 34%),
    linear-gradient(175deg, #f8f3e6 0%, #f9f7f0 45%, #edf5f4 100%);
  padding: 20px clamp(12px, 2.5vw, 32px) 28px;
  overflow-x: hidden;
  transition: background 0.35s ease;
}

body.theme-auto {
  --accent: #0f7b79;
  --accent-soft: #dcf3f2;
  background:
    radial-gradient(circle at 7% 12%, rgba(111, 184, 170, 0.19), transparent 38%),
    radial-gradient(circle at 91% 4%, rgba(15, 123, 121, 0.14), transparent 34%),
    linear-gradient(175deg, #eef8f4 0%, #f1f9f7 50%, #eef5f7 100%);
}

body.theme-moto {
  --accent: #c97823;
  --accent-soft: #ffeacc;
  background:
    radial-gradient(circle at 7% 12%, rgba(235, 160, 84, 0.18), transparent 38%),
    radial-gradient(circle at 91% 4%, rgba(221, 139, 59, 0.13), transparent 34%),
    linear-gradient(175deg, #fff7ed 0%, #fff4e6 48%, #fff9f0 100%);
}

body.theme-archive {
  --accent: #6b7a7f;
  --accent-soft: #e8edf0;
  background:
    radial-gradient(circle at 8% 16%, rgba(112, 129, 143, 0.13), transparent 34%),
    radial-gradient(circle at 90% 6%, rgba(154, 169, 178, 0.12), transparent 34%),
    linear-gradient(175deg, #f2f5f6 0%, #f6f9fa 50%, #eef1f3 100%);
}

.bg-glow {
  position: fixed;
  pointer-events: none;
  filter: blur(34px);
  z-index: 0;
}

.bg-glow-1 {
  width: 360px;
  height: 360px;
  background: rgba(216, 138, 29, 0.18);
  top: -90px;
  left: -120px;
}

.bg-glow-2 {
  width: 420px;
  height: 420px;
  background: rgba(15, 123, 121, 0.13);
  right: -140px;
  top: -100px;
}

.topbar,
.toolbar,
.main {
  position: relative;
}

.topbar {
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.brand-title {
  margin: 2px 0 0;
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

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

.board-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.board-tabs,
.view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(31, 49, 49, 0.1);
  backdrop-filter: blur(8px);
}

.tab-btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(15, 123, 121, 0.12);
  color: var(--ink);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent), white 17%));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in oklab, var(--accent), transparent 72%);
}

.archive-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: #173233;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(36, 58, 58, 0.14);
  cursor: pointer;
  transition: all 0.2s ease;
}

.archive-btn:hover {
  transform: translateY(-1px);
}

.archive-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #6f7f85, #85969b);
  box-shadow: 0 10px 22px rgba(57, 74, 82, 0.25);
}

.session-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.admin-link,
.logout-btn {
  border: 1px solid rgba(31, 49, 49, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1f3d3d;
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.admin-link {
  background: color-mix(in oklab, var(--accent-soft), #ffffff 45%);
}

.user-menu-wrap {
  position: relative;
}

.user-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(31, 49, 49, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(18, 39, 39, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(18, 39, 39, 0.18);
}

.user-menu-btn.open {
  border-color: color-mix(in oklab, var(--accent), transparent 45%);
}

.user-menu-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
}

.user-menu-icon::before,
.user-menu-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #315050;
}

.user-menu-icon::before {
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.user-menu-icon::after {
  bottom: 0;
  width: 13px;
  height: 8px;
  border-radius: 999px 999px 7px 7px;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(31, 49, 49, 0.14);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 30px rgba(13, 28, 28, 0.2);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 120;
}

.user-menu-login {
  border: 1px solid rgba(31, 49, 49, 0.1);
  border-radius: 10px;
  background: #f6fbfb;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2f4444;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.toolbar {
  z-index: 10;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.create-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent), black 6%));
  cursor: pointer;
  box-shadow: 0 10px 22px color-mix(in oklab, var(--accent), transparent 75%);
}

.search-box {
  width: min(540px, 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 0.95rem;
  padding: 12px 14px;
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: color-mix(in oklab, var(--accent), transparent 55%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 83%);
}

.meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.main {
  z-index: 1;
  margin-top: 14px;
}

.kanban-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.kanban-column {
  flex: 0 0 clamp(212px, 27vw, 302px);
  min-width: clamp(212px, 27vw, 302px);
  max-width: clamp(212px, 27vw, 302px);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(25, 45, 45, 0.11);
  border-radius: 16px;
  padding: 11px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  overflow: hidden;
}

.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  min-width: 0;
}

.column-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-title.tight {
  letter-spacing: -0.01em;
}

.column-count {
  font-size: 0.8rem;
  background: var(--accent-soft);
  color: color-mix(in oklab, var(--accent), black 20%);
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 700;
}

.column-body {
  min-height: 80px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.column-body.drop-over {
  outline: 2px dashed color-mix(in oklab, var(--accent), transparent 50%);
  outline-offset: 2px;
  border-radius: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(31, 49, 49, 0.12);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: rise-in 0.34s ease both;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(22, 42, 42, 0.13);
}

.card.is-dragging {
  opacity: 0.55;
  transform: rotate(1deg);
}

.card-cover {
  width: 100%;
  max-height: 144px;
  border-radius: 10px;
  object-fit: cover;
  background: #e8efef;
}

.label-strips {
  display: flex;
  gap: 5px;
  margin-bottom: 2px;
}

.label-strip {
  height: 8px;
  min-width: 34px;
  border-radius: 999px;
}

.card-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.tag {
  max-width: 100%;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 3px 8px;
  font-weight: 700;
  background: var(--amber-soft);
  color: #8a4e00;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tag.muted {
  background: #eef3f3;
  color: #4b6464;
}

.table-wrap {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(31, 49, 49, 0.09);
  font-size: 0.9rem;
  vertical-align: top;
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: rgba(248, 251, 251, 0.88);
  position: sticky;
  top: 0;
}

tr {
  cursor: pointer;
}

tr:hover {
  background: color-mix(in oklab, var(--accent), transparent 92%);
}

.empty-state {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-state h3 {
  margin: 0;
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 19, 19, 0.56);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: absolute;
  inset: 4% clamp(12px, 4vw, 48px);
  background: #fff;
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 28px 60px rgba(8, 17, 17, 0.34);
  animation: modal-in 0.22s ease both;
}

.modal-close {
  position: sticky;
  top: 8px;
  left: calc(100% - 48px);
  margin: 10px 10px 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: #f0f5f5;
  color: #274141;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-content {
  padding: 8px clamp(14px, 2.2vw, 26px) 24px;
}

.modal-header {
  display: grid;
  gap: 6px;
}

.modal-title {
  margin: 0;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  line-height: 1.2;
}

.modal-title-input {
  width: 100%;
  border: 1px solid rgba(31, 49, 49, 0.18);
  border-radius: 10px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 800;
  background: #fff;
  color: var(--ink);
}

.modal-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.label-editor {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.label-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  z-index: 4;
  width: min(320px, calc(100vw - 56px));
  max-height: 240px;
  overflow: auto;
  border: 1px solid rgba(31, 49, 49, 0.15);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 16px 28px rgba(14, 28, 28, 0.17);
  display: grid;
  gap: 6px;
}

.label-menu.hidden {
  display: none;
}

.label-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.label-option input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
}

.modal-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-form {
  margin-top: 12px;
  border: 1px solid rgba(31, 49, 49, 0.13);
  border-radius: 12px;
  background: #f9fcfc;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.edit-field {
  display: grid;
  gap: 4px;
}

.edit-field label {
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edit-field input,
.edit-field textarea,
.edit-field select {
  border: 1px solid rgba(31, 49, 49, 0.2);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
}

.edit-field textarea {
  min-height: 72px;
  resize: vertical;
}

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

.btn {
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 9px 12px;
}

.btn.archive {
  background: var(--accent);
  color: #fff;
}

.btn.link {
  background: #ecf4f4;
  color: #154343;
  text-decoration: none;
}

.btn.danger-soft {
  background: #fce6e5;
  color: #7a1313;
}

.btn.danger-hard {
  background: #d83f3f;
  color: #fff;
}

.danger-menu {
  position: relative;
}

.danger-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(31, 49, 49, 0.16);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #304141;
  background: #f5f9f9;
}

.danger-menu summary::-webkit-details-marker {
  display: none;
}

.danger-menu[open] {
  padding-bottom: 4px;
}

.danger-menu .btn.danger-soft {
  margin-top: 8px;
}

.danger-menu .btn.danger-hard {
  margin-top: 8px;
}

.modal-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}

.right-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel {
  background: #fbfdfd;
  border: 1px solid rgba(31, 49, 49, 0.12);
  border-radius: 13px;
  padding: 12px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.field-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.field-item {
  border-bottom: 1px dashed rgba(31, 49, 49, 0.15);
  padding-bottom: 7px;
}

.field-name {
  font-size: 0.76rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-value {
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  word-break: break-word;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.kv-item {
  border: 1px solid rgba(31, 49, 49, 0.14);
  background: #fff;
  border-radius: 10px;
  padding: 7px 8px;
  min-height: 56px;
}

.kv-label {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.kv-value {
  margin-top: 3px;
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-word;
}

.inline-input,
.inline-select,
.inline-textarea {
  margin-top: 4px;
  width: 100%;
  border: 1px solid rgba(31, 49, 49, 0.2);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: #1f3030;
}

.inline-textarea {
  min-height: 88px;
  resize: vertical;
}

.inline-input:focus,
.inline-select:focus,
.inline-textarea:focus,
.modal-title-input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent), transparent 58%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 82%);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(31, 49, 49, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

.check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.attachment {
  border: 1px solid rgba(31, 49, 49, 0.13);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.attachment img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
}

.attachment a {
  display: block;
  text-decoration: none;
  color: #173f3f;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-actions {
  padding: 0 7px 7px;
}

.attachment .btn.link {
  width: 100%;
  text-align: center;
  font-size: 0.73rem;
  padding: 6px 8px;
}

.attachment .btn.link:disabled {
  opacity: 0.7;
  cursor: default;
}

.desc-box {
  margin: 0;
  color: #253838;
  white-space: pre-wrap;
  font-size: 0.92rem;
}

.checklist {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
}

.mode-hero {
  margin-top: 6px;
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.create-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(8, 14, 14, 0.48);
  display: grid;
  place-items: center;
  padding: 14px;
}

.create-dialog {
  width: min(480px, 100%);
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(31, 49, 49, 0.18);
  box-shadow: 0 24px 54px rgba(10, 20, 20, 0.26);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.create-dialog h3 {
  margin: 0;
  font-size: 1.05rem;
}

.create-dialog .edit-field > span {
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.archive-pick-helper {
  margin: -2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.archive-list-pick {
  display: grid;
  gap: 8px;
}

.archive-list-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(31, 49, 49, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3333;
  background: #f7fbfb;
  cursor: pointer;
}

.archive-list-btn:hover {
  background: color-mix(in oklab, var(--accent-soft), #ffffff 45%);
  border-color: color-mix(in oklab, var(--accent), transparent 55%);
}

.archive-list-btn.recommended {
  border-color: color-mix(in oklab, var(--accent), transparent 35%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent), transparent 52%);
}

.move-board-row {
  display: flex;
  gap: 8px;
}

.move-board-btn {
  flex: 1;
  border: 1px solid rgba(31, 49, 49, 0.2);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: #274141;
  background: #f3f8f8;
  cursor: pointer;
}

.move-board-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent), white 16%));
  border-color: transparent;
}

.attachment-viewer {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(9, 16, 16, 0.76);
  display: grid;
  place-items: center;
  padding: 12px;
}

.attachment-viewer-stage {
  position: relative;
  width: min(1240px, 96vw);
  height: min(90vh, 980px);
  border-radius: 14px;
  background: rgba(11, 20, 20, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-viewer-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.av-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(22, 38, 38, 0.36);
  color: #fff;
  font-family: inherit;
  font-size: 1.22rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(7px);
  cursor: pointer;
}

.av-btn:hover {
  background: rgba(22, 38, 38, 0.6);
}

.attachment-viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  transition: transform 0.24s ease;
}

.attachment-viewer-image.zoomed {
  cursor: zoom-out;
  transition: transform 0.16s ease;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: start;
  }

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

@media (max-width: 760px) {
  body {
    padding: 12px 10px 18px;
  }

  .kanban-column {
    min-width: 80vw;
    max-width: 80vw;
  }

  .tab-btn {
    padding: 9px 10px;
    font-size: 0.84rem;
  }

  .modal-panel {
    inset: 2% 8px;
    border-radius: 14px;
  }

  .av-btn {
    width: 40px;
    height: 40px;
    font-size: 1.08rem;
  }
}
