/* Inventateq Trainer Registry — Meridian-inspired theme */
:root {
  --bg-start: #eef4ff;
  --bg-end: #f7f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --primary-dark: #1d4ed8;
  --success-bg: #dcfce7;
  --success-text: #15803d;
  --warn-bg: #ffedd5;
  --warn-text: #c2410c;
  --inactive-bg: #f1f5f9;
  --inactive-text: #64748b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end) 55%, #f8fafc);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--text-muted);
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  min-width: 0;
  flex: 1 1 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 1 auto;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-nav a:hover {
  background: #f1f5f9;
  color: var(--primary-dark);
}

.header-nav a.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.top-search,
.list-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
}

.top-search {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.list-search {
  max-width: none;
}

.top-search input,
.list-search input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
}

.top-search svg,
.list-search svg {
  flex-shrink: 0;
  color: var(--text-soft);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex: 1 1 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

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

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.btn-logout {
  background: transparent;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.btn-logout:hover {
  background: #f1f5f9;
  color: var(--primary-dark);
}

.logout-form {
  display: inline;
  margin: 0;
}

/* Honeypot: visually hidden but present in DOM for bots */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(145deg, #93c5fd, #2563eb);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}

.grid-dash {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.stat {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
}

.stat.highlight {
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stat-label {
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.recent-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.recent-list li:last-child {
  border-bottom: 0;
}

.recent-list .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.recent-item {
  display: flex;
  gap: 0.55rem;
  min-width: 0;
}

.filters-card {
  margin-bottom: 0;
}

/* Locked-height scroll viewport for large skill catalogues */
.filters-side .skill-scroll {
  height: 220px;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.25rem;
  margin-bottom: 0.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.55rem;
}

.filters-side .skill-scroll .skill-pills {
  max-height: none;
  overflow: visible;
}

.filters-side .skill-filter {
  width: 100%;
  margin-bottom: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.86rem;
  background: #fff;
  color: var(--text);
}

.filters-side .skill-filter:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
  border-color: #60a5fa;
}

.filters-side .skill-empty {
  margin: 0.4rem 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.filters-side .filter-row {
  flex-direction: column;
  align-items: stretch;
}

.filters-side .filter-controls {
  width: 100%;
}

.filters-side .select-pill {
  flex: 1;
}

.filters-side .match-count {
  text-align: right;
}

.skills-label {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.pill:hover {
  background: #e2e8f0;
}

.pill.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: #93c5fd;
}

.pill .x {
  font-size: 0.75rem;
  opacity: 0.8;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.select-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M5.5 7.5L10 12l4.5-4.5'/%3E%3C/svg%3E") right 0.8rem center no-repeat;
  padding: 0.5rem 2rem 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}

.match-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.layout-main {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.trainer-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trainer-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trainer-card:hover,
.trainer-card.selected {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.trainer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(145deg, #bfdbfe, #60a5fa);
  color: #1e3a8a;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.trainer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.trainer-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.trainer-name {
  font-weight: 800;
  font-size: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-available {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-busy {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.badge-inactive {
  background: var(--inactive-bg);
  color: var(--inactive-text);
}

.trainer-meta {
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.trainer-skills {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.trainer-skills .pill {
  cursor: default;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  background: #f8fafc;
  color: #475569;
}

.trainer-actions {
  display: flex;
  gap: 0.4rem;
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fafbfc;
}

.selected-panel {
  overflow: hidden;
  padding: 0;
}

.selected-hero {
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  min-height: 120px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.selected-body {
  padding: 1.2rem 1.25rem 1.35rem;
}

.selected-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.selected-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.selected-title h2 {
  font-size: 1.35rem;
}

.selected-sub {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.mini-stat {
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.7rem 0.5rem;
  text-align: center;
}

.mini-stat strong {
  display: block;
  font-size: 1.15rem;
}

.mini-stat span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.section-label {
  margin: 0.85rem 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.course-list li {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.course-list .num {
  color: var(--primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.selected-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.selected-actions .btn-primary {
  flex: 1;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1.5rem 3rem;
  position: relative;
}

.login-page .gac-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  margin: 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 0.86rem;
}

.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  background: #f8fafc;
  outline: none;
}

.form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #fff;
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.alert {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.checkbox-pill input {
  accent-color: var(--primary);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.profile-sections {
  display: grid;
  gap: 1rem;
}

.profile-hero {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}

.profile-hero .big-avatar {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  overflow: hidden;
}

.profile-hero .big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    border-radius: 24px;
    padding: 0.85rem;
  }
  .brand,
  .top-actions {
    flex: 1 1 auto;
  }
  .header-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 0.25rem;
  }
  .brand-text {
    font-size: 0.98rem;
  }
  .grid-dash,
  .layout-main,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .trainer-card {
    grid-template-columns: auto 1fr;
  }
  .trainer-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

/* Public homepage — landing, not in-app chrome */
.home-landing {
  background: #f8fafc;
}

.home-wrap {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.15rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0 0.5rem;
}

.home-hero {
  text-align: center;
  padding: 4.5rem 0.5rem 3.25rem;
}

.home-hero h1 {
  font-size: clamp(2.05rem, 4.8vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin: 0 auto;
}

.home-hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.home-lead {
  margin: 1.1rem auto 1.6rem;
  max-width: 40ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.home-hero-btn {
  padding: 0.8rem 1.45rem;
  font-size: 0.95rem;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: auto;
}

.home-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  padding: 1.45rem 1.35rem 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.home-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 1rem;
}

.home-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.home-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.gac-credit {
  margin: 2.75rem 0 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 0.01em;
}

.gac-credit a,
.gac-credit a:link,
.gac-credit a:visited,
.gac-credit a:hover,
.gac-credit a:focus,
.gac-credit a:active {
  color: #cbd5e1;
  text-decoration: none;
  background: none;
  border: 0;
  outline: none;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 800px) {
  .home-hero {
    padding: 3rem 0 2.25rem;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-nav .brand-text {
    font-size: 0.92rem;
  }
}
