:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-strong: #fffaf1;
  --panel-border: rgba(73, 53, 28, 0.12);
  --text: #2d2418;
  --muted: #73624a;
  --accent: #9d5c2f;
  --accent-strong: #6a3413;
  --accent-soft: rgba(157, 92, 47, 0.12);
  --danger: #b03824;
  --shadow: 0 22px 50px rgba(82, 60, 34, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 165, 0.7), transparent 35%),
    radial-gradient(circle at right, rgba(190, 219, 208, 0.8), transparent 30%),
    linear-gradient(180deg, #f7f1e8 0%, #efe3d1 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  padding: 24px;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 48px);
}

.login-card {
  width: min(720px, 100%);
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
  max-width: 11ch;
}

.hero-copy {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.login-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
}

.notice,
.toast {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: rgba(255, 244, 230, 0.92);
  border: 1px solid rgba(157, 92, 47, 0.18);
  color: var(--accent-strong);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  box-shadow: var(--shadow);
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  min-height: calc(100vh - 48px);
}

.sidebar,
.workspace {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px;
  gap: 18px;
}

.workspace {
  padding: 22px;
  overflow: hidden;
}

.user-row,
.sidebar-header,
.board-toolbar,
.section-title,
.column-header,
.board-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(157, 92, 47, 0.12);
}

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

.text-button,
.danger-button,
.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #fff9f2;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 24px rgba(106, 52, 19, 0.22);
}

.ghost-button,
.text-button {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(73, 53, 28, 0.1);
  color: var(--text);
}

.danger-button {
  color: #fff6f4;
  background: var(--danger);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.project-group {
  display: grid;
  gap: 10px;
}

.project-card {
  border: 1px solid rgba(73, 53, 28, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  padding: 14px;
}

.project-card.selected {
  border-color: rgba(157, 92, 47, 0.32);
  box-shadow: inset 0 0 0 1px rgba(157, 92, 47, 0.12);
}

.board-link,
.shared-board-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
}

.board-link.active,
.shared-board-link.active,
.board-link:hover,
.shared-board-link:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.form-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.field,
.inline-input,
.inline-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(73, 53, 28, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  color: var(--text);
}

.inline-input {
  font-weight: 700;
}

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

.board-toolbar {
  margin-bottom: 18px;
}

.board-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.board-surface {
  height: calc(100vh - 180px);
  overflow: auto;
  padding-bottom: 12px;
}

.columns {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-height: 100%;
}

.column {
  width: 320px;
  flex: 0 0 320px;
  background: var(--panel-strong);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(73, 53, 28, 0.1);
  padding: 16px;
  box-shadow: 0 14px 28px rgba(73, 53, 28, 0.08);
}

.column-list {
  display: grid;
  gap: 12px;
  min-height: 24px;
}

.card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(73, 53, 28, 0.08);
}

.card-actions,
.column-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mini-button {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(157, 92, 47, 0.1);
  color: var(--accent-strong);
}

.empty-state {
  display: grid;
  place-items: center;
  height: calc(100vh - 180px);
  text-align: center;
  color: var(--muted);
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.sortable-ghost {
  opacity: 0.35;
}

.sortable-drag {
  transform: rotate(1.4deg);
}

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

  .board-surface {
    height: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 12px;
  }

  .login-card,
  .sidebar,
  .workspace {
    padding: 16px;
    border-radius: 20px;
  }

  .column {
    width: 86vw;
    flex-basis: 86vw;
  }

  .form-row {
    flex-direction: column;
  }
}
