:root {
  --rouge: #7f1d1d;
  --rouge-dark: #450a0a;
  --navy: #0f172a;
  --navy-light: #1e293b;
  --silver: #94a3b8;
  --silver-light: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --success: #15803d;
  --danger: #b91c1c;
  --primary: #7f1d1d;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 45%, #f1f5f9 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

#app {
  min-height: 100vh;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hidden {
  display: none !important;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  margin: 0;
  font-size: 1.35rem;
  color: var(--rouge);
  font-weight: 700;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Typography */
h1, h2, h3 {
  color: var(--navy);
}

.text-muted {
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--rouge);
  box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.12);
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--rouge);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--rouge-dark);
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--navy);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-block {
  width: 100%;
}

/* Login */
#login-view {
  max-width: 380px;
  margin: 10vh auto;
  padding: 0 1rem;
}

#login-view .card {
  padding: 2rem 1.75rem;
}

#login-view h1 {
  text-align: center;
  margin-bottom: 0.25rem;
}

#login-view .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

/* Main layout */
#main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

/* Entry cards */
.entry {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.65rem;
}

.entry .title {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.entry .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.entry .progress {
  font-size: 0.9rem;
  color: var(--success);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* Level colours */
.level-DONE .title { color: var(--navy); }
.level-BIG .title { color: #1d4ed8; }
.level-BIGGER .title { color: #b45309; }
.level-BIGGEST .title { color: var(--rouge); }

/* Section headers */
.section-title {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

/* Progress row in form */
.progress-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.progress-row input {
  margin-bottom: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.checkbox-label input {
  width: auto;
}