:root {
  --navy: #082b43;
  --navy-2: #0d3a56;
  --blue: #2585c1;
  --blue-dark: #176da4;
  --blue-pale: #eaf5fb;
  --ink: #173143;
  --muted: #617481;
  --line: #d9e4ea;
  --surface: #ffffff;
  --background: #f3f7f9;
  --green: #17845b;
  --green-pale: #e5f4ee;
  --amber: #bd691e;
  --amber-pale: #fff0e2;
  --red: #b43d3d;
  --status-client: #4f8d55;
  --status-trial: #b52a22;
  --status-quotation: #b58a3c;
  --status-tender: #7b43e8;
  --status-contact-made: #526ee8;
  --status-not-contacted: #718096;
  --profiler: #d1b17e;
  --tracker: #9ed1e8;
  --readiness: #ca92e1;
  --shadow: 0 14px 36px rgba(8, 43, 67, 0.12);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, label.file-picker:focus-within {
  outline: 3px solid rgba(37, 133, 193, 0.28);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
}

.login-brand {
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  background:
    linear-gradient(150deg, rgba(37, 133, 193, 0.18), transparent 45%),
    var(--navy);
}

.login-brand img {
  width: min(360px, 75%);
  padding: 0.65rem;
  background: white;
}

.brand-copy { max-width: 34rem; }
.brand-copy h1 {
  max-width: 11ch;
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.brand-copy > p:last-child {
  max-width: 34rem;
  margin: 0;
  color: #c9dbe5;
  font-size: 1.05rem;
}

.overline {
  margin: 0;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-brand .overline { color: #7bc1ea; }

.login-panel {
  padding: clamp(1.5rem, 7vw, 7rem);
  display: grid;
  place-items: center;
  background: var(--background);
}

.login-card {
  width: min(100%, 31rem);
  display: grid;
  gap: 0.65rem;
}

.login-card h2, .dialog-header h2 {
  margin: 0.25rem 0 0;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.login-card .intro { margin: 0.55rem 0 1.5rem; color: var(--muted); }
.login-card label { margin-top: 0.85rem; color: var(--navy); font-size: 0.875rem; font-weight: 750; }

input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--ink);
  background: var(--surface);
  font-size: 1rem;
}

input:hover { border-color: #adc6d4; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 4.5rem; }
.password-toggle { position: absolute; top: 50%; right: 0.9rem; transform: translateY(-50%); }

.primary-button, .secondary-button {
  min-height: 3.2rem;
  padding: 0.7rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: 780;
}
.primary-button { border: 0; color: white; background: var(--blue); }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.48; }
.secondary-button { border: 1px solid var(--line); color: var(--navy); background: white; }
.login-card .primary-button { margin-top: 1.25rem; }

.text-button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
}

.form-error {
  margin: 0.35rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 4px solid var(--red);
  color: var(--red);
  background: #fff0f0;
  font-size: 0.875rem;
}

.prototype-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.75rem; }

.app-view { min-height: 100vh; padding-bottom: 5.25rem; }
.app-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); }
.app-header-inner { width: min(100% - 2rem, 1180px); min-height: 5.25rem; margin: 0 auto; display: grid; grid-template-columns: 7.5rem 1fr 7.5rem; align-items: center; }
.mobile-search-area { display: none; }
.header-brand { justify-self: center; display: block; line-height: 0; }
.header-brand img { width: clamp(10rem, 18vw, 13.5rem); height: 3.5rem; object-fit: contain; }
.access-button { min-height: 2.9rem; padding: 0.55rem 0.8rem; justify-self: start; display: inline-flex; align-items: center; gap: 0.55rem; border: 1px solid var(--line); border-radius: 0.8rem; color: var(--navy); background: white; font-weight: 800; }
.access-button svg { width: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.access-button:hover { border-color: #adc6d4; background: var(--blue-pale); }
.app-header-inner > .avatar-button { justify-self: end; }

.icon-button, .avatar-button {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: var(--blue-pale);
  font-weight: 800;
}
.icon-button svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.avatar-button:hover, .icon-button:hover { background: #d7ecf7; }

.app-shell { width: min(100% - 2rem, 1180px); margin: 0 auto; }
.landing-tools { padding: 1.4rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem); gap: 0.8rem; align-items: start; }
.last-entry-button { min-height: 3.6rem; padding: 0.55rem 1rem; display: grid; align-content: center; border: 0; border-radius: 0.8rem; color: white; background: var(--navy); text-align: left; box-shadow: 0 4px 18px rgba(8,43,67,0.12); }
.last-entry-button span { font-weight: 850; }
.last-entry-button small { overflow: hidden; opacity: 0.72; text-overflow: ellipsis; white-space: nowrap; }
.last-entry-button:disabled { cursor: default; background: #7f8990; box-shadow: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.welcome-row { padding: 2rem 0 1.35rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.welcome-row h1 { margin: 0.15rem 0 0; color: var(--navy); font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.1; letter-spacing: -0.035em; }
.date-line { margin: 0; color: var(--muted); font-size: 0.82rem; font-weight: 650; }

.search-area { position: relative; z-index: 10; }
.search-area > label { display: block; margin-bottom: 0.5rem; color: var(--navy); font-size: 0.875rem; font-weight: 780; }
.search-control { position: relative; }
.search-control svg { position: absolute; top: 50%; left: 1rem; width: 1.3rem; transform: translateY(-50%); fill: none; stroke: var(--blue); stroke-width: 1.9; }
.search-control input { min-height: 3.6rem; padding-left: 3.15rem; padding-right: 4.4rem; box-shadow: 0 4px 18px rgba(8,43,67,0.05); }
.search-control button { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); border: 0; color: var(--blue); background: none; font-size: 0.75rem; font-weight: 800; }
.search-results { position: absolute; top: calc(100% + 0.45rem); right: 0; left: 0; max-height: 22rem; overflow: auto; border: 1px solid var(--line); border-radius: 0.8rem; background: white; box-shadow: var(--shadow); }
.search-results.all-colleges-results { max-height: min(66vh, 38rem); }
.all-colleges-header { position: sticky; z-index: 2; top: 0; padding: 0.65rem 0.85rem; display: grid; grid-template-columns: minmax(9rem, 1fr) repeat(3, 3.25rem); align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); background: #f8fbfc; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.all-colleges-header > span:not(:first-child) { display: grid; place-items: center; }
.status-legend { position: sticky; z-index: 2; top: 3.3rem; padding: 0.5rem 0.75rem; display: flex; gap: 0.65rem; overflow-x: auto; border-bottom: 1px solid var(--line); background: white; scrollbar-width: thin; }
.status-legend span { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.28rem; color: var(--muted); font-size: 0.62rem; font-weight: 750; }
.status-legend i { width: 0.58rem; height: 0.58rem; border-radius: 50%; background: var(--legend-colour); }
.all-colleges-row { width: 100%; min-height: 4.35rem; padding: 0.65rem 0.85rem; display: grid; grid-template-columns: minmax(9rem, 1fr) repeat(3, 3.25rem); align-items: center; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: white; text-align: left; }
.all-colleges-row:hover, .all-colleges-row.is-active { background: var(--blue-pale); }
.all-colleges-row.is-active { box-shadow: inset 3px 0 0 var(--blue); }
.all-colleges-row strong, .all-colleges-row small { display: block; }
.all-colleges-row strong { color: var(--navy); font-size: 0.8rem; line-height: 1.2; }
.all-colleges-row small { margin-top: 0.18rem; color: var(--muted); font-size: 0.66rem; }
.all-colleges-row > span:not(:first-child) { display: grid; place-items: center; }
.search-result { width: 100%; min-height: 4.5rem; padding: 0.8rem 1rem; display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 0.8rem; align-items: center; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink); background: white; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--blue-pale); }
.search-result.is-active { background: var(--blue-pale); box-shadow: inset 3px 0 0 var(--blue); }
.college-initials { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 0.65rem; color: var(--blue); background: var(--blue-pale); font-size: 0.75rem; font-weight: 800; }
.search-result strong, .search-result small { display: block; }
.search-result strong { color: var(--navy); font-size: 0.9rem; }
.search-result small { margin-top: 0.15rem; color: var(--muted); font-size: 0.75rem; }
.search-result .arrow { color: var(--blue); font-size: 1.4rem; }
.empty-search { margin: 0; padding: 1rem; color: var(--muted); }

.data-warning { margin-top: 1rem; padding: 0.8rem 1rem; border-left: 4px solid var(--amber); color: #714017; background: var(--amber-pale); font-size: 0.875rem; }
.dashboard-grid { margin-top: 1.75rem; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.85fr); gap: 2rem; }
.section-heading { min-height: 2.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading:not(:first-child) { margin-top: 1.6rem; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 1.05rem; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.stat-card, .attention-card, .portfolio-card, .source-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: white;
  box-shadow: 0 4px 18px rgba(8,43,67,0.04);
}
.stat-card { min-height: 8rem; padding: 1.15rem; }
.stat-card span, .portfolio-card span, .source-card span { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.035em; }
.stat-card strong { display: block; margin: 0.55rem 0 0.35rem; color: var(--navy); font-size: 2.2rem; line-height: 1; }
.stat-card small, .portfolio-card small, .source-card small { color: var(--muted); font-size: 0.78rem; }

.attention-card { padding: 0 1.15rem; }
.attention-item { min-height: 5.8rem; padding: 1rem 0; display: grid; grid-template-columns: 0.4rem 2.6rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: start; border-bottom: 1px solid var(--line); }
.attention-product-icon { color: var(--profiler); }
.attention-item:last-child { border-bottom: 0; }
.attention-item[role="button"] { cursor: pointer; }
.attention-item[role="button"]:hover, .attention-item[role="button"]:focus-visible { margin: 0 -0.55rem; padding-right: 0.55rem; padding-left: 0.55rem; border-radius: 0.7rem; background: var(--blue-pale); outline: none; }
.priority-stripe { width: 0.4rem; height: 3.8rem; border-radius: 999px; background: var(--red); }
.priority-stripe.amber { background: var(--amber); }
.attention-item strong, .attention-item small { display: block; }
.attention-item strong { color: var(--navy); font-size: 0.95rem; }
.attention-item p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.8rem; }
.attention-item small { color: var(--red); font-size: 0.72rem; font-weight: 800; text-align: right; text-transform: uppercase; }

.portfolio-card { display: grid; grid-template-columns: repeat(3, 1fr); }
.portfolio-card > div { min-height: 7.8rem; padding: 1.1rem; border-right: 1px solid var(--line); }
.portfolio-card > div:last-child { border-right: 0; }
.portfolio-card strong { display: block; margin: 0.55rem 0 0.3rem; color: var(--navy); font-size: 1.55rem; line-height: 1.05; }
.source-card { margin-top: 0.9rem; padding: 1rem; display: grid; grid-template-columns: 2.5rem minmax(0,1fr) auto; gap: 0.75rem; align-items: center; }
.source-card strong { display: block; overflow: hidden; color: var(--navy); font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }
.source-icon { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 0.65rem; color: white; background: var(--green); font-weight: 850; }

.access-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(8,43,67,0.48); backdrop-filter: blur(2px); }
.access-panel { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(25rem, calc(100% - 2rem)); padding: 1.25rem; display: flex; flex-direction: column; background: white; box-shadow: 20px 0 50px rgba(8,43,67,0.22); }
.access-panel-header { padding-bottom: 1rem; display: flex; align-items: start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.access-panel-header h2 { margin: 0.15rem 0 0; color: var(--navy); font-size: 1.9rem; }
.compact-button { min-height: 2.6rem; padding: 0.45rem 0.8rem; }
.access-nav { padding: 0.9rem 0; display: grid; gap: 0.35rem; overflow: auto; }
.access-nav button { padding: 0.75rem; display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.65rem; border: 0; border-radius: 0.8rem; color: var(--ink); background: transparent; text-align: left; }
.access-nav button:hover, .access-nav button.active { background: var(--blue-pale); }
.access-nav button > span { grid-row: 1 / 3; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 0.55rem; color: var(--blue); background: white; font-size: 0.68rem; font-weight: 850; }
.access-nav button strong { color: var(--navy); font-size: 0.92rem; }
.access-nav button small { color: var(--muted); font-size: 0.72rem; }
.access-panel-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.access-panel-footer button { width: 100%; }
.version-label { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.72rem; text-align: center; }

.product-icon { width: 3.25rem; height: 3.25rem; overflow: visible; fill: none; stroke: var(--icon-tone, currentColor); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.product-icon-fill { fill: var(--icon-tone, currentColor); stroke: none; }
.product-icon--tracker { stroke-width: 4; }
.product-icon--readiness { stroke-width: 4.5; }
.product-icon--compact { width: 2rem; height: 2rem; stroke-width: 5.5; }
.product-icon--tracker.product-icon--compact, .product-icon--readiness.product-icon--compact { stroke-width: 4.5; }
.product-icon-default--profiler { color: var(--profiler); }
.product-icon-default--tracker { color: var(--tracker); }
.product-icon-default--readiness { color: var(--readiness); }

.mobile-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; min-height: 4.8rem; padding: 0.35rem max(0.35rem, env(safe-area-inset-right)) max(0.35rem, env(safe-area-inset-bottom)) max(0.35rem, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,0.97); backdrop-filter: blur(10px); }
.mobile-nav button { min-height: 3.8rem; display: grid; place-content: center; gap: 0.1rem; border: 0; color: #7b8b96; background: transparent; font-size: 0.7rem; font-weight: 760; }
.mobile-nav button span { font-size: 0.92rem; }
.mobile-nav button.active { color: var(--blue); }

dialog { width: min(calc(100% - 2rem), 34rem); padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: white; box-shadow: var(--shadow); }
.college-dialog { width: min(calc(100% - 2rem), 70rem); max-height: min(92vh, 58rem); }
dialog::backdrop { background: rgba(8, 43, 67, 0.58); backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.dialog-header h2 { font-size: 1.55rem; }
.dialog-header .icon-button { flex: 0 0 auto; font-size: 1.5rem; }
.data-dialog > p { color: var(--muted); font-size: 0.9rem; }
.file-picker { min-height: 6rem; padding: 1rem; display: grid; place-content: center; gap: 0.3rem; border: 2px dashed #b9d0dc; border-radius: 0.8rem; text-align: center; cursor: pointer; background: var(--background); }
.file-picker strong { color: var(--blue); }
.file-picker span { color: var(--muted); font-size: 0.8rem; }
#excel-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.import-status { min-height: 2.5rem; margin: 0.8rem 0; }
.data-dialog > .primary-button { width: 100%; }

.college-dialog-body, #college-dialog-body { display: grid; gap: 0.8rem; }
.college-meta { color: var(--muted); font-size: 0.85rem; }
.college-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.college-meta-row .college-meta { margin: 0; }
.college-access { min-height: 2.7rem; padding: 0.5rem 0.75rem; display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid #bfd0de; border-radius: 0.7rem; color: var(--navy); background: #edf4ff; font-size: 0.75rem; font-weight: 850; white-space: nowrap; }
.college-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.college-metrics div { padding: 0.8rem; border-radius: 0.7rem; background: var(--background); }
.college-metrics span, .college-metrics strong { display: block; }
.college-metrics span { color: var(--muted); font-size: 0.68rem; font-weight: 750; text-transform: uppercase; }
.college-metrics strong { margin-top: 0.35rem; color: var(--navy); }
.product-line { padding: 0.7rem 0; display: grid; grid-template-columns: 3.4rem minmax(0,1fr) auto; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--line); }
.product-line:last-child { border-bottom: 0; }
.status-pill { padding: 0.3rem 0.6rem; border: 1px solid color-mix(in srgb, var(--status-colour) 36%, white); border-radius: 999px; color: var(--status-colour); background: color-mix(in srgb, var(--status-colour) 11%, white); font-size: 0.7rem; font-weight: 850; white-space: nowrap; }

.college-priority { margin-top: 0.2rem; }
.college-section-heading { min-height: 3.2rem; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.college-section-heading h3 { margin: 0.1rem 0 0; padding-left: 0.65rem; border-left: 5px solid #d7a84e; color: var(--navy); font-size: 1.15rem; }
.college-section-heading > small { color: var(--muted); font-size: 0.72rem; }
.priority-action-card { padding: 1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.8rem 1rem; border: 1px solid #e9c98f; border-radius: 0.9rem; background: #fff4e3; }
.priority-action-card div:first-child > * { display: block; }
.priority-action-card small { color: #8a5b17; font-weight: 800; text-transform: uppercase; }
.priority-action-card strong { margin-top: 0.25rem; color: var(--navy); }
.priority-action-card span { margin-top: 0.25rem; color: var(--muted); font-size: 0.85rem; }
.priority-action-card time { color: var(--navy); font-weight: 850; }
.priority-buttons { grid-column: 1 / -1; display: flex; gap: 0.55rem; }
.priority-buttons button { min-height: 2.7rem; padding: 0.55rem 0.9rem; border: 1px solid var(--line); border-radius: 0.65rem; color: var(--navy); background: white; font-weight: 800; }
.priority-buttons button:first-child { border-color: var(--green); color: white; background: var(--green); }
.college-detail-grid { display: block; }
.college-products, .contact-list { display: grid; gap: 0.65rem; }
.product-panel { display: grid; gap: 0.65rem; }
.product-panel.expanded { margin-bottom: 0.35rem; }
.product-contacts { padding: 0 0.8rem 0.8rem; border-left: 5px solid var(--blue); }
.product-contacts .college-section-heading { min-height: 2.9rem; }
.product-contacts .contact-list { grid-template-columns: 1fr; }
.college-product-card { width: 100%; min-height: 7.2rem; display: grid; grid-template-columns: minmax(0,1fr) 3.65rem; align-items: stretch; border: 1px solid var(--line); border-radius: 0.9rem; color: var(--ink); background: white; text-align: left; overflow: hidden; }
.product-card-main { min-width: 0; padding: 0.8rem 0.65rem 0.8rem 0.9rem; display: grid; grid-template-columns: minmax(0,1fr) 4.25rem 7.5rem; align-items: center; gap: 0.65rem; border: 0; color: inherit; background: transparent; text-align: left; }
.product-card-icon { width: 4.25rem; display: grid; place-items: center; justify-self: center; }
.product-card-main .status-pill { justify-self: center; }
.product-access { padding: 0.45rem; display: grid; place-content: center; gap: 0.12rem; border: 0; border-left: 1px solid rgba(8,43,67,0.12); color: var(--navy); background: rgba(255,255,255,0.38); font-weight: 850; }
.product-access span { font-size: 1.05rem; }
.product-access small { font-size: 0.58rem; text-transform: uppercase; }
.product-card-main:hover, .product-access:hover { background: rgba(255,255,255,0.55); }
.college-product-card.product-profiler { border-color: #dfc69f; background: #f8eddf; }
.college-product-card.product-tracker { border-color: #aed5e7; background: #e2f3fa; }
.college-product-card.product-readiness { border-color: #d0a4e2; background: #f0ddf7; }
.college-product-card.selected { box-shadow: inset 5px 0 0 var(--blue), 0 5px 15px rgba(8,43,67,0.08); }
.product-card-copy strong, .product-card-copy small { display: block; }
.product-card-copy strong { color: var(--navy); font-size: 0.95rem; }
.product-card-copy small { margin-top: 0.2rem; color: var(--muted); font-size: 0.72rem; }
.contact-add, .contact-edit { width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border: 1px solid #bfd0de; border-radius: 50%; color: var(--navy); background: #edf4ff; font-size: 1.2rem; }
.contact-card { min-height: 8.2rem; padding: 0.9rem; display: grid; grid-template-columns: 3rem minmax(0,1fr) 2.7rem; gap: 0.75rem; align-items: start; border: 1px solid #dfc69f; border-radius: 0.9rem; background: #f8eddf; }
.contact-list.product-tracker .contact-card { border-color: #aed5e7; background: #e2f3fa; }
.contact-list.product-readiness .contact-card { border-color: #d0a4e2; background: #f0ddf7; }
.contact-avatar { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 0.75rem; color: var(--blue); background: #f4f9fc; font-weight: 850; }
.contact-title-row { display: flex; justify-content: space-between; gap: 0.6rem; }
.contact-title-row strong, .contact-title-row small { display: block; }
.contact-title-row strong { color: var(--navy); }
.contact-title-row small { margin-top: 0.16rem; color: var(--muted); font-size: 0.72rem; }
.primary-tag { align-self: start; padding: 0.2rem 0.45rem; border-radius: 999px; color: var(--green); background: var(--green-pale); font-size: 0.65rem; font-weight: 850; }
.contact-actions { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.contact-actions a { min-height: 2.35rem; padding: 0.48rem 0.7rem; display: inline-flex; align-items: center; border: 1px solid #c6d8e5; border-radius: 0.6rem; color: #376ca6; background: white; font-size: 0.72rem; font-weight: 800; text-decoration: none; }
.contact-dialog form { display: grid; gap: 0.55rem; }
.contact-dialog label { margin-top: 0.35rem; color: var(--navy); font-size: 0.78rem; font-weight: 800; }
.contact-dialog .primary-button { margin-top: 0.7rem; }
.detail-dialog { width: min(calc(100% - 2rem), 32rem); }
.detail-dialog-body { margin-top: 1rem; }
.context-menu-list { display: grid; gap: 0.5rem; }
.context-menu-list button { min-height: 4rem; padding: 0.7rem 0.8rem; display: block; border: 1px solid var(--line); border-radius: 0.75rem; color: var(--ink); background: #f8fbfc; text-align: left; }
.context-menu-list button:hover { border-color: #a9cadc; background: var(--blue-pale); }
.context-menu-list strong, .context-menu-list small { display: block; }
.context-menu-list strong { color: var(--navy); font-size: 0.9rem; }
.context-menu-list small { margin-top: 0.15rem; color: var(--muted); font-size: 0.72rem; }
.information-list { margin: 0; display: grid; gap: 0.55rem; }
.information-list div { padding: 0.7rem 0; display: grid; grid-template-columns: minmax(7rem, 0.45fr) 1fr; gap: 0.75rem; border-bottom: 1px solid var(--line); }
.information-list dt { color: var(--muted); font-size: 0.75rem; font-weight: 750; }
.information-list dd { margin: 0; color: var(--navy); font-size: 0.85rem; font-weight: 750; overflow-wrap: anywhere; }
.information-empty { padding: 1rem; border-left: 4px solid var(--blue); border-radius: 0.5rem; background: var(--blue-pale); }
.information-empty strong { color: var(--navy); }
.information-empty p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.82rem; }
.activity-list { display: grid; gap: 0.55rem; }
.activity-list div { padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.7rem; background: #f8fbfc; }
.activity-list strong, .activity-list span { display: block; }
.activity-list strong { color: var(--navy); }
.activity-list span { margin-top: 0.2rem; color: var(--muted); font-size: 0.75rem; }

.toast { position: fixed; z-index: 50; right: 1rem; bottom: 5.6rem; max-width: min(24rem, calc(100% - 2rem)); padding: 0.8rem 1rem; border-radius: 0.75rem; color: white; background: var(--navy); box-shadow: var(--shadow); font-size: 0.85rem; }
.desktop-only { display: inline-flex; }

@media (max-width: 820px) {
  .login-view { grid-template-columns: 1fr; background: linear-gradient(160deg, var(--navy) 0 33%, var(--background) 33%); }
  .login-brand { min-height: auto; padding: 2.25rem 1.5rem 7rem; background: transparent; }
  .login-brand img { width: min(20rem, 88%); margin: 0 auto; }
  .brand-copy { display: none; }
  .login-panel { margin-top: -5.2rem; padding: 0 1rem 3rem; place-items: start center; background: transparent; }
  .login-card { padding: 1.5rem; border-radius: 1.1rem; background: white; box-shadow: var(--shadow); }
  .login-card h2 { font-size: 2rem; }
  .app-header-inner, .app-shell { width: min(100% - 1.4rem, 44rem); }
  .app-header-inner { grid-template-columns: 5.6rem 1fr 5.6rem; }
  .header-brand img { width: min(10.2rem, 46vw); }
  .access-button span { display: none; }
  .access-button { width: 2.8rem; padding: 0; justify-content: center; }
  .mobile-search-area { position: relative; width: min(100% - 1.4rem, 44rem); margin: 0 auto; padding: 0 0 0.75rem; display: block; }
  .mobile-search-area .search-control input { min-height: 3.1rem; padding-left: 2.9rem; background: #f8fbfc; box-shadow: none; }
  .mobile-search-area .search-results { top: calc(100% - 0.3rem); max-height: min(24rem, 58vh); }
  .desktop-search-area { display: none; }
  .landing-tools { padding-top: 0.8rem; grid-template-columns: 1fr; }
  .last-entry-button { width: 100%; min-height: 3.45rem; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
  .desktop-only { display: none; }
  .portfolio-card { grid-template-columns: 1fr; }
  .portfolio-card > div { min-height: 5.7rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .portfolio-card > div:last-child { border-bottom: 0; }
  .college-dialog { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); margin: 0.5rem auto; padding: 1rem; }
  .college-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .app-header-inner { min-height: 4.75rem; grid-template-columns: 3.2rem 1fr 3.2rem; }
  .header-brand img { width: min(9rem, 44vw); height: 3rem; }
  .search-control input { min-height: 3.25rem; font-size: 1rem; }
  .dashboard-grid { margin-top: 1.25rem; }
  .stat-card { min-height: 7.3rem; padding: 1rem; }
  .stat-card strong { font-size: 2rem; }
  .attention-card { padding: 0 0.9rem; }
  .attention-item { grid-template-columns: 0.35rem 2.3rem minmax(0, 1fr); }
  .attention-item > small { grid-column: 3; text-align: left; }
  .portfolio-card { grid-template-columns: 1fr 1fr; }
  .portfolio-card > div { min-height: 6.3rem; border-right: 1px solid var(--line); }
  .portfolio-card > div:nth-child(2) { border-right: 0; }
  .portfolio-card > div:last-child { grid-column: 1 / -1; border-top: 0; border-right: 0; }
  .college-metrics { grid-template-columns: 1fr; }
  .all-colleges-header, .all-colleges-row { grid-template-columns: minmax(7.5rem, 1fr) repeat(3, 2.65rem); padding-right: 0.45rem; padding-left: 0.65rem; }
  .status-legend { top: 3.3rem; }
  .all-colleges-header > span:first-child { font-size: 0.62rem; }
  .product-icon--compact { width: 1.75rem; height: 1.75rem; }
  .product-line { grid-template-columns: 3rem minmax(0,1fr); }
  .product-line .status-pill { grid-column: 2; justify-self: start; }
  .college-product-card { grid-template-columns: minmax(0,1fr) 3.35rem; }
  .product-card-main { grid-template-columns: minmax(0,1fr) 3.5rem; }
  .product-card-icon { width: 3.5rem; grid-column: 2; grid-row: 1 / span 2; }
  .product-card-main .status-pill { grid-column: 1; justify-self: start; }
  .product-contacts { padding-right: 0; padding-left: 0.55rem; }
  .product-contacts .contact-list { grid-template-columns: 1fr; }
  .college-meta-row { align-items: flex-start; }
  .college-access { padding: 0.5rem; }
  .college-access span + * { display: none; }
  .priority-action-card { grid-template-columns: 1fr; }
  .priority-action-card time { grid-row: 2; }
  .priority-buttons { grid-column: 1; }
  .contact-card { grid-template-columns: 2.7rem minmax(0,1fr) 2.5rem; padding: 0.75rem; }
  .contact-avatar { width: 2.7rem; height: 2.7rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .app-view { animation: reveal 220ms ease-out; }
  @keyframes reveal { from { opacity: 0; transform: translateY(6px); } }
}
