:root {
  --bg: #f3efe6;
  --surface: rgba(255, 251, 244, 0.84);
  --surface-strong: #fffaf1;
  --ink: #1f2933;
  --muted: #66727f;
  --line: rgba(38, 50, 56, 0.12);
  --accent: #ff6b35;
  --accent-dark: #cf4f1f;
  --accent-soft: rgba(255, 107, 53, 0.16);
  --secondary: #124559;
  --success: #0f9d58;
  --danger: #b42318;
  --shadow: 0 28px 60px rgba(20, 24, 28, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Segoe UI Variable', 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(18, 69, 89, 0.18),
      transparent 28%
    ),
    radial-gradient(
      circle at right center,
      rgba(255, 107, 53, 0.18),
      transparent 32%
    ),
    linear-gradient(180deg, #f8f2e7 0%, #efe8dd 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.3;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  height: fit-content;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 24px;
}

.site-header,
.site-footer,
.section-card,
.hero,
.stat-card,
.board-card,
.kanban-column,
.task-card,
.mini-card {
  backdrop-filter: blur(22px);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 240, 0.72);
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.brand__eyebrow,
.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

.brand__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 12px;
}

.site-nav a,
.session-pill,
.button {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(18, 69, 89, 0.08);
  color: var(--secondary);
}

.session-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  gap: 16px;
}

.session-pill__name {
  font-weight: 700;
}

.session-pill__role {
  color: var(--muted);
  font-size: 13px;
  text-transform: capitalize;
}

.page-shell {
  max-width: 1440px;
  margin: 28px auto 0;
  display: grid;
  gap: 24px;
}

.hero,
.section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 107, 53, 0.24),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      rgba(255, 250, 241, 0.95),
      rgba(255, 244, 229, 0.84)
    );
}

.hero__body--board {
  display: grid;
  gap: 18px;
}

.hero-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-summary__item {
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.hero-summary__item span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 13px;
}

.hero-summary__item strong {
  font-size: 28px;
}

.hero h1,
.section-card h1,
.section-card h2,
.board-card h3,
.task-card h3,
.mini-card h3 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
}

.hero__text,
.board-card p,
.task-card p,
.muted {
  color: var(--muted);
}

.hero__actions,
.board-card__actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 124px;
  height: 124px;
  flex: 0 0 124px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.avatar-form {
  display: grid;
  gap: 16px;
}

.avatar-dropzone {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border: 1px dashed rgba(18, 69, 89, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.88),
      rgba(255, 250, 241, 0.72)
    ),
    rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.avatar-dropzone:hover,
.avatar-dropzone:focus-within {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 53, 0.58);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.94),
      rgba(255, 244, 229, 0.86)
    ),
    rgba(255, 255, 255, 0.82);
}

.avatar-dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.avatar-dropzone__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 30px;
  font-weight: 700;
}

.avatar-dropzone__preview {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(18, 69, 89, 0.14);
  background: rgba(255, 255, 255, 0.86);
}

.avatar-dropzone__icon[hidden],
.avatar-dropzone__preview[hidden] {
  display: none;
}

.avatar-dropzone__body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.avatar-dropzone__title {
  font-weight: 800;
  color: var(--ink);
}

.avatar-dropzone__meta,
.avatar-form__state {
  color: var(--muted);
  font-size: 14px;
}

.avatar-dropzone__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--secondary);
  font-weight: 800;
  white-space: nowrap;
}

.avatar-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  height: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 28px rgba(255, 107, 53, 0.2);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  background: var(--accent-dark);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.74);
  color: var(--secondary);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button--danger {
  background: var(--danger);
  box-shadow: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.stats-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card__label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.35;
}

.stat-card__value {
  font-size: 34px;
}

.section-card {
  padding: 28px;
}

.section-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.board-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.dashboard-team {
  position: sticky;
  top: 24px;
}

.board-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.board-card__meta,
.board-card__stats,
.task-card__top,
.task-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.board-card__stats {
  margin: 18px 0;
}

.board-card__stats div,
.task-card__meta div {
  min-width: 90px;
}

.board-card__stats dt,
.task-card__meta dt {
  color: var(--muted);
  font-size: 13px;
}

.board-card__stats dd,
.task-card__meta dd {
  margin: 6px 0 0;
  font-weight: 700;
}

.board-badge,
.task-priority {
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(18, 69, 89, 0.08);
  color: var(--secondary);
}

.board-badge--archived {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.task-priority--low {
  background: rgba(24, 119, 242, 0.12);
  color: #1f5fbf;
}
.task-priority--medium {
  background: rgba(255, 184, 0, 0.18);
  color: #8f6700;
}
.task-priority--high {
  background: rgba(255, 107, 53, 0.18);
  color: #b3471f;
}
.task-priority--critical {
  background: rgba(180, 35, 24, 0.16);
  color: var(--danger);
}

.empty-state {
  display: grid;
  place-items: start;
  gap: 12px;
  min-height: 220px;
}

.stack-form,
.field,
.member-list,
.mini-list {
  display: grid;
  gap: 14px;
}

.stack-form--compact {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.stack-form--inline {
  margin: 0;
  padding: 0;
  border: 0;
}

.field span,
.checkbox-row span {
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.board-toolbar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.compact-card {
  padding: 22px;
}

.quick-task-card {
  max-width: 360px;
}

.toolbar-heading {
  margin-bottom: 8px;
}

.sidebar-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}

.kanban-shell {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: start;
}

.kanban-shell--focus {
  overflow: visible;
}

.kanban-column {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(18, 69, 89, 0.12);
  box-shadow: var(--shadow);
  min-height: 420px;
  padding: 16px;
  position: relative;
}

.kanban-column::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--column-color, var(--secondary));
}

.kanban-column__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 16px;
}

.kanban-column__header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.kanban-column__header--minimal {
  align-items: center;
  margin-top: 10px;
  margin-bottom: 12px;
}

.kanban-column__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.column-edit-toggle {
  min-width: 44px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.column-editor {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.column-editor input[type='text'] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.column-editor .inline-fields {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
}

.column-editor input[type='number'] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.kanban-column__tasks {
  display: grid;
  gap: 14px;
}

.kanban-column--active {
  outline: 2px dashed var(--column-color, var(--secondary));
  outline-offset: 6px;
}

.task-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(18, 69, 89, 0.1);
  box-shadow: 0 18px 36px rgba(18, 69, 89, 0.08);
  cursor: grab;
}

.task-card.is-dragging {
  opacity: 0.5;
  transform: rotate(1deg);
}

.task-card__delete {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
}

.member-pill,
.mini-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.member-pill {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
}

.member-pill__avatar {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.member-pill--actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-pill--actions a {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.member-remove {
  border: 1px solid rgba(180, 35, 24, 0.18);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.member-pill small,
.mini-card small {
  color: var(--muted);
}

.member-list--stack {
  margin-top: 14px;
  grid-template-columns: 1fr;
}

.profile-id {
  margin: 10px 0 0;
  color: var(--muted);
}

.timing-info {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-grid,
.inline-fields {
  display: grid;
  gap: 16px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-feed {
  display: grid;
  gap: 10px;
}

.event-feed__item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.event-feed__item strong {
  display: block;
  margin-bottom: 4px;
}

.event-feed__placeholder {
  margin: 0;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  z-index: 40;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease;
}

.toast--success {
  border-left: 6px solid var(--success);
}
.toast--info {
  border-left: 6px solid var(--secondary);
}
.toast--warning {
  border-left: 6px solid var(--accent);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .dashboard-layout,
  .board-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-team,
  .board-toolbar {
    position: static;
  }

  .kanban-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 16px;
  }

  .site-header,
  .site-footer,
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-hero {
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .auth-grid,
  .kanban-shell {
    grid-template-columns: 1fr;
  }

  .quick-task-card {
    max-width: none;
  }

  .avatar-dropzone {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .avatar-dropzone__action {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .section-card,
  .hero,
  .site-header,
  .site-footer {
    padding: 18px;
    border-radius: 22px;
  }

  .stats-grid--compact {
    grid-template-columns: 1fr;
  }

  .toast-stack {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: none;
    min-width: 0;
  }

  .profile-hero {
    flex-direction: column;
  }

  .avatar-dropzone {
    grid-template-columns: 1fr;
  }

  .avatar-dropzone__icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .avatar-dropzone__preview {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
}

.member-profile-avatar {
  height: 42px;
  width: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.member-profile-creds {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pill-profile-avatar {
  height: 42px;
  width: 42px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
