:root {
  --bg: #f4efe6;
  --surface: rgba(255, 252, 247, 0.8);
  --surface-strong: #fffdf9;
  --ink: #1f1b18;
  --muted: #6c6258;
  --line: rgba(31, 27, 24, 0.1);
  --accent: #eb5e28;
  --accent-deep: #b63d16;
  --teal: #126b6b;
  --danger: #9d2f2f;
  --success: #2f7d4c;
  --shadow: 0 20px 60px rgba(88, 58, 24, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(235, 94, 40, 0.22), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(18, 107, 107, 0.18), transparent 22%),
    linear-gradient(160deg, #f6f0e8 0%, #efe7db 45%, #f8f5ef 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(31, 27, 24, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 24, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.glass-card,
.panel,
.hero__copy,
.hero__stats {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.auth-layout {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.auth-copy,
.auth-panel,
.panel,
.hero__copy,
.hero__stats {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.auth-copy,
.hero__copy {
  position: relative;
  overflow: hidden;
}

.auth-copy::after,
.hero__copy::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(235, 94, 40, 0.12);
}

.eyebrow,
.section-kicker,
.topbar__label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.hero__text {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.03rem;
  margin-top: 18px;
}

.text-link {
  color: var(--accent-deep);
  font-weight: 700;
}

.alert {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.alert--success {
  color: var(--success);
  border-color: rgba(47, 125, 76, 0.2);
}

.alert--error {
  color: var(--danger);
  border-color: rgba(157, 47, 47, 0.2);
}

.login-hint {
  margin-top: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.login-hint p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-hint span {
  color: var(--ink);
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero__stats {
  display: grid;
  gap: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 2px 2px;
}

.dashboard {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
}

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

.panel--filters {
  grid-column: 1 / -1;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}

.task-form,
.filters,
.update-form {
  display: grid;
  gap: 16px;
}

.form-actions,
.user-row__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 84px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(31, 27, 24, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

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

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(235, 94, 40, 0.2);
  border-color: rgba(235, 94, 40, 0.45);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
}

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

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

.range-value,
.form-message,
.user-row__meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-message {
  min-height: 1.2em;
  margin: 0;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

a.button {
  text-decoration: none;
}

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

.button--primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 24px rgba(235, 94, 40, 0.24);
}

.button--secondary {
  background: var(--teal);
  color: white;
}

.button--danger {
  background: var(--danger);
  color: white;
  padding-inline: 16px;
}

.button--ghost {
  background: rgba(31, 27, 24, 0.08);
  color: var(--ink);
}

.button--primary:hover,
.button--secondary:hover,
.button--danger:hover,
.button--ghost:hover {
  filter: brightness(0.96);
}

.stat-card,
.team-member,
.task-card,
.user-row,
.empty-state {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.stat-card {
  padding: 18px 20px;
}

.stat-card__label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 2rem;
}

.team-list,
.user-list {
  display: grid;
  gap: 14px;
}

.user-list--spaced {
  margin-top: 18px;
}

.team-member,
.user-row {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.team-member__identity strong,
.user-row__name {
  display: block;
  font-size: 1rem;
}

.team-member__identity span,
.team-member__metrics {
  color: var(--muted);
  font-size: 0.92rem;
}

.team-member__metrics strong {
  color: var(--ink);
}

.filters {
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 20px;
}

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

.task-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.task-card {
  padding: 20px;
  display: grid;
  gap: 16px;
  animation: fadeUp 320ms ease;
}

.task-card__top,
.progress-block__labels,
.update-block__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.task-card__priority,
.task-card__status,
.task-meta__chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.82rem;
  font-weight: 700;
}

.task-card__priority {
  margin-bottom: 10px;
  background: rgba(191, 139, 48, 0.15);
  color: #845b10;
}

.status-not-started {
  background: rgba(18, 107, 107, 0.12);
  color: var(--teal);
}

.status-in-progress {
  background: rgba(235, 94, 40, 0.12);
  color: var(--accent-deep);
}

.status-blocked {
  background: rgba(157, 47, 47, 0.12);
  color: var(--danger);
}

.status-completed {
  background: rgba(47, 125, 76, 0.12);
  color: var(--success);
}

.task-card__description,
.update-block__text,
.empty-state {
  color: var(--muted);
  margin: 0;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assignee-chip {
  background: rgba(18, 107, 107, 0.1);
  color: var(--teal);
}

.due-chip {
  background: rgba(31, 27, 24, 0.08);
  color: var(--ink);
}

.progress-block {
  display: grid;
  gap: 8px;
}

.progress-bar {
  height: 10px;
  background: rgba(31, 27, 24, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.update-block {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.empty-state {
  padding: 28px;
  text-align: center;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .auth-layout,
  .hero,
  .dashboard {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 20px;
  }

  .auth-copy,
  .auth-panel,
  .hero__copy,
  .hero__stats,
  .panel {
    padding: 20px;
  }

  .grid-2,
  .topbar,
  .team-member,
  .user-row,
  .task-card__top {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  h1 {
    font-size: 2.5rem;
  }
}
