/* ── DASHBOARD PAGE-SPECIFIC CSS ─────────────────────────── */

/* ── MAIN SCROLL AREA ────────────────────────────────────── */
#appBody {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px 48px;
  min-height: 0;
}

/* ── GREETING BAR ────────────────────────────────────────── */
#greetingBar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
#greetingBar h1 {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
}
#todayDate {
  font-size: 13px;
  color: #999;
}

/* ── STAT CARDS ──────────────────────────────────────────── */
#statCards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}
.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.stat-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #aaa;
}
.stat-card-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: #1a1a1a;
}
.stat-card-sub {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.stat-card-accent {}
.stat-card-accent-gold {}
.stat-card-accent-red {}
.stat-card-accent-blue {}

/* ── MAIN GRID ───────────────────────────────────────────── */
#mainGrid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

/* ── UPCOMING DEADLINES ──────────────────────────────────── */
#deadlineList { display: flex; flex-direction: column; }

.deadline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.1s;
}
.deadline-item:last-child { border-bottom: none; }
.deadline-item:hover { background: #fafafa; }

.deadline-date-block {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}
.deadline-month {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #aaa;
}
.deadline-day {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #1a1a1a;
}
.deadline-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
}
.deadline-info { flex: 1; min-width: 0; }
.deadline-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deadline-days-away {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}
.deadline-days-away.soon { color: #e03e3e; font-weight: 600; }

.empty-msg {
  padding: 32px 20px;
  text-align: center;
  color: #bbb;
  font-size: 13px;
}

/* ── NEWS PANEL ──────────────────────────────────────────── */
#newsList { display: flex; flex-direction: column; }

.news-item {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #fafafa; }
.news-item-topic {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.news-topic-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.news-topic-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #aaa; }
.news-date { font-size: 10px; color: #ccc; margin-left: auto; }
.news-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
}

/* ── RIGHT COLUMN ────────────────────────────────────────── */
#rightCol { display: flex; flex-direction: column; gap: 20px; }

/* ── QUICK LINKS ─────────────────────────────────────────── */
.quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { background: #fafafa; }
.quick-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quick-link-icon svg { width: 18px; height: 18px; stroke-width: 1.75; }
.quick-link-text { flex: 1; }
.quick-link-title { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.quick-link-sub { font-size: 11px; color: #999; margin-top: 1px; }
.quick-link-arrow { color: #ccc; font-size: 14px; }

/* ── IVY DAY COUNTDOWN ───────────────────────────────────── */
#ivyDayCard {
  position: relative;
  border-radius: 12px;
  padding: 24px 22px;
  color: #fff;
  background: url('../images/ivy-pattern.jpg') center/cover no-repeat;
  overflow: hidden;
}
#ivyDayCard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 12px;
}
#ivyDayCard > * { position: relative; z-index: 1; }
#ivyDayCard .label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
  margin-bottom: 8px;
}
#ivyDayCard .headline {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
#ivyDayCard .sub {
  font-size: 12px;
  color: #fff;
  margin-bottom: 20px;
}
#ivyDayCountdown {
  display: flex;
  gap: 12px;
}
.cd-block {
  flex: 1;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}
.cd-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.cd-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-top: 3px;
}

/* ── TO-DO LIST ──────────────────────────────────────────── */
.todo-add-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.todo-add-input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  color: #1a1a1a;
}
.todo-add-input:focus { border-color: var(--primary); }
.todo-add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.todo-add-btn:hover { background: var(--primary-dark); }
#todoList { display: flex; flex-direction: column; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f5f5f5;
}
.todo-item:last-child { border-bottom: none; }
.todo-check {
  width: 15px; height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.todo-text {
  flex: 1;
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
  word-break: break-word;
}
.todo-text.done { text-decoration: line-through; color: #bbb; }
.todo-edit-input {
  flex: 1;
  border: 1px solid var(--primary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.todo-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.1s;
  flex-shrink: 0;
}
.todo-action-btn:hover { color: #666; }
.todo-action-btn.cal:hover { color: var(--tertiary); }
.todo-action-btn.del:hover { color: #e03e3e; }

/* ── TODO DATE PICKER POPUP ──────────────────────────────── */
#todoDatePicker {
  position: fixed;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  padding: 16px;
  z-index: 2000;
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 230px;
}
#todoDatePicker.open { display: flex; }
.tdp-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #aaa;
}
.tdp-task {
  font-size: 12px;
  color: #1a1a1a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#todoDateInput {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
  color: #1a1a1a;
}
#todoDateInput:focus { border-color: var(--primary); }
.tdp-btns { display: flex; gap: 8px; }
.tdp-confirm {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tdp-confirm:hover { background: var(--primary-dark); }
.tdp-cancel {
  flex: 1;
  background: #f0f0f0;
  color: #666;
  border: none;
  border-radius: 8px;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tdp-cancel:hover { background: #e5e5e5; }
.todo-empty {
  padding: 24px 20px;
  text-align: center;
  color: #bbb;
  font-size: 12px;
}

/* ── MY COLLEGES WIDGET ──────────────────────────────────── */
.college-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.college-item:last-child { border-bottom: none; }
.college-item:hover { background: #fafafa; }
.college-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.college-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── SPINNER OVERRIDE ────────────────────────────────────── */
/* Dashboard uses a smaller spinner with different margin */
.spinner {
  width: 20px;
  height: 20px;
  border-width: 2px;
  border-top-color: var(--primary);
  margin: 24px auto;
}
