:root {
  --bg: #f3efe5;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: #fffdf8;
  --ink: #1f2933;
  --muted: #5b6670;
  --line: rgba(31, 41, 51, 0.12);
  --accent: #b85042;
  --accent-strong: #8f372b;
  --success: #2f6b4f;
  --shadow: 0 24px 60px rgba(79, 59, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 80, 66, 0.2), transparent 28%),
    radial-gradient(circle at right, rgba(47, 107, 79, 0.15), transparent 32%),
    linear-gradient(180deg, #efe5d2 0%, var(--bg) 100%);
}

.hidden {
  display: none;
}

.auth-shell {
  width: min(640px, calc(100% - 32px));
  margin: 56px auto;
}

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

.auth-panel {
  padding: 28px;
}

.hero {
  margin-bottom: 24px;
}

.layout {
  display: grid;
  grid-template-columns: 0.95fr 0.95fr 1.2fr;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero,
.form-panel,
.tasks-panel,
.detail-panel {
  padding: 24px;
}

.column-stack {
  display: grid;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent-strong);
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.lede {
  max-width: 62ch;
  color: var(--muted);
}

.hint {
  max-width: 74ch;
  color: var(--muted);
  font-size: 0.95rem;
}

label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.auth-form {
  margin-top: 20px;
}

textarea,
input,
button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
}

textarea,
input {
  margin-top: 8px;
  background: var(--panel-strong);
}

button {
  background: var(--accent);
  color: white;
  cursor: pointer;
  border: none;
  transition: transform 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button.secondary {
  width: auto;
  padding: 10px 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.session-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

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

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.commit-form {
  margin-top: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
  margin-top: 0;
}

.diff-view {
  min-height: 220px;
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #f7f2e8;
  color: #2f241d;
  overflow: auto;
  font-family: "Courier New", monospace;
  line-height: 1.45;
  border: 1px solid var(--line);
}

.form-status,
.task-meta,
.task-card p {
  color: var(--muted);
}

.task-meta p {
  margin: 0 0 8px;
  word-break: break-word;
}

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

.repository-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.repository-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  border-radius: 18px;
  padding: 16px;
  text-align: left;
}

.repository-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(184, 80, 66, 0.2);
}

.repository-card h3,
.repository-card p,
.repository-card strong,
.repository-card span {
  margin: 0;
}

.repository-card p,
.repository-card span,
.panel-hint,
.empty-state,
.selected-repository-label {
  color: var(--muted);
}

.repository-card-meta {
  flex: 1;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.repository-filter {
  display: grid;
  justify-content: start;
  gap: 6px;
}

.selected-repository {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
}

.selected-repository strong {
  display: block;
  margin-bottom: 6px;
}

.panel-hint {
  margin: 6px 0 0;
  font-size: 0.95rem;
}

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

.task-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
}

.task-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(184, 80, 66, 0.2);
}

.task-card h3,
.task-card p {
  margin: 0 0 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(47, 107, 79, 0.1);
  color: var(--success);
  font-size: 0.85rem;
  text-transform: capitalize;
}

.logs {
  min-height: 420px;
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #201b19;
  color: #efe9dc;
  overflow: auto;
  font-family: "Courier New", monospace;
  line-height: 1.45;
}

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

  .logs {
    min-height: 280px;
  }
}
