:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #607064;
  --line: #d9e1dc;
  --panel: #ffffff;
  --panel-soft: #f7faf8;
  --field: #fdfefd;
  --accent: #236a58;
  --accent-2: #b45f2a;
  --warn: #9b3f30;
  --gold: #c89b36;
  --shadow: 0 18px 50px rgba(24, 42, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(35, 106, 88, 0.1), transparent 36%),
    linear-gradient(245deg, rgba(180, 95, 42, 0.12), transparent 38%),
    #edf3ef;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

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

.auth-view {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 430px);
  align-items: center;
  gap: 28px;
}

.brand-panel,
.login-panel,
.assignment-form,
.review-board,
.stat-card,
.assignment-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(217, 225, 220, 0.9);
  box-shadow: var(--shadow);
}

.brand-panel {
  min-height: 560px;
  padding: clamp(32px, 7vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -70px -110px auto;
  width: 330px;
  height: 330px;
  background:
    linear-gradient(45deg, transparent 46%, rgba(35, 106, 88, 0.22) 47% 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(180, 95, 42, 0.18) 47% 53%, transparent 54%);
  transform: rotate(8deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
}

.lede {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.method-strip {
  width: min(680px, 100%);
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 1;
}

.method-strip span {
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 800;
}

.login-panel {
  border-radius: 8px;
  padding: 26px;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35, 106, 88, 0.14);
}

.primary-action,
.secondary-action,
.ghost-action,
.tab,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 850;
}

.primary-action {
  width: 100%;
  margin-top: 22px;
  background: var(--accent);
  color: white;
}

.secondary-action {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  padding: 0 16px;
}

.ghost-action {
  background: transparent;
  border-color: var(--line);
  color: var(--warn);
  padding: 0 12px;
}

.icon-button {
  width: 42px;
  display: grid;
  place-items: center;
  background: #fff7e6;
  border-color: #ead7a9;
  color: #7c5513;
  font-size: 1.2rem;
}

.icon-button.enabled {
  background: #e8f4ef;
  border-color: #b7d5c9;
  color: var(--accent);
}

.fine-print {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  border-radius: 8px;
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.assignment-form,
.review-board {
  border-radius: 8px;
  padding: 20px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.review-board {
  min-height: 560px;
}

.board-heading {
  align-items: center;
  margin-bottom: 16px;
}

.tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.tab {
  border: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--muted);
  padding: 0 12px;
}

.tab.active {
  background: var(--accent);
  color: white;
}

.assignment-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px dashed #b9c8bf;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
  line-height: 1.5;
}

.assignment-card {
  border-radius: 8px;
  padding: 16px;
  box-shadow: none;
}

.assignment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.card-tag {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.content-preview {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.initial-row {
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
}

.check-line {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.check-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.fortress-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.fortress {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.fortress.due {
  border-color: var(--gold);
  background: #fff9ea;
}

.fortress.overdue {
  border-color: #dfaaa0;
  background: #fff0ed;
}

.fortress.done {
  border-color: #add1c2;
  background: #edf8f3;
}

.fortress-title {
  color: var(--ink);
  font-weight: 900;
  font-size: 0.78rem;
}

.fortress-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.fortress button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--accent);
  font-weight: 850;
}

.fortress.done button {
  color: var(--muted);
}

@media (max-width: 900px) {
  .auth-view,
  .workspace {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 16px 0;
  }

  .topbar,
  .board-heading,
  .section-heading {
    display: grid;
  }

  .method-strip,
  .fortress-list,
  .form-row,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .tabs {
    width: 100%;
  }

  .secondary-action {
    flex: 1;
  }
}
