:root {
  --text: #1f2328;
  --muted: #5e6c84;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --panel-soft: #f6f9fb;
  --line: rgba(9, 30, 66, 0.14);
  --line-strong: rgba(9, 30, 66, 0.24);
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 6px 14px rgba(15, 23, 42, 0.07);
  --brand: #74e8d8;
  --brand-deep: #17304b;
  --navy: #15253b;
  --navy-soft: #1c3048;
  --navy-deep: #101d31;
  --surface-tint: #eef8f7;
  --danger: #c9372c;
  --warning: #ae6f00;
  --success: #216e4e;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-body);
  background: #f7fbfc;
}

body {
  transition: background 180ms ease;
}

body[data-board-bg="walnut"] {
  background:
    radial-gradient(circle at top left, rgba(116, 232, 216, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.98)),
    linear-gradient(90deg, rgba(151, 123, 107, 0.08) 0%, rgba(90, 72, 62, 0.04) 100%);
}

body[data-board-bg="slate"] {
  background:
    radial-gradient(circle at top right, rgba(23, 48, 75, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 250, 0.98)),
    linear-gradient(135deg, rgba(57, 86, 117, 0.06), rgba(20, 35, 52, 0.03));
}

body[data-board-bg="olive"] {
  background:
    radial-gradient(circle at 15% 15%, rgba(116, 232, 216, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 247, 0.98)),
    linear-gradient(135deg, rgba(88, 129, 87, 0.06), rgba(52, 78, 65, 0.03));
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.login-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(116, 232, 216, 0.24), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(116, 232, 216, 0.14), transparent 24%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
}

.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  min-height: 100vh;
  padding: 3rem;
}

.login-story,
.login-panel {
  display: flex;
  align-items: center;
}

.login-story {
  padding: 2rem;
  color: #fff;
}

.login-story .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.acuityx-lockup {
  margin-bottom: 1rem;
}

.acuityx-word {
  display: inline-block;
  color: var(--navy-deep);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.acuityx-word span {
  color: var(--brand);
}

.acuityx-lockup.light .acuityx-word {
  color: #fff;
}

.sidebar .acuityx-word {
  color: var(--brand-deep);
}

.login-story h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.96;
}

.login-lede {
  max-width: 34rem;
  margin: 1.2rem 0 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}

.story-card,
.login-card,
.sidebar-card,
.metric-card,
.panel,
.bucket,
.task-card,
.settings-card,
.detail-card,
.empty-state,
.upload-card,
.draft-card,
.bucket-manager-card,
.summary-item,
.risk-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.story-card {
  max-width: 34rem;
  margin-top: 2rem;
  padding: 1.4rem;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.story-label,
.sidebar-label,
.panel-label {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.8;
}

.login-panel {
  justify-content: center;
}

.login-card {
  width: min(31rem, 100%);
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.login-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
}

.login-note {
  margin: 0.8rem 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.user-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(245, 247, 250, 0.78);
  text-align: left;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.user-option:hover,
.user-option.is-selected {
  transform: translateY(-2px);
  border-color: rgba(12, 102, 228, 0.3);
  background: rgba(255, 255, 255, 0.96);
}

.user-avatar,
.mini-avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
}

.avatar-sunrise {
  background: linear-gradient(135deg, #ff8f73, #ffbb87);
}

.avatar-tide {
  background: linear-gradient(135deg, #00a3bf, #7bdff2);
}

.avatar-ink {
  background: linear-gradient(135deg, #44546f, #6f86b6);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.field span {
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.bucket-title-input,
.board-name-input {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
}

.inline-create-form input,
.inline-create-form select {
  width: 100%;
  padding: 0.68rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.field textarea {
  resize: vertical;
}

.primary-button,
.ghost-button,
.chip,
.status-pill {
  border-radius: 999px;
}

.primary-button,
.ghost-button {
  border: 0;
  padding: 0.58rem 0.82rem;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 8px;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #55d6c4);
  color: var(--navy-deep);
}

.ghost-button {
  border: 1px solid rgba(23, 48, 75, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-deep);
}

.ghost-button.danger {
  color: var(--danger);
}

.ghost-button.light {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
}

.wide {
  width: 100%;
  margin-top: 1.2rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid rgba(23, 48, 75, 0.08);
  backdrop-filter: blur(12px);
  color: var(--text);
}

.brand-block {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.brand-block h1 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.sidebar-card {
  padding: 0.72rem;
  margin-bottom: 0.7rem;
  background: rgba(247, 250, 252, 0.96);
  border-color: rgba(23, 48, 75, 0.08);
  box-shadow: none;
}

.sidebar-label {
  color: var(--muted);
}

.current-user {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.current-user-copy strong {
  display: block;
}

.current-user-copy span,
.tiny-note,
.helper-copy {
  color: var(--muted);
}

.sidebar .current-user-copy span,
.sidebar .tiny-note,
.sidebar .helper-copy {
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.nav-link {
  width: 100%;
  padding: 0.56rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(116, 232, 216, 0.14);
  border-color: rgba(23, 48, 75, 0.08);
}

.stack {
  display: grid;
  gap: 0.8rem;
}

.sidebar-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-stat strong {
  color: var(--brand-deep);
}

.workspace-tree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.workspace-tree-copy {
  display: grid;
  gap: 0.08rem;
}

.workspace-tree-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-mini-add {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid rgba(23, 48, 75, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 700;
  line-height: 1;
}

.main-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  padding: 0.5rem 0.65rem 0.75rem;
}

.topbar,
.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.56rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid rgba(23, 48, 75, 0.08);
  box-shadow: var(--shadow-soft);
}

.topbar {
  margin-bottom: 0.7rem;
}

.workspace-bar {
  margin-bottom: 0.85rem;
}

.topbar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.topbar-actions,
.workspace-actions,
.board-header-actions,
.bucket-toolbar,
.detail-actions,
.draft-actions,
.row-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.import-group {
  position: relative;
}

.import-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 10rem;
  padding: 0.35rem;
  border: 1px solid rgba(23, 48, 75, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.import-option {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-deep);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 600;
}

.import-option:hover {
  background: #f6f9fb;
}

.workspace-path {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.workspace-breadcrumb {
  display: grid;
  gap: 0.5rem;
}

.workspace-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.workspace-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0 0.68rem;
  border-radius: 999px;
  background: rgba(116, 232, 216, 0.12);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.8rem;
}

.workspace-chip.active {
  background: var(--brand);
  color: var(--navy-deep);
}

.page {
  display: none;
  min-width: 0;
}

.page.active {
  display: block;
}

.dashboard-grid,
.imports-layout,
.settings-layout {
  display: grid;
  gap: 1rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.panel,
.upload-card,
.settings-card {
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.98);
}

.panel h3,
.upload-card h3,
.settings-card h3,
.board-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
}

.metric-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.94);
}

.metric-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.metric-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.metric-value-row h3 {
  margin: 0;
  font-size: 2.2rem;
}

.metric-note {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.chip {
  background: rgba(9, 30, 66, 0.08);
  color: var(--text);
}

.status-pill {
  background: rgba(116, 232, 216, 0.16);
  color: var(--navy-deep);
}

.status-pill.blocked {
  background: rgba(201, 55, 44, 0.14);
  color: var(--danger);
}

.status-pill.slip {
  background: rgba(174, 111, 0, 0.14);
  color: var(--warning);
}

.status-pill.good {
  background: rgba(33, 110, 78, 0.14);
  color: var(--success);
}

.summary-list,
.risk-list,
.timeline-list,
.draft-list,
.upload-list,
.settings-grid,
.bucket-manager-list {
  display: grid;
  gap: 0.7rem;
}

.summary-item,
.risk-item,
.timeline-item,
.draft-card {
  padding: 0.95rem;
  background: #fbfcfd;
  box-shadow: var(--shadow-soft);
}

.access-card,
.access-list {
  display: grid;
  gap: 0.65rem;
}

.access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(23, 48, 75, 0.08);
  border-radius: 10px;
  background: #fbfcfd;
}

.summary-item strong,
.risk-item strong,
.timeline-item strong,
.draft-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.two-up,
.upload-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

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

.settings-grid-split {
  grid-template-columns: 0.9fr 1.1fr;
}

.inline-create-form {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.board-wrap {
  display: grid;
  gap: 0.75rem;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.15rem;
  color: var(--text);
}

.board-header .panel-label,
.board-header .helper-copy {
  color: var(--muted);
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 16rem;
  gap: 0.75rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.bucket {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(23, 48, 75, 0.08);
  box-shadow: var(--shadow-soft);
}

.bucket.dragging {
  opacity: 0.55;
}

.bucket.is-column-over {
  outline: 2px solid rgba(116, 232, 216, 0.52);
  outline-offset: -2px;
}

.bucket-head {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(9, 30, 66, 0.08);
}

.bucket-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.bucket-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.bucket-topline .row-actions {
  flex-wrap: nowrap;
}

.bucket-icon-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  border: 1px solid rgba(9, 30, 66, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #42526e;
  font-size: 0.95rem;
  font-weight: 700;
}

.bucket-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.72rem;
  height: 1.72rem;
  border: 1px solid rgba(9, 30, 66, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #42526e;
  font-size: 0.95rem;
}

.bucket-title-input {
  border: 0;
  padding: 0.15rem 0;
  background: transparent;
  font-weight: 700;
  font-size: 0.98rem;
  box-shadow: none;
  min-width: 0;
}

.bucket-title-input:focus {
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(12, 102, 228, 0.36);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(12, 102, 228, 0.12);
}

.bucket-image {
  position: relative;
  height: 4.8rem;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 48, 75, 0.74), rgba(116, 232, 216, 0.7)),
    linear-gradient(135deg, #dff4f1, #f3fbfa);
  box-shadow: inset 0 -18px 32px rgba(23, 48, 75, 0.14);
}

.bucket-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.22));
}

.bucket-image.bucket-image-slate {
  background:
    linear-gradient(135deg, rgba(23, 48, 75, 0.72), rgba(78, 118, 159, 0.5)),
    linear-gradient(135deg, #e9f0f6, #f8fbfd);
}

.bucket-image.bucket-image-olive {
  background:
    linear-gradient(135deg, rgba(71, 131, 113, 0.68), rgba(116, 232, 216, 0.52)),
    linear-gradient(135deg, #eaf7f2, #f9fcfb);
}

.bucket-image.bucket-image-ember {
  background:
    linear-gradient(135deg, rgba(220, 146, 66, 0.74), rgba(255, 208, 147, 0.64)),
    linear-gradient(135deg, #fff4e7, #fffaf3);
}

.bucket-body {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem;
}

.bucket-dropzone {
  min-height: 4rem;
  border-radius: 12px;
}

.bucket-dropzone.is-over {
  background: rgba(116, 232, 216, 0.08);
  outline: 2px dashed rgba(116, 232, 216, 0.28);
}

.task-card {
  padding: 0.54rem 0.58rem;
  background: var(--panel-strong);
  border-radius: 8px;
  border: 1px solid rgba(23, 48, 75, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.task-card-high {
  background: linear-gradient(180deg, #fff1ef 0%, #ffe2dd 100%);
}

.task-card-medium {
  background: linear-gradient(180deg, #fff9df 0%, #fff0b3 100%);
}

.task-card-low {
  background: linear-gradient(180deg, #eafaf7 0%, #d0f3eb 100%);
}

.task-card-slip {
  background: linear-gradient(180deg, #fff5e2 0%, #ffe2b8 100%);
}

.task-card-blocked {
  background: linear-gradient(180deg, #ffe7e7 0%, #ffc9c9 100%);
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(9, 30, 66, 0.18);
}

.task-card.dragging {
  opacity: 0.45;
}

.task-title {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 600;
}

.task-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.42rem;
}

.task-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.task-owner {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-avatar {
  width: 1.42rem;
  height: 1.42rem;
  border-radius: 8px;
  font-size: 0.68rem;
}

.add-card-row,
.add-bucket-tile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem;
  border-radius: 8px;
  color: #42526e;
  font-weight: 600;
  font-size: 0.88rem;
}

.add-card-row {
  background: transparent;
  border: 0;
  text-align: left;
}

.add-card-row:hover,
.add-bucket-tile:hover {
  background: rgba(9, 30, 66, 0.08);
}

.add-bucket-tile {
  min-height: 8rem;
  align-self: start;
  justify-content: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px dashed rgba(23, 48, 75, 0.16);
  color: var(--brand-deep);
  box-shadow: none;
}

.empty-state {
  padding: 0.75rem;
  background: rgba(246, 249, 251, 0.96);
  color: var(--muted);
  box-shadow: none;
  text-align: center;
}

.settings-card,
.upload-card {
  box-shadow: var(--shadow-soft);
}

.board-name-input {
  background: #fff;
}

.board-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.bucket-manager-card {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 248, 250, 0.94);
  box-shadow: var(--shadow-soft);
}

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

.span-2 {
  grid-column: span 2;
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(23, 48, 75, 0.12);
  backdrop-filter: blur(4px);
}

.modal-card,
.detail-card {
  width: min(44rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
}

.board-switcher-card {
  width: min(52rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(9, 30, 66, 0.1);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.1);
}

.board-switcher-top {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.board-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(9, 30, 66, 0.18);
  border-radius: 10px;
  background: #fff;
}

.board-search input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 1rem;
  background: transparent;
}

.board-search-icon {
  font-size: 1.35rem;
  color: var(--muted);
}

.board-filter-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.board-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f2f4;
  color: var(--text);
  font-weight: 700;
}

.board-filter-chip.active {
  border-color: rgba(116, 232, 216, 0.28);
  background: rgba(116, 232, 216, 0.12);
  color: var(--navy-deep);
}

.board-switcher-content {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.4rem;
}

.board-switcher-section {
  display: grid;
  gap: 0.85rem;
}

.board-switcher-section h4 {
  margin: 0;
  font-size: 1rem;
}

.board-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
}

.board-picker-card {
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.board-picker-card:hover {
  transform: translateY(-1px);
}

.board-picker-cover {
  position: relative;
  height: 5.3rem;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22)),
    linear-gradient(135deg, #243447, #42526e);
}

.board-picker-cover[data-bg="walnut"] {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22)),
    linear-gradient(90deg, #2d241f 0%, #3b312c 18%, #241d1a 36%, #342922 54%, #251e1b 72%, #382d27 100%);
}

.board-picker-cover[data-bg="olive"] {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.2)),
    linear-gradient(135deg, #344e41, #588157);
}

.board-picker-star {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.board-picker-star.is-starred {
  background: rgba(255, 214, 10, 0.9);
}

.board-picker-copy {
  padding: 0.62rem;
}

.board-picker-copy strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.35;
}

.board-picker-meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.modal-header .eyebrow {
  color: var(--muted);
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: rgba(9, 30, 66, 0.08);
  color: var(--text);
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1rem;
}

.action-history-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.detail-hero {
  padding: 1rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(12, 102, 228, 0.94), rgba(55, 173, 170, 0.78)),
    linear-gradient(135deg, #1d3557, #457b9d);
  color: #fff;
}

.detail-hero h3 {
  margin: 0.4rem 0 0;
  font-size: 1.7rem;
}

.detail-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 248, 250, 0.96);
}

.detail-section h4 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .metrics-grid,
  .two-up,
  .upload-grid,
  .settings-grid,
  .settings-grid-3,
  .settings-grid-split,
  .board-detail-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

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

  .topbar,
  .workspace-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-path {
    width: 100%;
  }

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

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

  .span-2 {
    grid-column: span 1;
  }
}
