/*
 * Responsibility: Style the single-column A Level learning dashboard.
 * Implementation:
 * 1. Use a calm, readable layout optimized for repeated study check-ins.
 * 2. Keep all modules in one column with compact controls and stable card sizing.
 * 3. Provide clear status colors without relying on a one-note palette.
 */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #172033;
  --muted: #687385;
  --line: #d9e1ec;
  --blue: #2454d6;
  --green: #147a52;
  --amber: #a85f00;
  --red: #b42318;
  --ink: #111827;
  --shadow: 0 16px 40px rgba(24, 39, 75, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 52%, #f3f6f1 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero {
  padding: 22px 0 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.hero-copy,
.muted {
  color: var(--muted);
}

.panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 247, 251, 0.96);
  backdrop-filter: blur(10px);
}

.tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  border-color: #b9c8df;
  background: var(--surface);
  color: var(--blue);
  font-weight: 700;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.filters,
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters {
  margin-bottom: 14px;
}

.chip,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2ff;
  color: #24439a;
  font-size: 12px;
  font-weight: 700;
}

.status.todo {
  background: #f3f4f6;
  color: #4b5563;
}

.status.active {
  background: #e8f0ff;
  color: var(--blue);
}

.status.done {
  background: #e8f7ef;
  color: var(--green);
}

.status.overdue {
  background: #fff1f0;
  color: var(--red);
}

.score {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f8f0df;
  color: #7c4a03;
  font-size: 12px;
  font-weight: 700;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.item-header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.item-title {
  margin-bottom: 4px;
  font-weight: 800;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.resource-note {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  background: #f7faf8;
  color: #334155;
  font-size: 13px;
}

.button,
button.button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #b8c4d6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 5px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #b8c4d6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 10px 11px;
}

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

hr {
  width: 100%;
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: var(--line);
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2f7;
  color: #334155;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.notice {
  padding: 12px;
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: #fff7ed;
  color: #5f3b05;
}

.empty {
  padding: 18px;
  border: 1px dashed #b8c4d6;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

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

  h1 {
    font-size: 28px;
  }

  .stats,
  .grid-two {
    grid-template-columns: 1fr;
  }

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

  .item-header {
    display: block;
  }
}
