/*
 * IAMatch – look & feel aligned with https://cirseau.eu/
 * Fonts: Commissioner (body), Cabin (headings). Palette taken from the CIRSEAU site.
 */
:root {
  --cs-teal: #05908e;
  --cs-teal-dark: #04716f;
  --cs-blue: #0c4da2;
  --cs-sky: #6cabba;
  --cs-sky-soft: #6cabba2e;
  --cs-slate: #5b819f;
  --cs-ink: #0c0c0c;
  --cs-base: #f8f8f8;
  --cs-accent: #d8613c;

  --bs-primary: var(--cs-teal);
  --bs-primary-rgb: 5, 144, 142;
  --bs-link-color: var(--cs-blue);
  --bs-link-color-rgb: 12, 77, 162;
  --bs-link-hover-color: var(--cs-teal);
  --bs-link-hover-color-rgb: 5, 144, 142;
  --bs-body-font-family: "Commissioner", system-ui, sans-serif;
  --bs-body-color: var(--cs-ink);
  --bs-heading-color: var(--cs-blue);
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }
.content-panel p a, .site-footer p a { text-decoration: underline; }

body {
  font-family: var(--bs-body-font-family);
  line-height: 1.45;
  background-color: #fff;
  background-image: url("../img/bg_drops.png");
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .navbar, .btn, .badge, th { font-family: "Cabin", sans-serif; }
h1, h2 { color: var(--cs-blue); font-weight: 700; }
h3, h4, h5 { color: var(--cs-teal-dark); }
.page-title { font-size: 2rem; margin-bottom: .25rem; }
.page-subtitle { color: #555; margin-bottom: 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--cs-teal); }

/* --- Header ----------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #0000001c;
}
.site-header .navbar-brand img { height: 46px; width: auto; }
.brand-divider { width: 1px; height: 38px; background: #0000002a; margin: 0 .9rem; }
.brand-app { line-height: 1.05; }
.brand-app .name { font-family: "Cabin", sans-serif; font-weight: 700; font-size: 1.45rem; color: var(--cs-blue); }
.brand-app .name span { color: var(--cs-teal); }
.brand-app .tag { font-size: .72rem; color: #666; }
.site-header .nav-link { color: var(--cs-ink); font-weight: 500; text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--cs-teal); }
.site-header .nav-link.active { box-shadow: inset 0 -2px 0 var(--cs-teal); }

/* --- Main ------------------------------------------------------------------------- */
main { flex: 1 0 auto; }
.content-panel {
  background: rgba(255, 255, 255, .94);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(12, 77, 162, .07);
  padding: 1.75rem;
}
.card { border: 0; border-radius: 14px; box-shadow: 0 2px 14px rgba(12, 77, 162, .08); }
.card-header { background: transparent; border-bottom: 1px solid #0000000f; font-family: "Cabin", sans-serif; font-weight: 700; color: var(--cs-blue); }
.stat-card .value { font-family: "Cabin", sans-serif; font-size: 2.2rem; font-weight: 700; color: var(--cs-blue); line-height: 1; }
.stat-card .label { color: #555; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-card a { text-decoration: none; }

.btn-primary { --bs-btn-bg: var(--cs-teal); --bs-btn-border-color: var(--cs-teal); --bs-btn-hover-bg: var(--cs-teal-dark); --bs-btn-hover-border-color: var(--cs-teal-dark); --bs-btn-active-bg: var(--cs-teal-dark); border-radius: 999px; }
.btn-outline-primary { --bs-btn-color: var(--cs-teal); --bs-btn-border-color: var(--cs-teal); --bs-btn-hover-bg: var(--cs-teal); --bs-btn-hover-border-color: var(--cs-teal); --bs-btn-active-bg: var(--cs-teal); border-radius: 999px; }
.btn-outline-secondary, .btn-outline-danger, .btn-secondary, .btn-danger { border-radius: 999px; }
.text-primary { color: var(--cs-teal) !important; }
.bg-primary { background-color: var(--cs-teal) !important; }
.form-check-input:checked { background-color: var(--cs-teal); border-color: var(--cs-teal); }
.page-link { color: var(--cs-blue); }
.active > .page-link { background-color: var(--cs-teal); border-color: var(--cs-teal); }

.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--cs-slate); border-bottom-width: 2px; white-space: nowrap; }
.table thead th a { color: inherit; text-decoration: none; }
.table thead th a:hover { color: var(--cs-teal); }
.table td { vertical-align: middle; }

.cat-badge { display: inline-block; padding: .2em .6em; border-radius: 999px; color: #fff; font-size: .75rem; font-family: "Cabin", sans-serif; white-space: nowrap; }
.cat-dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .35em; vertical-align: baseline; }
.iam-chip { display: inline-block; padding: .1em .5em; border-radius: 6px; background: #e8f4f4; color: var(--cs-teal-dark); font-size: .75rem; font-weight: 600; margin: 0 .15em .15em 0; text-decoration: none; }
.iam-chip:hover { background: var(--cs-teal); color: #fff; }
.muted-small { color: #666; font-size: .85rem; }
dl.detail dt { color: var(--cs-slate); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
dl.detail dd { margin-bottom: .9rem; white-space: pre-line; }

.score-bar { display: flex; gap: 3px; }
.score-bar span { flex: 1; height: 8px; border-radius: 3px; background: #e5e9ec; }
.score-bar span.on { background: var(--cs-teal); }
.score-big { font-family: "Cabin", sans-serif; font-size: 2.6rem; font-weight: 700; color: var(--cs-blue); line-height: 1; }

.filter-bar { background: var(--cs-sky-soft); border-radius: 12px; padding: .9rem 1rem; }

/* Affinity matrix */
.matrix-table th.iam-col { vertical-align: bottom; text-align: center; min-width: 76px; max-width: 120px; white-space: normal; }
.matrix-table th.iam-col span { display: block; font-size: .68rem; font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.15; margin-top: .2rem; }
.matrix-table td.cell { text-align: center; min-width: 52px; }
.matrix-table .w1 { background: #d6eeee; color: var(--cs-teal-dark); }
.matrix-table .w2 { background: var(--cs-teal); color: #fff; }
.matrix-table .cat-row td { background: var(--cs-sky-soft); font-weight: 700; font-family: "Cabin", sans-serif; }
.matrix-select { min-width: 112px; padding-right: 1.6rem; }

/* Hero */
.hero { background: linear-gradient(120deg, rgba(12, 77, 162, .92), rgba(5, 144, 142, .88)); color: #fff; border-radius: 18px; padding: 2.5rem; }
.hero h1 { color: #fff; }
.hero .lead { color: #eef; }

/* --- Footer ----------------------------------------------------------------------- */
.site-footer { background-color: #e5f0f3; font-size: .85rem; margin-top: 3rem; }
.site-footer h6 { font-family: "Cabin", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--cs-ink); }
.site-footer .cirseau-logo { max-width: 230px; }
.site-footer .eu-emblem { width: 120px; float: left; margin: 0 1rem .5rem 0; }
.site-footer .uwmh-logo { max-width: 190px; }
.site-footer a { color: var(--cs-blue); }
.footer-bottom { background: var(--cs-sky); color: #fff; font-size: .8rem; }
.footer-bottom a { color: #fff; }

/* Tom Select tweaks */
.ts-wrapper.multi .ts-control > div { background: #e8f4f4; color: var(--cs-teal-dark); border-radius: 6px; }
.ts-dropdown .optgroup-header { font-weight: 700; color: var(--cs-blue); }

@media (max-width: 767.98px) {
  .content-panel { padding: 1rem; }
  .brand-app .tag { display: none; }
}
