:root {
  --ink: #182230;
  --muted: #6b7280;
  --line: #d7dce4;
  --line-strong: #b9c3d2;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --panel: #f7f9fc;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --green: #0f8b6f;
  --coral: #f26d5b;
  --violet: #7c3aed;
  --danger: #b91c1c;
  --shadow: 0 18px 48px rgba(24, 34, 48, 0.14);
  --shadow-soft: 0 8px 24px rgba(24, 34, 48, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e9edf5;
}

body.dark-mode {
  --ink: #e5e7eb;
  --muted: #9ca3af;
  --line: #374151;
  --line-strong: #4b5563;
  --surface: #171717;
  --surface-soft: #222222;
  --panel: #111111;
  --blue: #9ca3af;
  --blue-soft: #2b2b2b;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.34);
  background: #0f0f0f;
}

body.dark-mode button,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #1f1f1f;
  color: var(--ink);
  border-color: var(--line);
}

body.dark-mode button:hover {
  border-color: #6b7280;
  background: #292929;
  box-shadow: none;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 8px rgba(24, 34, 48, 0.08);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.startup-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  align-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 25% 22%, rgba(33, 191, 243, 0.14), transparent 22%),
    radial-gradient(circle at 72% 24%, rgba(255, 93, 167, 0.1), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #f6f8fb 54%, #eef4fb 100%);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.startup-loader .brand-logo {
  width: 84px;
  height: 84px;
}

body.booting .startup-loader,
body.loading-workspace .startup-loader {
  display: grid;
}

body.loading-workspace .alpha-gate {
  visibility: hidden;
}

.alpha-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #fffaf7 url("./assets/brand/fondo-login.png?v=trazzo-ui-simplify-34") center / cover no-repeat;
  overflow: hidden;
}

.alpha-gate::before,
.alpha-gate::after {
  content: none;
}

.alpha-gate::before {
  width: 260px;
  height: 150px;
  left: 7vw;
  top: 16vh;
  transform: rotate(-7deg);
}

.alpha-gate::after {
  width: 300px;
  height: 170px;
  right: 7vw;
  bottom: 13vh;
  transform: rotate(6deg);
}

.alpha-gate.hidden {
  display: none;
}

body.auth-mode .app-shell,
body.booting .app-shell,
body.loading-workspace .app-shell {
  visibility: hidden;
}

body.auth-mode .active-users,
body.auth-mode .save-status,
body.booting .active-users,
body.booting .save-status,
body.loading-workspace .active-users,
body.loading-workspace .save-status {
  display: none;
}

.alpha-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.alpha-panel .brand-mark {
  width: 42px;
  height: 42px;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(24, 34, 48, 0.16));
}

.brand-logo-large {
  width: 76px;
  height: 76px;
}

.alpha-panel h1 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.05;
}

.alpha-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.auth-form input {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

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

.signup-plan {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.signup-plan input {
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.signup-plan span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.signup-plan strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.signup-plan small {
  color: #64748b;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.25;
}

.signup-plan:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.signup-plan.locked {
  cursor: not-allowed;
  opacity: 0.56;
}

.signup-plan.locked strong::after {
  content: " Bloqueado";
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.alpha-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.alpha-actions button {
  flex: 1;
}

.auth-link-button {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.auth-link-button:hover {
  background: transparent;
  box-shadow: none;
  color: #1d4ed8;
}

.auth-message {
  min-height: 18px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.auth-message.error {
  color: #b91c1c;
}

.secondary-actions {
  margin-top: 0;
}

.alpha-notice {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  display: none;
  padding: 7px 10px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transform: translateX(-50%);
  pointer-events: none;
}

.alpha-notice.show {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 64px 1fr;
  width: 100vw;
  height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.1;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.board-controls {
  display: flex;
  flex: 0 1 456px;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 456px;
}

.board-title {
  flex: 0 1 220px;
  min-width: 130px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 700;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-title:focus {
  box-shadow: inset 0 0 0 2px #b8cdfb;
}

.shared-board-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.shared-board-indicator[hidden] {
  display: none;
}

.shared-board-indicator svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#newBoardBtn {
  display: none !important;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.top-menu-combo {
  position: relative;
  flex: 0 0 auto;
}

.top-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 28;
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.top-menu-popover.visible {
  display: grid;
}

.board-options-menu {
  position: relative;
  flex: 0 0 auto;
}

.board-options-popover {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 28;
  display: none;
  min-width: 230px;
  padding: 8px;
  border: 1px solid rgba(195, 198, 215, 0.7);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 28, 48, 0.12);
  backdrop-filter: none;
}

.board-options-menu.open .board-options-popover {
  display: grid;
  gap: 6px;
}

.board-options-popover button {
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 450;
  text-align: left;
}

.board-options-popover button:hover {
  border-color: var(--line);
  background: #f8fafc;
}

.board-options-divider {
  height: 1px;
  margin: 3px 0;
  background: var(--line);
}

.version-submenu {
  display: grid;
  gap: 6px;
  padding: 6px 2px 0;
}

.version-submenu > span {
  padding: 0 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 450;
}

.version-submenu #versionList {
  display: grid;
  gap: 6px;
}

.top-actions select {
  width: clamp(120px, 14vw, 170px);
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.ghost-button {
  color: #475569;
}

.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

#presentBtn {
  border-color: rgba(195, 198, 215, 0.7);
  background: #ffffff;
  color: var(--tds-on-surface);
  box-shadow: none;
}

#presentBtn:hover {
  border-color: #b0b8c8;
  background: #f1f5f9;
  color: var(--tds-on-surface);
}

.ghost-button.icon-only {
  display: grid;
  width: 36px;
  padding: 0;
  place-items: center;
}

.ghost-button.labeled-button {
  padding: 0 13px 0 11px;
}

.ghost-button.labeled-button span {
  font-size: 13px;
}

.ghost-button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.ghost-button svg,
.primary-button svg,
.canvas-toolbar button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.profile-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border-color: #d8dee8;
  background: #182230;
  color: white;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(24, 34, 48, 0.16);
  overflow: hidden;
}

.profile-button.has-alert::after {
  content: attr(data-count);
  position: absolute;
  right: -3px;
  top: -3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #f26d5b;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
}

.profile-button:hover {
  background: #263241;
  box-shadow: 0 8px 18px rgba(24, 34, 48, 0.18);
}

.feedback-button {
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 550;
}

.profile-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 24;
  display: none;
  width: 210px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(24, 34, 48, 0.18);
}

.profile-menu.open .profile-popover {
  display: grid;
  gap: 6px;
}

.profile-popover strong,
.profile-popover > span {
  display: none;
}

.profile-popover button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 450;
}

.profile-popover button:hover {
  background: var(--surface-soft);
  box-shadow: none;
}

.invitation-list {
  position: static;
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.invitation-title {
  padding: 0;
  color: #334155;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.invitation-card {
  display: grid;
  gap: 8px;
}

.invitation-card p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.invitation-card div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.profile-popover .invitation-card button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  text-align: center;
  font-size: 12px;
}

.profile-popover .invitation-card button:first-child {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

#shareBtn {
  display: inline-flex !important;
  flex: 0 0 auto;
}

.toolrail {
  position: fixed;
  left: 18px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  grid-row: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-height: calc(100vh - 112px);
  padding: 10px;
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.62);
  border-radius: 8px;
  background: rgba(216, 222, 232, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(24, 34, 48, 0.14);
  z-index: 6;
}

.tool {
  display: grid;
  position: relative;
  width: 44px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
}

.ghost-button.icon-only svg,
.canvas-toolbar button svg,
.tool svg,
.tool-menu button svg {
  display: block;
  margin: auto;
}

.tool[hidden] {
  display: none !important;
}

.tool svg,
.tool-menu button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tool.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.tool.active::before {
  content: "";
  position: absolute;
  left: -9px;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue);
}

.ui-staging,
.sidepanel {
  grid-column: 2;
  grid-row: 2;
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
  z-index: 4;
  scrollbar-width: thin;
}

.sidepanel.hidden {
  display: none;
}

.ui-staging {
  display: none;
}

.sidepanel .template-section {
  display: none;
}

.sidepanel .settings-section {
  display: none;
}

.sidepanel .facilitation-section,
.sidepanel .presentation-section,
.sidepanel .versions-section,
.sidepanel .activity-section {
  display: none;
}

.sidepanel .color-property-section {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sidepanel section + section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

h2 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #475569;
}

.timer-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

#timerDisplay {
  display: block;
  margin-bottom: 12px;
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.timer-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panel-actions {
  grid-template-columns: 1fr 1fr;
}

.panel-actions {
  margin-top: 12px;
}

.timer-controls button,
.template-grid button,
.template-actions button {
  min-height: 36px;
  border-radius: 8px;
  font-weight: 700;
  background: var(--surface);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.template-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
}

.template-tabs button {
  min-width: max-content;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.template-tabs button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.template-card {
  display: grid;
  grid-template-columns: 1fr 78px;
  grid-template-rows: auto auto;
  gap: 3px 10px;
  min-height: 82px;
  padding: 10px;
  text-align: left;
  background: var(--surface);
}

.template-card.active {
  border-color: var(--blue);
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.template-card span {
  align-self: end;
  font-weight: 900;
}

.template-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.preview {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: block;
  width: 78px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: #f8fafc;
}

.retro-preview {
  background-image:
    linear-gradient(90deg, #bdf7d2 0 28%, transparent 28% 36%, #ffd8a8 36% 64%, transparent 64% 72%, #c7d2fe 72%),
    linear-gradient(#ffffff 0 0);
}

.journey-preview {
  background-image:
    radial-gradient(circle at 16px 18px, #2563eb 0 5px, transparent 6px),
    radial-gradient(circle at 38px 32px, #0f8b6f 0 5px, transparent 6px),
    radial-gradient(circle at 60px 20px, #f26d5b 0 5px, transparent 6px),
    linear-gradient(25deg, transparent 45%, #94a3b8 46% 52%, transparent 53%);
}

.kanban-preview {
  background-image:
    linear-gradient(90deg, #eef2ff 0 31%, transparent 31% 34%, #eef2ff 34% 65%, transparent 65% 68%, #eef2ff 68%),
    linear-gradient(#ffd166 0 0),
    linear-gradient(#93c5fd 0 0);
  background-size: 100% 100%, 22px 14px, 22px 14px;
  background-position: 0 0, 8px 28px, 48px 18px;
  background-repeat: no-repeat;
}

.brainstorm-preview {
  background-image:
    radial-gradient(circle at 18px 18px, #ffd166 0 8px, transparent 9px),
    radial-gradient(circle at 42px 28px, #bdf7d2 0 8px, transparent 9px),
    radial-gradient(circle at 61px 16px, #fca5a5 0 8px, transparent 9px),
    radial-gradient(circle at 28px 42px, #93c5fd 0 8px, transparent 9px);
}

.lean-preview {
  background-image:
    linear-gradient(#263241 0 0),
    linear-gradient(#263241 0 0),
    linear-gradient(#263241 0 0),
    linear-gradient(#263241 0 0),
    linear-gradient(90deg, #fff7ed 0 31%, #f0fdf4 31% 52%, #eef2ff 52% 73%, #eff6ff 73%);
  background-size: 1px 100%, 1px 100%, 100% 1px, 100% 1px, 100% 100%;
  background-position: 31% 0, 73% 0, 0 34%, 0 68%, 0 0;
  background-repeat: no-repeat;
}

.template-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
}

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

.activity li {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
  font-size: 13px;
}

.activity li strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.activity li span {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.activity-panel {
  position: fixed;
  top: 76px;
  right: 18px;
  bottom: 18px;
  z-index: 22;
  display: none;
  width: min(340px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.activity-panel.visible {
  display: block;
}

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

.activity-panel-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  text-transform: none;
}

.activity-panel-header button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
}

.activity-panel-header button svg,
.dashboard-header button svg,
.template-library-header button svg,
.settings-library-header button svg,
.comment-thread-header button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

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

.frame-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.frame-row input {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: none;
  font-weight: 800;
}

.frame-row input:focus {
  border-color: var(--blue);
}

.frame-row button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 900;
}

.version-actions {
  margin-bottom: 10px;
}

.version-actions button {
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-weight: 800;
}

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

.version-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.version-row strong,
.version-row small {
  display: block;
}

.version-row strong {
  font-size: 13px;
  font-weight: 500;
}

.version-row small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
}

.version-row button {
  min-height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 450;
}

.workspace {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
}

.canvas-toolbar,
.context-toolbar,
.floating-timer,
.vote-banner {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.context-toolbar {
  display: none;
  gap: 6px;
  max-width: min(760px, calc(100vw - 110px));
  padding: 8px;
  transform: translate(-50%, -110%);
  overflow: visible;
}

.context-toolbar.visible {
  display: flex;
}

.context-toolbar span {
  padding: 0 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.context-toolbar button {
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-soft);
}

.context-toolbar button.icon-action {
  display: inline-grid;
  width: 32px;
  min-width: 32px;
  padding: 0;
  place-items: center;
}

.context-toolbar button.icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.context-toolbar .danger-action {
  color: var(--danger);
}

/* Format painter */
#copyStyleBtn.active {
  background: rgba(37,99,235,0.12);
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.35);
}
body.paste-style-mode #viewport {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpath d='M9.06 11.9l8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08'/%3E%3Cpath d='M7.07 14.94c-1.66 0-5 1-5 1s1-3.34 1-5'/%3E%3C/svg%3E") 2 20, crosshair;
}

.toolbar-menu {
  position: relative;
  display: inline-grid;
}

.toolbar-menu-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 12;
  display: none;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(24, 34, 48, 0.16);
  transform: translateX(-50%);
}

.toolbar-menu:hover .toolbar-menu-panel,
.toolbar-menu:focus-within .toolbar-menu-panel {
  display: grid;
}

.toolbar-menu-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
}

.color-panel {
  grid-template-columns: repeat(5, 26px);
}

.align-panel {
  grid-template-columns: repeat(4, 32px);
}

.text-align-panel {
  grid-template-columns: repeat(4, 32px);
}

.context-toolbar.image-only .color-menu,
.context-toolbar.link-only .color-menu,
.context-toolbar.text-only:not(.sticky-only) .color-menu,
.context-toolbar.checklist-only .color-menu,
.context-toolbar.table-only .color-menu {
  display: none;
}

.context-toolbar.connector-only .toolbar-menu,
.context-toolbar.sticker-only .layers-menu {
  display: none;
}

.context-toolbar.frame-only .color-menu,
.context-toolbar.frame-only .text-action,
.context-toolbar.frame-only .line-action,
.context-toolbar.frame-only .checklist-action,
.context-toolbar.frame-only .table-action,
.context-toolbar.frame-only .layers-menu,
.context-toolbar.frame-only .align-menu,
.context-toolbar.frame-only #groupBtn,
.context-toolbar.frame-only #ungroupBtn {
  display: none;
}

.context-toolbar [data-color],
.context-toolbar .custom-color-action {
  width: 26px;
  min-width: 26px;
  border: 2px solid white;
  box-shadow: inset 0 0 0 1px rgba(24, 34, 48, 0.22);
}

.context-toolbar [data-color="#fef3c7"] { background: #fef3c7; }
.context-toolbar [data-color="#d1fae5"] { background: #d1fae5; }
.context-toolbar [data-color="#dbeafe"] { background: #dbeafe; }
.context-toolbar [data-color="#fce7f3"] { background: #fce7f3; }
.context-toolbar [data-color="#ede9fe"] { background: #ede9fe; }
.context-toolbar [data-color="#ffedd5"] { background: #ffedd5; }
/* Legacy colors kept for existing boards */
.context-toolbar [data-color="#ffd166"] { background: #ffd166; }
.context-toolbar [data-color="#bdf7d2"] { background: #bdf7d2; }
.context-toolbar [data-color="#93c5fd"] { background: #93c5fd; }
.context-toolbar [data-color="#fca5a5"] { background: #fca5a5; }

.context-toolbar .custom-color-action {
  background:
    radial-gradient(circle at 72% 68%, #42d86d 0 12%, transparent 13%),
    linear-gradient(135deg, #8b35f6 0%, #21bff3 38%, #ff4f91 68%, #ffb21f 100%);
}

.custom-color-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 160px;
  padding-top: 6px;
}

.custom-color-panel[hidden] {
  display: none;
}

.custom-color-panel input[type="color"] {
  width: 34px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.custom-color-panel button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.custom-color-panel button:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.context-toolbar.image-only .color-action {
  display: none;
}

.context-toolbar.link-only .color-action,
.context-toolbar.link-only #ungroupBtn {
  display: none;
}

.context-toolbar button.text-action,
.context-toolbar .text-action {
  display: none;
}

.context-toolbar button.checklist-action,
.context-toolbar .checklist-action {
  display: none;
}

.context-toolbar button.table-action,
.context-toolbar .table-action {
  display: none;
}

.context-toolbar .line-action {
  display: none;
}

.context-toolbar.text-only .text-action {
  display: inline-grid;
}

.context-toolbar.text-only .text-align-menu {
  display: inline-grid;
}

.context-toolbar.text-only select.text-action {
  display: block;
}

.font-size-select {
  height: 30px;
  min-width: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.context-toolbar.line-only .line-action {
  display: block;
}

.context-toolbar.line-only .color-action,
.context-toolbar.line-only #ungroupBtn,
.context-toolbar.line-only #anchorCommentBtn {
  display: none;
}

.context-toolbar.connector-only #bringForwardBtn,
.context-toolbar.connector-only #sendBackwardBtn,
.context-toolbar.connector-only #contextDuplicateBtn,
.context-toolbar.connector-only #contextLockBtn,
.context-toolbar.connector-only #contextDeleteBtn,
.context-toolbar.connector-only #lineColorSelect,
.context-toolbar.connector-only #lineWidthSelect,
.context-toolbar.connector-only .layers-menu,
.context-toolbar.connector-only .align-menu {
  display: none;
}

.line-color-select,
.line-width-select,
.line-style-select {
  height: 30px;
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.context-toolbar.text-only:not(.sticky-only) .color-action,
.context-toolbar.text-only #anchorCommentBtn {
  display: none;
}

.context-toolbar.checklist-only .checklist-action {
  display: inline-grid;
}

.context-toolbar.checklist-only .color-action,
.context-toolbar.checklist-only #ungroupBtn {
  display: none;
}

.context-toolbar.table-only .table-action {
  display: inline-grid;
}

.context-toolbar.table-only .color-menu,
.context-toolbar.table-only #ungroupBtn {
  display: none;
}

.context-toolbar.sticker-only #bringForwardBtn,
.context-toolbar.sticker-only #sendBackwardBtn,
.context-toolbar.sticker-only .layers-menu,
.context-toolbar.sticker-only #ungroupBtn,
.context-toolbar.sticker-only #anchorCommentBtn {
  display: none;
}

.context-toolbar.basic-shape-only #ungroupBtn {
  display: none;
}

.context-toolbar.stroke-only #ungroupBtn {
  display: none;
}

.context-toolbar.single-selected .multi-action {
  display: none;
}

.context-toolbar.single-selected #groupBtn {
  display: none;
}

.context-toolbar:not(.can-ungroup) #ungroupBtn {
  display: none;
}

.floating-timer {
  top: 18px;
  left: 18px;
  display: none;
  padding: 8px 10px;
}

.floating-timer.visible {
  display: flex;
}

.floating-timer span {
  min-width: 70px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.floating-timer button,
.vote-banner button {
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.vote-banner {
  top: 18px;
  left: 50%;
  display: none;
  padding: 8px 10px;
  transform: translateX(-50%);
  border-color: #f6a24f;
  background: rgba(255, 247, 237, 0.96);
  color: #9a3412;
}

.vote-banner.visible {
  display: flex;
}

.vote-banner span {
  font-size: 13px;
  font-weight: 900;
}

.presentation-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 18;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.presentation-controls.visible {
  display: flex;
}

.presentation-controls button {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  font-weight: 900;
}

.presentation-controls button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#prevFrameBtn,
#nextFrameBtn {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  place-items: center;
}

#exitPresentationBtn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 0 10px;
}

.presentation-controls span {
  min-width: 110px;
  text-align: center;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.minimap {
  display: none;
  position: absolute;
  right: 18px;
  bottom: 72px;
  left: auto;
  z-index: 3;
  width: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.minimap.visible {
  display: block;
}

.minimap-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--line);
}

.minimap-header span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.minimap-header button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  font-weight: 900;
}

.minimap-header button svg {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.minimap-header button .icon-expand {
  display: none;
}

.minimap-header button[data-state="collapsed"] .icon-collapse {
  display: none;
}

.minimap-header button[data-state="collapsed"] .icon-expand {
  display: block;
}

.minimap-body {
  position: relative;
  height: 132px;
  overflow: hidden;
  cursor: pointer;
  background-image:
    linear-gradient(#e2e8f0 1px, transparent 1px),
    linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
  background-size: 18px 18px;
}

.template-modal,
.settings-modal,
.admin-modal,
.feedback-modal,
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(3px);
}

.template-modal.visible,
.settings-modal.visible,
.admin-modal.visible,
.feedback-modal.visible,
.confirm-modal.visible {
  display: flex;
}

.template-library,
.settings-library,
.admin-library,
.feedback-library {
  width: min(760px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 96px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(24, 34, 48, 0.22);
}

.template-library-header,
.settings-library-header,
.admin-library-header,
.feedback-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.template-library-header h2,
.settings-library-header h2,
.admin-library-header h2,
.feedback-library-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.template-library-header p,
.settings-library-header p,
.admin-library-header p,
.feedback-library-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.template-library-header button,
.settings-library-header button,
.admin-library-header button,
.feedback-library-header button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
}

.template-library-header button svg,
.settings-library-header button svg,
.admin-library-header button svg,
.feedback-library-header button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.template-library .template-section > h2 {
  display: none;
}

.settings-library .settings-section > h2 {
  display: none;
}

.settings-library {
  width: min(420px, calc(100vw - 48px));
}

.admin-library {
  width: min(980px, calc(100vw - 48px));
}

.feedback-library {
  width: min(520px, calc(100vw - 32px));
}

.confirm-modal {
  z-index: 160;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  position: relative;
  display: grid;
  width: min(400px, calc(100vw - 32px));
  gap: 14px;
  padding: 32px 28px 28px;
  border: none;
  border-radius: 18px;
  background: #e8e8e8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.confirm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #555;
  cursor: pointer;
}

.confirm-close:hover {
  background: rgba(0, 0, 0, 0.15);
}

.confirm-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  color: var(--tds-error);
}

.confirm-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-dialog h2 {
  margin: 4px 40px 0 0;
  color: #1a1a1a;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.confirm-dialog p {
  margin: 0;
  color: #444;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.confirm-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(195, 198, 215, 0.9);
  border-radius: 8px;
  background: #ffffff;
  color: var(--tds-on-surface);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.confirm-input:focus {
  border-color: var(--tds-primary);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.confirm-actions button {
  min-width: 110px;
  height: 42px;
  border-radius: 10px;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.confirm-actions .ghost-button {
  background: transparent;
  border: none;
  color: #555;
  box-shadow: none;
}

.confirm-actions .ghost-button:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #222;
}

.confirm-actions .danger-confirm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--tds-error) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: none !important;
}

.confirm-actions .danger-confirm:hover {
  background: #c0392b !important;
  box-shadow: none !important;
}

.confirm-actions .danger-confirm::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

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

.feedback-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
}

.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 13px;
}

.feedback-form select {
  height: 38px;
  padding: 0 10px;
}

.feedback-form textarea {
  min-height: 128px;
  padding: 10px;
  resize: vertical;
}

.feedback-form small {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.feedback-actions button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
}

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

.admin-toolbar button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}

.admin-toolbar span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.admin-users-body {
  display: grid;
  gap: 8px;
}

.admin-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 110px 130px repeat(3, 92px) 86px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-user-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-user-main strong,
.admin-user-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-main strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.admin-user-main span {
  color: #64748b;
  font-size: 11px;
  font-weight: 550;
}

.admin-user-row select,
.admin-user-row input {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.admin-user-row input::placeholder {
  color: #94a3b8;
}

.admin-user-row button {
  height: 32px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.settings-library .switch-row {
  margin-top: 10px;
}

.template-library .template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.minimap.collapsed .minimap-body {
  display: none;
}

.minimap-node {
  position: absolute;
  min-width: 3px;
  min-height: 3px;
  border-radius: 3px;
  opacity: 0.9;
}

.minimap-viewport {
  position: absolute;
  border: 2px solid var(--blue);
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
}

.comment-thread {
  position: absolute;
  top: 72px;
  right: 18px;
  z-index: 4;
  display: none;
  width: 300px;
  max-height: calc(100% - 160px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.comment-thread.visible {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.comment-thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.comment-thread-header strong,
.comment-thread-header span {
  display: block;
}

.comment-thread-header span {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.comment-thread-header button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 900;
}

.thread-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 12px;
}

.thread-message {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.thread-message small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.thread-message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.thread-message header small {
  margin-bottom: 0;
}

.thread-message header button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 900;
}

.thread-message p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.thread-empty {
  padding: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.thread-composer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.thread-composer textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  outline: none;
  font: inherit;
}

.thread-composer textarea:focus {
  border-color: var(--blue);
}

.thread-composer div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.thread-composer button {
  min-height: 34px;
  border-radius: 8px;
  font-weight: 800;
}

.comment-badge {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid white;
  border-radius: 999px;
  background: #f97316;
  color: white;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(24, 34, 48, 0.2);
}

.comment-badge.resolved {
  background: #94a3b8;
}

.canvas-toolbar {
  position: fixed;
  right: max(18px, calc(env(safe-area-inset-right) + 12px));
  left: auto;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  padding: 8px;
  user-select: none;
  -webkit-user-select: none;
  z-index: 30;
}

.canvas-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  font-weight: 800;
}

#zoomLabel {
  min-width: 50px;
  text-align: center;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  user-select: none;
  -webkit-user-select: none;
}

.board-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: var(--grid-x, 0) var(--grid-y, 0);
  background-color: #f8fbff;
}

.board-viewport.tool-active {
  cursor: crosshair;
}

body.grid-hidden .board-viewport {
  background-image: none;
}

.board {
  position: absolute;
  left: 0;
  top: 0;
  width: 5000px;
  height: 3200px;
  transform-origin: 0 0;
}

.links-layer,
.ink-layer,
.presence-layer {
  position: absolute;
  inset: 0;
  width: 5000px;
  height: 3200px;
  overflow: visible;
  pointer-events: none;
}

.links-layer .connector-line {
  pointer-events: stroke;
  cursor: pointer;
}

.links-layer .connector-hitbox {
  pointer-events: stroke;
  cursor: pointer;
}

.links-layer .selected-connector {
  filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.6));
}

.presence-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  pointer-events: none;
}

.presence-cursor {
  position: absolute;
  display: grid;
  gap: 4px;
  transform: translate(-2px, -2px);
  transition: left 120ms linear, top 120ms linear;
  pointer-events: none;
}

.item [contenteditable="true"] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cursor-pointer {
  width: 0;
  height: 0;
  border-left: 11px solid var(--cursor-color);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  transform: rotate(38deg);
  filter: drop-shadow(0 3px 5px rgba(24, 34, 48, 0.22));
}

.cursor-label {
  width: max-content;
  max-width: 160px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--cursor-color);
  color: white;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(24, 34, 48, 0.18);
}

.item {
  position: absolute;
  min-width: 80px;
  min-height: 54px;
  border: 2px solid transparent;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.item:active {
  cursor: grabbing;
}

.item.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.item.sticky.selected {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 3px #2563eb,
    0 20px 40px -10px rgba(37, 99, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.item.line.selected {
  border-color: transparent;
  box-shadow: none;
}

.item.stroke.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.item.grouped:not(.selected) {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.item.locked {
  cursor: not-allowed;
}

.item:hover,
.item [contenteditable="true"] {
  cursor: pointer;
}

.item [contenteditable="true"]:focus {
  cursor: text;
}

.resize-handle,
.line-endpoint,
.comment-badge,
.task-check {
  cursor: pointer;
}

.item.locked::before {
  content: "Bloqueado";
  position: absolute;
  right: -2px;
  top: -28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #182230;
  color: white;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.item.remote-locked {
  outline: 2px solid rgba(37, 99, 235, 0.7);
  outline-offset: 2px;
}

.item.remote-locked::before {
  content: attr(data-locked-by);
  max-width: 190px;
  overflow: hidden;
  background: #2563eb;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resize-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 4px 12px rgba(24, 34, 48, 0.22);
  cursor: nwse-resize;
  touch-action: none;
  z-index: 4;
}

.resize-handle::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

.image .resize-handle {
  right: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
}

.sticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 200px;
  min-height: 200px;
  padding: 20px;
  border-radius: 6px;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.85);
}

.text {
  width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  font-size: 22px;
  font-weight: 500;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.text::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 10px;
  pointer-events: none;
}

.text:hover:not(.selected)::before {
  border: 1px dashed rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.04);
}

.link {
  width: 260px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(24, 34, 48, 0.12);
}

.link-card {
  display: grid;
  height: 100%;
  gap: 6px;
  align-content: center;
}

.link-card strong,
.link-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card strong {
  color: #0f172a;
  font-size: 15px;
}

.link-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.link-card a {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.shape {
  display: grid;
  width: 170px;
  height: 105px;
  place-items: center;
  border: 2px solid #263241;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.circle {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border: 2px solid #263241;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.triangle {
  display: grid;
  width: 170px;
  height: 145px;
  place-items: center;
  background: transparent;
  font-weight: 800;
}

.triangle-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.triangle-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.triangle-content span {
  position: relative;
  z-index: 1;
  max-width: 64%;
  margin-top: 24%;
  text-align: center;
  outline: none;
}

.line {
  overflow: visible;
  min-height: 28px;
  background: transparent;
}

.line-svg,
.stroke-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.stroke {
  overflow: visible;
  background: transparent;
}

.line-endpoint {
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 5px 12px rgba(24, 34, 48, 0.24);
  transform: translate(-50%, -50%);
  cursor: grab;
}

.line-endpoint:active {
  cursor: grabbing;
}

.line::before {
  display: none;
}

/*
.line {
  min-height: 12px;
  height: 12px;
  background: transparent;
}

.line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: #263241;
  transform: translateY(-50%);
}
*/

.table {
  display: grid;
  width: 260px;
  height: 150px;
  padding: 0;
  overflow: visible;
  border: 2px solid #263241;
  border-radius: 8px;
  background: white;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
}

.table-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  outline: none;
  overflow-wrap: anywhere;
  cursor: text;
}

.table-grid span:focus {
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.28);
}

.table .resize-handle {
  right: -9px;
  bottom: -9px;
}

.table-edge-handle {
  position: absolute;
  z-index: 3;
  display: block;
  background: transparent;
  cursor: move;
  touch-action: none;
}

.table-edge-handle.top {
  left: -10px;
  right: -10px;
  top: -10px;
  height: 18px;
}

.table-edge-handle.right {
  top: -10px;
  right: -10px;
  bottom: -10px;
  width: 18px;
}

.table-edge-handle.bottom {
  left: -10px;
  right: -10px;
  bottom: -10px;
  height: 18px;
}

.table-edge-handle.left {
  top: -10px;
  bottom: -10px;
  left: -10px;
  width: 18px;
}

.table-move-handle {
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(24, 34, 48, 0.24);
  cursor: grab;
  touch-action: none;
}

.table-move-handle:active {
  cursor: grabbing;
}

.table-move-handle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.table-move-handle::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

.checklist {
  width: 230px;
  min-height: 150px;
  padding: 14px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(24, 34, 48, 0.12);
}

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

.checklist-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #334155;
  font-weight: 800;
}

.task-check {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid #2563eb;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.checklist-list li.done {
  color: #64748b;
  text-decoration: line-through;
}

.checklist-list li.done .task-check {
  background: #2563eb;
  box-shadow: inset 0 0 0 3px white;
}

.task-text {
  outline: none;
}

.sticker {
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 58px;
  line-height: 1;
  text-shadow: 0 8px 18px rgba(24, 34, 48, 0.18);
}

.comment {
  width: 210px;
  padding: 12px;
  border: 1px solid #f6a24f;
  border-radius: 8px;
  background: #fff7ed;
  box-shadow: 0 10px 22px rgba(180, 83, 9, 0.14);
  color: #9a3412;
  font-size: 14px;
  font-weight: 700;
}

.image {
  overflow: visible;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 12px 26px rgba(24, 34, 48, 0.18);
}

.image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  pointer-events: none;
}

.frame {
  display: grid;
  place-items: start;
  border: 2px dashed rgba(37, 99, 235, 0.58);
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.frame-title {
  margin: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  color: #1e293b;
  font-size: 13px;
  font-weight: 900;
  outline: none;
  cursor: text;
}

.frame-title:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), var(--shadow-soft);
}

.comment.resolved {
  border-color: #9ca3af;
  background: #f3f4f6;
  color: #4b5563;
  opacity: 0.82;
}

.comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.comment-footer span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.comment-footer button {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.item [contenteditable] {
  outline: none;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: rgba(24, 34, 48, 0.6);
  font-size: 12px;
}

.vote {
  display: none;
  min-width: 26px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.meta-row.vote-visible .vote {
  display: inline-grid;
}

.private .item:not(.selected) {
  filter: blur(4px);
  opacity: 0.55;
}

.selection-box {
  position: absolute;
  display: none;
  border: 1px dashed var(--blue);
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
}

.selection-box.visible {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: min(460px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 8px;
  background: #182230;
  color: white;
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.save-status {
  position: fixed;
  z-index: 7;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.active-users {
  display: none;
  align-items: center;
  flex-direction: row-reverse;
  gap: 0;
  margin-right: 4px;
}

.active-users.visible {
  display: flex;
}

.active-user {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--user-color, #2563eb);
  color: white;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(24, 34, 48, 0.14);
}

.active-user + .active-user {
  margin-left: -7px;
}

.app-shell:has(.profile-menu.open) .save-status {
  bottom: 20px;
}

.board-dashboard {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  overflow: auto;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background: #f6f8fb;
  box-shadow: none;
}

.board-dashboard.visible {
  display: block;
}

body.dashboard-mode .topbar,
body.dashboard-mode .workspace,
body.dashboard-mode .active-users,
body.dashboard-mode .save-status,
body.dashboard-mode .toolrail,
body.dashboard-mode .canvas-toolbar,
body.dashboard-mode .minimap,
body.dashboard-mode .context-toolbar {
  visibility: hidden;
}

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

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

.dashboard-header h2 {
  margin: 0;
  font-size: 22px;
  color: var(--ink);
  text-transform: none;
}

.dashboard-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.dashboard-header button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-actions button {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-weight: 800;
}

.plan-usage {
  color: #64748b;
  font-size: 12px;
  font-weight: 450;
  text-align: right;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
  align-items: start;
}

.account-summary {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.summary-kicker,
.summary-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.account-summary > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary > small {
  color: #475569;
  font-size: 12px;
  font-weight: 450;
}

.summary-grid {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.summary-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #e2e8f0;
}

.summary-grid strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
}

.dashboard-main {
  min-width: 0;
}

.board-grid {
  display: grid;
  gap: 22px;
}

.board-grid-section {
  display: grid;
  gap: 10px;
}

.board-grid-section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.board-grid-section-header h3 {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.board-grid-section-header span {
  min-width: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.board-grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.board-grid-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 450;
  background: #f8fafc;
}

.board-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  cursor: default;
}

.board-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.board-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.board-card.shared {
  border-color: #bfdbfe;
}

.board-card.shared input {
  color: #1d4ed8;
}

.board-preview {
  position: relative;
  height: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-image:
    linear-gradient(#e2e8f0 1px, transparent 1px),
    linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
  background-size: 18px 18px;
  background-color: #f8fafc;
}

.preview-node {
  position: absolute;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(24, 34, 48, 0.12);
}

.board-card input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  font-weight: 900;
  outline: none;
}

.board-card input:focus {
  border-color: var(--blue);
}

.board-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.board-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 8px;
}

.board-card-actions button {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.board-card-actions .icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.board-card-actions .danger-action {
  color: var(--danger);
}

body.presenting .topbar,
body.presenting .toolrail,
body.presenting .sidepanel,
body.presenting .canvas-toolbar,
body.presenting .context-toolbar,
body.presenting .minimap,
body.presenting .comment-thread,
body.presenting .save-status,
body.presenting .board-dashboard {
  display: none;
}

body.presenting .presentation-controls {
  display: flex;
}

body.presenting .app-shell {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

body.presenting .workspace {
  grid-column: 1 / -1;
  grid-row: 1;
}

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

  .topbar {
    gap: 8px;
  }

  .top-actions {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .ghost-button,
  .primary-button,
  .top-actions select {
    flex: 0 0 auto;
  }

  .sidepanel {
    position: fixed;
    right: 12px;
    top: 76px;
    bottom: 12px;
    width: min(320px, calc(100vw - 86px));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .board-dashboard {
    inset: 0;
    padding: 18px;
  }

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

  .toolrail {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    max-height: calc(100vh - 96px);
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    display: none;
  }

  .board-title {
    max-width: 220px;
  }

  .save-status {
    display: none;
  }
}

@media (pointer: coarse), (max-width: 980px) {
  .ghost-button.icon-only,
  .canvas-toolbar button {
    display: grid;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    text-align: center;
  }

  .ghost-button svg,
  .primary-button svg,
  .canvas-toolbar button svg,
  .tool svg,
  .tool-menu button svg {
    display: block;
    width: 20px;
    height: 20px;
    margin: auto;
    vector-effect: non-scaling-stroke;
  }

  .canvas-toolbar {
    right: max(14px, calc(env(safe-area-inset-right) + 10px));
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
    gap: 6px;
    padding: 7px;
  }

  #zoomLabel {
    min-width: 48px;
  }

  .resize-handle {
    right: -10px;
    bottom: -10px;
    width: 16px;
    height: 16px;
  }

  .resize-handle::before {
    inset: -16px;
  }

  .image .resize-handle {
    right: -9px;
    bottom: -9px;
    width: 16px;
    height: 16px;
  }
}

/* UI polish layer */
.topbar {
  height: 64px;
  border-bottom-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(24, 34, 48, 0.08);
}

.brand-mark {
  background: #ffffff;
  box-shadow: none;
  border: 1px solid rgba(195, 198, 215, 0.6);
}

.board-title {
  background: #f8fafc;
  border: 1px solid transparent;
}

.board-title:hover,
.board-title:focus {
  border-color: #cbd5e1;
  background: #ffffff;
}

.ghost-button,
.top-actions select {
  background: #f8fafc;
  border-color: #d8dee8;
}

.ghost-button:hover,
.top-actions select:hover {
  background: #ffffff;
  border-color: #b9c3d2;
}

.primary-button {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.primary-button.danger-confirm {
  background: var(--tds-error) !important;
  box-shadow: none !important;
  color: #fff !important;
}

.toolrail {
  border-color: rgba(148, 163, 184, 0.62);
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.98), rgba(203, 213, 225, 0.96));
  box-shadow: 0 14px 34px rgba(100, 116, 139, 0.18);
}

.tool-group {
  display: grid;
  gap: 7px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.38);
}

.tool-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tool {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(248, 250, 252, 0.96);
  color: #334155;
}

.tool::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 20;
  padding: 5px 8px;
  border-radius: 8px;
  background: #182230;
  color: white;
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.tool:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tool-combo {
  position: relative;
}

.tool-menu {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  z-index: 30;
  display: none;
  min-width: auto;
  padding: 6px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 34px rgba(24, 34, 48, 0.16);
}

.tool-menu.visible {
  display: grid;
  gap: 4px;
}

.facilitation-menu {
  min-width: 244px;
  padding: 12px;
  gap: 10px;
}

.facilitation-menu .facilitation-section {
  display: grid;
  gap: 10px;
}

.facilitation-menu h2 {
  margin: 0;
  color: #526174;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.facilitation-menu .timer-card {
  padding: 10px;
}

.facilitation-menu #timerDisplay {
  margin-bottom: 10px;
  font-size: 30px;
}

.facilitation-menu .timer-controls button {
  width: auto;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.facilitation-menu .switch-row {
  min-height: 38px;
}

.tool-menu button {
  display: grid;
  width: 36px;
  height: 34px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 450;
}

.grouped-tool-menu {
  min-width: 94px;
}

.tool-menu-label {
  padding: 2px 4px 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-menu-row {
  display: flex;
  gap: 4px;
}

body.dark-mode .tool-menu-label {
  color: #a3a3a3;
}

.tool:hover {
  background: #f1f5f9;
}

.tool.active {
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: none;
}

.sidepanel {
  background: #f3f6fb;
  box-shadow: -12px 0 28px rgba(24, 34, 48, 0.06);
}

.sidepanel section {
  padding: 2px 0;
}

.canvas-toolbar,
.context-toolbar,
.floating-timer,
.vote-banner,
.minimap,
.comment-thread,
.save-status {
  border-color: rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(24, 34, 48, 0.14);
}

.context-toolbar {
  padding: 7px;
}

.context-toolbar button,
.canvas-toolbar button {
  background: #f8fafc;
}

.context-toolbar button:hover,
.canvas-toolbar button:hover {
  background: #eef2ff;
  border-color: #a8bff8;
  color: #1d4ed8;
}

.board-viewport {
  background-color: #f8fbff;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
}

.sticky {
  box-shadow: none;
}

.shape,
.comment,
.image,
.frame {
  box-shadow: 0 10px 24px rgba(24, 34, 48, 0.12);
}

.frame {
  background: rgba(37, 99, 235, 0.025);
}

.template-card,
.timer-card,
.switch-row,
.frame-row,
.version-row,
.activity li,
.board-card {
  border-color: #dbe3ee;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.template-card:hover,
.board-card:hover {
  border-color: #b9c3d2;
  box-shadow: 0 10px 24px rgba(24, 34, 48, 0.1);
}

.save-status {
  color: #2563eb;
  font-weight: 900;
}

.context-toolbar.connector-only > * {
  display: none !important;
}

.context-toolbar.connector-only #selectionCount,
.context-toolbar.connector-only #lineStyleSelect {
  display: block !important;
}

body.dark-mode .topbar,
body.dark-mode .sidepanel,
body.dark-mode .toolrail,
body.dark-mode .alpha-panel,
body.dark-mode .alpha-notice,
body.dark-mode .template-library,
body.dark-mode .settings-library,
body.dark-mode .admin-library,
body.dark-mode .feedback-library,
body.dark-mode .canvas-toolbar,
body.dark-mode .context-toolbar,
body.dark-mode .active-users,
body.dark-mode .profile-popover,
body.dark-mode .board-options-popover,
body.dark-mode .top-menu-popover,
body.dark-mode .activity-panel,
body.dark-mode .floating-timer,
body.dark-mode .vote-banner,
body.dark-mode .minimap,
body.dark-mode .comment-thread,
body.dark-mode .save-status {
  border-color: #383838;
  background: rgba(23, 23, 23, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

body.dark-mode .board-viewport {
  background-color: #181818;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

body.dark-mode .alpha-gate {
  background:
    linear-gradient(rgba(15, 15, 15, 0.9), rgba(15, 15, 15, 0.9)),
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

body.dark-mode.grid-hidden .board-viewport {
  background-image: none;
}

body.dark-mode .timer-card,
body.dark-mode .switch-row,
body.dark-mode .template-card,
body.dark-mode .version-row,
body.dark-mode .activity li,
body.dark-mode .board-card,
body.dark-mode .board-grid-empty,
body.dark-mode .shared-board-indicator,
body.dark-mode .invitation-list,
body.dark-mode .profile-popover .invitation-card button,
body.dark-mode .feedback-form select,
body.dark-mode .feedback-form textarea,
body.dark-mode .field input {
  border-color: #383838;
  background: #1a1a1a;
  box-shadow: none;
}

body.dark-mode h2,
body.dark-mode .template-library-header p,
body.dark-mode .settings-library-header p,
body.dark-mode .admin-library-header p,
body.dark-mode .feedback-library-header p,
body.dark-mode .feedback-form small,
body.dark-mode .invitation-card p,
body.dark-mode .board-grid-section-header h3,
body.dark-mode .template-card small,
body.dark-mode .version-row small,
body.dark-mode .link-card span {
  color: #a3a3a3;
}

body.dark-mode .tool,
body.dark-mode .tool-menu,
body.dark-mode .context-toolbar button,
body.dark-mode .canvas-toolbar button,
body.dark-mode .template-tabs button {
  background: #202020;
  color: #d4d4d4;
}

body.dark-mode .tool:hover,
body.dark-mode .context-toolbar button:hover,
body.dark-mode .canvas-toolbar button:hover {
  background: #2b2b2b;
  color: #ffffff;
}

body.dark-mode .tool.active,
body.dark-mode .template-tabs button.active {
  border-color: #737373;
  background: #303030;
  color: #ffffff;
  box-shadow: none;
}

body.dark-mode .tool.active::before {
  background: #d4d4d4;
}

/* Typography system */
body {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

button,
select,
input,
textarea {
  font-family: inherit;
  font-size: 13px;
  font-weight: 450;
  letter-spacing: 0;
}

.brand strong {
  font-size: 15px;
  font-weight: 800;
}

.brand span,
.template-card small,
.version-row small,
.board-card small,
.activity li,
.link-card span {
  font-size: 12px;
  font-weight: 600;
}

.board-title,
.top-actions select {
  font-size: 13px;
  font-weight: 700;
}

h2,
.dashboard-header h2 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-header h2 {
  text-transform: none;
  font-size: 22px;
}

.dashboard-header p {
  font-size: 13px;
  font-weight: 500;
}

.ghost-button,
.primary-button,
.timer-controls button,
.template-tabs button,
.template-actions button,
.version-actions button,
.board-card-actions button,
.context-toolbar button,
.canvas-toolbar button,
.floating-timer button,
.vote-banner button,
.comment-footer button,
.thread-composer button {
  font-size: 13px;
  font-weight: 500;
}

.tool::after,
.comment-badge,
.item.locked::before,
.save-status {
  font-size: 11px;
  font-weight: 700;
}

.context-toolbar span,
#zoomLabel,
.minimap-header span,
.frame-row strong,
.version-row strong,
.template-card span,
.board-card input,
.link-card strong {
  font-size: 13px;
  font-weight: 700;
}

#timerDisplay {
  font-size: 34px;
  font-weight: 800;
}

.sticky,
.shape,
.circle,
.triangle {
  font-weight: 700;
}

.sticky .editable {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.85);
  text-align: center;
}

.text {
  font-weight: 800;
}

/* Side panel typography */
.sidepanel {
  font-size: 13px;
  font-weight: 500;
}

.sidepanel h2 {
  margin-bottom: 10px;
  color: #526174;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
}

.sidepanel label,
.sidepanel .field,
.sidepanel .switch-row,
.sidepanel .activity li {
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.sidepanel button,
.sidepanel input,
.sidepanel select {
  font-size: 13px;
  font-weight: 650;
}

.sidepanel .timer-controls button,
.sidepanel .template-actions button,
.sidepanel .version-actions button {
  font-weight: 700;
}

.sidepanel .template-tabs button {
  font-size: 12px;
  font-weight: 650;
}

.sidepanel .template-card span,
.sidepanel .frame-row input,
.sidepanel .version-row strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.sidepanel .template-card small,
.sidepanel .version-row small {
  color: #64748b;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
}

.sidepanel .frame-row button,
.sidepanel .version-row button {
  font-size: 12px;
  font-weight: 650;
}

.sidepanel #timerDisplay {
  font-size: 34px;
  font-weight: 750;
  line-height: 1;
}

body.dark-mode .sidepanel h2,
body.dark-mode .sidepanel label,
body.dark-mode .sidepanel .field,
body.dark-mode .sidepanel .switch-row,
body.dark-mode .sidepanel .activity li,
body.dark-mode .sidepanel .template-card small,
body.dark-mode .sidepanel .version-row small {
  color: #a3a3a3;
}

@media print {
  @page {
    size: landscape;
    margin: 0;
  }

  body.printing-board .topbar,
  body.printing-board .toolrail,
  body.printing-board .canvas-toolbar,
  body.printing-board .context-toolbar,
  body.printing-board .minimap,
  body.printing-board .comment-thread,
  body.printing-board .save-status,
  body.printing-board .active-users,
  body.printing-board .board-dashboard,
  body.printing-board .activity-panel,
  body.printing-board .template-modal,
  body.printing-board .settings-modal,
  body.printing-board .toast,
  body.printing-board .alpha-notice {
    display: none !important;
  }

  body.printing-board .app-shell {
    display: block;
    width: 100vw;
    height: 100vh;
  }

  body.printing-board .workspace,
  body.printing-board .board-viewport {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
}

/* Trazzo design system v0.45 */
:root {
  --tds-surface: #f8f9ff;
  --tds-surface-lowest: #ffffff;
  --tds-surface-low: #eff4ff;
  --tds-surface-container: #e5eeff;
  --tds-surface-high: #dce9ff;
  --tds-surface-highest: #d3e4fe;
  --tds-on-surface: #0b1c30;
  --tds-on-variant: #434655;
  --tds-outline: #737686;
  --tds-outline-variant: #c3c6d7;
  --tds-primary: #004ac6;
  --tds-action: #2563eb;
  --tds-secondary: #4648d4;
  --tds-danger: #ba1a1a;
  --tds-glass: rgba(255, 255, 255, 0.82);
  --tds-glass-border: rgba(255, 255, 255, 0.58);
  --tds-shadow-low: 0 4px 12px rgba(11, 28, 48, 0.1);
  --tds-shadow-high: 0 18px 42px rgba(11, 28, 48, 0.15);
  --tds-radius: 8px;
  --tds-radius-md: 12px;
  --tds-radius-lg: 16px;
  --ink: var(--tds-on-surface);
  --muted: var(--tds-on-variant);
  --line: var(--tds-outline-variant);
  --line-strong: var(--tds-outline);
  --surface: var(--tds-surface-lowest);
  --surface-soft: var(--tds-surface-low);
  --panel: var(--tds-surface);
  --blue: var(--tds-action);
  --blue-soft: #eff6ff;
  --danger: var(--tds-danger);
  --shadow: var(--tds-shadow-high);
  --shadow-soft: var(--tds-shadow-low);
}

html,
body {
  color: var(--tds-on-surface);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--tds-surface);
}

button,
select,
input,
textarea,
[contenteditable="true"] {
  font-family: Inter, "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

button {
  border-radius: var(--tds-radius);
}

.topbar {
  height: 64px;
  padding: 0 24px;
  gap: 24px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.55);
  background: rgba(248, 249, 255, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 30px rgba(11, 28, 48, 0.06);
}

.brand {
  gap: 10px;
  min-width: 174px;
  padding-right: 22px;
  border-right: 1px solid rgba(115, 118, 134, 0.35);
}

.brand .brand-logo {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: var(--tds-action);
  object-fit: contain;
  filter: none;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.brand-mark-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(195, 198, 215, 0.6);
  box-shadow: none;
  overflow: hidden;
}

.brand-mark-letter img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand strong {
  color: #2563eb !important;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.brand span {
  margin-top: 2px;
  color: #434655;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.brand .brand-mark-letter {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-controls {
  gap: 14px;
}

.board-title {
  min-width: 216px;
  max-width: 320px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(195, 198, 215, 0.6);
  border-radius: var(--tds-radius);
  background: rgba(239, 244, 255, 0.74);
  color: var(--tds-on-surface);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 650;
  line-height: 38px;
  box-shadow: none;
}

.board-title:hover,
.board-title:focus {
  border-color: rgba(0, 74, 198, 0.35);
  background: #ffffff;
}

.labeled-button#dashboardBtn {
  position: relative;
  height: 40px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid var(--tds-primary);
  border-radius: 0;
  background: transparent;
  color: var(--tds-primary);
  box-shadow: none;
}

.labeled-button#dashboardBtn svg {
  display: none;
}

.labeled-button#dashboardBtn span {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.board-options-menu .ghost-button,
.top-actions .ghost-button,
.dashboard-icon-action {
  border: 0;
  background: transparent;
  color: var(--tds-on-surface);
  box-shadow: none;
}

.board-options-menu .ghost-button:hover,
.top-actions .ghost-button:hover,
.dashboard-icon-action:hover {
  background: rgba(211, 228, 254, 0.55);
  box-shadow: none;
}

.feedback-button {
  min-width: 116px;
  color: var(--tds-on-surface);
}

.feedback-button span {
  font-size: 14px;
  font-weight: 650;
}

#presentBtn {
  background: #ffffff;
  color: var(--tds-on-surface);
  box-shadow: none;
}

#presentBtn:hover {
  background: #f1f5f9;
  color: var(--tds-on-surface);
}

.primary-button,
#shareBtn,
.dashboard-actions #dashboardNewBoardBtn {
  border: 0;
  background: var(--tds-primary);
  color: #ffffff;
  box-shadow: none;
}

.primary-button:hover,
#shareBtn:hover,
.dashboard-actions #dashboardNewBoardBtn:hover {
  background: var(--tds-action);
  box-shadow: none;
}

.primary-button.danger-confirm,
.primary-button.danger-confirm:hover {
  background: var(--tds-error);
  box-shadow: none;
  color: #fff;
}

.profile-button {
  width: 40px;
  height: 40px;
  border: 2px solid #ffffff;
  background: #213145;
  box-shadow: none;
  overflow: hidden;
}

.profile-popover,
.top-menu-popover,
.tool-menu,
.canvas-toolbar,
.context-toolbar,
.minimap,
.comment-thread,
.save-status {
  border: 1px solid var(--tds-glass-border);
  background: var(--tds-glass);
  backdrop-filter: blur(20px);
  box-shadow: var(--tds-shadow-high);
}

.board-options-popover {
  background: #ffffff;
  backdrop-filter: none;
}

.board-viewport {
  background-color: var(--tds-surface);
  background-image:
    linear-gradient(rgba(0, 74, 198, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 74, 198, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.grid-hidden .board-viewport {
  background-image: none;
}

.toolrail {
  left: 24px;
  width: 56px;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--tds-glass-border);
  border-radius: 16px;
  background: var(--tds-glass);
  backdrop-filter: blur(20px);
  box-shadow: var(--tds-shadow-high);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-group {
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.42);
}

.tool {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tds-on-variant);
  box-shadow: none;
}

.tool svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.tool:hover {
  background: rgba(211, 228, 254, 0.52);
  color: var(--tds-primary);
  box-shadow: none;
}

.tool.active {
  background: var(--tds-action);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.tool.active::before {
  display: none;
}

.tool::after {
  left: calc(100% + 12px);
  border-radius: 999px;
  background: #213145;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 650;
}

.tool-menu {
  border-radius: 14px;
}

.canvas-toolbar {
  right: 24px;
  bottom: 24px;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 16px;
}

.canvas-toolbar button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tds-on-variant);
}

.canvas-toolbar button:hover {
  background: rgba(211, 228, 254, 0.55);
  color: var(--tds-primary);
}

#zoomLabel {
  min-width: 48px;
  color: var(--tds-on-surface);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  user-select: none;
}

.save-status {
  top: auto;
  bottom: 20px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--tds-on-variant);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 550;
}

.save-status::before {
  content: "☁";
  color: var(--tds-primary);
  font-size: 16px;
  line-height: 1;
}

/* active-users now inline in topbar */

.canvas-watermark {
  position: fixed;
  bottom: 16px;
  left: 72px;
  z-index: 6;
  color: rgba(148, 163, 184, 0.7);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
}

body.presenting .canvas-watermark,
body.dashboard-mode .canvas-watermark {
  display: none;
}

.sticky {
  border: 1px solid rgba(11, 28, 48, 0.08);
  border-radius: 12px;
  box-shadow: 4px 4px 14px rgba(11, 28, 48, 0.1);
}

.shape,
.circle,
.triangle,
.frame {
  border-radius: 12px;
  box-shadow: none;
}

.shape {
  border-width: 2px;
}

.item.selected {
  box-shadow: 0 0 0 2px var(--tds-action), 0 0 0 7px rgba(37, 99, 235, 0.12);
}

.resize-handle {
  background: var(--tds-action);
}

.board-dashboard {
  padding: 0;
  background: var(--tds-surface-lowest);
  overflow: hidden;
}

.board-dashboard.visible {
  display: grid;
  grid-template-columns: 264px 1fr;
}

.dashboard-sidebar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 20px;
  border-right: 1px solid rgba(195, 198, 215, 0.44);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  box-shadow: 12px 0 34px rgba(11, 28, 48, 0.06);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.dashboard-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--tds-action);
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.dashboard-brand strong {
  display: block;
  color: #2563eb;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-brand span {
  color: var(--tds-outline);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 550;
}

.dashboard-nav {
  display: grid;
  gap: 4px;
}

.dashboard-nav > span {
  margin: 0 0 8px 10px;
  color: var(--tds-outline);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-nav button,
.dashboard-support button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #202234;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  box-shadow: none;
}

.dashboard-nav button svg,
.dashboard-support button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-nav button.active {
  background: var(--tds-secondary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(70, 72, 212, 0.2);
}

.dashboard-nav button:hover,
.dashboard-support button:hover {
  background: var(--tds-surface-high);
  box-shadow: none;
}

.dashboard-nav button.active:hover {
  background: var(--tds-secondary);
}

.account-summary {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(195, 198, 215, 0.55);
  border-radius: 14px;
  background: rgba(239, 244, 255, 0.86);
  box-shadow: none;
}

.summary-kicker {
  display: none;
}

.account-summary > strong {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.account-summary > small {
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.summary-grid {
  gap: 6px;
}

.summary-grid div {
  padding: 6px 0;
  border-top: 0;
}

.summary-grid span,
.summary-grid strong {
  color: var(--tds-outline);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 550;
  text-transform: none;
}

.summary-grid div:first-child,
.summary-grid div:nth-child(3) {
  display: none;
}

.dashboard-upgrade {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--tds-primary);
  color: #ffffff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.dashboard-support {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(195, 198, 215, 0.52);
}

.dashboard-shell {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(circle, rgba(0, 74, 198, 0.09) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--tds-surface-lowest);
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  margin: 0;
  padding: 0 32px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.44);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(11, 28, 48, 0.05);
}

.dashboard-search {
  position: relative;
  display: block;
  width: min(560px, 48vw);
}

.dashboard-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--tds-outline);
  stroke-width: 2;
  transform: translateY(-50%);
}

.dashboard-search input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 44px;
  border: 1px solid rgba(115, 118, 134, 0.45);
  border-radius: 10px;
  background: rgba(239, 244, 255, 0.72);
  color: var(--tds-on-surface);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  outline: none;
}

.dashboard-search input:focus {
  border-color: var(--tds-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.dashboard-actions #dashboardNewBoardBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 162px;
  height: 46px;
  padding: 0 22px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.dashboard-actions svg,
.dashboard-icon-action svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-icon-action {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--tds-on-surface);
}

.dashboard-profile-button {
  width: 42px;
  height: 42px;
}

.dashboard-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 120px;
}

.board-grid {
  display: grid;
  gap: 56px;
}

.board-grid-section {
  gap: 26px;
}

.board-grid-section-header {
  gap: 10px;
}

.board-grid-section-header h3 {
  color: var(--tds-on-surface);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.board-grid-section-header span {
  min-width: 28px;
  padding: 4px 10px;
  background: #dbe1ff;
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.board-grid-items {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.board-card {
  gap: 0;
  min-height: 300px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(195, 198, 215, 0.52);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(11, 28, 48, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.board-card:hover {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 18px 32px rgba(11, 28, 48, 0.1);
  transform: translateY(-4px);
}

.board-card.active {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13), 0 18px 32px rgba(11, 28, 48, 0.1);
}

.board-preview {
  height: 170px;
  border: 0;
  border-bottom: 1px solid rgba(195, 198, 215, 0.32);
  border-radius: 0;
  background-color: var(--tds-surface-low);
  background-image: radial-gradient(circle, rgba(0, 74, 198, 0.14) 1px, transparent 1px);
  background-size: 20px 20px;
}

.preview-node {
  border: 1px solid rgba(0, 74, 198, 0.12);
  border-radius: 5px;
  box-shadow: 0 5px 12px rgba(11, 28, 48, 0.08);
}

.board-card input {
  width: calc(100% - 40px);
  margin: 22px 20px 0;
  color: var(--tds-on-surface);
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.board-card.shared input {
  color: var(--tds-primary);
}

.board-card small {
  display: block;
  margin: 5px 20px 0;
  color: var(--tds-outline);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.board-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: auto 20px 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(195, 198, 215, 0.3);
}

.board-card-actions::before {
  content: "RM";
  display: grid;
  width: 26px;
  height: 26px;
  margin-right: auto;
  place-items: center;
  border-radius: 999px;
  background: #dbe1ff;
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.board-card-actions button {
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tds-outline);
}

.board-card-actions button:hover {
  background: var(--tds-surface-high);
  color: var(--tds-primary);
  box-shadow: none;
}

.board-card-actions .danger-action:hover {
  background: rgba(255, 218, 214, 0.5);
  color: var(--tds-danger);
}

.board-grid-empty {
  min-height: 220px;
  padding: 34px;
  border: 2px dashed rgba(115, 118, 134, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--tds-outline);
  font-size: 15px;
}

.dashboard-quickbar {
  position: fixed;
  left: calc(264px + (100vw - 264px) / 2);
  bottom: 22px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--tds-glass-border);
  border-radius: 999px;
  background: var(--tds-glass);
  backdrop-filter: blur(20px);
  box-shadow: var(--tds-shadow-high);
  transform: translateX(-50%);
}

.dashboard-quickbar span,
.dashboard-quickbar strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: var(--tds-on-surface);
  font-family: Inter, sans-serif;
  font-size: 22px;
}

.dashboard-quickbar strong {
  background: var(--tds-primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 74, 198, 0.28);
}

.alpha-panel {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
}

.alpha-panel h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
}

body.dark-mode {
  --tds-surface: #111827;
  --tds-surface-lowest: #0b1220;
  --tds-surface-low: #162235;
  --tds-surface-container: #1d2b42;
  --tds-surface-high: #25364f;
  --tds-surface-highest: #334966;
  --tds-on-surface: #eaf1ff;
  --tds-on-variant: #c3c6d7;
  --tds-outline: #9aa3b4;
  --tds-outline-variant: #334155;
  --tds-glass: rgba(17, 24, 39, 0.84);
  --tds-glass-border: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dashboard-sidebar,
body.dark-mode .dashboard-header,
body.dark-mode .board-card,
body.dark-mode .dashboard-search input {
  background: rgba(17, 24, 39, 0.86);
}

body.dark-mode .dashboard-shell {
  background:
    radial-gradient(circle, rgba(180, 197, 255, 0.1) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--tds-surface-lowest);
}

body.dark-mode .board-preview {
  background-color: var(--tds-surface-low);
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    padding-right: 10px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand span {
    display: none;
  }

  .board-title {
    min-width: 140px;
    max-width: 180px;
  }

  .toolrail {
    left: 12px;
  }

  .board-dashboard.visible {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    display: none;
  }

  .dashboard-header {
    padding: 0 14px;
  }

  .dashboard-search {
    width: min(420px, 52vw);
  }

  .dashboard-actions #dashboardNewBoardBtn span {
    display: none;
  }

  .dashboard-main {
    padding: 28px 14px 96px;
  }

  .board-grid-items {
    grid-template-columns: 1fr;
  }

  .dashboard-quickbar {
    left: 50%;
  }
}

/* Login refresh v0.45 */
.alpha-gate {
  place-items: center;
  padding: 32px 20px 72px;
  background:
    radial-gradient(circle at 18% 12%, rgba(168, 85, 247, 0.34), transparent 28%),
    radial-gradient(circle at 21% 86%, rgba(52, 211, 153, 0.32), transparent 31%),
    radial-gradient(circle at 87% 8%, rgba(250, 204, 21, 0.3), transparent 27%),
    radial-gradient(circle at 84% 91%, rgba(244, 114, 182, 0.36), transparent 34%),
    var(--tds-surface);
}

.login-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.42;
}

.login-blob-purple {
  left: -140px;
  top: -120px;
  width: 620px;
  height: 420px;
  background: #a855f7;
}

.login-blob-mint {
  left: -60px;
  bottom: -140px;
  width: 560px;
  height: 560px;
  background: #34d399;
}

.login-blob-yellow {
  right: -80px;
  top: -70px;
  width: 460px;
  height: 340px;
  background: #facc15;
}

.login-blob-pink {
  right: -160px;
  bottom: -190px;
  width: 760px;
  height: 560px;
  background: #f472b6;
}

.login-deco {
  position: absolute;
  color: var(--tds-primary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  line-height: 1;
  opacity: 0.42;
  animation: login-float 6s ease-in-out infinite;
}

.login-deco-x {
  right: 16%;
  top: 27%;
  color: #f5b800;
  font-size: 76px;
  font-weight: 300;
}

.login-deco-gesture {
  left: 15%;
  top: 22%;
  color: #a855f7;
  font-size: 54px;
  animation-delay: -2s;
}

.login-deco-waves {
  right: 19%;
  bottom: 15%;
  color: #f472b6;
  font-size: 70px;
  animation-delay: -4s;
}

.login-deco-dots {
  left: 10%;
  bottom: 27%;
  display: grid;
  grid-template-columns: repeat(2, 14px);
  gap: 9px;
  color: transparent;
  animation-delay: -3s;
}

.login-deco-dots i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #34d399;
}

@keyframes login-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-18px) rotate(5deg);
  }
}

.alpha-panel {
  width: min(480px, 100%);
  max-height: none;
  gap: 8px;
  padding: 18px 34px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0, 74, 198, 0.12);
}

.alpha-panel > .brand-logo {
  justify-self: center;
  width: 26px;
  height: 26px;
  margin-bottom: 0;
  filter: drop-shadow(0 12px 20px rgba(37, 99, 235, 0.22));
}

.alpha-panel h1 {
  margin: 0;
  text-align: center;
  color: var(--tds-on-surface);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.alpha-panel p {
  max-width: 440px;
  margin: -4px auto 2px;
  color: #202234;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.auth-form {
  gap: 7px;
}

.auth-form label {
  gap: 5px;
  color: #202234;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.auth-form input {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(115, 118, 134, 0.45);
  border-radius: 10px;
  background: #ffffff;
  color: var(--tds-on-surface);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form input::placeholder {
  color: #737686;
}

.auth-form input:focus {
  border-color: var(--tds-action);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

.signup-plans {
  gap: 10px;
  margin-top: 4px;
}

.signup-plan {
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(115, 118, 134, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.signup-plan:hover {
  background: rgba(239, 244, 255, 0.78);
  box-shadow: none;
}

.signup-plan:active {
  transform: scale(0.98);
}

.signup-plan input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.signup-plan strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tds-on-surface);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.signup-plan strong::after {
  content: none !important;
}

.signup-plan strong em {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--tds-primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signup-plan:nth-of-type(4) strong em {
  color: var(--tds-secondary);
  background: rgba(70, 72, 212, 0.1);
}

.signup-plan small {
  color: var(--tds-on-variant);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.signup-plan:has(input:checked),
.signup-plan.selected {
  border-color: var(--tds-action);
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.signup-plan.locked {
  background: rgba(255, 255, 255, 0.44);
  opacity: 0.52;
}

.alpha-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.alpha-actions button {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.alpha-actions .primary-button {
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.alpha-actions .ghost-button {
  border: 1px solid rgba(115, 118, 134, 0.45);
  background: #ffffff;
  color: var(--tds-on-surface);
}

.alpha-actions .ghost-button:hover {
  background: var(--tds-surface-low);
}

.auth-link-button {
  margin-top: 2px;
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 650;
}

.auth-message {
  min-height: 18px;
  font-family: Inter, sans-serif;
}

.auth-version {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(195, 198, 215, 0.32);
  color: var(--tds-on-variant);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  color: rgba(67, 70, 85, 0.62);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-footer nav {
  display: flex;
  gap: 28px;
}

.login-footer a {
  color: inherit;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.04em;
}

.login-footer a:hover {
  color: var(--tds-primary);
}

@media (max-width: 760px) {
  .alpha-gate {
    align-items: start;
    padding: 18px 14px 28px;
  }

  .alpha-panel {
    width: 100%;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 28px 20px;
  }

  .alpha-panel h1 {
    font-size: 32px;
  }

  .alpha-panel p {
    font-size: 15px;
  }

  .auth-form input,
  .alpha-actions button {
    min-height: 52px;
  }

  .signup-plans {
    grid-template-columns: 1fr;
  }

  .login-footer {
    display: none;
  }
}

/* Dashboard alignment refinements */
.dashboard-brand-mark {
  overflow: hidden;
  border: 1px solid rgba(195, 198, 215, 0.62);
  background: #ffffff;
  box-shadow: none;
}

.dashboard-brand-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: none;
}

.dashboard-brand strong {
  font-size: 18px;
  line-height: 1;
}

.dashboard-brand span {
  font-size: 12px;
}

.dashboard-nav button,
.dashboard-support button {
  font-size: 14px;
  font-weight: 650;
}

.dashboard-nav button.active {
  box-shadow: none;
}

.account-summary {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.account-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 999px;
  background: #dbe1ff;
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.account-person div {
  min-width: 0;
}

.account-person strong {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: var(--tds-on-surface);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-person small {
  display: block;
  margin-top: 2px;
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.summary-grid {
  gap: 11px;
}

.summary-grid div:first-child,
.summary-grid div:nth-child(3) {
  display: grid;
}

.usage-row {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 0 !important;
}

.usage-row span,
.usage-row strong {
  color: var(--tds-outline);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 650;
}

.usage-row strong {
  text-align: right;
}

.usage-bar {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #d3e4fe;
}

.usage-bar b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--tds-primary);
}

.dashboard-header {
  height: 70px;
  box-shadow: none;
}

.dashboard-search input {
  height: 46px;
  font-size: 15px;
}

.dashboard-actions {
  gap: 14px;
}

.dashboard-actions #dashboardNewBoardBtn {
  min-width: 154px;
  height: 42px;
  border-radius: 8px;
  box-shadow: none;
}

.dashboard-actions #dashboardNewBoardBtn:hover {
  box-shadow: none;
}

.dashboard-actions .dashboard-icon-action {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #0b1c30;
  box-shadow: none;
}

.dashboard-actions .dashboard-icon-action:hover {
  background: rgba(211, 228, 254, 0.45);
  box-shadow: none;
}

.dashboard-notification {
  position: relative;
}

.dashboard-notification::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 7px;
  width: 6px;
  height: 6px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--tds-danger);
}

.dashboard-photo-button {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center;
  overflow: hidden;
  border: none !important;
  border-radius: 50% !important;
  background: #213145;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none !important;
  cursor: pointer;
  flex-shrink: 0;
  outline: none;
}

.dashboard-photo-button:hover {
  border: none !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
  transform: none;
}

.dashboard-photo-button span {
  display: block;
  line-height: 1;
  pointer-events: none;
}

.dashboard-close-hidden {
  display: none !important;
}

.plan-usage,
.dashboard-quickbar {
  display: none !important;
}

.dashboard-main {
  max-width: 1088px;
  padding-top: 38px;
}

.board-grid {
  gap: 40px;
}

.board-grid-section-header h3 {
  font-size: 28px;
  font-weight: 700;
}

.dashboard-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--tds-primary);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}

.dashboard-view-all svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-view-all:hover {
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.board-grid-items {
  grid-template-columns: repeat(auto-fill, minmax(232px, 270px));
  justify-content: start;
}

.board-card {
  min-height: 244px;
}

.board-preview {
  height: 124px;
}

.board-card input {
  margin-top: 16px;
  font-size: 14px;
}

.board-card small {
  font-size: 12px;
}

.board-card-actions {
  margin-bottom: 14px;
}

.create-board-tile {
  display: grid;
  min-height: 244px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 2px dashed rgba(115, 118, 134, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--tds-outline);
  box-shadow: none;
}

.create-board-tile:hover {
  border-color: var(--tds-primary);
  background: rgba(37, 99, 235, 0.05);
  color: var(--tds-primary);
  box-shadow: none;
}

.create-board-tile span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  background: #dbe1ff;
  color: var(--tds-outline);
}

.create-board-tile svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.create-board-tile strong {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

body,
.dashboard-shell,
.dashboard-sidebar,
.dashboard-main {
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

.dashboard-nav,
.dashboard-actions,
.account-summary,
.board-card input,
.board-card small,
.create-board-tile,
.dashboard-search input {
  font-family: Inter, "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}


/* ── Preferences Modal ─────────────────────────────────────── */
.prefs-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}
.prefs-modal.visible { display: flex; }

.prefs-shell {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  width: min(900px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 48px));
  border-radius: 18px;
  overflow: hidden;
  background: #f0f2f5;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
}

.prefs-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 12px;
  background: #ffffff;
  border-right: 1px solid rgba(195,198,215,0.5);
}

.prefs-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(195,198,215,0.6);
  overflow: hidden;
}
.prefs-nav-logo img { width: 32px; height: 32px; object-fit: contain; }

.prefs-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.prefs-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.prefs-nav-item:hover { background: #f1f5f9; color: #1e293b; }
.prefs-nav-item.active { background: #eff6ff; color: #2563eb; }

.prefs-nav-signout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #ef4444;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.prefs-nav-signout svg { width: 17px; height: 17px; flex-shrink: 0; }
.prefs-nav-signout:hover { background: #fef2f2; }

.prefs-body {
  position: relative;
  overflow-y: auto;
  padding: 36px 36px 28px;
}

.prefs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.07);
  color: #64748b;
  cursor: pointer;
}
.prefs-close:hover { background: rgba(0,0,0,0.13); }
.prefs-close svg { width: 16px; height: 16px; }

.prefs-section { display: none; }
.prefs-section.active { display: block; }

.prefs-section h2 {
  margin: 0 0 2px;
  color: #1e293b;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
}
.prefs-subtitle { margin: 0 0 24px; color: #64748b; font-size: 13px; }

.prefs-card {
  padding: 20px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(195,198,215,0.5);
  margin-bottom: 16px;
}
.prefs-card h4 {
  margin: 0 0 14px;
  color: #1e293b;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.prefs-hint { color: #64748b; font-size: 13px; margin-bottom: 14px; }

.prefs-avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(195,198,215,0.5);
}
.prefs-avatar-row h3 { margin: 0 0 4px; font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 15px; font-weight: 700; color: #1e293b; }
.prefs-avatar-row p { margin: 0; color: #64748b; font-size: 13px; }

.prefs-avatar-wrap { position: relative; flex-shrink: 0; }
.prefs-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: #2563eb; color: #fff;
  display: grid; place-items: center;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 26px; font-weight: 800; overflow: hidden;
}
.prefs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prefs-avatar-btn {
  position: absolute; bottom: 0; right: 0;
  display: grid; width: 26px; height: 26px; place-items: center;
  border-radius: 50%; background: #2563eb; color: #fff;
  cursor: pointer; border: 2px solid #fff;
}
.prefs-avatar-btn svg { width: 13px; height: 13px; }

.prefs-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.prefs-section label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #475569;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
}
.prefs-section input[type="text"],
.prefs-section input[type="email"],
.prefs-section input[type="password"],
.prefs-section textarea {
  padding: 9px 12px;
  border: 1px solid rgba(195,198,215,0.9);
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13px;
  outline: none;
  resize: vertical;
}
.prefs-section input:focus,
.prefs-section textarea:focus { border-color: #2563eb; background: #fff; }
.prefs-section input:disabled { opacity: 0.6; cursor: not-allowed; }

.prefs-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.prefs-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 110px;
  border-radius: 10px;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.prefs-themes { display: flex; gap: 14px; margin-bottom: 20px; }
.prefs-theme-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; cursor: pointer;
}
.prefs-theme-option input { display: none; }
.prefs-theme-preview {
  width: 110px; height: 72px; border-radius: 10px;
  border: 2px solid rgba(195,198,215,0.6);
  overflow: hidden; display: flex; flex-direction: column;
}
.prefs-theme-option input:checked + .prefs-theme-preview {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.prefs-theme-bar { height: 16px; flex-shrink: 0; }
.prefs-theme-canvas { flex: 1; display: flex; align-items: center; justify-content: center; }
.prefs-theme-card { width: 50px; height: 28px; border-radius: 5px; }

.prefs-theme-light .prefs-theme-bar { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.prefs-theme-light .prefs-theme-canvas { background: #f1f5f9; }
.prefs-theme-light .prefs-theme-card { background: #e2e8f0; }
.prefs-theme-dark .prefs-theme-bar { background: #1e293b; border-bottom: 1px solid #334155; }
.prefs-theme-dark .prefs-theme-canvas { background: #0f172a; }
.prefs-theme-dark .prefs-theme-card { background: #1e293b; }
.prefs-theme-system .prefs-theme-bar { background: linear-gradient(90deg, #f8fafc 50%, #1e293b 50%); }
.prefs-theme-system .prefs-theme-canvas { background: linear-gradient(90deg, #f1f5f9 50%, #0f172a 50%); }
.prefs-theme-system .prefs-theme-card { background: linear-gradient(90deg, #e2e8f0 50%, #1e293b 50%); }
.prefs-theme-option span { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 12px; font-weight: 600; color: #475569; }
.prefs-theme-option input:checked ~ span { color: #2563eb; }

.prefs-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; border-top: 1px solid rgba(195,198,215,0.4);
}
.prefs-toggle-row:first-of-type { border-top: none; padding-top: 0; }
.prefs-toggle-row > div strong { display: block; color: #1e293b; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.prefs-toggle-row > div p { margin: 0; color: #64748b; font-size: 12px; }

.prefs-switch { position: relative; flex-shrink: 0; width: 42px; height: 24px; cursor: pointer; }
.prefs-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.prefs-switch span { position: absolute; inset: 0; border-radius: 24px; background: #cbd5e1; transition: background 0.2s; }
.prefs-switch span::after {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.prefs-switch input:checked + span { background: #2563eb; }
.prefs-switch input:checked + span::after { transform: translateX(18px); }

.prefs-section .primary-button { margin-top: 12px; height: 40px; border-radius: 10px; font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 13px; font-weight: 600; }

body.dark-mode .prefs-shell { background: #1a1a1a; }
body.dark-mode .prefs-nav { background: #111; border-right-color: #2a2a2a; }
body.dark-mode .prefs-nav-item:hover { background: #222; color: #e2e8f0; }
body.dark-mode .prefs-nav-item.active { background: #1e3a6e; color: #60a5fa; }
body.dark-mode .prefs-nav-signout:hover { background: #2d1111; }
body.dark-mode .prefs-card { background: #111; border-color: #2a2a2a; }
body.dark-mode .prefs-section h2,
body.dark-mode .prefs-card h4,
body.dark-mode .prefs-avatar-row h3,
body.dark-mode .prefs-toggle-row > div strong { color: #f1f5f9; }
body.dark-mode .prefs-section input[type="text"],
body.dark-mode .prefs-section input[type="email"],
body.dark-mode .prefs-section input[type="password"],
body.dark-mode .prefs-section textarea { background: #1e1e1e; border-color: #333; color: #e2e8f0; }














/* Hide zoom controls on touch devices (iPad, mobile) */
@media (pointer: coarse) {
  #zoomOutBtn,
  #zoomLabel,
  #zoomInBtn {
    display: none;
  }
}

/* Active users topbar avatars overlap */
.active-user {
  margin-left: -8px;
}
.active-users .active-user:last-child {
  margin-left: 0;
}
/* Archived boards view */
.archived-section {
  margin-bottom: 32px;
}

.archived-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #0b1c30;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.5);
}

.archived-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(195, 198, 215, 0.5);
  border-radius: 10px;
  overflow: hidden;
}

.archived-row {
  display: grid;
  grid-template-columns: 2fr 80px 80px 80px 120px 90px;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.35);
  font-size: 13px;
  color: #334155;
}

.archived-row:last-child {
  border-bottom: none;
}

.archived-header {
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ar-name {
  font-weight: 600;
  color: #0b1c30;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ar-restore {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.4);
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.ar-restore:hover {
  background: #dbeafe;
}

/* ── Onboarding empty state ─────────────────────────────────── */
.board-empty-hero {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}

.beh-icon svg {
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
}

.beh-title {
  font-size: 20px;
  font-weight: 700;
  color: #0b1c30;
  margin: 0;
}

.beh-sub {
  font-size: 14px;
  color: #64748b;
  max-width: 320px;
  margin: 0;
  line-height: 1.5;
}

.beh-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  text-align: left;
  width: 100%;
  max-width: 320px;
}

.beh-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #334155;
}

.beh-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.board-grid-empty-simple {
  color: #94a3b8;
  font-size: 13px;
  padding: 16px 0;
  grid-column: 1 / -1;
}

/* ── Version history thumbnails ─────────────────────────────── */
.version-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(195, 198, 215, 0.35);
}

.version-row:last-child {
  border-bottom: none;
}
.version-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.version-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #0b1c30;
}

.version-info small {
  font-size: 11px;
  color: #64748b;
}

/* ── Board Search Overlay ───────────────────────────────────── */
.board-search-overlay {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(195, 198, 215, 0.6);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(11, 28, 48, 0.14);
  z-index: 9000;
  min-width: 340px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s;
}

.board-search-overlay.visible {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#boardSearchInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #0b1c30;
  font-family: "Plus Jakarta Sans", sans-serif;
  min-width: 0;
}

#boardSearchInput::placeholder { color: #94a3b8; }

.bso-count {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  min-width: 48px;
  text-align: center;
}

.bso-nav, .bso-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #64748b;
  padding: 0;
  flex-shrink: 0;
}

.bso-nav:hover, .bso-close:hover {
  background: #f1f5f9;
  color: #0b1c30;
}

.bso-nav svg, .bso-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Search result highlights */
.item.search-highlight {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.item.search-focus {
  outline: 2.5px solid #2563eb !important;
  outline-offset: 3px;
}

/* ── Timer configurable input ───────────────────────────────── */
.timer-set-row {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-bottom: 4px;
}

#timerMinutesInput {
  width: 52px;
  text-align: center;
  border: 1px solid rgba(195, 198, 215, 0.7);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0b1c30;
  background: #f8fafc;
}

#timerMinutesInput:focus {
  outline: 2px solid #2563eb;
  border-color: transparent;
}

.timer-set-label {
  font-size: 12px;
  color: #64748b;
}

/* ── Template view tabs ─────────────────────────────────────── */
.tpl-view-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.5);
  padding-bottom: 0;
}

.tpl-view-tabs button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  transition: color 0.15s;
}

.tpl-view-tabs button.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

/* ── User templates list ────────────────────────────────────── */
.user-tpl-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(195, 198, 215, 0.35);
}

.user-tpl-card:last-child { border-bottom: none; }

.user-tpl-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-tpl-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #0b1c30;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-tpl-info small {
  font-size: 11px;
  color: #64748b;
}

.user-tpl-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.user-tpl-actions button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(195, 198, 215, 0.6);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}

.user-tpl-actions button:hover { background: #f1f5f9; }
.user-tpl-actions button.danger-action { color: #dc2626; border-color: rgba(220,38,38,0.3); }
.user-tpl-actions button.danger-action:hover { background: #fef2f2; }

/* Topbar search button — bare icon, no border/background */
.topbar-search-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #64748b;
  padding: 0;
  border-radius: 8px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.topbar-search-btn:hover { color: #0b1c30; }

.topbar-search-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Notification Bell ──────────────────────────────────────── */
.notif-bell {
  position: relative;
}

.notif-bell.has-alert::after {
  content: attr(data-count);
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.bell-panel {
  width: 320px;
  right: 0;
  left: auto;
  padding: 0;
  overflow: hidden;
}

.bell-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.5);
}

.bell-header strong {
  font-size: 14px;
  font-weight: 700;
  color: #0b1c30;
}

.bell-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.bell-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(195, 198, 215, 0.3);
  cursor: pointer;
  transition: background 0.1s;
  align-items: flex-start;
}

.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: #f8fafc; }
.bell-item.bell-read { opacity: 0.55; }

.bell-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dbeafe;
  display: grid;
  place-items: center;
}

.bell-item-icon svg {
  width: 14px;
  height: 14px;
  color: #2563eb;
}

.bell-item.bell-invite .bell-item-icon {
  background: #d1fae5;
}

.bell-item.bell-invite .bell-item-icon svg { color: #059669; }

.bell-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bell-item-body span {
  font-size: 13px;
  color: #0b1c30;
  line-height: 1.4;
}

.bell-item-body small {
  font-size: 11px;
  color: #94a3b8;
}

.bell-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.bell-item-actions button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(195, 198, 215, 0.6);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}

.bell-item-actions button:first-child {
  background: #2563eb;
  color: #fff;
  border-color: transparent;
}

.bell-item-actions button:first-child:hover { background: #1d4ed8; }
.bell-item-actions button:last-child:hover { background: #f1f5f9; }

/* ── PWA Install Banner ─────────────────────────────────────── */
.pwa-banner {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0b1c30;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 9999;
  font-size: 13px;
  white-space: nowrap;
  transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: calc(100vw - 32px);
}

.pwa-banner.visible { bottom: 20px; }

.pwa-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.pwa-text { flex: 1; font-weight: 500; }

.pwa-share-icon {
  width: 18px;
  height: 18px;
  color: #60a5fa;
  flex-shrink: 0;
}

.pwa-ios-steps {
  color: #94a3b8;
  font-size: 12px;
}

.pwa-android-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.pwa-android-btn:hover { background: #1d4ed8; }

.pwa-dismiss {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #94a3b8;
  padding: 0;
  flex-shrink: 0;
}

.pwa-dismiss svg { width: 12px; height: 12px; }
.pwa-dismiss:hover { background: rgba(255,255,255,0.2); color: #fff; }

@media (max-width: 480px) {
  .pwa-banner { white-space: normal; flex-wrap: wrap; bottom: -120px; }
  .pwa-banner.visible { bottom: 16px; }
}

/* ── Dashboard bell panel position ─────────────────────────── */
.dash-bell-combo {
  position: relative;
}

.dash-bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: 320px;
}

/* System notification icon color */
.bell-item-icon[style*="ede9fe"] svg { color: #7c3aed; }

/* ── Dashboard admin nav section ────────────────────────────── */
.dashboard-admin-nav {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(195, 198, 215, 0.4);
}

.dashboard-admin-nav > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dc2626;
  padding: 0 12px;
  display: block;
  margin-bottom: 4px;
}

.dashboard-admin-nav button {
  color: #dc2626;
}

.dashboard-admin-nav button:hover,
.dashboard-admin-nav button.active {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-admin-nav button svg {
  stroke: #dc2626;
}

/* ── Inline Admin Dashboard ────────────────────────────────── */
.dash-admin-heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text-primary, #182230);
}

.dash-admin-sub {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  margin: 0 0 20px;
}

.dash-admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-admin-count {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin-left: auto;
}

.dash-admin-loading {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  padding: 24px 0;
}

.dash-admin-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-admin-table .admin-user-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 80px 80px 80px 80px;
  gap: 8px;
  align-items: center;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 16px;
}

.dash-admin-table .admin-user-row select,
.dash-admin-table .admin-user-row input[type="number"] {
  height: 32px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  background: var(--bg, #f8fafc);
  width: 100%;
}

.dash-admin-table .admin-user-row button[data-admin-save] {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.dash-admin-table .admin-user-row button[data-admin-save]:hover {
  background: #1d4ed8;
}

.dash-admin-table .admin-user-main strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.dash-admin-table .admin-user-main span {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  word-break: break-all;
}

/* ── Share Modal ───────────────────────────────────────────── */
.share-modal-box {
  width: 480px;
  max-width: 95vw;
}

.share-invite-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.share-invite-row input[type="email"] {
  flex: 1;
  height: 38px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}

.share-invite-row select {
  height: 38px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 13px;
  background: var(--bg, #f8fafc);
  cursor: pointer;
}

.share-invite-row .primary-btn {
  height: 38px;
  padding: 0 18px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.share-invite-row .primary-btn:hover { background: #1d4ed8; }

.share-role-explainer {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin-bottom: 16px;
}

.share-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.share-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border, #f1f5f9);
}

.share-member-row:last-child { border-bottom: none; }

.share-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #213145;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.share-member-email {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-member-role-select {
  height: 30px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
  background: var(--bg, #f8fafc);
  cursor: pointer;
}

.share-member-role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: #f1f5f9;
  color: #64748b;
}

.owner-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.share-remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  padding: 0;
}

.share-remove-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  box-shadow: none;
}

/* ── Viewer mode ───────────────────────────────────────────── */
.viewer-badge {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: #fef9c3;
  color: #854d0e;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid #fde047;
  pointer-events: none;
}

/* Hide creation tools for viewers */
body.viewer-mode .toolbox,
body.viewer-mode #boardToolbar,
body.viewer-mode .sticky-toolbar,
body.viewer-mode #shareBtn {
  display: none !important;
}

body.viewer-mode .topbar {
  position: relative;
}

/* ── Admin user analytics row ───────────────────────────────── */
.admin-user-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.admin-user-stats span {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
}

.dash-admin-table .admin-user-row {
  grid-template-columns: 1fr 110px 110px 72px 72px 72px 72px;
}

/* ── Drag & drop image onto canvas ─────────────────────────── */
#viewport.drag-over::after {
  content: "Drop image here";
  position: fixed;
  inset: 0;
  background: rgba(37, 99, 235, 0.08);
  border: 3px dashed #2563eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #2563eb;
  pointer-events: none;
  z-index: 9999;
}
