/* ==========================================================================
   AlumNet — Design System
   Kenya Airways alumni engagement portal
   ========================================================================== */

/* Fonts are served from this site (SIL Open Font License, see assets/fonts) */
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/schibsted-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/schibsted-grotesk-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Brand: livery red for the main action and where you are, horizon blue for links and focus */
  --kq-red: #B5121B;
  --kq-red-dark: #8F0E15;
  --kq-red-tint: #FBEAEB;
  --kq-red-solid: #B5121B;
  --kq-green: #20507A;       /* kept as the name the older rules use; now the secondary blue */
  --kq-green-light: #2B6699;
  --link: #20507A;
  --link-hover: #163A59;
  --ok: #1D6B3A;
  --ok-tint: #E6F2EA;
  --warn: #7A4B00;
  --warn-tint: #FFF3DC;
  --blue-tint: #E3EBF2;

  /* Neutrals */
  --ink: #1C2127;
  --ink-soft: #4E5864;
  --slate: #5B6672; /* 5.6:1 on white, 4.9:1 on the cloud grey (WCAG AA) */
  --paper: #FFFFFF;
  --panel: #FFFFFF;
  --stone: #DDE3E8;
  --stone-line: #DDE3E8;
  --line-strong: #C5CED6;
  --wash: #EEF2F5;
  --side-dark: #1C2127;

  /* Type */
  --font-display: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, sans-serif;

  /* Scale */
  --radius: 8px;
  --radius-lg: 12px;

  /* Older names, now flat surfaces (no glass) */
  --glass-bg: #FFFFFF;
  --glass-border: #DDE3E8;
  --glass-dark: #1C2127;
}

:root[data-theme="dark"] {
  /* Red as text must be lighter on dark surfaces; filled red buttons use --kq-red-solid */
  --kq-red: #FF8A8F;
  --kq-red-dark: #FFB0B3;
  --kq-red-solid: #C8242D;
  --kq-red-tint: rgba(255, 138, 143, 0.14);
  --kq-green: #8CB8E0;
  --kq-green-light: #A9CBEA;
  --link: #8CB8E0;
  --link-hover: #B5D3EE;
  --ok: #7FD39B;
  --ok-tint: rgba(127, 211, 155, 0.14);
  --warn: #F2C46B;
  --warn-tint: rgba(242, 196, 107, 0.14);
  --blue-tint: rgba(140, 184, 224, 0.16);
  --ink: #ECEFF2;
  --ink-soft: #B9C2CB;
  --slate: #97A3AE;
  --paper: #111518;
  --panel: #1A1F24;
  --stone: #2A3138;
  --stone-line: #333B43;
  --line-strong: #46505A;
  --wash: #1F252B;
  --side-dark: #0B0E10;
  --glass-bg: #1A1F24;
  --glass-border: #333B43;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

img {
  max-width: 100%;
  display: block;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--kq-green);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--kq-green);
  font-weight: 600;
}

.divider {
  height: 1px;
  background: var(--stone-line);
  border: none;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--kq-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--kq-red-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--stone-line);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-quiet {
  background: transparent;
  color: var(--kq-green);
  padding: 8px 10px;
}

.btn-quiet:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Form elements
   -------------------------------------------------------------------------- */

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--kq-green);
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Auth — Split Screen with Flight Path
   -------------------------------------------------------------------------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
}

.auth-visual {
  flex: 1 1 46%;
  position: relative;
  overflow: hidden;
  background: #081210;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  min-height: 100vh;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/auth-bg.jpeg') center/cover no-repeat;
  opacity: 0.16;
  z-index: 0;
}
.auth-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #0a2e4a 0%, #0d1f1a 55%, #081210 100%);
  opacity: 0.88;
  z-index: 0;
}

.auth-visual-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  z-index: 2;
}

.auth-visual-brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--kq-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.auth-visual-copy {
  z-index: 2;
  max-width: 360px;
}

.auth-visual-copy h1 {
  color: #fff;
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.auth-visual-copy p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.98rem;
  line-height: 1.6;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  filter: blur(18px);
  animation: drift 50s linear infinite;
}

@keyframes drift {
  from {
    transform: translateX(-40px);
  }

  to {
    transform: translateX(40px);
  }
}

.aircraft-silhouette {
  position: absolute;
  bottom: 60px;
  right: -30px;
  width: 280px;
  opacity: 0.14;
  z-index: 1;
  transform: rotate(-8deg);
}
.aircraft-silhouette path { fill: #fff; }

.flight-path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.flight-path-svg .path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
}

.auth-topbar {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 3;
}

.auth-form-panel {
  flex: 1 1 54%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
  animation: form-fade-in 0.6s ease both;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-toggle {
  display: flex;
  background: var(--wash);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 30px;
}

.auth-toggle a {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-toggle a.active {
  background: var(--kq-red);
  color: #fff;
}

.auth-form-inner h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.auth-form-inner .sub {
  color: var(--slate);
  font-size: 0.92rem;
  margin-bottom: 26px;
  display: block;
}

.auth-switch {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--slate);
  text-align: center;
}

.auth-switch a {
  color: var(--kq-green);
  font-weight: 600;
}

@media (max-width: 880px) {
  .auth-shell {
    flex-direction: column;
  }

  .auth-visual {
    min-height: 220px;
    padding: 28px 24px;
  }

  .auth-visual-copy h1 {
    font-size: 1.4rem;
  }

  .auth-visual-copy p {
    display: none;
  }

  .auth-form-panel {
    padding: 32px 24px;
  }
}


.auth-form-inner.leaving {
  animation: form-fade-out 0.32s ease forwards;
}
@keyframes form-fade-out {
  to { opacity: 0; transform: translateY(-10px) scale(0.98); }
}

.btn-primary:disabled {
  opacity: 0.85;
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .auth-form-inner.leaving { animation: none; opacity: 1; transform: none; }
}

.auth-shell.transitioning #flight-path-mount animateMotion {
  animation-duration: 0.4s !important;
}

/* --------------------------------------------------------------------------
   App shell — dashboard layout
   -------------------------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  background: var(--glass-dark);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 40px;
}

.app-brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--kq-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.nav-group {
  margin-bottom: 28px;
}

.nav-group-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 2px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left: 2px solid var(--kq-red);
  padding-left: 10px;
}

.app-sidebar-foot {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: auto;
}

.topbar-actions {
  position: fixed;
  top: 20px;
  right: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-switch {
  display: inline-flex;
  cursor: pointer;
}

.theme-switch input {
  display: none;
}

.switch-track {
  width: 44px;
  height: 24px;
  background: var(--stone-line);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  display: inline-block;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.theme-switch input:checked+.switch-track {
  background: var(--kq-green);
}

.theme-switch input:checked+.switch-track .switch-thumb {
  transform: translateX(20px);
}

.topbar-actions .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

.topbar-actions .icon-btn:hover {
  border-color: var(--kq-red);
  color: var(--kq-red);
}

.app-main {
  padding: 36px 44px;
  max-width: 920px;
}

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

.app-header h1 {
  font-size: 1.6rem;
}

.app-header .sub {
  color: var(--slate);
  font-size: 0.92rem;
  margin-top: 6px;
  display: block;
}

.app-toolbar {
  display: flex;
  gap: 10px;
}

.select-pill {
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 0.85rem;
  background: var(--panel);
  color: var(--ink-soft);
}

.search-pill {
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 0.85rem;
  min-width: 200px;
  background: var(--panel);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Glass cards — shared by mentor/request/opportunity/notif/event/stat/table
   -------------------------------------------------------------------------- */

.mentor-card,
.request-card,
.opportunity-card,
.notif-item,
.event-card,
.stat-card,
.table-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(20, 32, 28, 0.06);
}

.mentor-list {
  display: flex;
  flex-direction: column;
}

.mentor-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 20px;
  margin-bottom: 14px;
}

.request-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  margin-bottom: 14px;
}

.opportunity-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  margin-bottom: 14px;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 20px;
  margin-bottom: 14px;
}

.notif-item.unread {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--kq-green);
}

.event-card,
.stat-card {
  padding: 18px;
}

.table-card {
  padding: 8px 20px;
  overflow-x: auto;
}

.mentor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--kq-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.mentor-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.mentor-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.match-score {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--kq-green);
  border: 1px solid var(--kq-green);
  border-radius: 12px;
  padding: 2px 10px;
}

.mentor-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--wash);
  padding: 3px 9px;
  border-radius: 12px;
}

.mentor-blurb {
  color: var(--ink-soft);
  font-size: 0.9rem;
  max-width: 52ch;
}

.mentor-meta {
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 6px;
}

.mentor-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn.saved {
  border-color: var(--kq-red);
  color: var(--kq-red);
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--stone-line);
}

.tab {
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--slate);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--kq-red);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Status pills
   -------------------------------------------------------------------------- */

.request-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.request-status.pending {
  background: var(--wash);
  color: var(--ink-soft);
}

.request-status.accepted {
  background: var(--kq-green);
  color: #fff;
}

.request-status.declined {
  background: var(--stone);
  color: var(--ink-soft);
}
.request-status.ended {
  background: var(--stone);
  color: var(--slate);
}

/* --------------------------------------------------------------------------
   Admin — stats + table
   -------------------------------------------------------------------------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card .label {
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  font-size: 0.75rem;
  color: var(--slate);
  padding: 10px 8px;
  border-bottom: 1px solid var(--stone-line);
}

.data-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--stone-line);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Events
   -------------------------------------------------------------------------- */

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.event-card .date {
  font-size: 0.78rem;
  color: var(--kq-green);
  font-weight: 600;
  margin-bottom: 8px;
}

.event-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.event-card p {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Notifications
   -------------------------------------------------------------------------- */

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kq-red);
  margin-top: 6px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

.hamburger-btn {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 55;
}
.sidebar-backdrop.visible { display: block; }

@media (max-width: 900px) {
  .hamburger-btn { display: flex; }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 58;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }

  .app-main {
    padding: 24px;
    padding-top: 76px;
  }

  .mentor-card {
    grid-template-columns: 44px 1fr;
  }

  .mentor-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 8px;
  }
}

/*View a public profile*/
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px; width: 90%;
  max-height: 80vh; overflow-y: auto;
}
.modal-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.modal-card .modal-meta { color: var(--slate); font-size: 0.85rem; margin-bottom: 20px; }
.modal-card .modal-section { margin-bottom: 16px; }
.modal-card .modal-section .label { font-size: 0.75rem; color: var(--slate); margin-bottom: 4px; font-weight: 600; }
.modal-card .modal-section .value { font-size: 0.92rem; color: var(--ink-soft); }


.dash-header {
  margin-bottom: 32px;
}
.dash-header .greeting {
  font-size: 1.9rem;
  margin-bottom: 4px;
}
.dash-header .greeting-sub {
  color: var(--slate);
  font-size: 0.95rem;
}

.dash-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 36px;
}
.dash-stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(20, 32, 28, 0.06);
}
.dash-stat-card .icon { font-size: 1.3rem; margin-bottom: 10px; }
.dash-stat-card .num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.dash-stat-card .label { font-size: 0.8rem; color: var(--slate); margin-top: 2px; }
.dash-stat-card.alert { border-color: var(--kq-red); }
.dash-stat-card.alert .num { color: var(--kq-red); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-heading h2 { font-size: 1.15rem; }
.section-heading .count { color: var(--slate); font-size: 0.85rem; }

.profile-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, var(--kq-green) 0%, #033224 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
}
.profile-nudge p { font-size: 0.9rem; color: rgba(255,255,255,0.85); margin-top: 2px; }
.profile-nudge strong { font-size: 1rem; }

@media (max-width: 720px) {
  .dash-stat-row { grid-template-columns: 1fr; }
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
  padding: 26px 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(20, 32, 28, 0.06);
}
.profile-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  flex-shrink: 0;
}
.profile-header-info h1 { font-size: 1.4rem; margin-bottom: 7px; }
.profile-header-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 11px;
  border-radius: 999px;
  text-transform: uppercase;
}
.role-badge.mentee { background: var(--wash); color: var(--kq-green); }
.role-badge.mentor { background: var(--kq-green); color: #fff; }
.profile-header-meta .dept { color: var(--slate); font-size: 0.88rem; }
.profile-header-meta .years { color: var(--slate); font-size: 0.88rem; }
.profile-header-meta .sep { color: var(--stone-line); }

/* Completeness bar */
.profile-strength {
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.profile-strength-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.profile-strength-top .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.profile-strength-top .pct {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--kq-green);
}
.profile-strength-track {
  height: 6px;
  background: var(--stone);
  border-radius: 999px;
  overflow: hidden;
}
.profile-strength-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--kq-green), var(--kq-green-light));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.profile-card.span-2 { grid-column: 1 / -1; }

.profile-section-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.profile-section-label .icon {
  width: 18px;
  height: 18px;
  color: var(--kq-green);
  flex-shrink: 0;
}
.profile-section-label .icon svg { width: 100%; height: 100%; }

.profile-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(20, 32, 28, 0.06);
}
.profile-card textarea,
.profile-card select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  resize: vertical;
  min-height: 92px;
}
.profile-card select { min-height: unset; padding: 12px 13px; }
.profile-card textarea:focus,
.profile-card select:focus {
  border-color: var(--kq-green);
}
.profile-card textarea::placeholder { color: var(--slate); }

.profile-save-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.save-status {
  font-size: 0.85rem;
  color: var(--kq-green);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.save-status.visible { opacity: 1; }

@media (max-width: 720px) {
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Events: badges, meta and aligned buttons */
.event-card { display: flex; flex-direction: column; }
.event-card .btn { margin-top: auto; }
.event-card-top { margin-bottom: 10px; }
.event-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.event-badge.official { background: var(--kq-green); color: #fff; }
.event-badge.community { background: var(--wash); color: var(--kq-green); }
.event-meta {
  font-size: 0.8rem;
  color: var(--slate);
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}
.event-meta a { color: var(--kq-green); font-weight: 600; text-decoration: underline; }
.events-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.events-toolbar .tabs { margin-bottom: 0; flex: 1; }
.request-status.approved { background: var(--kq-green); color: #fff; }
.request-status.rejected { background: var(--stone); color: var(--ink-soft); }

/* Notifications */
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--kq-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-item { cursor: pointer; transition: border-color 0.15s ease; }
.notif-item:hover { border-color: var(--kq-green); }
:root[data-theme="dark"] .notif-item.unread { background: rgba(32, 80, 122, 0.18); }
/* Career opportunities */
.opportunity-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.opportunity-filters .search-pill { flex: 1; min-width: 220px; }
.opp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.opp-company { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.tag.closing-soon { background: rgba(200, 16, 46, 0.1); color: var(--kq-red); font-weight: 600; }

/* Match breakdown bars on mentor cards */
.match-breakdown { display: grid; gap: 4px; margin: 6px 0 8px; max-width: 320px; }
.mb-row {
  display: grid;
  grid-template-columns: 78px 1fr 38px;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--slate);
}
.mb-track { height: 5px; background: var(--stone); border-radius: 999px; overflow: hidden; }
.mb-fill { display: block; height: 100%; background: var(--kq-green); border-radius: 999px; }
.mb-value { text-align: right; font-weight: 600; color: var(--ink-soft); }


/* ===================== Mentor dashboard ===================== */
.md {
  --md-surface: var(--panel);
  --md-border: var(--stone-line);
  --md-muted: var(--slate, #64748b);
  --md-accent: #c8102e;
  --md-accent-soft: rgba(200, 16, 46, 0.08);
  --md-green: #166534;
  --md-green-soft: rgba(21, 128, 61, 0.1);
  --md-amber: #92400e;
  --md-amber-soft: rgba(180, 83, 9, 0.1);
  max-width: 1160px;
  margin: 0 auto;
  padding: 0px 0px 40px;
}

/* Header */
.md-top { margin-bottom: 28px; padding-right: 150px; }
.md-date { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--md-muted); margin: 0 0 8px; }
.md-greeting { font-size: 1.85rem; line-height: 1.2; margin: 0 0 6px; }
.md-sub { color: var(--md-muted); margin: 0 0 18px; font-size: 0.95rem; }
.md-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.md-actions .btn { padding: 8px 16px; font-size: 0.875rem; }

/* Banner */
.md-banner {
  display: flex; align-items: center; gap: 16px;
  background: var(--md-accent-soft); border: 1px solid rgba(200, 16, 46, 0.2);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 24px;
}
.md-banner-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--md-accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.md-banner-icon svg { width: 18px; height: 18px; }
.md-banner-body { flex: 1; }
.md-banner-body p { margin: 2px 0 0; font-size: 0.875rem; color: var(--md-muted); }
.md-banner .btn { white-space: nowrap; }

/* Stat cards: icon on the left, number and label on the right */
.md-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.md-kpi {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  background: var(--md-surface); border: 1px solid var(--md-border); border-radius: 12px;
  padding: 16px 18px; min-height: 84px;
}
.md-kpi-icon {
  grid-row: span 3; width: 44px; height: 44px; border-radius: 12px;
  background: var(--md-accent-soft); color: var(--md-accent); display: grid; place-items: center;
}
.md-kpi-icon svg { width: 20px; height: 20px; }
.md-kpi-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.md-kpi-label { font-size: 0.8rem; color: var(--md-muted); margin-top: 2px; }
.md-kpi-sub { font-size: 0.72rem; color: var(--md-muted); margin-top: 2px; }
.md-kpi.alert { border-color: var(--md-accent); }
.md-kpi.alert .md-kpi-icon { background: var(--md-accent); color: #fff; }
.md-kpi.alert .md-kpi-sub { color: var(--md-accent); font-weight: 600; }

/* Layout */
.md-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.md-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Panels */
.md-panel { background: var(--md-surface); border: 1px solid var(--md-border); border-radius: 12px; padding: 18px 20px; }
.md-panel-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--md-border); }
.md-panel-head h2 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.md-panel-head a, .md-link { font-size: 0.8rem; color: var(--md-accent); text-decoration: none; font-weight: 600; }
.md-panel-head a:hover, .md-link:hover { text-decoration: underline; }

/* List items */
.md-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--md-border); }
.md-item:first-child { border-top: none; }
.md-item-tight { padding: 10px 0; }
.md-item-body { flex: 1; min-width: 0; }
.md-item-title { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-item-text { font-size: 0.85rem; margin-top: 3px; opacity: 0.85; }
.md-item-meta { font-size: 0.75rem; color: var(--md-muted); margin-top: 2px; }
.md-muted { color: var(--md-muted); font-weight: 400; }
.md-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--md-accent); color: #fff; font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; flex-shrink: 0; }
.md-avatar-soft { background: var(--md-accent-soft); color: var(--md-accent); }
.md-btn-sm { padding: 6px 14px; font-size: 0.8rem; white-space: nowrap; }
.md-more { display: block; margin-top: 8px; }
.md-hint { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--md-muted); margin: 8px 0 2px; }

/* Status pills */
.md-pill { font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.md-pill.approved { background: var(--md-green-soft); color: var(--md-green); }
.md-pill.pending { background: var(--md-amber-soft); color: var(--md-amber); }
.md-pill.rejected { background: var(--md-accent-soft); color: var(--md-accent); }

/* Profile strength */
.md-progress-row { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px; }
.md-progress-num { font-size: 1.4rem; font-weight: 700; }
.md-progress { height: 6px; border-radius: 999px; background: var(--md-border); overflow: hidden; margin-bottom: 14px; }
.md-progress div { height: 100%; background: var(--md-accent); border-radius: 999px; transition: width 0.6s ease; }
.md-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.md-checklist li { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--md-muted); }
.md-checklist li svg { width: 15px; height: 15px; flex-shrink: 0; }
.md-checklist li.ok { color: inherit; }
.md-checklist li.ok svg { color: var(--md-green); }

/* Events */
.md-event { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--md-border); color: inherit; text-decoration: none; }
.md-event:first-of-type { border-top: none; }
.md-event:hover .md-item-title { color: var(--md-accent); }
.md-date-block { width: 44px; height: 48px; border-radius: 10px; background: var(--md-accent-soft); color: var(--md-accent); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.md-date-block .m { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.md-date-block .d { font-size: 1.1rem; font-weight: 700; line-height: 1.1; }

/* Empty states: compact */
.md-empty { display: flex; align-items: center; gap: 14px; padding: 16px 0 6px; text-align: left; }
.md-empty-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--md-accent-soft); color: var(--md-accent); display: grid; place-items: center; flex-shrink: 0; }
.md-empty-icon svg { width: 18px; height: 18px; }
.md-empty-title { font-weight: 600; font-size: 0.9rem; }
.md-empty-text { font-size: 0.8rem; color: var(--md-muted); margin-top: 2px; }
.md-empty .md-link { display: inline-block; margin-top: 6px; }

/* Loading placeholders */
.md-skel { background: linear-gradient(90deg, var(--md-border) 25%, rgba(15, 23, 42, 0.03) 50%, var(--md-border) 75%); background-size: 200% 100%; animation: md-shimmer 1.2s infinite; border-radius: 12px; }
.md-skel-row { height: 48px; margin-top: 10px; border-radius: 10px; }
@keyframes md-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 1200px) {
  .md-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .md-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .md { padding: 0px 0px 32px; }
  .md-top { padding-right: 0; padding-top: 24px; }
}
@media (max-width: 520px) {
  .md { padding: 0px 0px 24px; }
  .md-kpis { grid-template-columns: 1fr; gap: 10px; }
  .md-greeting { font-size: 1.5rem; }
  .md-banner { flex-direction: column; align-items: flex-start; }
}

/* Dashboards use the full width; other pages keep the 920px limit */
.app-main:has(.md) { max-width: none; }

.md-pill.match { background: var(--md-accent-soft); color: var(--md-accent); }

/* Admin overview */
.md-inline-actions { display: flex; gap: 6px; flex-shrink: 0; }
.md-avatar svg { width: 18px; height: 18px; }
.md-pill.neutral { background: var(--wash); color: var(--ink-soft); }
.md-split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--md-border); gap: 2px; margin: 4px 0 14px; }
.md-split span { display: block; height: 100%; }
.md-split .a, .md-legend i.a { background: var(--kq-green); }
.md-split .b, .md-legend i.b { background: var(--md-accent); }
.md-legend { display: grid; gap: 8px; font-size: 0.85rem; }
.md-legend div { display: flex; align-items: center; gap: 8px; }
.md-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.md-legend b { margin-left: auto; }
@media (max-width: 520px) {
  .md-inline-actions { flex-direction: column; }
}

/* Admin create-event form */
.admin-form { padding-top: 14px; }
.admin-form .field-row { gap: 16px; }
.admin-form-actions { display: flex; justify-content: flex-end; }
@media (max-width: 720px) {
  .admin-form .field-row { grid-template-columns: 1fr; }
}
/* ===================== Sign-in extras ===================== */
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-label-row label { margin-bottom: 7px; }
.field-link { font-size: 0.8rem; font-weight: 600; color: var(--kq-green); }
.field-link:hover { text-decoration: underline; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--slate); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--stone-line); }
.google-btn-wrap { display: flex; justify-content: center; min-height: 44px; }
.auth-notice { background: rgba(32, 80, 122, 0.1); color: var(--kq-green); border-radius: var(--radius); padding: 10px 14px; font-size: 0.85rem; margin-bottom: 18px; }
.auth-step-icon { width: 48px; height: 48px; border-radius: 14px; background: rgba(200, 16, 46, 0.1); color: var(--kq-red); display: grid; place-items: center; margin-bottom: 16px; }
.auth-step-icon svg { width: 24px; height: 24px; }
.code-input { font-family: var(--font-display); font-size: 1.4rem !important; letter-spacing: 0.4em; text-align: center; }
.auth-form-inner .btn-block + .auth-switch, #forgot-done .btn { margin-top: 18px; }

/* ===================== Account settings ===================== */
.st-body { padding-top: 14px; }
.st-text { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 14px; }
.st-small { font-size: 0.75rem; }
.st-details { margin: 0 0 18px; display: grid; gap: 10px; }
.st-details div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 0.875rem; }
.st-details dt { color: var(--slate); }
.st-details dd { margin: 0; overflow-wrap: anywhere; }
.st-inline { display: flex; gap: 8px; }
.st-inline input { flex: 1; }
.st-msg { display: none; font-size: 0.85rem; margin-bottom: 12px; }
.st-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-actions .btn-quiet:only-child, .st-actions .btn:only-child { margin-left: auto; }
.st-steps { margin: 0 0 14px; padding-left: 20px; font-size: 0.875rem; color: var(--ink-soft); display: grid; gap: 4px; }
.st-qr { display: flex; justify-content: center; margin: 8px 0 10px; }
.st-qr img { background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--stone-line); }
.st-key { text-align: center; font-size: 0.8rem; color: var(--slate); margin-bottom: 16px; }
.st-key code { font-size: 0.85rem; color: var(--ink); background: var(--wash); padding: 3px 8px; border-radius: 6px; }
.st-disclosure summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--kq-red); margin-bottom: 12px; }

/* ===================== Professional profile ===================== */
.pf-hero { background: var(--panel); border: 1px solid var(--stone-line); border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.pf-cover {
  height: 140px;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, 0.16) 0, transparent 45%),
    linear-gradient(120deg, #1C2127 0%, #2A3138 100%);
  border-bottom: 4px solid var(--kq-red);
}
.pf-hero-body { display: flex; align-items: flex-end; gap: 20px; padding: 0 24px 22px; flex-wrap: wrap; }
.pf-avatar {
  width: 112px; height: 112px; border-radius: 50%; margin-top: -56px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 2.2rem;
  border: 4px solid var(--panel); box-shadow: 0 6px 20px rgba(20, 32, 28, 0.15);
}
.pf-avatar-sm { width: 56px; height: 56px; margin-top: 0; font-size: 1.1rem; border-width: 0; box-shadow: none; }
.pf-identity { flex: 1; min-width: 220px; padding-top: 14px; }
.pf-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-name-row h1 { font-size: 1.6rem; }
.pf-headline { font-size: 0.98rem; color: var(--ink-soft); margin: 4px 0 8px; }
.pf-headline.pf-placeholder { color: var(--slate); font-style: italic; font-size: 0.88rem; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.82rem; color: var(--slate); }
.pf-meta span + span::before { content: '·'; margin-right: 14px; color: var(--stone-line); }
.pf-hero-actions { display: flex; gap: 8px; padding-bottom: 4px; }
.pf-text { padding-top: 12px; font-size: 0.9rem; line-height: 1.65; color: var(--ink-soft); }
.pf-empty { color: var(--slate); font-style: italic; font-size: 0.85rem; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.pf-chip { font-size: 0.8rem; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: rgba(32, 80, 122, 0.08); color: var(--kq-green); border: 1px solid rgba(32, 80, 122, 0.18); }
.pf-tag-match { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--kq-green); background: rgba(32, 80, 122, 0.08); padding: 3px 8px; border-radius: 999px; }
.pf-tag-small { margin-left: auto; font-size: 0.6rem; }
.pf-form { padding-top: 14px; }
#pf-view { gap: 20px; }
:root[data-theme="dark"] .pf-chip, :root[data-theme="dark"] .pf-tag-match { background: rgba(10, 122, 90, 0.18); color: #6FD3AE; border-color: rgba(10, 122, 90, 0.35); }
:root[data-theme="dark"] .auth-notice { background: rgba(10, 122, 90, 0.18); color: #6FD3AE; }

/* Public profile modal */
.pf-modal { max-width: 560px; }
.pf-modal-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.pf-modal-head .pf-headline { margin: 2px 0 4px; font-size: 0.88rem; }
.pf-modal-head .modal-meta { margin-bottom: 0; }
.pf-modal .pf-chips { padding-top: 4px; }
.pf-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

@media (max-width: 720px) {
  .pf-hero-body { padding: 0 18px 18px; }
  .pf-avatar { width: 88px; height: 88px; margin-top: -44px; font-size: 1.7rem; }
  .pf-hero-actions { width: 100%; }
  .st-details div { grid-template-columns: 1fr; gap: 2px; }
}

/* Quiet buttons have no box */
.btn-quiet { border: none; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
/* Keep the profile banner clear of the fixed theme and logout buttons */
#profile-page { padding-top: 44px; }
@media (max-width: 900px) { #profile-page { padding-top: 0; } }
@media (max-width: 520px) { .pf-meta span + span::before { content: none; } .pf-meta { flex-direction: column; gap: 2px; } }

/* Profile strength: next-step hint and button (same on profile page and dashboards) */
.pf-next { font-size: 0.8rem; color: var(--slate); margin-top: 12px; }
.pf-strength-cta { margin-top: 12px; }

/* ------------------------------------------------------------------
   Identity and account security (Module 1)
   ------------------------------------------------------------------ */
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.45; margin: 4px 0 18px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--kq-red); }
.check-row a { color: var(--link); font-weight: 700; }
.btn-danger { background: transparent; color: var(--kq-red); border: 1px solid var(--kq-red); }
.btn-danger:hover { background: var(--kq-red); color: #fff; }
.st-banner { background: var(--md-amber-soft); color: var(--md-amber); border-radius: var(--radius); padding: 12px 16px; font-size: 0.88rem; font-weight: 500; margin-bottom: 18px; }
.st-codes-box { border: 1px dashed var(--stone-line); border-radius: var(--radius); padding: 14px; margin: 6px 0 14px; }
.st-codes { list-style: none; padding: 0; margin: 10px 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.st-codes code { font-size: 0.92rem; letter-spacing: 0.04em; }

/* Verified badge on profiles */
.verified-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; color: var(--kq-green); background: rgba(32, 80, 122, 0.1); padding: 3px 9px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.verified-badge svg { width: 12px; height: 12px; }
:root[data-theme="dark"] .verified-badge { color: #6FD3AE; background: rgba(10, 122, 90, 0.18); }

/* Onboarding wizard */
.ob-wrap { max-width: 640px; margin: 0 auto; }
.ob-progress { display: flex; gap: 6px; margin: 4px 0 22px; }
.ob-progress span { flex: 1; height: 4px; border-radius: 999px; background: var(--stone-line); }
.ob-progress span.on { background: var(--kq-red); }
.ob-step h2 { font-size: 1.15rem; margin-bottom: 6px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.ob-chip { border: 1px solid var(--stone-line); background: var(--panel); color: var(--ink-soft); border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; cursor: pointer; font-family: inherit; }
.ob-chip.on { border-color: var(--kq-red); color: var(--kq-red); background: rgba(200, 16, 46, 0.06); }
.ob-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 10px; }

/* Admin verification queue */
.vr-card { border: 1px solid var(--md-border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; background: var(--md-surface); }
.vr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.vr-head h3 { font-size: 1rem; margin: 0 0 4px; }
.vr-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 14px 0; font-size: 0.85rem; }
.vr-cols dt { color: var(--slate); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.vr-cols dd { margin: 2px 0 0; color: var(--ink); }
.vr-signals { list-style: none; padding: 0; margin: 0 0 12px; font-size: 0.84rem; }
.vr-signals li { padding: 3px 0 3px 22px; position: relative; color: var(--ink-soft); }
.vr-signals li::before { position: absolute; left: 0; top: 3px; font-weight: 700; }
.vr-signals li.ok::before { content: '\2713'; color: var(--kq-green); }
.vr-signals li.bad::before { content: '\2715'; color: var(--kq-red); }
.vr-suggest { font-size: 0.85rem; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 12px; }
.vr-suggest.low { background: var(--md-green-soft); color: var(--md-green); }
.vr-suggest.medium { background: var(--md-amber-soft); color: var(--md-amber); }
.vr-suggest.high { background: var(--md-accent-soft); color: var(--md-accent); }
.md-pill.risk-low { background: var(--md-green-soft); color: var(--md-green); }
.md-pill.risk-medium { background: var(--md-amber-soft); color: var(--md-amber); }
.md-pill.risk-high { background: var(--md-accent-soft); color: var(--md-accent); }
.hr-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.hr-summary div { border: 1px solid var(--md-border); border-radius: var(--radius); padding: 10px 12px; }
.hr-summary strong { display: block; font-size: 1.3rem; font-family: var(--font-display); }
.hr-summary span { font-size: 0.78rem; color: var(--slate); }

@media (max-width: 640px) {
  .vr-cols, .st-codes { grid-template-columns: 1fr; }
}

/* Plain document pages (privacy notice) */
.doc-page { background: var(--paper, var(--panel)); }
.doc-wrap { max-width: 720px; margin: 0 auto; padding: 48px 20px 64px; color: var(--ink); line-height: 1.65; }
.doc-brand { font-family: var(--font-display); font-weight: 700; margin-bottom: 28px; }
.doc-brand .mark { background: var(--kq-red); color: #fff; padding: 3px 7px; border-radius: 6px; margin-right: 4px; }
.doc-wrap h1 { font-size: 1.9rem; margin-bottom: 6px; }
.doc-wrap h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.doc-wrap ul { padding-left: 20px; }
.doc-wrap li { margin-bottom: 6px; }
.doc-meta { color: var(--slate); }
.doc-back { margin-top: 36px; }

/* ------------------------------------------------------------------
   Trust and safety (Module 2)
   ------------------------------------------------------------------ */
.dlg { max-width: 480px; }
.dlg h3 { margin: 0 0 12px; font-size: 1.1rem; }
/* Links inside dialogs and banners look like links in both themes */
.dlg .st-text a, .md-banner-body a { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--kq-red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.dlg .st-text a:hover, .md-banner-body a:hover { color: var(--kq-red); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.dlg-safety { font-size: 0.8rem; color: var(--ink-soft); background: var(--wash, rgba(0,0,0,0.04)); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0 4px; line-height: 1.45; }
.dlg-safety .btn-quiet { padding: 0; color: var(--kq-red); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--panel); padding: 12px 18px; border-radius: 10px; font-size: 0.88rem; opacity: 0; transition: opacity .25s, transform .25s; z-index: 2000; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.request-card-rich { align-items: flex-start; }
.req-main { flex: 1; min-width: 0; }
.req-name { color: inherit; text-decoration: none; }
.req-name:hover { text-decoration: underline; }
.req-headline { font-size: 0.85rem; color: var(--ink-soft); }
.req-message { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--stone-line); font-size: 0.88rem; color: var(--ink); background: var(--wash, rgba(0,0,0,0.03)); border-radius: 0 8px 8px 0; white-space: pre-line; }
.req-contact { margin-top: 10px; font-size: 0.88rem; }
.req-contact a { color: var(--kq-red); font-weight: 600; }
.req-safety { margin-top: 8px; display: flex; gap: 14px; }
.req-safety .btn-quiet, .event-report { padding: 0; color: var(--slate); }
.req-safety .btn-quiet:hover, .event-report:hover { color: var(--kq-red); }
.event-report { display: block; margin: 10px auto 0; }
.risk-block { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.risk-block .vr-signals { flex-basis: 100%; }
.report-list { list-style: none; padding: 0; margin: 12px 0; font-size: 0.87rem; }
.report-list li { padding: 8px 0; border-top: 1px solid var(--md-border, var(--stone-line)); }
.report-quote { margin-top: 4px; color: var(--ink-soft); font-style: italic; }
.pf-modal-actions { align-items: center; }
.mentor-name-row .verified-badge { margin-left: 2px; }
@media (max-width: 640px) {
  .request-card-rich { flex-direction: column; gap: 12px; }
  .request-card-rich > :last-child { align-self: stretch; }
}
.req-caution { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius); background: rgba(200, 16, 46, 0.08); color: var(--kq-red); font-size: 0.84rem; line-height: 1.45; }
.mod-filter { display: flex; align-items: center; gap: 10px; margin: -8px 0 18px; font-size: 0.88rem; color: var(--ink-soft); }
.mod-filter select { width: auto; min-width: 200px; }

/* ------------------------------------------------------------------
   Smart moderation
   ------------------------------------------------------------------ */
.mod-controls { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.mod-lane-key { display: grid; gap: 6px; font-size: 0.84rem; color: var(--ink-soft); }
.mod-lane-key .md-pill { display: inline-block; min-width: 70px; text-align: center; margin-right: 6px; }
.mod-switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; max-width: 320px; font-size: 0.88rem; }
.mod-switch input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--kq-green); flex-shrink: 0; }
.mod-insights { margin-bottom: 16px; }
.mod-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mod-stat { border: 1px solid var(--md-border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mod-stat strong { font-family: var(--font-display); font-size: 1.05rem; }
.mod-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mod-toolbar .mod-filter { margin: 0; }
.mod-card h3 { margin: 0 0 2px; }
.mod-why { background: var(--wash); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; }
.mod-why .vr-signals { margin: 4px 0 0; }
.mod-why .vr-signals li:not(.ok):not(.bad) { padding-left: 14px; }
.mod-why .vr-signals li:not(.ok):not(.bad)::before { content: '\2022'; color: var(--slate); }
.mod-trust { margin-top: 6px; font-size: 0.84rem; }
.mod-trust summary { cursor: pointer; color: var(--ink-soft); }
.mod-late { color: var(--kq-red); font-weight: 600; }
.mod-learned { margin-top: 28px; }
.mod-learned-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.mod-chip-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--md-border); font-size: 0.86rem; }
.post-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .mod-learned-cols { grid-template-columns: 1fr; }
  .post-side { align-items: flex-start; }
}

/* Opportunities: my posts tab, poster filter */
.opp-tabs { margin: 4px 0 18px; }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--wash); font-size: 0.72rem; line-height: 18px; text-align: center; }
.tab-count:empty { display: none; }
.tag-mine { background: rgba(32, 80, 122, 0.1); color: var(--kq-green); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { color: var(--kq-red); }
.filter-chip-row:empty { display: none; }
.filter-chip-row { margin: -6px 0 14px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--wash); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 0.82rem; color: var(--ink); }
.filter-chip button { border: 0; background: var(--panel); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--ink-soft); line-height: 1; }

/* ------------------------------------------------------------------
   Find a mentor (Module 3)
   ------------------------------------------------------------------ */
.fm-section { margin-bottom: 36px; }
.fm-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 14px; }
.fm-search { display: flex; gap: 10px; margin-bottom: 12px; }
.fm-search input { flex: 1; min-width: 0; }
.fm-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 8px; margin-bottom: 10px; }
.fm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-available { margin: 0; }
.fm-note { font-size: 0.84rem; color: var(--ink-soft); background: var(--wash); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 12px; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fm-card { background: var(--panel); border: 1px solid var(--stone-line); border-radius: var(--radius-lg, 14px); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fm-card-top { display: flex; gap: 12px; align-items: flex-start; }
.fm-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; margin-right: 4px; }
.fm-name:hover { text-decoration: underline; }
.fm-chips { margin: 0; }
.fm-avail { font-size: 0.82rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.fm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate); flex-shrink: 0; }
.fm-avail.on .fm-dot { background: var(--kq-green); }
.fm-avail.on { color: var(--kq-green); }
.fm-avail.off { color: var(--slate); }
.fm-card-actions { display: flex; gap: 8px; margin-top: auto; }
.fm-pages { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.fm-page { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--stone-line); background: var(--panel); cursor: pointer; font: inherit; color: var(--ink); }
.fm-page.active { background: var(--kq-red); color: #fff; border-color: var(--kq-red); }
.pf-fieldset { border: 1px solid var(--stone-line); border-radius: var(--radius); padding: 12px 14px 4px; margin: 4px 0 18px; }
.pf-fieldset legend { font-weight: 600; font-size: 0.88rem; padding: 0 6px; }
@media (max-width: 640px) {
  .fm-search { flex-direction: column; }
  .fm-grid { grid-template-columns: 1fr; }
}
.fm-why { font-size: 0.82rem; color: var(--kq-green); }
.pf-chip-hit { border-color: var(--kq-green); color: var(--kq-green); font-weight: 600; }

/* ------------------------------------------------------------------
   Fit bands and recommendations (Module 4)
   ------------------------------------------------------------------ */
.fit-pill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.fit-strong { background: rgba(32, 80, 122, 0.12); color: var(--kq-green); }
.fit-good { background: rgba(32, 80, 122, 0.06); color: var(--kq-green); border: 1px solid rgba(32, 80, 122, 0.25); }
.fit-some { background: var(--wash); color: var(--ink-soft); }
.fit-why { font-size: 0.82rem; color: var(--kq-green); margin: 4px 0 6px; }
.rec-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 26px; }
.rec-card { text-align: left; background: var(--panel); border: 1px solid var(--stone-line); border-radius: var(--radius-lg, 14px); padding: 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; color: var(--ink); }
.rec-card:hover { border-color: var(--kq-green); }
.rec-card .fit-pill { align-self: flex-start; }
.events-rec-label { grid-column: 1 / -1; font-weight: 600; font-size: 0.95rem; margin: 8px 0 -4px; }
.event-highlight { outline: 2px solid var(--kq-red); outline-offset: 2px; }
.dept-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.dept-pick { display: flex; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }
.dept-pick input { accent-color: var(--kq-red); }
:root[data-theme="dark"] .fit-strong, :root[data-theme="dark"] .fit-good, :root[data-theme="dark"] .fit-why { color: #6FD3AE; }
.event-card .fit-pill { align-self: flex-start; margin-bottom: 6px; }
.dept-pick, .admin-form .dept-pick { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.dept-pick input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; padding: 0; }

/* Your own event: edit and cancel instead of register */
.event-badge.mine { background: var(--kq-green-soft, #e3f1ea); color: var(--kq-green, #0b6b3a); margin-left: 6px; }
.event-own-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.event-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-event-actions { white-space: nowrap; }
.admin-event-actions .btn-quiet { margin-left: 8px; }
.modal-card .md-muted a, .fit-why a { color: var(--kq-green, #0b6b3a); text-decoration: underline; }
.mod-burst { margin-top: 14px; }
.mod-burst-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.mod-burst-row input { width: 90px; }
#event-filters { margin-bottom: 16px; }
.list-more { display: flex; justify-content: center; margin: 18px 0 6px; grid-column: 1 / -1; }
.fm-save { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line, #d9ddd8);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.85rem; color: var(--ink-soft, #45524c); cursor: pointer; }
.fm-save:hover { border-color: var(--kq-green, #0b6b3a); color: var(--kq-green, #0b6b3a); }
.fm-save.is-saved { color: var(--kq-green, #0b6b3a); border-color: var(--kq-green, #0b6b3a); font-weight: 600; }
.mentor-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mentor-actions .fm-save { margin-right: 0; }
.event-place-free { font-size: 0.85rem; font-weight: 600; color: var(--kq-green, #0b6b3a); text-align: center; }
.fm-save { white-space: nowrap; }
.fm-card-actions { flex-wrap: wrap; }

/* Mentorship workspace */
.ws-card { max-width: 620px; }
.ws-section { border-top: 1px solid var(--line, #e3e6e2); padding-top: 14px; margin-top: 14px; }
.ws-section h4 { margin: 0 0 8px; font-size: 0.95rem; }
.ws-goals, .ws-meetings { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.ws-goals li, .ws-meetings li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ws-meetings li { flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--paper-soft, rgba(0,0,0,0.03)); }
.ws-goal { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.ws-goal input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.ws-goal.done .ws-goal-text { text-decoration: line-through; color: var(--slate); }
.ws-inline { display: flex; gap: 8px; }
.ws-inline input { flex: 1; }
.req-side-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.req-progress { margin-top: 6px; }
.fb-q { border: 0; padding: 0; margin: 0 0 14px; }
.fb-q legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.fb-scale { display: flex; gap: 8px; }
.fb-scale label { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.fb-scale-ends { display: flex; justify-content: space-between; max-width: 220px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ws-inline input { padding: 10px 12px; border: 1px solid var(--line, #d9ddd8); border-radius: 10px; font: inherit; background: var(--panel, #fff); color: inherit; }

/* Admin: one member in detail */
.ud-card { max-width: 920px; width: calc(100vw - 32px); max-height: calc(100vh - 48px); overflow-y: auto; }
.ud-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ud-head h3 { margin: 0 0 4px; }
.ud-pills { display: flex; gap: 6px; }
.ud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 14px; }
.ud-section { margin-top: 18px; }
.ud-card h4 { margin: 0 0 8px; font-size: 0.95rem; }
.ud-dl { display: grid; gap: 6px; margin: 0; }
.ud-dl div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.ud-dl dt { color: var(--slate); font-size: 0.85rem; }
.ud-dl dd { margin: 0; font-size: 0.9rem; }
.ud-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ud-stats div { background: var(--paper-soft, rgba(0,0,0,0.03)); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ud-stats strong { font-size: 1.15rem; }
.ud-stats span { font-size: 0.8rem; color: var(--slate); }
.ud-table { overflow-x: auto; }
.ud-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; font-size: 0.9rem; }
.ud-warn { color: var(--kq-red, #c8102e); }
:root[data-theme="dark"] .ud-warn { color: #ff8f9f; }
.adm-name { font: inherit; padding: 0; text-align: left; }
.adm-user-filters { align-items: center; margin-bottom: 8px; }

/* Impact dashboard: single-hue bars validated for both themes (dataviz checks) */
:root { --chart-bar: #0A7A5A; --chart-grid: rgba(0,0,0,0.08); }
:root[data-theme="dark"] { --chart-bar: #2FA57A; --chart-grid: rgba(255,255,255,0.08); }
.ic-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ic-controls { display: flex; gap: 8px; align-items: center; }
.ic-section { margin: 24px 0 8px; }
.ic-section h2 { font-size: 1.1rem; margin: 0 0 6px; }
.ic-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.ic-tile { background: var(--panel); border: 1px solid var(--stone-line, #e3e6e2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ic-tile strong { font-size: 1.6rem; font-family: 'Space Grotesk', sans-serif; color: var(--ink); }
.ic-tile span { font-size: 0.88rem; color: var(--ink-soft, #45524c); }
.ic-tile small { font-size: 0.78rem; }
.ic-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.ic-chart { background: var(--panel); border: 1px solid var(--stone-line, #e3e6e2); border-radius: 12px; padding: 14px 16px; margin: 0; }
.ic-chart figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; color: var(--ink); }
.ic-plot { display: grid; grid-template-columns: 32px 1fr; height: 160px; }
.ic-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.72rem; color: var(--slate); text-align: right; padding-right: 6px; }
.ic-bars { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; align-items: end; border-bottom: 1px solid var(--chart-grid);
  background: linear-gradient(var(--chart-grid) 1px, transparent 1px) 0 0 / 100% 50%; }
.ic-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.ic-bar { width: min(70%, 36px); min-height: 0; background: var(--chart-bar); border-radius: 4px 4px 0 0; }
.ic-col:hover .ic-bar, .ic-col:focus .ic-bar { filter: brightness(1.15); }
.ic-col:hover::after, .ic-col:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--panel); font-size: 0.75rem; padding: 5px 8px; border-radius: 6px; white-space: nowrap; z-index: 5; pointer-events: none; }
.ic-labels { display: grid; grid-template-columns: repeat(var(--n), 1fr); margin-left: 32px; gap: 2px; font-size: 0.72rem; color: var(--slate); text-align: center; margin-top: 4px; }
.ic-table { margin-top: 10px; font-size: 0.85rem; }
.ic-table summary { cursor: pointer; color: var(--ink-soft, #45524c); }
.log-filters { align-items: flex-end; }
.log-date { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.log-date input { padding: 8px 10px; border: 1px solid var(--stone-line, #d9ddd8); border-radius: 999px; font: inherit; background: var(--panel); color: inherit; }
.log-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 12px; }
.log-tools #log-export { margin-left: auto; }
#log-pages { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 12px; }

/* Phones: wide tables scroll inside their card instead of widening the page */
.app-main, .md, .table-card, .ud-table { min-width: 0; max-width: 100%; }
.tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab { flex: 0 0 auto; }
@media (max-width: 640px) {
  .table-card { padding: 4px 8px; }
  .data-table th, .data-table td { padding-left: 8px; padding-right: 8px; }
  .ud-dl div { grid-template-columns: 110px 1fr; }
  .ic-top { align-items: flex-start; }
}
/* Long words and links that members type never push a card wider than the screen */
.opportunity-card, .event-card, .request-card, .mentor-card, .fm-card, .modal-card, .rec-card, .md-panel, .ic-tile { overflow-wrap: anywhere; }
.opportunity-filters > *, .select-pill, .search-pill { max-width: 100%; min-width: 0; }

/* ==========================================================================
   Portal redesign (October 2026)
   Flat surfaces, one red for "do this" and "you are here", blue for links
   and focus, large targets (44px or more) and labelled controls. Placed
   last so it takes over from the older rules above.
   ========================================================================== */

body { background: var(--paper); font-size: 1rem; line-height: 1.55; }
:root[data-theme="dark"] body { background: var(--paper); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.eyebrow { color: var(--slate); font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; }

/* ---------- Buttons ---------- */
.btn { min-height: 44px; padding: 10px 20px; font-weight: 700; font-size: 1rem; border-radius: var(--radius); }
.btn-primary { background: var(--kq-red); color: #fff; }
.btn-primary:hover { background: var(--kq-red-dark); }
.btn-secondary { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); background: var(--panel); }
.btn-quiet { color: var(--link); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.md-btn-sm, .btn.md-btn-sm { min-height: 40px; padding: 7px 14px; font-size: 0.92rem; }
:root[data-theme="dark"] .btn-primary { background: #C8242D; }
:root[data-theme="dark"] .btn-primary:hover { background: #A51A22; }

/* ---------- Forms ---------- */
.field label { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea,
.profile-card textarea, .profile-card select, .select-pill, .search-pill {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  min-height: 46px;
  font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus,
.profile-card textarea:focus, .profile-card select:focus { border-color: var(--link); }
.field-hint { font-size: 0.88rem; }
::placeholder { color: var(--slate); opacity: 1; }

/* ---------- Links inside text ---------- */
.md-link, .md-panel-head a, .auth-switch a, .event-meta a, .link-btn {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.md-link:hover, .md-panel-head a:hover, .auth-switch a:hover { color: var(--link-hover); }

/* ---------- App shell ---------- */
.app-shell { grid-template-columns: 264px minmax(0, 1fr); background: var(--paper); }

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--panel);
  color: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--stone-line);
  padding: 24px 16px 20px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 28px;
  margin: 0;
  color: inherit;
  text-decoration: none;
}
.app-brand .mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--kq-red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  flex: none;
}
.app-brand-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.app-brand-sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.82rem; color: var(--slate); }

.nav-group { margin-bottom: 20px; }
.nav-group-label {
  margin: 0 10px 6px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--slate);
}
.nav-group-label:empty { display: none; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  margin: 0 0 2px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.nav-link svg { width: 20px; height: 20px; flex: none; }
.nav-link .nav-label { flex: 1; min-width: 0; }
.nav-link:hover { background: var(--wash); color: var(--ink); }
.nav-link.active, .nav-link[aria-current="page"] {
  background: var(--kq-red-tint);
  color: var(--kq-red);
  font-weight: 700;
  border-left: 0;
  padding-left: 12px;
}
:root[data-theme="dark"] .nav-link.active, :root[data-theme="dark"] .nav-link[aria-current="page"] { color: #FF9EA2; }

.nav-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: var(--kq-red);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.app-sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--stone-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  font-size: 1rem;
}
.side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 6px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}
.side-user:hover .side-user-name { text-decoration: underline; }
.side-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--link);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex: none;
}
.side-user-name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-role { display: block; font-size: 0.875rem; color: var(--slate); }
.side-user > span:last-child { min-width: 0; }
.side-state { font-size: 0.875rem; color: var(--slate); }
.side-signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.side-signout svg { width: 20px; height: 20px; }
.side-signout:hover { border-color: var(--ink); }

/* Admin: dark sidebar so admins always know they are in the admin tools */
.app-sidebar.is-admin { background: var(--side-dark); color: #F3F5F7; border-right-color: var(--side-dark); }
.app-sidebar.is-admin .app-brand-sub,
.app-sidebar.is-admin .nav-group-label,
.app-sidebar.is-admin .side-user-role,
.app-sidebar.is-admin .side-state { color: #A9B4BE; }
.app-sidebar.is-admin .nav-link { color: #E4E8EC; }
.app-sidebar.is-admin .nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.app-sidebar.is-admin .nav-link.active, .app-sidebar.is-admin .nav-link[aria-current="page"] { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 3px 0 0 #E2353E; }
.app-sidebar.is-admin .app-sidebar-foot { border-top-color: rgba(255, 255, 255, 0.14); color: #F3F5F7; }
.app-sidebar.is-admin .side-avatar { background: rgba(255, 255, 255, 0.12); color: #fff; }
.app-sidebar.is-admin .side-signout { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.app-sidebar.is-admin .side-signout:hover { border-color: #fff; }
.app-sidebar.is-admin :focus-visible { outline-color: #8CB8E0; }

.app-main { padding: 36px 44px 48px; max-width: 980px; min-width: 0; }
.app-header h1, .md-greeting { font-family: var(--font-display); }
.app-header .sub, .md-sub { color: var(--ink-soft); font-size: 1rem; }

/* Phones and small tablets: the sidebar slides in from a labelled Menu button */
.hamburger-btn {
  top: 12px; left: 12px;
  width: auto; height: 44px;
  padding: 0 14px 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: none;
  flex-direction: column;
  gap: 4px;
}
.hamburger-btn::after {
  content: none;
}
.hamburger-btn span { width: 18px; background: var(--ink); }
@media (max-width: 900px) {
  .hamburger-btn { display: flex; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { padding-top: 68px; }
  .app-sidebar { position: fixed; height: 100vh; width: 280px; z-index: 58; box-shadow: 0 0 40px rgba(0, 0, 0, 0.25); }
  .app-sidebar:not(.open) { box-shadow: none; }
  .app-main { padding: 72px 20px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-sidebar { transition: none; }
}

/* ---------- Cards, panels and lists: flat, bordered ---------- */
.mentor-card, .request-card, .opportunity-card, .notif-item, .event-card,
.stat-card, .table-card, .profile-card, .profile-header, .profile-strength,
.dash-stat-card, .md-panel, .md-kpi {
  background: var(--panel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.notif-item.unread { background: var(--blue-tint); border-color: var(--link); }
:root[data-theme="dark"] .notif-item.unread { background: var(--blue-tint); }
.notif-item:hover { border-color: var(--link); }
.mentor-name, .profile-section-label { font-family: var(--font-display); }
.mentor-blurb, .event-card p { font-size: 0.95rem; }
.mentor-meta, .event-meta { font-size: 0.875rem; }
.mentor-avatar { background: var(--blue-tint); color: var(--link); }
.tag { font-size: 0.82rem; background: var(--wash); color: var(--ink-soft); border-radius: 6px; padding: 3px 9px; }
.tag.closing-soon { background: var(--warn-tint); color: var(--warn); }
.match-score { color: var(--link); border-color: var(--link); }

.tabs { gap: 2px; }
.tab { min-height: 44px; font-size: 0.95rem; color: var(--ink-soft); }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom: 3px solid var(--kq-red); font-weight: 700; }

.data-table { font-size: 0.95rem; }
.data-table th { font-size: 0.875rem; font-weight: 700; color: var(--ink-soft); }

/* Status pills: green for done, amber for waiting, grey for closed */
.request-status { font-size: 0.82rem; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.request-status.pending { background: var(--warn-tint); color: var(--warn); }
.request-status.accepted, .request-status.approved { background: var(--ok-tint); color: var(--ok); }
.request-status.declined, .request-status.rejected, .request-status.ended { background: var(--wash); color: var(--ink-soft); }
.role-badge { border-radius: 6px; font-size: 0.78rem; letter-spacing: 0.02em; }
.role-badge.mentee { background: var(--blue-tint); color: var(--link); }
.role-badge.mentor { background: var(--ok-tint); color: var(--ok); }
.event-badge { border-radius: 6px; font-size: 0.78rem; }
.event-badge.official { background: var(--kq-red-tint); color: var(--kq-red); }
:root[data-theme="dark"] .event-badge.official { color: #FF9EA2; }
.event-badge.community { background: var(--blue-tint); color: var(--link); }
.event-card .date { color: var(--kq-red); }
:root[data-theme="dark"] .event-card .date { color: #FF9EA2; }

/* Fit labels, as in the mentor search: a coloured dot and words, never colour alone */
.fit-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 0.875rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 0; }
.fit-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.fit-strong { background: var(--ok-tint); color: var(--ok); }
.fit-good { background: var(--warn-tint); color: var(--warn); border: 0; }
.fit-some { background: var(--wash); color: var(--ink-soft); }
.fit-why { color: var(--ink-soft); }
:root[data-theme="dark"] .fit-strong { color: var(--ok); }
:root[data-theme="dark"] .fit-good { color: var(--warn); }
:root[data-theme="dark"] .fit-why { color: var(--ink-soft); }

.verified-badge { color: var(--ok); background: var(--ok-tint); }
:root[data-theme="dark"] .verified-badge { color: var(--ok); background: var(--ok-tint); }
.pf-chip, .pf-tag-match { background: var(--blue-tint); color: var(--link); border-color: transparent; }
:root[data-theme="dark"] .pf-chip, :root[data-theme="dark"] .pf-tag-match { background: var(--blue-tint); color: var(--link); border-color: transparent; }
.auth-notice { background: var(--ok-tint); color: var(--ok); }
:root[data-theme="dark"] .auth-notice { background: var(--ok-tint); color: var(--ok); }

.profile-strength-fill { background: var(--ok); }
.mb-fill { background: var(--link); }
.profile-nudge { background: var(--wash); color: var(--ink); border: 1px solid var(--stone-line); }
.profile-nudge p { color: var(--ink-soft); }
.theme-switch input:checked + .switch-track { background: var(--link); }
.save-status { color: var(--ok); }

/* Charts */
:root { --chart-bar: #20507A; }
:root[data-theme="dark"] { --chart-bar: #8CB8E0; }

/* Dialogs */
.modal-backdrop { background: rgba(16, 20, 24, 0.55); }
.modal-card { border: 1px solid var(--stone-line); border-radius: var(--radius-lg); }

/* ---------- Dashboard building blocks (used by every admin tab) ---------- */
.md {
  --md-accent: var(--kq-red);
  --md-accent-soft: var(--kq-red-tint);
  --md-green: var(--ok);
  --md-green-soft: var(--ok-tint);
  --md-amber: var(--warn);
  --md-amber-soft: var(--warn-tint);
  --md-muted: var(--slate);
}
:root[data-theme="dark"] .md { --md-accent: #FF9EA2; }
.md-top { padding-right: 0; }
.md-date { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 400; color: var(--ink-soft); margin-bottom: 4px; }
.md-greeting { font-size: 2rem; letter-spacing: -0.01em; }
.md-panel { padding: 20px 22px; }
.md-panel-head { border-bottom: 0; padding-bottom: 6px; }
.md-panel-head h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.md-panel-head a { font-size: 0.95rem; }
.md-item-title { font-size: 1rem; font-weight: 700; }
.md-item-text { font-size: 0.95rem; }
.md-item-meta { font-size: 0.875rem; }
.md-pill { font-size: 0.82rem; font-weight: 700; border-radius: 6px; }
.md-avatar { background: var(--blue-tint); color: var(--link); }
.md-avatar-soft { background: var(--wash); color: var(--ink-soft); }
.md-kpi-icon, .md-empty-icon, .md-date-block { background: var(--wash); color: var(--ink-soft); }
.md-date-block { background: var(--kq-red-tint); color: var(--md-accent); }
.md-banner { background: var(--warn-tint); border-color: transparent; }
.md-banner-icon { background: var(--warn); }
:root[data-theme="dark"] .md-banner-icon { color: #1C2127; }
.md-banner-body p { color: var(--ink-soft); }
.md-empty-title { font-size: 1rem; }
.md-empty-text { font-size: 0.92rem; }
.md-hint { text-transform: none; letter-spacing: 0; font-size: 0.875rem; }
.md-progress div { background: var(--ok); }
.md-split .a, .md-legend i.a { background: var(--link); }

/* ---------- Home screens ---------- */
.app-main.app-main-home { max-width: none; padding: 0; }
.home-inset .home-band { border-radius: var(--radius-lg); padding: 28px 32px 32px; }
.home-inset .home-body { padding: 28px 0 0; }
.home-band { background: var(--wash); padding: 36px 44px 40px; }
.home-band-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.home-date { color: var(--ink-soft); margin: 0 0 4px; }
.home-title { font-family: var(--font-display); font-size: 2.35rem; line-height: 1.15; }
.home-lead { color: var(--ink-soft); margin-top: 6px; font-size: 1.05rem; }
.home-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 32px; padding: 32px 44px 48px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.home-section h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 12px; }
.home-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.home-section-head h2 { margin: 0; }
.home-link { color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.home-link:hover { color: var(--link-hover); }
.home-muted { color: var(--ink-soft); }
.home-side .home-section { border: 1px solid var(--stone-line); border-radius: var(--radius-lg); padding: 20px 22px; background: var(--panel); }
.home-side .home-section h2 { font-size: 1.1rem; }

/* Journey: four steps along a line, the current one marked in red */
.journey { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.journey li { padding-right: 16px; }
.journey-mark { display: flex; align-items: center; }
.journey-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); display: grid; place-items: center; flex: none; }
.journey-dot svg { width: 16px; height: 16px; }
.journey-line { flex: 1; height: 2px; background: var(--line-strong); margin-left: 8px; }
.journey li:last-child .journey-line { display: none; }
.journey li.done .journey-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
:root[data-theme="dark"] .journey li.done .journey-dot { color: #111518; }
.journey li.done .journey-line { background: var(--ok); }
.journey li.now .journey-dot { background: var(--kq-red); border-color: var(--kq-red); box-shadow: 0 0 0 6px rgba(181, 18, 27, 0.15); }
.journey li.now .journey-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.journey-step { font-weight: 700; margin-top: 12px; }
.journey-note { font-size: 0.92rem; color: var(--ink-soft); margin-top: 2px; }
.journey li.now .journey-note { color: var(--kq-red); font-weight: 700; }
:root[data-theme="dark"] .journey li.now .journey-note { color: #FF9EA2; }

/* Next step: one clear action */
.next-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; border: 1px solid var(--stone-line); border-left: 5px solid var(--kq-red); border-radius: var(--radius-lg); background: var(--panel); }
.next-step h2 { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 4px; }
.next-step p { color: var(--ink-soft); max-width: 56ch; }
.next-step.calm { border-left-color: var(--ok); }

/* People lists */
.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone-line); }
.people li { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--stone-line); flex-wrap: wrap; }
.people-av { width: 46px; height: 46px; border-radius: 50%; background: var(--blue-tint); color: var(--link); display: grid; place-items: center; font-weight: 700; flex: none; }
.people-body { flex: 1 1 220px; min-width: 0; }
.people-name { font-weight: 700; }
.people-text { color: var(--ink-soft); font-size: 0.95rem; margin-top: 2px; }
.people .btn { flex: none; }

.empty-note { padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--ink-soft); }
.empty-note strong { display: block; color: var(--ink); margin-bottom: 2px; }
.empty-note a { display: inline-block; margin-top: 8px; }

/* Side cards: date block, opportunity */
.home-event, .home-opp { display: flex; gap: 14px; color: inherit; text-decoration: none; padding: 10px 0; }
.home-event + .home-event, .home-opp + .home-opp { border-top: 1px solid var(--stone-line); }
.home-event:hover .home-item-title, .home-opp:hover .home-item-title { text-decoration: underline; }
.home-datebox { width: 52px; height: 58px; border-radius: 10px; background: var(--kq-red-tint); color: var(--kq-red); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
:root[data-theme="dark"] .home-datebox { color: #FF9EA2; }
.home-datebox .m { font-size: 0.8rem; font-weight: 700; }
.home-datebox .d { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; line-height: 1; }
.home-item-title { display: block; font-weight: 700; }
.home-item-meta { display: block; font-size: 0.92rem; color: var(--ink-soft); }
.home-item-flag { display: block; font-size: 0.875rem; font-weight: 700; color: var(--ok); margin-top: 2px; }
.home-item-flag.warn { color: var(--warn); }
.home-guide p { color: var(--ink-soft); margin-bottom: 10px; }
.home-actions { display: grid; gap: 10px; }
.home-actions .btn { justify-content: flex-start; }
.home-actions .btn svg { width: 20px; height: 20px; }

/* Mentor: mentoring places, shown as seats */
.seats { border: 1px solid var(--stone-line); border-radius: var(--radius-lg); background: var(--panel); padding: 18px 20px; min-width: 300px; }
.seats-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.seats-head h2 { font-family: var(--font-display); font-size: 1.05rem; margin: 0; }
.seats-free { font-size: 0.92rem; font-weight: 700; color: var(--ok); }
.seats-free.full { color: var(--warn); }
.seats-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--ink-soft); width: 56px; text-align: center; }
.seat-av { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-tint); color: var(--link); display: grid; place-items: center; font-weight: 700; }
.seat.open .seat-av { background: transparent; border: 2px dashed var(--line-strong); color: var(--slate); font-weight: 400; font-size: 0.82rem; }
.seat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seats-row .home-link { margin-left: auto; align-self: center; }

/* Mentor: a request waiting for an answer */
.ask { border: 1px solid var(--stone-line); border-radius: var(--radius-lg); padding: 20px 22px; background: var(--panel); }
.ask + .ask { margin-top: 14px; }
.ask-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ask-when { margin-left: auto; font-size: 0.875rem; color: var(--warn); font-weight: 700; }
.ask blockquote { margin: 14px 0 16px; padding: 12px 16px; border-left: 3px solid var(--line-strong); background: var(--wash); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); }
.ask-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask-actions .home-link { margin-left: 6px; }

/* Goal progress bar */
.goalbar { width: 120px; height: 8px; border-radius: 999px; background: var(--stone-line); overflow: hidden; flex: none; }
.goalbar div { height: 100%; background: var(--ok); border-radius: 999px; }

/* Admin: the day's queue */
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.queue li { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--stone-line); border-radius: var(--radius-lg); background: var(--panel); flex-wrap: wrap; }
.queue-count { width: 46px; height: 46px; border-radius: 10px; background: var(--kq-red-tint); color: var(--kq-red); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; flex: none; }
:root[data-theme="dark"] .queue-count { color: #FF9EA2; }
.queue-body { flex: 1 1 240px; min-width: 0; }
.queue-title { font-weight: 700; font-size: 1.05rem; }
.queue-text { color: var(--ink-soft); font-size: 0.95rem; }
.queue-warn { color: var(--kq-red); font-weight: 700; }
:root[data-theme="dark"] .queue-warn { color: #FF9EA2; }
.activity { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone-line); }
.activity li { padding: 12px 0; border-bottom: 1px solid var(--stone-line); }
.activity .who { font-size: 0.875rem; color: var(--ink-soft); }
.community dl { margin: 0 0 12px; display: grid; gap: 0; }
.community dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--stone-line); }
.community dt { color: var(--ink-soft); }
.community dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }

.home-skel { height: 64px; border-radius: var(--radius-lg); background: var(--wash); }

@media (max-width: 1100px) {
  .home-body { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-main.app-main-home { padding: 64px 0 0; }
  .home-inset .home-band { padding: 22px 18px 24px; }
  .home-inset .home-body { padding: 22px 0 0; }
  .home-band { padding: 24px 20px 28px; }
  .home-body { padding: 24px 20px 36px; gap: 24px; }
  .home-title { font-size: 1.75rem; }
  .seats { min-width: 0; width: 100%; }
}
@media (max-width: 640px) {
  .journey { grid-template-columns: 1fr; gap: 0; }
  .journey li { display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; padding: 0 0 14px; position: relative; }
  .journey-mark { grid-row: span 2; flex-direction: column; align-items: center; }
  .journey-line { width: 2px; height: auto; min-height: 24px; margin: 6px 0 0; flex: 1; }
  .journey-step { margin-top: 2px; }
  .ask-when { margin-left: 0; width: 100%; }
  .goalbar { width: 100%; }
}
.guide-steps { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 10px; }
.guide-steps li { padding-left: 4px; }

/* ---------- Sign-in and sign-up ---------- */
.auth-visual { background: #15191E; }
.auth-visual::after { background: linear-gradient(170deg, #1C2127 0%, #15191E 60%, #0E1114 100%); opacity: 0.9; }
.auth-visual::before { opacity: 0.12; }
.auth-visual-brand .mark { border-radius: 9px; width: 38px; height: 38px; font-size: 0.875rem; }
.auth-visual-brand { font-size: 1.25rem; }
.auth-visual-copy h1 { font-size: 2.2rem; }
.auth-visual-copy p { color: #C3CBD3; font-size: 1.05rem; }
.auth-visual { border-right: 6px solid var(--kq-red); }
.auth-topbar .theme-switch { align-items: center; gap: 10px; color: #E4E8EC; font-size: 0.95rem; }
.auth-topbar .theme-switch::before { content: 'Dark mode'; }
.auth-toggle { border-radius: 10px; }
.auth-toggle a { border-radius: 8px; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.auth-form-inner h2 { font-size: 2rem; }
.auth-form-inner .sub { font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 880px) {
  .auth-visual { border-right: 0; border-bottom: 6px solid var(--kq-red); }
}

/* Filled red stays a deep red in dark mode, so white text on it stays readable */
.btn-primary, .app-brand .mark, .auth-visual-brand .mark, .auth-toggle a.active, .nav-badge,
.fm-page.active, .doc-brand .mark, .btn-danger:hover, .journey li.now .journey-dot {
  background: var(--kq-red-solid);
}
.fm-page.active, .journey li.now .journey-dot { border-color: var(--kq-red-solid); }
.btn-primary:hover { background: #8F0E15; }
:root[data-theme="dark"] .btn-primary:hover { background: #A51A22; }

/* ---------- Photos and images ---------- */
.has-photo { overflow: hidden; padding: 0 !important; background: var(--wash) !important; }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.mentor-avatar, .people-av, .seat-av, .side-avatar, .pf-avatar, .md-avatar { flex-shrink: 0; }
.mentor-avatar.has-photo, .people-av.has-photo, .pf-avatar.has-photo { border-radius: 50%; }

/* Event banners: cut to the card edges */
.event-card .event-banner { display: block; width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 8 / 3; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--wash); }
.event-banner-empty { background: repeating-linear-gradient(135deg, var(--wash) 0 12px, var(--panel) 12px 24px); }
.post-thumb { width: 96px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; align-self: flex-start; }
.post-thumb-sm { width: 64px; height: 24px; margin-right: 8px; vertical-align: middle; }
.admin-event-title { display: inline-flex; align-items: center; }

/* Company logos: never cropped, on white so dark logos stay visible in dark mode */
.opp-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--stone-line); flex: none; }
.opportunity-card.has-logo { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: start; }
.opp-logo-lg { width: 72px; height: 72px; margin-bottom: 12px; }
.opp-logo-inline { width: 28px; height: 28px; border-radius: 6px; margin-right: 8px; vertical-align: middle; }
@media (max-width: 640px) {
  .opportunity-card.has-logo { grid-template-columns: 48px minmax(0, 1fr); }
  .opportunity-card.has-logo > .btn { grid-column: 1 / -1; }
  .opp-logo { width: 48px; height: 48px; }
}

/* Image fields in forms */
.img-field-label { display: block; font-size: 0.95rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.img-field-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.img-preview { display: grid; place-items: center; background: var(--wash); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--slate); font-size: 0.82rem; overflow: hidden; flex: none; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-preview-banner { width: 160px; height: 60px; }
.img-preview-logo { width: 64px; height: 64px; background: #fff; }
.img-preview-logo img { object-fit: contain; }
.img-field input[type="file"]:focus-visible + label { outline: 3px solid var(--link); outline-offset: 2px; }
.img-field-error { color: var(--kq-red); }
.img-field label.btn { cursor: pointer; }

/* Gallery of a past event */
.gallery-card { max-width: 760px; width: 94%; max-height: 88vh; }
.gallery-grid { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery-grid li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.gallery-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--stone-line); border-radius: var(--radius); overflow: hidden; background: var(--wash); cursor: zoom-in; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-flag { position: absolute; left: 6px; bottom: 6px; background: var(--warn-tint); color: var(--warn); font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.gallery-add { border-top: 1px solid var(--stone-line); padding-top: 16px; margin-top: 8px; }
.gallery-add h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 10px; }
.gallery-add .check-row { margin-bottom: 12px; }

/* Full-size photo viewer */
.photo-viewer { z-index: 120; background: rgba(10, 12, 14, 0.88); }
.photo-viewer-card { display: flex; flex-direction: column; max-width: min(1100px, 94vw); max-height: 92vh; }
.photo-viewer-card img { max-width: 100%; max-height: calc(92vh - 110px); object-fit: contain; border-radius: var(--radius) var(--radius) 0 0; background: #000; }
.photo-viewer-bar { background: var(--panel); border-radius: 0 0 var(--radius) var(--radius); padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.photo-viewer-actions { display: flex; gap: 8px; }

/* Reports and review */
.report-shots { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.report-shots .gallery-thumb { width: 90px; aspect-ratio: 3 / 4; }
.report-av, .ud-av { width: 52px; height: 52px; }
.vr-head, .ud-head { gap: 14px; }
.img-review-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.img-review-item { display: flex; gap: 16px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--stone-line); flex-wrap: wrap; }
.img-review-thumb { width: 220px; aspect-ratio: 8 / 3; padding: 0; border: 1px solid var(--stone-line); border-radius: var(--radius); overflow: hidden; background: var(--wash); cursor: zoom-in; flex: none; }
.img-review-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-review-logo { width: 96px; aspect-ratio: 1; background: #fff; }
.img-review-logo img { object-fit: contain; }
.img-review-event_photo { width: 180px; aspect-ratio: 4 / 3; }
.img-review-body { flex: 1 1 240px; min-width: 0; }
.img-review-body p { margin-bottom: 4px; }
@media (max-width: 640px) { .img-review-thumb { width: 100%; } }

/* People with photos in lists and tables */
.adm-person { display: inline-flex; align-items: center; gap: 10px; }
.adm-av { width: 36px; height: 36px; font-size: 0.8rem; }
.req-av { align-self: flex-start; }
.request-card-rich { align-items: flex-start; }
.request-card-rich .req-main { flex: 1; min-width: 0; }
.req-av { width: 44px; height: 44px; }
.img-preview-logo span { color: #4E5864; }
.img-field input.sr-only { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; left: 0; }

/* ---------- Organisation logo ---------- */
.mark[hidden] { display: none !important; }
.mark.mark-img { background: #fff !important; padding: 3px; border: 1px solid var(--stone-line); overflow: hidden; }
.mark.mark-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-wide { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 6px 10px; border: 1px solid var(--stone-line); max-width: 100%; }
.brand-wide img { display: block; height: 30px; width: auto; max-width: 100%; object-fit: contain; }
.app-brand.is-wide, .auth-visual-brand.is-wide { flex-direction: column; align-items: flex-start; gap: 10px; }
.auth-visual-brand .brand-wide img { height: 36px; }
.app-sidebar.is-admin .brand-wide, .app-sidebar.is-admin .mark.mark-img { border-color: transparent; }
.brand-preview-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 16px; }
.brand-sample { margin: 0; flex: 1 1 260px; }
.brand-sample-side { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--stone-line); }
.brand-sample.light .brand-sample-side { background: #fff; color: #1C2127; }
.brand-sample.light .app-brand-sub { color: #5B6672; }
.brand-sample.dark .brand-sample-side { background: #1C2127; color: #F3F5F7; border-color: #1C2127; }
.brand-sample.dark .app-brand-sub { color: #A9B4BE; }
.brand-sample .brand-wide + span { display: block; }
.brand-sample-side:has(.brand-wide) { flex-direction: column; align-items: flex-start; }
.brand-sample .mark { width: 38px; height: 38px; border-radius: 9px; background: var(--kq-red-solid); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; flex: none; }
.brand-sample figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 6px; }
.brand-tips { margin: 0 0 14px; padding-left: 20px; color: var(--ink-soft); display: grid; gap: 4px; }
