/* ─── APP SHELL ─── */
.app-body {
  background: var(--bg);
  min-height: 100vh;
}

.app-main {
  min-height: calc(100vh - 72px);
}

/* ─── LANDING PAGE CTA ADDITIONS ─── */
.nav-cta {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.88; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.hero-btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.hero-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.hero-btn-note {
  font-size: 0.85rem;
  color: var(--fg-light);
  font-weight: 400;
}

/* ─── APP NAV ─── */
.app-nav {
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.app-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  font-family: var(--font-body);
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--fg); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }

/* ─── FORM PAGE ─── */
.form-page {
  padding: 3rem 2rem 5rem;
}
.form-container {
  max-width: 720px;
  margin: 0 auto;
}
.form-header {
  margin-bottom: 2.5rem;
}
.form-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.form-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.form-subtitle {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
}

/* Form sections */
.form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.form-section-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
  font-weight: 300;
}

/* Form inputs */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.4rem;
}
.required { color: var(--accent); }
.form-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-select { cursor: pointer; }
.form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--fg-light);
  margin-top: 0.35rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group-sm { flex: 0 0 120px; }

/* Systems grid */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.system-card {
  cursor: pointer;
  display: block;
}
.system-card input[type="checkbox"] { display: none; }
.system-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.system-card:hover .system-card-inner {
  border-color: var(--accent-light);
  transform: translateY(-1px);
}
.system-card input[type="checkbox"]:checked + .system-card-inner {
  border-color: var(--accent);
  background: #fff9f6;
}
.system-icon { font-size: 1.4rem; }
.system-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
}
.system-desc {
  font-size: 0.75rem;
  color: var(--fg-light);
  line-height: 1.4;
  font-weight: 300;
}

/* Submit */
.form-submit {
  margin-top: 2rem;
  text-align: center;
}
.form-submit-note {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--fg-light);
}

/* Error banner */
.error-banner {
  background: #fff5f5;
  border: 1px solid #ffc5c5;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #b91c1c;
}

/* ─── DASHBOARD ─── */
.dashboard {
  min-height: 100vh;
}

.dashboard-header {
  background: var(--green);
  color: #fff;
  padding: 2.5rem 2rem 1.5rem;
}
.dashboard-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.dashboard-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.dashboard-subtitle {
  font-size: 0.9rem;
  opacity: 0.7;
  font-weight: 300;
}
.home-switcher { flex-shrink: 0; }
.home-select {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
}

/* Dashboard stats */
.dashboard-stats {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.dash-stat {}
.dash-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-light);
  margin-bottom: 0.2rem;
}
.dash-stat-label {
  font-size: 0.8rem;
  opacity: 0.65;
  font-weight: 300;
}
.dash-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

/* Dashboard body layout */
.dashboard-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ─── SIDEBAR ─── */
.dashboard-sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.sidebar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--fg);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.sidebar-empty {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-align: center;
  padding: 1.5rem 0;
  font-weight: 300;
}
.upcoming-list { display: flex; flex-direction: column; gap: 0.75rem; }
.upcoming-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  background: var(--bg);
}
.upcoming-item.priority-high { border-left: 3px solid #dc2626; }
.upcoming-item.priority-medium { border-left: 3px solid #f59e0b; }
.upcoming-item.priority-low { border-left: 3px solid #22c55e; }
.upcoming-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.upcoming-cat {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.priority-badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-transform: capitalize;
}
.priority-badge-high { background: #fef2f2; color: #dc2626; }
.priority-badge-medium { background: #fffbeb; color: #d97706; }
.priority-badge-low { background: #f0fdf4; color: #16a34a; }

.upcoming-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.upcoming-actions { margin-top: 0.5rem; }
.btn-complete {
  font-size: 0.78rem;
  color: var(--green);
  background: var(--green-light);
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: background 0.15s;
}
.btn-complete:hover { background: #d4e8d8; }

/* ─── CALENDAR ─── */
.calendar-section {}
.calendar-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--fg);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.calendar-subtitle {
  font-size: 0.88rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
  font-weight: 300;
}
.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.month-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.month-block-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.month-block-current .month-header {
  background: linear-gradient(135deg, #fff9f6 0%, var(--bg) 100%);
}
.month-header-left { display: flex; align-items: center; gap: 0.75rem; }
.month-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.current-indicator { color: var(--accent); }
.month-count {
  font-size: 0.75rem;
  color: var(--fg-light);
  background: var(--border);
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
}
.month-progress {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 500;
}

/* Task items */
.task-list {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.task-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  border-left-width: 3px;
  transition: box-shadow 0.15s;
}
.task-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.task-completed { opacity: 0.55; }
.priority-border-high { border-left-color: #dc2626; }
.priority-border-medium { border-left-color: #f59e0b; }
.priority-border-low { border-left-color: #22c55e; }

.task-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.task-meta { display: flex; align-items: center; gap: 0.5rem; }
.task-category {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-dot-high { background: #dc2626; }
.priority-dot-medium { background: #f59e0b; }
.priority-dot-low { background: #22c55e; }

.task-done-badge {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 500;
}
.task-complete-btn {
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
}
.task-complete-btn:hover {
  background: var(--green-light);
  color: var(--green);
  border-color: transparent;
}

.task-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 0.3rem;
}
.task-title-done {
  text-decoration: line-through;
  color: var(--fg-light);
}
.task-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
  font-weight: 300;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  gap: 1rem;
}
.empty-icon { font-size: 3rem; }
.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--fg);
}
.empty-state p {
  font-size: 1rem;
  color: var(--fg-muted);
  font-weight: 300;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .dashboard-body {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .dashboard-sidebar {
    position: static;
  }
  .systems-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .app-nav { padding: 1rem; }
  .form-page { padding: 2rem 1rem 4rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-group-sm { flex: auto; }
  .systems-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-header { padding: 1.5rem 1rem; }
  .dashboard-header-inner { flex-direction: column; }
  .dashboard-body { padding: 1rem; }
  .dashboard-stats { flex-wrap: wrap; gap: 1rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
