/**
 * @file app.css
 * @brief Layout der Hauptseite: Kopfzeile und Aufgabenkacheln.
 */

/* ============= Grundlagen ============= */

:root {
  --ink: #1a2332;
  --paper: #f3f0e8;
  --card: #fffcf7;
  --line: #ddd6c8;
  --muted: #5e6872;
  --teal: #0e6b66;
  --header: #172033;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.45;
}

/* ============= Kopfzeile ============= */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--header);
  color: #f7f4ee;
  border-bottom: 3px solid var(--teal);
}

.brand-mark,
.brand-sub,
.user-name {
  margin: 0;
}

.brand-mark {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-sub,
.user-name {
  color: #c9d0da;
  font-size: 0.92rem;
}

.account {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logout {
  color: #f7f4ee;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border: 1px solid #8ea0b5;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.logout:hover,
.logout:focus-visible {
  background: #24344c;
  outline: 2px solid #f7f4ee;
  outline-offset: 2px;
}

/* ============= Inhalt ============= */

.page {
  width: min(960px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
}

h1 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
  font-weight: 600;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.sign-in {
  background: var(--teal);
  color: #f7f4ee;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font: inherit;
  cursor: pointer;
}

.sign-in:hover,
.sign-in:focus-visible {
  background: #0b5753;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sign-in:disabled {
  background: #9aa3ab;
  cursor: default;
}

.auth-note {
  margin: 1rem 0 0;
  color: var(--muted);
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.task-card {
  margin: 0;
  padding: 1.1rem 1rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.task-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.task-card p {
  margin: 0;
  color: var(--muted);
}

.task-card a {
  color: var(--teal);
  text-decoration: none;
}

.task-card a:hover,
.task-card a:focus-visible {
  text-decoration: underline;
}

.task-card.is-disabled {
  background: #f7f5f1;
  color: var(--muted);
}

.noscript {
  width: min(960px, calc(100% - 2rem));
  margin: 1rem auto;
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
  }
}
