/* GradTrackr — styles
   The accent color comes from your profile so it can match your school. */

:root {
  --paper: #f5f4ef;
  --ink: #1d1f23;
  --ink-soft: #5b5f66;
  --line: #d9d7cf;
  --panel: #ffffff;
  --accent: #8a2432;       /* overridden from profile */
  --accent-ink: #ffffff;
  --ok: #2f7a4d;
  --warn: #b7791f;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; line-height: 1.15; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0.4rem 0; }
.muted { color: var(--ink-soft); }
a { color: var(--accent); }

/* Sign-in screen */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2rem;
}
.auth-card .brand { font-family: var(--font-display); font-size: 1.9rem; }
.auth-card form { margin-top: 1.25rem; display: grid; gap: 0.9rem; }
.link-btn {
  justify-self: start;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* App shell */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--ink);
  color: #e9e7e0;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { font-family: var(--font-display); font-size: 1.3rem; padding: 0 0.5rem; }
.sidebar nav { display: grid; gap: 0.15rem; }
.sidebar nav a {
  color: inherit;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid transparent;
}
.sidebar nav a.active { border-left-color: var(--accent); background: rgba(255,255,255,0.06); }
.sidebar nav a:hover { background: rgba(255,255,255,0.08); }
.sidebar .subtle { margin-top: auto; color: #b9b6ac; background: none; border: 1px solid #3a3d44; }

.view { padding: 2.25rem 2.5rem 4rem; max-width: 1040px; position: relative; z-index: 1; }
.view header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* Faint school logo behind the page */
.watermark {
  position: fixed;
  right: -6vw;
  bottom: -8vh;
  width: 55vw;
  height: 55vw;
  max-width: 720px;
  max-height: 720px;
  background: no-repeat center / contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* Forms */
label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
input, select, textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  width: 1.15rem; height: 1.15rem; margin: 0; flex: 0 0 auto; accent-color: var(--accent);
}
input[type="color"] { width: 3.5rem; height: 2.4rem; padding: 0.15rem; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.row > label { flex: 1 1 160px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; align-items: end; }

.btn {
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: #9b1c1c; border-color: #e5b4b4; }
.btn.small { padding: 0.3rem 0.6rem; font-size: 0.9rem; }
.msg { min-height: 1.3em; font-size: 0.95rem; color: var(--ink-soft); }
.msg.error { color: #9b1c1c; }

/* Panels and lists */
.panel { background: var(--panel); border: 1px solid var(--line); padding: 1.25rem; margin-bottom: 1.25rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li .grow { flex: 1 1 180px; min-width: 0; }
.req-course { width: auto; max-width: 260px; }
.empty { padding: 1.5rem; border: 1px dashed var(--line); color: var(--ink-soft); text-align: center; }

/* Status strip on the dashboard */
.status-strip { display: flex; border: 1px solid var(--line); background: var(--panel); margin-bottom: 1.5rem; }
.status-strip div { flex: 1; padding: 0.9rem 1rem; border-left: 1px solid var(--line); }
.status-strip div:first-child { border-left: 0; }
.status-strip .n { font-family: var(--font-display); font-size: 1.8rem; display: block; }

/* School cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: 1rem 1.1rem;
}
.card:hover { border-color: var(--ink-soft); border-top-color: var(--accent); }
.card h3 { margin-bottom: 0.15rem; }
.card .meta { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.92rem; color: var(--ink-soft); }

.badge { display: inline-block; padding: 0.15rem 0.55rem; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--line); background: #fff; }
.badge.not_started { color: var(--ink-soft); }
.badge.in_progress { color: var(--warn); border-color: #ead9b0; }
.badge.applied { color: var(--accent); border-color: var(--accent); }
.badge.accepted { color: var(--ok); border-color: #b9d8c4; }

.progress { height: 6px; background: var(--line); margin-top: 0.6rem; }
.progress span { display: block; height: 100%; background: var(--accent); }

.req-done { text-decoration: line-through; color: var(--ink-soft); }

/* Card progress labels */
.bar-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }
.bar-label + .progress { margin-top: 0.2rem; }

/* Deadline warnings */
.dl-soon .dl-label, span.dl-soon { color: var(--warn); font-weight: 600; }
.dl-overdue .dl-label, span.dl-overdue { color: #9b1c1c; font-weight: 600; }
.list li.dl-soon { box-shadow: inset 3px 0 0 var(--warn); padding-left: 0.6rem; }
.list li.dl-overdue { box-shadow: inset 3px 0 0 #9b1c1c; padding-left: 0.6rem; }
.alert-panel { border-color: #e5b4b4; border-left: 4px solid #9b1c1c; }
.cal-row { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); align-items: center; }
a.btn { text-decoration: none; display: inline-block; }

/* Shared advisor view */
.share { min-height: 100vh; }
.share-page { max-width: 960px; margin: 0 auto; padding: 2.25rem 1.25rem 4rem; }
.share-page header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.share-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 2rem; margin-top: 1rem; }
.share-cols h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: 0.2rem 0 0.2rem 1.6rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45rem; width: 0.85rem; height: 0.85rem; border: 1.5px solid var(--line); }
.ticks li.on { color: var(--ink-soft); }
.ticks li.on::before { background: var(--accent); border-color: var(--accent); }

/* Fine print + privacy page */
.fine { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1rem; }
.side-fine { margin-top: auto; color: #b9b6ac; font-size: 0.85rem; padding: 0 0.5rem; text-decoration: none; }
.side-fine:hover { text-decoration: underline; }
.side-fine + .subtle { margin-top: 0; }
.legal { max-width: 720px; margin: 0 auto; padding: 2.25rem 1.25rem 4rem; }
.legal h1 { margin: 0.5rem 0 0.25rem; }
.legal h2 { font-size: 1.3rem; margin: 1.75rem 0 0.4rem; }
.legal ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.legal li { margin: 0.3rem 0; }

/* Small screens */
@media (max-width: 760px) {
  .status-strip { flex-wrap: wrap; }
  .status-strip div { flex: 1 1 45%; border-left: 0; border-top: 1px solid var(--line); }
  .status-strip div:nth-child(-n+2) { border-top: 0; }
  .status-strip div:nth-child(even) { border-left: 1px solid var(--line); }
  .list li { gap: 0.4rem 0.6rem; }
  .req-course { flex: 1 1 100%; max-width: none; }
  .view header { margin-bottom: 1rem; }
  .view h1 { font-size: 1.75rem; }
  .panel { padding: 1rem; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 0.75rem; gap: 0.5rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav a { padding: 0.4rem 0.6rem; border-left: 0; border-bottom: 3px solid transparent; }
  .sidebar nav a.active { border-bottom-color: var(--accent); }
  .sidebar .subtle { margin-top: 0; margin-left: auto; }
  .side-fine { margin: 0 0 0 auto; }
  .side-fine + .subtle { margin-left: 0.5rem; }
  .view { padding: 1.25rem 1rem 3rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .progress span { transition: width 250ms ease; }
}
