:root {
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --line: #d7e1eb;
  --text: #152035;
  --muted: #65758b;
  --primary: #1967d2;
  --primary-strong: #0f3f8f;
  --accent: #0f9f8f;
  --danger: #c2413a;
  --shadow: 0 18px 45px rgba(20, 38, 63, 0.08);
}
body {
  background:
    radial-gradient(circle at top left, rgba(25, 103, 210, 0.12), transparent 30rem),
    linear-gradient(180deg, #f7faff 0%, #eef4f8 100%);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0;
}
a {
  text-decoration: none;
}
.app-nav {
  background: rgba(14, 35, 67, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
}
.navbar-brand,
.app-nav .nav-link {
  color: #fff;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6ee7d8, #8fb7ff);
  color: #09203c;
  font-weight: 800;
}
.nav-pills-soft {
  gap: .15rem;
}
.nav-pills-soft .nav-link {
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  padding: .45rem .75rem;
}
.nav-pills-soft .nav-link:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}
.user-chip {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: .34rem .7rem;
  font-size: .875rem;
  background: rgba(255, 255, 255, 0.08);
}
.btn-light-subtle {
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  color: #172033;
}
.app-main {
  max-width: 1440px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.narrow {
  max-width: 560px;
}
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  border-radius: 8px;
  padding: 1.4rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 63, 143, 0.96), rgba(15, 159, 143, 0.88)),
    linear-gradient(90deg, #0f3f8f, #0f9f8f);
  box-shadow: 0 22px 55px rgba(15, 63, 143, 0.24);
}
.dashboard-hero h1 {
  font-weight: 750;
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.dashboard-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
}
.eyebrow {
  display: inline-block;
  margin-bottom: .35rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .6rem;
}
.hero-actions .btn {
  border-radius: 999px;
  font-weight: 650;
}
.auth-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 3rem;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}
.auth-shell h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.stat::after {
  content: "";
  position: absolute;
  inset: auto 1rem 0 1rem;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px 999px 0 0;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}
.stat strong {
  font-size: 2rem;
  line-height: 1;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}
.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}
.section-title span,
.section-title a {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 650;
}
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.list-row:hover {
  color: var(--primary);
}
.list-row:first-of-type {
  border-top: 0;
}
.list-row span:last-child {
  color: var(--muted);
  text-align: right;
}
.filterbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: .75rem;
}
.mini-heading {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
}
.task-line,
.plan-line,
.compact-item {
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e7edf4;
  padding: .75rem;
}
.task-line {
  margin-bottom: .5rem;
}
.task-line.danger {
  color: var(--danger);
  background: #fff7f6;
  border-color: #f3c9c4;
}
.plan-line {
  margin-bottom: .65rem;
}
.compact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .65rem;
}
.compact-item span,
.empty-state {
  color: var(--muted);
}
.empty-state {
  margin-bottom: 0;
}
.prewrap {
  white-space: pre-wrap;
}
.flashcard {
  min-height: 210px;
}
.admin-user {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.admin-user:first-of-type {
  border-top: 0;
}
@media (max-width: 768px) {
  .auth-shell,
  .filterbar,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    justify-content: flex-start;
  }
  .list-row {
    flex-direction: column;
  }
  .list-row span:last-child {
    text-align: left;
  }
}
