.ui-refresh .mdc-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ui-refresh .mdc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}

.ui-refresh .mdc-button,
.ui-refresh .mdc-text-field,
.ui-refresh .mdc-select {
  border-radius: 999px;
}

.ui-refresh .like-btn {
  box-shadow: none;
  background: transparent;
  border-radius: 999px;
}

.ui-refresh .mdc-card__actions .mdc-card__action-buttons {
  padding-left: 11.5px;
}

.ui-refresh .mdc-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 12px;
}

.ui-refresh .mdc-card__action-buttons {
  font-size: 19px;
  font-weight: 500;
}

.ui-refresh .mdc-card__actions .mdc-button {
  background: transparent;
  box-shadow: none;
  min-width: 0;
  padding: 0;
}

.ui-refresh .mdc-card__actions .mdc-button__ripple {
  display: none;
}

.ui-refresh .mdc-card__action-buttons .rating .star-filled,
.ui-refresh .mdc-card__action-buttons .rating .star-unfilled {
  width: 19px;
  height: 19px;
}

.ui-refresh .acc-card .mdc-card__media-content,
.ui-refresh .explore-card .mdc-card__media-content {
  font-size: 18px;
}

.ui-refresh #filterSearch input[type="text"],
.ui-refresh #filterSearch input[type="search"] {
  color: #111 !important;
  caret-color: #111 !important;
}

.ui-refresh #filterSearch input::placeholder {
  color: rgba(0,0,0,0.45) !important;
}

/* Homepage sponsor banner (Trainline) */
.ui-refresh .homepage-banner {
  margin: 18px 0 6px;
}
.ui-refresh .homepage-banner__link {
  display: block;
}
.ui-refresh .homepage-banner__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.ui-refresh .homepage-banner__link:hover .homepage-banner__img {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}

/* Trainline banner placement: render twice but show one per breakpoint */
.ui-refresh .homepage-banner--desktop { display: none; }
.ui-refresh .homepage-banner--mobile { display: block; }

@media screen and (min-width: 840px) {
  .ui-refresh .homepage-banner--desktop { display: block; }
  .ui-refresh .homepage-banner--mobile { display: none; }
}

/* Jobs page toggle + portal */
.ui-refresh .jobs-page .jobs-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}
.ui-refresh .jobs-page .jobs-toggle {
  display: inline-flex;
  width: auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  background: #fff;
}
.ui-refresh .jobs-page .jobs-toggle__btn {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}
.ui-refresh .jobs-page .jobs-toggle__btn[aria-pressed="true"] {
  background: #0aa6a6;
  color: #fff;
}
.ui-refresh .jobs-page .jobs-view {
  display: none;
}
.ui-refresh .jobs-page .jobs-view--active {
  display: block;
}
.ui-refresh .jobs-page .jobs-portal {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.ui-refresh .jobs-page .jobs-portal__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f6f7f9;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ui-refresh .jobs-page .jobs-portal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.ui-refresh .jobs-page .jobs-portal__dot--red { background: #ff605c; }
.ui-refresh .jobs-page .jobs-portal__dot--yellow { background: #ffbd44; }
.ui-refresh .jobs-page .jobs-portal__dot--green { background: #00ca4e; }
.ui-refresh .jobs-page .jobs-portal__title {
  margin-left: 6px;
  font-weight: 600;
  color: #333;
}
.ui-refresh .jobs-page .jobs-portal__body {
  padding: 0;
}
.ui-refresh .jobs-page .jobs-portal__iframe {
  width: 100%;
  height: clamp(560px, 75vh, 900px);
  border: 0;
}
.ui-refresh .jobs-page .jobs-portal__link {
  display: inline-block;
  margin: 0;
}
.ui-refresh .jobs-page .jobs-portal__empty {
  padding: 18px 16px;
  color: #666;
}
.ui-refresh .jobs-page .jobs-portal__desc {
  padding: 12px 16px 0;
  color: #333;
}
.ui-refresh .jobs-page .jobs-portal__note {
  padding: 8px 16px 16px;
  color: #666;
}
.ui-refresh .jobs-page {
  width: 100%;
}
@media (max-width: 600px) {
  .ui-refresh .jobs-page .jobs-toggle-row {
    justify-content: center;
  }
}

/* Tips feed */
.ui-refresh .tips-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}
.ui-refresh .tips-feed-page {
  background: transparent;
}
.ui-refresh .tips-feed-page .tips-feed-bg {
  background: transparent;
  padding: 12px 0 6px;
}
.ui-refresh .tip-feed-card {
  background: rgba(18, 168, 162, 0.06);
  border-radius: 18px;
  border: 1px solid rgba(18, 168, 162, 0.14);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 16px 18px;
}
.ui-refresh .tip-feed-card.is-anim {
  opacity: 0;
  transform: translateY(8px);
}
.ui-refresh .tip-feed-card.is-anim.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 350ms ease, transform 350ms ease;
}
.ui-refresh .tip-feed-card__header {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ui-refresh .tip-feed-card__avatar img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}
.ui-refresh .tip-feed-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.ui-refresh .tip-feed-card__title a {
  color: inherit;
  text-decoration: none;
}
.ui-refresh .tip-feed-card__byline {
  font-size: 13px;
  color: #66727d;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ui-refresh .tip-feed-card__chips {
  margin-top: 6px;
}
.ui-refresh .tip-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(18,168,162,0.35);
  color: #12a8a2;
  font-size: 12px;
  font-weight: 600;
}
.ui-refresh .tip-feed-card__excerpt {
  margin-top: 12px;
  font-size: 15px;
  color: #2b3440;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ui-refresh .tip-feed-card__see-more {
  color: #12a8a2;
  font-weight: 600;
  text-decoration: none;
}
.ui-refresh .tip-feed-card__image {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  max-height: 420px;
}
.ui-refresh .tip-feed-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ui-refresh .tip-feed-card__engagement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: #5d6a75;
  font-size: 12px;
}
.ui-refresh .tip-feed-card__likes {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ui-refresh .tip-feed-card .rating .star-filled,
.ui-refresh .tip-feed-card .rating .star-unfilled {
  width: 24px;
  height: 24px;
}
.ui-refresh .tip-feed-card .rating .rating-title {
  font-size: 18px;
  line-height: 18px;
}
.ui-refresh .tip-feed-card__likes-label {
  font-size: 12px;
  color: #5d6a75;
}
.ui-refresh .tip-feed-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ui-refresh .tip-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f2f6f7;
  color: #2b3440;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
}
.ui-refresh .tip-action:hover {
  background: #e9f6f5;
}
.ui-refresh .tip-feed__item:hover .tip-feed-card {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.ui-refresh .tip-feed-card:hover {
  border-color: rgba(18, 168, 162, 0.22);
}
.ui-refresh .tips-loading {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ui-refresh .tip-skeleton {
  height: 140px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f1f3f5 25%, #e9ecef 45%, #f1f3f5 65%);
  background-size: 200% 100%;
  animation: tip-skeleton 1.2s infinite;
}
@keyframes tip-skeleton {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.ui-refresh .a2z-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 9999;
}
.ui-refresh .a2z-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* University section nav */
.ui-refresh .page-description-links {
  text-align: center;
  margin: 6px 0 18px;
}
.ui-refresh .uni-section-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
}
.ui-refresh .uni-section-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(18, 168, 162, 0.04);
  border: 1px solid rgba(18, 168, 162, 0.12);
  color: #4b7f7a;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}
.ui-refresh .uni-section-nav__link:hover {
  background: rgba(18, 168, 162, 0.08);
}
.ui-refresh .section-empty {
  margin: 12px 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.03);
  color: #4a5560;
  font-size: 14px;
}

/* ─────────────────────────────────────────
   Desktop Sign-in / Sign-up Card
   (desktop-only, appView is unchanged)
───────────────────────────────────────── */

.ui-refresh .desktop-signin {
  /* Break out of any inherited container constraints */
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 56px 20px 80px;
  min-height: calc(100vh - 64px);
  background: linear-gradient(160deg, #e8fffe 0%, #d6f5f3 35%, #eef4ff 70%, #f5f0ff 100%);
}

/* Fix app.css's .form.signin rule which sets width:calc(100%-60px) on sign-in form only */
.ui-refresh .desktop-signin .form.signin {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Also override old form border/padding for all forms inside the card */
.ui-refresh .desktop-signin .form {
  display: flex;
  flex-direction: column;
}

.ui-refresh .signin-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 12px 32px rgba(0,0,0,0.08),
    0 32px 72px rgba(48,213,200,0.08);
  padding: 44px 40px 40px;
  width: 100%;
  max-width: 440px;
  animation: signin-card-in 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes signin-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ui-refresh .signin-card__logo {
  text-align: center;
  margin-bottom: 10px;
}
.ui-refresh .signin-card__logo img {
  width: 120px;
  height: auto;
  display: inline-block;
}

.ui-refresh .signin-card__heading {
  font-size: 30px;
  font-weight: 800;
  color: #30D5C8;
  text-align: center;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.ui-refresh .signin-card__sub {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 26px;
}

/* Social buttons */
.ui-refresh .signin-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.ui-refresh .signin-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  border: 1.5px solid rgba(0,0,0,0.11);
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
  font-family: inherit;
  letter-spacing: 0.1px;
}
.ui-refresh .signin-social__btn:hover {
  background: #f8f9fa;
  border-color: rgba(0,0,0,0.20);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.ui-refresh .signin-social__btn:active {
  transform: translateY(0);
  background: #f1f3f5;
  box-shadow: none;
}

.ui-refresh .signin-social__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

/* Divider */
.ui-refresh .signin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
}
.ui-refresh .signin-divider__line {
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.09);
}
.ui-refresh .signin-divider__text {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Tabs pill toggle */
.ui-refresh .signin-tabs-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}
.ui-refresh .signin-tab-btn {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  user-select: none;
  text-decoration: none !important;
  display: block;
}
.ui-refresh .signin-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Override old form border styles inside the card */
.ui-refresh .desktop-signin #signin-form,
.ui-refresh .desktop-signin #signup-form,
.ui-refresh .desktop-signin #verify-form {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  animation: form-fade-in 220ms ease both;
}
.ui-refresh .desktop-signin #signin-form.hidden,
.ui-refresh .desktop-signin #signup-form.hidden,
.ui-refresh .desktop-signin #verify-form.hidden {
  display: none !important;
}

@keyframes form-fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modern form fields */
.ui-refresh .signin-field {
  margin-bottom: 14px;
}
.ui-refresh .signin-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.ui-refresh .signin-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ui-refresh .signin-field__icon {
  position: absolute;
  left: 13px;
  font-size: 18px;
  color: #9ca3af;
  pointer-events: none;
  user-select: none;
}
.ui-refresh .signin-field__input {
  width: 100%;
  height: 46px;
  border: 1.5px solid rgba(0,0,0,0.11);
  border-radius: 12px;
  padding: 0 42px 0 42px;
  font-size: 15px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  box-sizing: border-box;
  font-family: inherit;
}
.ui-refresh .signin-field__input:focus {
  border-color: #30D5C8;
  box-shadow: 0 0 0 3px rgba(48, 213, 200, 0.16);
}
.ui-refresh .signin-field__input::placeholder {
  color: #c7cdd4;
}
.ui-refresh .signin-field__toggle {
  position: absolute;
  right: 13px;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  user-select: none;
  transition: color 150ms ease;
}
.ui-refresh .signin-field__toggle:hover {
  color: #374151;
}

/* Autofill override */
.ui-refresh .signin-field__input:-webkit-autofill,
.ui-refresh .signin-field__input:-webkit-autofill:hover,
.ui-refresh .signin-field__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #111827;
  transition: background-color 600000s 0s;
}

/* Submit button */
.ui-refresh .signin-submit-btn {
  width: 100%;
  height: 48px;
  background: #30D5C8;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  margin-top: 6px;
  transition: background 140ms ease, transform 110ms ease, box-shadow 140ms ease;
  font-family: inherit;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(48, 213, 200, 0.32);
}
.ui-refresh .signin-submit-btn:hover {
  background: #28b4a9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(48, 213, 200, 0.42);
}
.ui-refresh .signin-submit-btn:active {
  transform: translateY(0);
  background: #22a09a;
  box-shadow: none;
}
.ui-refresh .signin-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Messages */
.ui-refresh .signin-message {
  font-size: 13px;
  color: #dc2626;
  text-align: center;
  min-height: 18px;
  margin-bottom: 10px;
  font-weight: 500;
  line-height: 1.4;
}
.ui-refresh .signin-message--info {
  color: #374151;
  background: rgba(48, 213, 200, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(48, 213, 200, 0.22);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

/* Links */
.ui-refresh .signin-links {
  text-align: center;
  margin-top: 14px;
}
.ui-refresh .signin-link-text {
  font-size: 13px;
  color: #30D5C8;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease;
}
.ui-refresh .signin-link-text:hover {
  color: #28b4a9;
  text-decoration: underline;
}

/* Hint text */
.ui-refresh .signin-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 6px 0 12px;
  text-align: center;
  line-height: 1.5;
}
.ui-refresh .signin-hint .signin-link-text {
  font-size: 12px;
}

/* ─────────────────────────────────────────
   Admin page modernisation
───────────────────────────────────────── */

/* Admin title header */
.ui-refresh .admin-title {
  display: flex;
  align-items: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  margin-bottom: 20px;
}
.ui-refresh .admin-title .mdc-typography--headline5,
.ui-refresh .admin-title .university-edit-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.2px;
  text-transform: none;
}

/* Admin contained section — scoped only to admin-specific classes, never listing pages */
.ui-refresh .admin-university-section.contained-section,
.ui-refresh .university-detail.contained-section {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  padding: 24px 28px;
  margin-top: 24px;
  margin-bottom: 24px;
}

/* Data table modernisation — scoped to admin data tables only */
/* NOTE: no overflow:hidden — would clip content and break card layouts on any shared page */
.ui-refresh .mdc-data-table {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ui-refresh .mdc-data-table__header-row {
  background: linear-gradient(135deg, #30D5C8 0%, #28b4a9 100%);
}
.ui-refresh .mdc-data-table__header-cell {
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 14px 16px;
}
.ui-refresh .mdc-data-table__row {
  transition: background 120ms ease;
}
.ui-refresh .mdc-data-table__row:hover {
  background: rgba(48, 213, 200, 0.04) !important;
}
.ui-refresh .mdc-data-table__row:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.ui-refresh .mdc-data-table__cell {
  color: #374151;
  font-size: 14px;
  padding: 12px 16px;
}

/* Admin sub-nav pills */
.ui-refresh .sub-nav .mdc-tab,
.ui-refresh .sub-nav-item {
  border-radius: 999px;
  transition: background 150ms ease;
}

/* ── Responsive photo slider ───────────────────────────────────────────────
   On mobile the container height snaps to each image's natural aspect ratio
   (JS-driven, see sliderScript in display.njk). CSS provides the initial
   fallback and the smooth transition between heights.
   Tablet/desktop (768px+) is completely unchanged — fixed 340px stays.
   ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Fallback height until JS measures the image; transition makes resizes smooth */
  .slider {
    height: clamp(200px, 75vw, 360px);
    transition: height 0.3s ease;
  }
  .slide {
    height: clamp(200px, 75vw, 360px);
  }

  /* No cropping — show the whole image */
  .slide img {
    object-fit: contain;
    height: 100%;
    max-height: none;
  }
}
