
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --background: #f5f6fb;
  --surface: #ffffff;
  --text: #20233b;
  --muted: #7b8099;
  --border: #e8eaf3;
  --purple: #7164e8;
  --purple-dark: #5548c9;
  --green: #209d79;
  --orange: #e99742;
  --blue: #4e8ee9;
  --sidebar: #20203b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 14px;
}

button, input, select { font: inherit; }

button, select { cursor: pointer; }

a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }

.sidebar {
  width: 238px;
  padding: 30px 19px 22px;
  background: var(--sidebar);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  font: 800 23px "Manrope", sans-serif;
  letter-spacing: -1px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #7567ed;
  border-radius: 12px;
  font-size: 22px;
}

.nav-label, .sidebar-footer, .eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.nav-label { color: #8585a6; margin: 46px 10px 13px; }

.sidebar nav { display: grid; gap: 7px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 12px;
  border-radius: 10px;
  color: #b6b7d0;
  font-weight: 600;
  transition: background .2s, color .2s;
}

.nav-link:hover, .nav-link.active {
  color: white;
  background: #393858;
}

.nav-link.active { box-shadow: inset 3px 0 #9c91ff; }

.sidebar-note {
  margin-top: auto;
  padding: 18px;
  border: 1px solid #45435f;
  background: #2b2a48;
  border-radius: 15px;
}

.note-icon { color: #b7adff; font-size: 22px; }
.sidebar-note h3 { margin: 12px 0 7px; font: 700 15px "Manrope", sans-serif; }
.sidebar-note p { color: #b6b7d0; font-size: 12px; line-height: 1.7; margin: 0; }
.sidebar-footer { color: #8585a6; text-align: center; margin: 24px 0 0; font-size: 9px; }

.main-content { margin-left: 238px; padding: 36px 42px 22px; max-width: 1700px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 29px; }
.eyebrow { color: var(--purple); margin: 0 0 9px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: "Manrope", sans-serif; }
h1 { font-size: clamp(26px, 3vw, 35px); letter-spacing: -1.4px; margin: 0 0 8px; }
.subtitle { color: var(--muted); margin: 0; line-height: 1.6; }
.today-chip { background: #fff; border: 1px solid var(--border); border-radius: 30px; padding: 10px 15px; white-space: nowrap; font-weight: 600; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: #28b58c; border-radius: 50%; margin-right: 7px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 25px; }
.stat-card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 17px; }
.stat-card { padding: 20px; min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 16px; }
.purple { color: #7164e8; background: #eeebff; }
.green { color: #209d79; background: #e2f7ef; }
.orange { color: #dc8a31; background: #fff0df; }
.blue { color: #4e8ee9; background: #e8f1ff; }
.stat-number { font: 800 29px "Manrope", sans-serif; letter-spacing: -1px; margin: 17px 0 4px; }
.stat-caption { font-size: 11px; color: var(--muted); margin: 0; }
.progress-track { height: 6px; background: #eeedf7; border-radius: 9px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; width: 0; background: var(--purple); border-radius: inherit; transition: width .25s; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .85fr); align-items: start; gap: 22px; }
.panel { padding: 24px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.panel-heading .eyebrow { margin-bottom: 6px; }
h2 { font-size: 20px; letter-spacing: -.6px; margin: 0; }
.count-pill { border-radius: 20px; background: #f0eeff; color: var(--purple-dark); font-size: 11px; font-weight: 700; padding: 7px 10px; white-space: nowrap; }

.field { display: grid; gap: 8px; margin-bottom: 15px; min-width: 0; }
.field label, .filter-label { color: #525670; font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-width: 0; color: var(--text); background: #fff; border: 1px solid #e0e3ee; border-radius: 9px; padding: 12px; outline: none; }
input:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #7164e81c; }
input::placeholder { color: #a7aabd; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.primary-button { border: 0; border-radius: 10px; padding: 13px 16px; color: #fff; background: var(--purple); font-weight: 700; width: 100%; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.form-message { min-height: 16px; font-size: 12px; margin: 9px 0 0; color: var(--green); }

.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 22px; margin-top: 21px; }
.list-heading h3 { font-size: 15px; margin: 0; }
.filter-label { display: flex; align-items: center; gap: 8px; }
.filter-label select { width: auto; padding: 7px 25px 7px 9px; font-size: 11px; }

.assignment-list, .priority-list { display: grid; gap: 11px; margin-top: 15px; }
.empty-state { text-align: center; padding: 27px 10px; }
.empty-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; background: #f0eeff; color: var(--purple); border-radius: 14px; font-size: 23px; }
.empty-state h3 { font-size: 14px; margin: 13px 0 6px; }
.empty-state p, .muted { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }

.task-card { display: flex; gap: 11px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.task-check { appearance: none; flex: 0 0 18px; width: 18px; height: 18px; padding: 0; margin-top: 2px; border: 1.5px solid #c9c9df; border-radius: 6px; cursor: pointer; }
.task-check:checked { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 4px white; }
.task-body { min-width: 0; flex: 1; }
.task-title { font-size: 13px; font-weight: 700; margin: 0 0 5px; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.task-card.is-complete .task-title { text-decoration: line-through; color: #9699ac; }
.task-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.delete-button { color: #b0a6b2; border: 0; background: transparent; font-size: 17px; padding: 0 3px; }
.delete-button:hover { color: #d34e62; }
.priority-badge { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 5px 7px; white-space: nowrap; }
.priority-high { background: #fff0ed; color: #c65a45; }
.priority-medium { background: #fff3df; color: #b47723; }
.priority-low { background: #e5f7ef; color: #258463; }
.overdue { color: #c65a45; font-weight: 700; }

.right-column { display: grid; gap: 22px; }
.panel-description { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 10px 0 17px; }
.priority-item { padding: 13px; border: 1px solid var(--border); border-radius: 11px; }
.priority-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.priority-item h3 { font-size: 12px; margin: 0 0 6px; }
.priority-item p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }
.priority-reason { margin-top: 8px !important; color: #5d5f7b !important; }

.focus-card { background: #292744; color: #fff; padding: 25px; border-radius: 17px; }
.focus-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #454164; color: #c7beff; font-size: 22px; margin-bottom: 19px; }
.focus-card .eyebrow { color: #c0b8ff; }
.focus-card h2 { font-size: 23px; line-height: 1.35; margin: 0 0 11px; }
.focus-card > p:not(.eyebrow):not(.focus-footer) { color: #cbc9df; font-size: 12px; line-height: 1.8; margin: 0; }
.focus-rule { height: 1px; background: #494660; margin: 21px 0 14px; }
.focus-footer { color: #a8a3cb; font-size: 9px; letter-spacing: 1px; font-weight: 700; margin: 0; }

.page-footer { display: flex; justify-content: space-between; gap: 12px; color: #9094a9; font-size: 11px; padding: 25px 3px 0; }

@media (max-width: 1150px) {
  .main-content { padding: 30px 24px; }
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .right-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .sidebar { position: static; width: 100%; padding: 16px; }
  .sidebar .nav-label, .sidebar-note, .sidebar-footer { display: none; }
  .sidebar nav { display: flex; gap: 6px; margin-top: 15px; overflow-x: auto; }
  .nav-link { white-space: nowrap; padding: 10px; }
  .main-content { margin-left: 0; padding: 25px 15px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-number { font-size: 25px; }
  .right-column { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .form-row { gap: 9px; }
  .page-footer { flex-direction: column; }
}

/* StudyPilot focus timer */
.timer-display {
  text-align: center;
  font-family: "Manrope", sans-serif;
  font-size: clamp(44px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -2px;
  padding: 15px 0 4px;
  font-variant-numeric: tabular-nums;
}

.timer-status {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  min-height: 18px;
  margin: 0 0 18px;
}

.timer-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.secondary-button {
  background: #f0eeff;
  color: var(--purple-dark);
  border: 1px solid #e4e0ff;
  border-radius: 10px;
  padding: 12px 15px;
  font-weight: 700;
}

.secondary-button:hover {
  background: #e5e1ff;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid #978bff;
  outline-offset: 3px;
}


/* Deadline indicators */
.deadline-label {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.deadline-overdue {
  background: #fff0ed;
  color: #c34f42;
}

.deadline-today {
  background: #fff0df;
  color: #a66515;
}

.deadline-soon {
  background: #eeebff;
  color: #5548c9;
}

.deadline-later {
  background: #e5f7ef;
  color: #258463;
}
