/* ─── Mi Panel (member web app) ─────────────────────────── */
.panel-page { background: var(--snow); }
.panel-main { padding: 28px 0 120px; min-height: 70vh; }

/* Greeting */
.panel-hello {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 8px;
}
.panel-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 64px);
  line-height: .95;
  margin: 6px 0 8px;
  letter-spacing: .01em;
}
.panel-sub { color: var(--ink-soft); margin: 0; font-size: 16px; }
.panel-walker {
  width: 92px; height: 92px; object-fit: contain;
  opacity: .16;
  flex-shrink: 0;
}

/* Pending check-in cards */
.checkin-list { display: grid; gap: 14px; margin: 18px 0 6px; }
.checkin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--red), var(--red-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-md);
}
.checkin-card h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 2px;
  letter-spacing: .02em;
}
.checkin-card p { margin: 0; font-size: 14px; opacity: .92; }
.checkin-actions { display: flex; gap: 10px; }
.checkin-actions .btn-yes {
  background: #fff; color: var(--red-dark); border: 0;
}
.checkin-actions .btn-yes:hover { background: #ffe9ea; color: var(--red-deep); }
.checkin-actions .btn-no {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.5);
}
.checkin-actions .btn-no:hover { border-color: #fff; color: #fff; }

/* Tabs */
.panel-tabs {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  width: max-content;
  margin: 22px 0 26px;
  box-shadow: var(--shadow-sm);
}
.panel-tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease;
}
.panel-tab.is-active { color: #fff; }
.panel-tab-ink {
  position: absolute;
  top: 5px; bottom: 5px; left: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--red), var(--red-dark));
  box-shadow: var(--shadow-md);
  z-index: 0;
}

.panel-loading { color: var(--muted); font-size: 14px; padding: 22px 4px; }

/* Cells */
.cells-list { display: grid; gap: 22px; }
.cell-uni {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.cell-uni::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
}
.cell-uni-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.cell-uni-head h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 30px;
  color: var(--red);
  margin: 0;
  line-height: 1;
  letter-spacing: .02em;
}
.cell-uni-head .uni-city { font-size: 12px; }
.tag-mycampus {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(215,20,26,.1); color: var(--red-dark);
  padding: 4px 10px; border-radius: 999px;
}
.cell-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cell-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: var(--snow);
  border-radius: 12px;
  padding: 12px 14px;
}
.cell-row-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.cell-row-info .day { font-weight: 700; }
.cell-row-info .time { color: var(--ink-soft); }
.cell-row-links { display: inline-flex; gap: 8px; }
.cell-row-links a { font-size: 12px; font-weight: 600; }
.cell-row-actions { display: flex; align-items: center; gap: 10px; }
.btn-reminder {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
}
.btn-reminder:hover { border-color: var(--red); color: var(--red); }
.btn-reminder.is-on {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 6px 16px rgba(215,20,26,.25);
}

/* Events */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.event-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-media {
  position: relative;
  aspect-ratio: 16 / 8;
  background: linear-gradient(120deg, var(--red-deep), var(--red));
  overflow: hidden;
}
.event-media img { width: 100%; height: 100%; object-fit: cover; }
.event-media .event-media-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.event-media .event-media-fallback img {
  width: 64px; height: 64px; object-fit: contain; opacity: .5;
}
.event-date {
  position: absolute; top: 12px; left: 12px;
  background: #fff;
  border-radius: 12px;
  text-align: center;
  padding: 6px 12px;
  box-shadow: var(--shadow-md);
  line-height: 1;
}
.event-date .d {
  display: block;
  font-family: var(--f-display);
  font-size: 26px;
  color: var(--red);
}
.event-date .m {
  display: block;
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-top: 2px;
}
.event-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-body h3 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 26px; line-height: 1; margin: 0; letter-spacing: .015em;
}
.event-meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.event-desc { font-size: 14px; color: var(--ink-soft); margin: 0; flex: 1; }
.event-foot { margin-top: 8px; }
.btn-rsvp {
  border: 1px solid var(--red);
  background: transparent; color: var(--red);
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  transition: all .18s ease;
}
.btn-rsvp:hover { background: rgba(215,20,26,.06); }
.btn-rsvp.is-going { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(215,20,26,.25); }

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.blog-card {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  font: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-media { aspect-ratio: 16 / 8; background: var(--cream); overflow: hidden; }
.blog-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-media.blog-media-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(120deg, var(--cream), #fff);
}
.blog-media.blog-media-fallback img { width: 58px; height: 58px; opacity: .35; object-fit: contain; }
.blog-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.blog-body h3 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 26px; line-height: 1; margin: 0; letter-spacing: .015em;
}
.blog-excerpt { font-size: 14px; color: var(--ink-soft); margin: 0; }
.blog-meta { font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* Empty state */
.panel-empty {
  grid-column: 1 / -1;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  color: var(--muted);
}
.panel-empty strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: .02em;
  margin-bottom: 6px;
}

/* Blog reader overlay */
.reader { position: fixed; inset: 0; z-index: 90; }
.reader-backdrop {
  position: absolute; inset: 0;
  background: rgba(20,20,20,.5);
  backdrop-filter: blur(3px);
}
.reader-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(680px, 100%);
  background: #fff;
  box-shadow: -30px 0 80px rgba(0,0,0,.25);
  overflow-y: auto;
  padding: 56px clamp(24px, 5vw, 56px) 64px;
}
.reader-close {
  position: absolute; top: 16px; right: 20px;
  border: 1px solid var(--line);
  background: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all .15s ease;
}
.reader-close:hover { color: var(--red); border-color: var(--red); }
.reader-body .blog-meta { margin-bottom: 18px; display: block; }
.reader-body h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1;
  margin: 8px 0 10px;
  letter-spacing: .01em;
}
.reader-body img.reader-hero {
  width: 100%;
  border-radius: var(--radius);
  margin: 0 0 20px;
  max-height: 320px;
  object-fit: cover;
}
.reader-body p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }

/* App promo bar */
.app-promo {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: min(880px, calc(100% - 28px));
  background: #141414;
  color: #fff;
  border-radius: 18px;
  padding: 14px 48px 14px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.app-promo-logo { width: 44px; height: 44px; flex-shrink: 0; }
.app-promo-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.app-promo-copy strong {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .03em;
}
.app-promo-copy span { font-size: 13px; color: #cfcfcf; }
.app-promo-badges { display: flex; gap: 10px; align-items: center; }
.app-promo-badges img { height: 40px; width: auto; }
.app-promo-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: 0; color: #888;
  font-size: 18px; cursor: pointer; padding: 4px;
}
.app-promo-close:hover { color: #fff; }

.panel-footer { margin-top: 40px; }
.panel-footer .copy { border: 0; margin: 0; padding: 0; }

@media (max-width: 640px) {
  .panel-tabs { width: 100%; justify-content: space-between; top: 70px; }
  .panel-tab { flex: 1; padding: 10px 8px; }
  .panel-walker { display: none; }
  .app-promo { padding-right: 40px; }
}
