/* ============================================================
   tracker.css — Progress Tracker page styles
   Symbiosis Quantum Club · SIT Pune · 2026
   ============================================================ */

/* ── Layout ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--black);
  padding: 16px 0;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions { display: flex; gap: 8px; margin-left: auto; }

.btn {
  padding: 8px 16px;
  border: 1.5px solid var(--black);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-green  { background: #fff; color: var(--black); }
.btn-green:hover { background: var(--black); color: #fff; }
.btn-outline { background: #fff; color: var(--muted); border-color: #ccc; }
.btn-outline:hover { border-color: var(--black); color: var(--black); }
.btn-red    { background: rgba(10,10,10,.08); border-color: var(--red); color: var(--red); }
.btn-red:hover { background: var(--red); color: #fff; }

/* ── Progress Overview ── */
.progress-overview {
  background: #fff;
  border-bottom: 1px solid var(--black);
  padding: 20px 0;
}

.overview-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.overview-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.overview-pct { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--red); }

.overview-bar {
  height: 6px;
  background: #e0e0e0;
  overflow: hidden;
  margin-bottom: 16px;
}

.overview-bar-fill { height: 100%; background: var(--red); transition: width .6s ease; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.stat-box { border: 1px solid var(--black); padding: 16px; text-align: center; }
.stat-box-val { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--red); line-height: 1; }
.stat-box-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }

/* ── Phase Bars Strip ── */
.phase-bars-strip {
  background: var(--bg-off);
  border-bottom: 1px solid var(--black);
  padding: 16px 0;
}

.phase-bars-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.phase-bar-item {
  border: 1px solid var(--black);
  padding: 12px;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phase-bar-item:hover { background: #f5f5f5; }

.phase-bar-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.phase-bar-info { flex: 1; min-width: 0; }
.phase-bar-name { font-size: 11px; font-weight: 600; color: var(--black); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.phase-bar-track { background: #e0e0e0; height: 4px; overflow: hidden; }
.phase-bar-fill  { height: 100%; transition: width .5s; }

.phase-bar-pct { font-family: var(--mono); font-size: 11px; font-weight: 700; min-width: 36px; text-align: right; }

/* ── Timeline Nav ── */
.timeline-nav {
  border-bottom: 1px solid var(--black);
  padding: 12px 0;
  overflow-x: auto;
}

.timeline-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}

.timeline-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border-right: 1px solid var(--black);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s;
}

.timeline-btn:first-child { border-left: 1px solid var(--black); }
.timeline-btn:hover { background: #f5f5f5; color: var(--black); }

.phase-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Phases Grid ── */
.phases-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Phase Card ── */
.phase-card {
  border: 1.5px solid var(--black);
  overflow: hidden;
  transition: border-color .2s;
}

.phase-card:hover { border-color: var(--red); }

.phase-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

.phase-number {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
}

.phase-title-group { flex: 1; min-width: 0; }
.phase-title-group h3 { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--black); margin-bottom: 4px; }

.phase-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.phase-tag  { background: #f5f5f5; border: 1px solid var(--black); padding: 2px 8px; font-size: 10px; font-weight: 600; }

.completed-badge {
  background: rgba(10,10,10,.1);
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.phase-progress-wrap { display: flex; align-items: center; gap: 12px; }

.phase-ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.phase-ring svg { transform: rotate(-90deg); width: 52px; height: 52px; }
.phase-ring-bg   { fill: none; stroke: #e0e0e0; stroke-width: 4; }
.phase-ring-fill { fill: none; stroke-width: 4; stroke-linecap: butt; stroke-dasharray: 126; stroke-dashoffset: 126; transition: stroke-dashoffset .6s; }
.phase-pct-text  { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 700; }

.phase-chevron { color: var(--muted); transition: transform .3s; flex-shrink: 0; }
.phase-card.open .phase-chevron { transform: rotate(180deg); }

.phase-body { display: none; padding: 0 24px 24px; }
.phase-card.open .phase-body { display: block; }

.phase-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ── Topic Section ── */
.topic-section { margin-bottom: 12px; }

.topic-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topic-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.topics-list { display: flex; flex-direction: column; gap: 2px; }

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  transition: background .2s;
  border: 1px solid transparent;
}

.topic-item:hover { background: #f5f5f5; border-color: var(--border); }
.topic-item.checked { background: rgba(10,10,10,.04); border-color: rgba(10,10,10,.2); }

.topic-checkbox {
  width: 20px; height: 20px;
  border: 2px solid #ccc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  margin-top: 1px;
}

.topic-item.checked .topic-checkbox { background: var(--red); border-color: var(--red); }

.topic-checkbox-icon { opacity: 0; transition: opacity .2s; color: #fff; font-size: 11px; font-weight: 800; }
.topic-item.checked .topic-checkbox-icon { opacity: 1; }

.topic-text { font-size: 13px; color: #333; line-height: 1.5; flex: 1; transition: color .2s; }
.topic-item.checked .topic-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(10,10,10,.4); }

/* ── Topic Notes / Milestone ── */
.topic-note {
  font-size: 12px;
  padding: 8px 12px;
  margin: 8px 0 4px;
  line-height: 1.5;
}

.topic-note.info    { color: var(--black); background: #f5f5f5; border: 1px solid #e0e0e0; }
.topic-note.success { color: var(--red);   background: rgba(10,10,10,.05); border: 1px solid rgba(10,10,10,.2); }

.milestone-box {
  margin-top: 16px;
  background: #f9f9f9;
  border: 1px solid var(--black);
  padding: 14px 18px;
}

.milestone-box h4 { font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 6px; }
.milestone-box p  { font-size: 13px; color: var(--muted); line-height: 1.6; font-style: italic; }

.phase-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Research Audit Panel ── */
#rap-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(10,10,10,.35);
}

#rap-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 460px;
  background: #fff;
  border-left: 1.5px solid var(--black);
  z-index: 8001;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--sans);
}

.rap-header {
  padding: 22px 24px 18px;
  border-bottom: 1.5px solid var(--black);
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rap-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.rap-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}

.rap-close {
  border: 1.5px solid var(--black);
  background: #fff;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: background .2s;
}

.rap-close:hover { background: var(--black); color: #fff; }

.rap-body { flex: 1; overflow-y: auto; padding: 20px 24px 24px; }

.rap-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rap-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.rap-audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color .2s;
}

.rap-audit-row.done { border-color: var(--red); }

.rap-audit-label { font-size: 13px; font-weight: 500; color: #333; }

.rap-audit-status { font-size: 11px; font-weight: 700; color: #bbb; letter-spacing: .05em; }
.rap-audit-status.done { color: var(--red); }

.rap-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.rap-action-btn {
  padding: 11px;
  border: 1.5px solid var(--black);
  background: #fff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
}

.rap-action-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.rap-action-btn.copy:hover { background: var(--black); color: #fff; border-color: var(--black); }

.rap-prereq-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.rap-prereq-arrow { color: var(--red); font-weight: 700; flex-shrink: 0; }
.rap-prereq-text  { font-size: 13px; color: #333; line-height: 1.5; }

.rap-notes {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1.5px solid var(--black);
  background: #fafafa;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--black);
  resize: vertical;
  outline: none;
  line-height: 1.7;
  transition: border-color .2s;
}

.rap-notes:focus { border-color: var(--red); }

.rap-notes-saved { font-size: 11px; color: #888; margin-top: 4px; height: 16px; }

.rap-footer {
  padding: 16px 24px;
  border-top: 1.5px solid var(--black);
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

.rap-complete-btn {
  flex: 1;
  padding: 13px;
  background: var(--black);
  color: #fff;
  border: 1.5px solid var(--black);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}

.rap-complete-btn:hover,
.rap-complete-btn.completed { background: var(--red); border-color: var(--red); }

.rap-uncheck-btn {
  padding: 13px 16px;
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.rap-uncheck-btn:hover { background: var(--red); color: #fff; }

/* ── Reset Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: #fff;
  border: 1.5px solid var(--black);
  padding: 32px;
  max-width: 380px;
  width: 90%;
}

.modal-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.modal-box p  { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  #rap-drawer { width: 100vw; }
}

@media (max-width: 600px) {
  .header-title { font-size: 15px; }
  .phases-wrapper { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
