/* ==========================================================================
   SABCVA Alumni & Intern Platform — Shared Styles
   Palette + type from SABCVA Brand Guidelines v2.0
   ========================================================================== */
 
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;600&display=swap');
 
:root {
  /* Brand colors */
  --empower-navy: #011431;   /* primary background */
  --seal-navy: #152333;      /* softer navy panels */
  --signal-gold: #DD9B1D;    /* primary accent */
  --bronze: #A27B53;         /* fine rules, hover states */
  --cream-gold: #E5CFAE;     /* warm highlight panels */
  --snow: #F8F8F8;           /* light content panels */
  --slate: #555555;          /* secondary text */
  --white: #ffffff;
  --error: #E5484D;
  --success: #3DA35D;
 
  /* Type */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
 
  /* Spacing / shape */
  --radius: 10px;
  --shadow-card: 0 12px 30px rgba(1, 20, 49, 0.25);
}
 
* { box-sizing: border-box; }
 
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--empower-navy);
  color: var(--white);
  min-height: 100vh;
}
 
h1, h2, h3, .eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
}
 
a { color: var(--signal-gold); }
 
/* ---- Layout shells ---- */
 
.page-auth {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(221, 155, 29, 0.08), transparent 40%),
    var(--empower-navy);
}
 
.card {
  width: 100%;
  max-width: 440px;
  background: var(--seal-navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
  border: 1px solid rgba(221, 155, 29, 0.15);
}
 
.card-wide {
  max-width: 640px;
}
 
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
 
.brand-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
 
.brand-lockup .org-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  color: var(--white);
}
 
.brand-lockup .org-tagline {
  font-size: 11px;
  color: var(--signal-gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
 
.page-title {
  font-size: 26px;
  margin: 0 0 6px;
  color: var(--white);
}
 
.page-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  color: #C7CBD6;
  font-size: 14px;
  margin: 0 0 28px;
}
 
/* ---- App shell (home / directory) ---- */

/* Sticky-footer layout: .app-main grows to fill any leftover space so
   .app-footer sits flush at the bottom of the viewport on short pages,
   instead of leaving a dead gap below it (the old min-height-only rule let
   .app-shell grow taller than its content with nothing to absorb that
   extra space). Harmless on pages with no footer — .app-main just fills
   the same space it already would have. */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
 
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--seal-navy);
  border-bottom: 1px solid rgba(221, 155, 29, 0.15);
}
 
.app-nav .brand-lockup { margin-bottom: 0; }
 
.app-nav-links { display: flex; align-items: center; gap: 20px; }
 
.app-nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
 
.app-nav-links a:hover { color: var(--signal-gold); }
 
.app-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
 
/* ---- Forms ---- */
 
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cream-gold);
  margin-bottom: 6px;
  margin-top: 18px;
}
 
label:first-of-type { margin-top: 0; }
 
textarea { resize: vertical; min-height: 70px; }
 
.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--signal-gold);
  margin: 28px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(221, 155, 29, 0.25);
}
 
.form-section-title:first-of-type { margin-top: 0; }
 
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
.ms-trigger,
textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

input::placeholder { color: #7C8291; }

input:focus, select:focus, .ms-trigger:focus, textarea:focus {
  border-color: var(--signal-gold);
  box-shadow: 0 0 0 3px rgba(221, 155, 29, 0.2);
}

select,
.ms-trigger {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23DD9B1D' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
 
/* Native <select> dropdown popups are rendered by the browser/OS, not this
   page's CSS — most browsers force a white popup background regardless of
   the page theme. Without this, the white page text becomes invisible
   white-on-white inside that popup. Forcing dark text on <option> keeps it
   readable no matter what background the browser uses for the popup. */
select option {
  color: var(--empower-navy);
  background: var(--white);
}

/* ---- Multi-select dropdown (industry preferences / org interests / skills) ----
   A trigger button styled identically to <select> (via .ms-trigger above),
   opening a checkbox panel — gives a collapsed, single-line dropdown that
   still allows picking more than one option. */

.ms-dropdown { position: relative; }

.ms-trigger {
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  margin: 0;
  line-height: normal;
}

.ms-trigger-text {
  display: block;
  color: #7C8291;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-trigger.has-selection .ms-trigger-text { color: var(--white); }

.ms-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--empower-navy);
  border: 1px solid rgba(221, 155, 29, 0.3);
  border-radius: 6px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  padding: 6px 0;
}

.ms-panel[hidden] { display: none; }

.ms-group-label {
  padding: 8px 13px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--signal-gold);
}

.ms-option {
  /* .ms-option is a <label> wrapping a checkbox — reset the global `label`
     rule's field-label spacing/weight/color (margin-top/bottom, 600 weight,
     cream-gold) so option rows don't get shoved apart and recolored. */
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  cursor: pointer;
}

.ms-option:hover { background: var(--seal-navy); color: var(--signal-gold); }

.ms-option input { width: auto; }

.field-hint {
  font-size: 12px;
  color: #8A90A0;
  margin-top: 5px;
}
 
.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 5px;
  display: none;
}
 
.field-error.visible { display: block; }
 
input.invalid, select.invalid { border-color: var(--error); }
 
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
 
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
 
.checkbox-row input { width: auto; }
 
/* ---- Buttons ---- */
 
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 6px;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
}
 
.btn-primary {
  background: var(--signal-gold);
  color: var(--empower-navy);
  width: 100%;
  margin-top: 26px;
}
 
.btn-primary:hover { background: #c98c17; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
 
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}
 
.btn-secondary:hover { border-color: var(--signal-gold); color: var(--signal-gold); }
 
.btn-danger { background: var(--error); color: var(--white); }

/* ---- Form action group (Save / Cancel) ----
   Vertical stack so Save stays the full-width primary action and Cancel
   sits centered below it with clear, deliberate spacing -- not touching
   or reading as one combined control. */
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ---- Skill chips ---- */
 
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
 
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(221, 155, 29, 0.15);
  border: 1px solid var(--signal-gold);
  color: var(--signal-gold);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
 
.chip button {
  background: none;
  border: none;
  color: var(--signal-gold);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
 
.chip-level-select {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--signal-gold);
  color: var(--signal-gold);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  cursor: pointer;
}
 
/* ---- Banners / states ---- */
 
.banner {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
}
 
.banner.visible { display: block; }
.banner-error { background: rgba(229, 72, 77, 0.15); border: 1px solid var(--error); color: #FFB4B6; }
.banner-success { background: rgba(61, 163, 93, 0.15); border: 1px solid var(--success); color: #A6E5B8; }
 
/* ---- Directory / table ---- */
 
.toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--seal-navy);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
 
.toolbar .field { flex: 1; min-width: 200px; }
.toolbar label { margin-top: 0; }
 
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
 
.profile-card {
  background: var(--seal-navy);
  border: 1px solid rgba(221, 155, 29, 0.15);
  border-radius: var(--radius);
  padding: 18px 20px;
}
 
.profile-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--white); }
.profile-card .role-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--empower-navy);
  background: var(--signal-gold);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.profile-card p { margin: 4px 0; font-size: 13px; color: #C7CBD6; }

/* .tag/.tag-row are a general "pill list" component, not directory-specific
   (also used by match-page.js's skill/openTo chips) — unscoped on purpose. */
.tag-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--white);
}
 
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #8A90A0;
}
 
.loading-state { text-align: center; padding: 40px; color: #8A90A0; font-size: 14px; }

/* ---- Nav ---- */

.nav-user-email {
  color: #C7CBD6;
  font-size: 13px;
  font-weight: 600;
}

/* ---- Match page ---- */

.match-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--seal-navy);
  border: 1px solid rgba(221, 155, 29, 0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.match-card-main h3 { margin: 0 0 4px; font-size: 17px; color: var(--white); }
.match-card-main p { margin: 3px 0; font-size: 13px; color: #C7CBD6; }
.match-card-main .match-role { color: var(--white); font-weight: 600; }
.match-card-main .tag-row { margin-top: 8px; }

/* Shared by match-page.js's match cards and directory.js's profile cards —
   both link to profile.html?profileId= */
.view-profile-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--signal-gold);
  text-decoration: none;
}

.view-profile-link:hover { text-decoration: underline; }

.match-card-score { flex-shrink: 0; }

.match-badge {
  min-width: 76px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--signal-gold);
  font-family: var(--font-display);
  text-align: center;
}

.match-badge .match-percent { display: block; font-size: 20px; font-weight: 800; }
.match-badge .match-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* Overlap explanation shown under a match, generated by
   js/match-explain.js. Labelled "What you have in common" rather than
   "Why you matched": the percentage comes from cosine distance between
   profile_embedding vectors, and an embedding doesn't expose which parts
   of a profile drove the score. These sentences state verifiable shared
   attributes only. */
.match-why {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(221, 155, 29, 0.4);
  font-size: 13px;
  line-height: 1.55;
  color: #C7CBD6;
}

.match-why-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal-gold);
  margin-bottom: 3px;
}

/* ---- Home page ---- */

.hero-tagline {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--white);
  margin: 12px 0 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--seal-navy);
  border: 1px solid rgba(221, 155, 29, 0.15);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-card h2 {
  font-size: 20px;
  color: var(--signal-gold);
  margin: 0 0 12px;
}

.feature-card p {
  font-size: 14px;
  color: #C7CBD6;
  margin: 0 0 20px;
  flex-grow: 1;
}

.feature-card .btn {
  text-decoration: none;
  width: auto;
  min-width: 160px;
  margin-top: 0;
}

/* ---- Footer ---- */

.app-footer {
  background: var(--seal-navy);
  border-top: 1px solid rgba(221, 155, 29, 0.15);
  margin-top: 40px;
}

.app-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.app-footer h3 {
  font-size: 14px;
  color: var(--signal-gold);
  margin: 0 0 12px;
}

.app-footer p {
  font-size: 13px;
  color: #C7CBD6;
  line-height: 1.6;
  margin: 0 0 8px;
}

.app-footer-links { display: flex; flex-direction: column; gap: 8px; }

.app-footer-links a,
.app-footer-contact a {
  color: #C7CBD6;
  text-decoration: none;
  font-size: 13px;
}

.app-footer-links a:hover,
.app-footer-contact a:hover { color: var(--signal-gold); }

/* ---- Profile detail (profile.html) ---- */

.profile-detail {
  display: flex;
  gap: 32px;
  background: var(--seal-navy);
  border: 1px solid rgba(221, 155, 29, 0.15);
  border-radius: var(--radius);
  padding: 32px;
}

.profile-photo-col {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.profile-photo-col h2 { margin: 0 0 4px; font-size: 18px; color: var(--white); }
.profile-photo-col p { margin: 2px 0; font-size: 13px; color: #C7CBD6; }
.profile-photo-col .btn { margin-top: 16px; width: 100%; text-decoration: none; }

.profilePhoto { width: 100%; height: 100%; object-fit: contain; }

.profile-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.profile-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(221, 155, 29, 0.15);
  border-radius: var(--radius);
  padding: 16px 22px;
}

.profile-info-box h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--signal-gold);
  margin: 0 0 10px;
}

.profile-info-box p { margin: 0; font-size: 14px; color: var(--white); }
.profile-info-box .tag-row { margin-top: 0; }
.profile-empty-note { margin: 0; font-size: 13px; color: #8A90A0; font-style: italic; }

@media (max-width: 640px) {
  .card { padding: 28px 22px; }
  .app-main { padding: 28px 18px 60px; }
  .match-card { flex-direction: column; align-items: flex-start; }
  .match-card-score { align-self: flex-end; }
  .feature-grid { grid-template-columns: 1fr; }
  .app-footer-inner { grid-template-columns: 1fr; padding: 32px 22px; }
  .profile-detail { flex-direction: column; }
  .profile-photo-col { flex: 0 0 auto; max-width: 220px; margin: 0 auto; }
}


.brand-lockup img.login-card-logo {
  width: 200px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}