/* IEEE Bilkent — Etkinlikler & Puan Tablosu. Everything is scoped under .ieeeb */
.ieeeb {
  --ieeeb-blue: #00629b;
  --ieeeb-blue-dark: #004c78;
  --ieeeb-blue-soft: #e6f0f6;
  --ieeeb-ink: #14212b;
  --ieeeb-ink-2: #4a5963;
  --ieeeb-muted: #74828c;
  --ieeeb-line: #dfe6eb;
  --ieeeb-card: #ffffff;
  --ieeeb-bg: #f5f8fa;
  --ieeeb-gold: #c9a227;
  --ieeeb-silver: #9aa5ad;
  --ieeeb-bronze: #b0703a;
  --ieeeb-radius: 14px;
  color: var(--ieeeb-ink);
  font-size: 16px;
  line-height: 1.5;
  max-width: 1120px;
  margin: 0 auto;
}
.ieeeb *, .ieeeb *::before, .ieeeb *::after { box-sizing: border-box; }
.ieeeb h2, .ieeeb h3, .ieeeb h4 { color: var(--ieeeb-ink); margin: 0; line-height: 1.25; }
.ieeeb p { margin: 0; }
.ieeeb [hidden] { display: none !important; }
.ieeeb .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Section nav */
.ieeeb-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.ieeeb-tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--ieeeb-line);
  background: var(--ieeeb-card); color: var(--ieeeb-ink-2) !important; text-decoration: none !important;
  font-weight: 600; font-size: 14px;
}
.ieeeb-tab:hover, .ieeeb-tab:focus-visible { border-color: var(--ieeeb-blue); color: var(--ieeeb-blue) !important; }

.ieeeb-section { margin-bottom: 56px; scroll-margin-top: 90px; }
.ieeeb-head { margin-bottom: 20px; }
.ieeeb-head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.01em; }
.ieeeb-head h2::after {
  content: ""; display: block; width: 48px; height: 4px; border-radius: 2px;
  background: var(--ieeeb-blue); margin-top: 10px;
}
.ieeeb-head p { color: var(--ieeeb-ink-2); margin-top: 10px; max-width: 62ch; }
.ieeeb-subhead { font-size: 18px; font-weight: 700; margin: 0 0 14px !important; }
.ieeeb-empty { color: var(--ieeeb-muted); padding: 18px; background: var(--ieeeb-bg); border-radius: var(--ieeeb-radius); }

/* ------------ Calendar ------------ */
.ieeeb-cal-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .ieeeb-cal-layout { grid-template-columns: 1fr; } }

.ieeeb-month {
  background: var(--ieeeb-card); border: 1px solid var(--ieeeb-line);
  border-radius: var(--ieeeb-radius); padding: 18px;
}
.ieeeb-month-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.ieeeb-month-title { flex: 1; font-size: 18px; font-weight: 700; text-align: center; }
.ieeeb-icon-btn, .ieeeb-link-btn {
  appearance: none; border: 1px solid var(--ieeeb-line); background: var(--ieeeb-card);
  color: var(--ieeeb-ink); border-radius: 10px; cursor: pointer; font: inherit; line-height: 1;
}
.ieeeb-icon-btn { width: 36px; height: 36px; font-size: 22px; }
.ieeeb-link-btn { height: 36px; padding: 0 12px; font-size: 14px; font-weight: 600; }
.ieeeb-icon-btn:hover, .ieeeb-link-btn:hover { border-color: var(--ieeeb-blue); color: var(--ieeeb-blue); }

.ieeeb-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ieeeb-dow { font-size: 12px; font-weight: 700; color: var(--ieeeb-muted); text-align: center; padding: 4px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.ieeeb-day {
  appearance: none; border: 0; background: transparent; font: inherit; color: var(--ieeeb-ink);
  aspect-ratio: 1 / 1; min-height: 40px; border-radius: 10px; cursor: default;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  position: relative; font-variant-numeric: tabular-nums;
}
.ieeeb-day.is-out { color: #b7c1c8; }
.ieeeb-day.is-today { box-shadow: inset 0 0 0 2px var(--ieeeb-blue); font-weight: 700; }
.ieeeb-day.has-ev { background: var(--ieeeb-blue-soft); cursor: pointer; font-weight: 700; color: var(--ieeeb-blue-dark); }
.ieeeb-day.has-ev:hover { background: #d3e5ef; }
.ieeeb-day.is-sel, .ieeeb-day.is-sel:hover { background: var(--ieeeb-blue); color: #fff; }
.ieeeb-dots { display: flex; gap: 3px; height: 6px; }
.ieeeb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ieeeb-blue); }
.ieeeb-day.is-sel .ieeeb-dots i { background: #fff; }

.ieeeb-day-detail:not(:empty) { margin-top: 14px; border-top: 1px solid var(--ieeeb-line); padding-top: 14px; }
.ieeeb-day-detail h4 { font-size: 14px; color: var(--ieeeb-muted); font-weight: 700; margin-bottom: 8px; }
.ieeeb-day-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ieeeb-day-detail li { border-left: 3px solid var(--ieeeb-blue); padding: 2px 0 2px 12px; }
.ieeeb-day-detail strong { display: block; }
.ieeeb-day-detail span { color: var(--ieeeb-ink-2); font-size: 14px; }

/* Upcoming list */
.ieeeb-event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ieeeb-event {
  display: flex; gap: 16px; padding: 16px; background: var(--ieeeb-card);
  border: 1px solid var(--ieeeb-line); border-radius: var(--ieeeb-radius);
  transition: border-color .15s, box-shadow .15s;
}
.ieeeb-event:hover { border-color: #b9d3e3; box-shadow: 0 4px 16px rgba(0, 76, 120, .07); }
.ieeeb-date-badge {
  flex: 0 0 56px; height: 60px; border-radius: 12px; background: var(--ieeeb-blue); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
}
.ieeeb-date-badge .d { font-size: 22px; font-weight: 800; }
.ieeeb-date-badge .m { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.ieeeb-event-body { min-width: 0; flex: 1; }
.ieeeb-event-body h4 { font-size: 17px; font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; }
.ieeeb-meta { color: var(--ieeeb-ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ieeeb-loc::before { content: "📍 "; }
.ieeeb-desc { margin-top: 8px; font-size: 14px; color: var(--ieeeb-ink-2); }
.ieeeb-desc summary { cursor: pointer; color: var(--ieeeb-blue); font-weight: 600; }
.ieeeb-desc p { margin-top: 6px; }
.ieeeb-add { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--ieeeb-blue) !important; text-decoration: none !important; }
.ieeeb-add:hover { text-decoration: underline !important; }

/* ------------ Leaderboard ------------ */
.ieeeb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.ieeeb-stat { background: var(--ieeeb-bg); border-radius: var(--ieeeb-radius); padding: 16px 18px; }
.ieeeb-stat .v { display: block; font-size: 30px; font-weight: 800; color: var(--ieeeb-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ieeeb-stat .l { color: var(--ieeeb-ink-2); font-size: 14px; }
@media (max-width: 520px) { .ieeeb-stat { padding: 12px; } .ieeeb-stat .v { font-size: 24px; } .ieeeb-stat .l { font-size: 12px; } }

.ieeeb-podium {
  list-style: none; margin: 0 0 28px; padding: 0; display: flex; justify-content: center;
  align-items: flex-end; gap: 12px;
}
.ieeeb-step {
  flex: 1 1 0; max-width: 260px; min-width: 0; text-align: center; background: var(--ieeeb-card);
  border: 1px solid var(--ieeeb-line); border-radius: var(--ieeeb-radius) var(--ieeeb-radius) 6px 6px;
  padding: 18px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ieeeb-step-1 { min-height: 190px; border-top: 5px solid var(--ieeeb-gold); }
.ieeeb-step-2 { min-height: 160px; border-top: 5px solid var(--ieeeb-silver); }
.ieeeb-step-3 { min-height: 140px; border-top: 5px solid var(--ieeeb-bronze); }
.ieeeb-medal {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.ieeeb-step-1 .ieeeb-medal { background: var(--ieeeb-gold); width: 50px; height: 50px; font-size: 22px; }
.ieeeb-step-2 .ieeeb-medal { background: var(--ieeeb-silver); }
.ieeeb-step-3 .ieeeb-medal { background: var(--ieeeb-bronze); }
.ieeeb-step-names { font-weight: 700; overflow-wrap: anywhere; }
.ieeeb-more { display: block; font-weight: 500; font-size: 13px; color: var(--ieeeb-muted); }
.ieeeb-step-pts { font-size: 14px; font-weight: 700; color: var(--ieeeb-blue); background: var(--ieeeb-blue-soft); padding: 2px 10px; border-radius: 999px; }

.ieeeb-table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ieeeb-search { flex: 1; max-width: 340px; }
.ieeeb-search input {
  width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--ieeeb-line); border-radius: 10px;
  font: inherit; color: var(--ieeeb-ink); background: var(--ieeeb-card);
}
.ieeeb-search input:focus { outline: 2px solid var(--ieeeb-blue); outline-offset: 1px; border-color: transparent; }
.ieeeb-count { color: var(--ieeeb-muted); font-size: 14px; white-space: nowrap; }

.ieeeb-table-wrap { background: var(--ieeeb-card); border: 1px solid var(--ieeeb-line); border-radius: var(--ieeeb-radius); overflow: hidden; margin-bottom: 36px; }
.ieeeb-table { width: 100%; border-collapse: collapse; margin: 0 !important; border: 0 !important; }
.ieeeb-table th, .ieeeb-table td { padding: 11px 16px; border: 0 !important; border-bottom: 1px solid var(--ieeeb-line) !important; text-align: left; background: transparent; }
.ieeeb-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ieeeb-muted); font-weight: 700; background: var(--ieeeb-bg); }
.ieeeb-table th.num, .ieeeb-table td.num { text-align: right; width: 1%; white-space: nowrap; }
.ieeeb-table tbody tr:last-child td { border-bottom: 0 !important; }
.ieeeb-table tbody tr:hover td { background: #fafcfd; }
.ieeeb-table td.name { font-weight: 600; }
.ieeeb-table td.pts { font-weight: 800; color: var(--ieeeb-blue-dark); }
.ieeeb-rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--ieeeb-ink-2); }
.ieeeb-rank.r1 { background: var(--ieeeb-gold); color: #fff; }
.ieeeb-rank.r2 { background: var(--ieeeb-silver); color: #fff; }
.ieeeb-rank.r3 { background: var(--ieeeb-bronze); color: #fff; }
.ieeeb-table-wrap .ieeeb-empty { border-radius: 0; }
.ieeeb-btn {
  display: block; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--ieeeb-line);
  background: var(--ieeeb-bg); color: var(--ieeeb-blue); font: inherit; font-weight: 700; cursor: pointer;
}
.ieeeb-btn:hover { background: var(--ieeeb-blue-soft); }

/* Attendance bars */
.ieeeb-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ieeeb-bars li { display: grid; grid-template-columns: minmax(160px, 1.1fr) 2fr auto; align-items: center; gap: 14px; }
.ieeeb-bar-label strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.ieeeb-bar-label small { color: var(--ieeeb-muted); font-size: 13px; }
.ieeeb-bar-track { height: 12px; background: var(--ieeeb-bg); border-radius: 6px; overflow: hidden; }
.ieeeb-bar { display: block; height: 100%; background: var(--ieeeb-blue); border-radius: 0 6px 6px 0; min-width: 4px; }
.ieeeb-bar-val { font-weight: 700; font-size: 14px; color: var(--ieeeb-ink-2); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
@media (max-width: 600px) {
  .ieeeb-bars li { grid-template-columns: 1fr auto; }
  .ieeeb-bar-label { grid-column: 1 / -1; }
}

.ieeeb-updated { color: var(--ieeeb-muted); font-size: 13px; text-align: right; }

@media (max-width: 520px) {
  .ieeeb-podium { gap: 6px; }
  .ieeeb-step { padding: 14px 6px 12px; font-size: 14px; }
  .ieeeb-step-1 { min-height: 170px; } .ieeeb-step-2 { min-height: 145px; } .ieeeb-step-3 { min-height: 125px; }
  .ieeeb-table th, .ieeeb-table td { padding: 10px 10px; }
  .ieeeb-event { padding: 14px; gap: 12px; }
  .ieeeb-month { padding: 12px; }
  .ieeeb-day { min-height: 36px; }
}
