/* Immanuel Innovation - base styles (spec §16) */
:root {
  --navy: #0a1628;
  --navy-mid: #0d2144;
  --navy-light: #1a3a6b;
  --gold: #c9a84c;
  --gold-light: #e8c96b;
  --white: #ffffff;
  --cream: #f6f3ec;
  --cream-alt: #efeae0;
  --muted: #6b7a99;
  --border: rgba(201, 168, 76, 0.25);
  --success: #4ade80;
  --danger: #f87171;
  --radius: 12px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--gold-light);
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-shell:has(.auth-card--wide) {
  max-width: 720px;
}

.auth-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  text-align: left;
}

.auth-brand-text {
  flex: 1;
  min-width: 0;
}

.auth-brand h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
}

.auth-brand p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.auth-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f0f2f6;
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}

.auth-close:hover {
  background: var(--gold);
  color: var(--navy);
}

.auth-close span {
  margin-top: -1px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.auth-card--wide {
  max-width: 720px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-group--checkbox {
  margin-bottom: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--navy-light);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--gold);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  width: 100%;
}

.btn-primary.btn-compact,
.btn-secondary.btn-compact,
.btn-compact {
  width: auto;
  min-width: 7.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.5);
}

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #b91c1c;
}

.alert-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #166534;
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.tab.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.teacher-fields {
  display: none;
}

.teacher-fields.visible {
  display: block;
}

.pending-page {
  text-align: center;
  max-width: 480px;
}

.pending-page h1 {
  font-size: 20px;
  margin-bottom: 12px;
}

.dashboard-stub {
  min-height: 100vh;
  background: var(--white);
}

.dashboard-stub header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-stub main {
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.welcome-banner {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: var(--navy);
}

.dash-badge-toast {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.18), rgba(26, 58, 107, 0.08));
  border: 1px solid var(--gold-light, #d9b95c);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-badge-toast-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-badge-toast-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.dash-badge-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.dash-badge-toast-text strong {
  color: var(--navy);
  font-size: 14px;
}

.dash-badge-toast-link {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.dash-badge-toast-link:hover {
  text-decoration: underline;
}

/* App shell (admin / student dashboard) */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--white);
}

.app-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--navy);
  color: var(--white);
  padding: 20px 0;
}

.app-sidebar .brand {
  padding: 0 16px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
}

.app-sidebar a {
  display: block;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  border-left: 3px solid transparent;
}

.app-sidebar a:hover,
.app-sidebar a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: block;
}

.sidebar-nav-badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #0a1628;
  background: var(--gold);
}

.app-welcome-line {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
}

.app-welcome-hero {
  margin: 0 0 20px;
}

.app-welcome-hero-name {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.app-welcome-hero-sub {
  margin: 8px 0 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--muted);
  font-weight: 400;
}

.sidebar-section-label {
  margin: 20px 16px 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 168, 76, 0.25);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
}

.sidebar-nav--admin {
  margin-bottom: 8px;
}

.sidebar-logout {
  color: var(--muted) !important;
}

.sidebar-logout:hover {
  color: var(--gold) !important;
}

.app-main {
  flex: 1;
  padding: 24px 28px;
  min-width: 0;
  max-width: 100%;
}

.mr-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.mr-main-head h1 {
  margin: 0;
}
.mr-howto-link {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 6px;
}

/*
 * App pages fill the main column next to the sidebar.
 * Avoid centered “islands” that leave huge white gutters on wide screens.
 */
.app-main > .mkt-page,
.app-main > .bank-page,
.app-main > .mp-page,
.app-main > .pp-page,
.app-main > .ps-page,
.app-main > .ws-page,
.app-main > .cn-page,
.app-main > .ex-page,
.app-main > .sap-page,
.app-main > .pf-page,
.app-main > .badges-page,
.app-main > .notif-page,
.app-main > .cp-page,
.app-main > .mp-manage,
.app-main > .collab-apply {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

/* Forms stay readable, but stay left-aligned (no floating center column). */
.app-main > .cp-page,
.app-main > .notif-page,
.app-main > .mp-manage,
.app-main > .collab-apply {
  max-width: 880px;
}

.app-main-title {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

.nav-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1001;
  background: var(--navy);
  color: var(--gold);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
}

.category-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.category-filter-bar a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--navy);
}

.category-filter-bar a.active,
.category-filter-bar a:hover {
  background: rgba(201, 168, 76, 0.2);
  color: var(--navy);
}

.co-members {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.co-members-label {
  font-size: 12px;
  color: var(--muted);
}

.avatar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-light);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }

  .app-shell.nav-open {
    overflow: hidden;
  }

  .app-shell.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    width: min(280px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .app-shell.nav-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .app-main {
    padding: 56px 16px 28px;
    width: 100%;
  }

  .app-main-title {
    padding-right: 52px;
    margin-bottom: 14px;
  }

  .app-welcome-line {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .app-welcome-hero {
    margin-bottom: 24px;
    padding: 16px 0 4px;
  }

  .app-welcome-hero-name {
    font-size: clamp(2.25rem, 8vw, 3rem);
    color: var(--gold-light, #e8d5a0);
  }

  .app-welcome-hero-sub {
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    color: var(--navy-light, #3a4a62);
  }

  .page-nav-back {
    font-size: 14px;
    margin-bottom: 12px;
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .group-work-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .group-work-cta {
    width: 100%;
    text-align: center;
  }

  .group-member-cards {
    grid-template-columns: 1fr;
  }

  .journal-actions .btn {
    width: 100%;
  }

  .profile-avatar-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-card {
    max-width: 100%;
  }

  .auth-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .category-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .category-filter-bar a {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .app-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.stat-card .value {
  font-size: 24px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 4px;
}

.stat-card.alert .value {
  color: var(--danger);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.data-table tr.row-error td {
  color: #b91c1c;
}

.badge-pending {
  display: inline-block;
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Public landing */
.landing-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 24px;
  text-align: center;
}

.landing-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 12px;
  font-weight: 500;
}

.landing-hero .sub {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-content {
  background: var(--cream, #f6f3ec);
  padding: 80px 24px;
}

.landing-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.slideshow {
  position: relative;
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.slide {
  display: none;
  position: relative;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: var(--navy-mid);
}

.slide .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(10, 22, 40, 0.92));
  color: var(--white);
  font-size: 14px;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--navy-mid);
}

.slide-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--muted);
  cursor: pointer;
  padding: 0;
}

.slide-dots button.active {
  background: var(--gold);
}

.icon-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.icon-card {
  text-align: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.icon-card strong {
  display: block;
  color: var(--gold);
  margin-bottom: 6px;
  font-size: 18px;
}

.category-section {
  margin-bottom: 36px;
}

.category-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 14px;
}

.project-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.project-tile {
  background: var(--navy-mid);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.project-tile h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--gold);
}

.project-tile p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.landing-footer {
  background: var(--navy);
  color: var(--muted);
  padding: 32px 24px;
  text-align: center;
  font-size: 14px;
}

.landing-footer a {
  margin: 0 10px;
}

.public-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(10, 22, 40, 0.92);
  color: var(--white);
  backdrop-filter: blur(16px);
}

.public-nav .logo {
  font-weight: 600;
  color: var(--gold);
}

/* Workspace & dashboard cards */
.badge-solo {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(107, 122, 153, 0.2);
  color: var(--muted);
}

.badge-group {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(201, 168, 76, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.2s;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 20px;
  font-size: 14px;
}

.page-nav-back {
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
}

.page-nav-back:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.page-nav-secondary {
  color: var(--muted);
  text-decoration: none;
}

.page-nav-secondary:hover {
  color: var(--navy-light);
  text-decoration: underline;
}

.page-nav-sep {
  color: var(--muted);
}

.group-wall-header {
  margin-bottom: 16px;
}

.group-wall-meta {
  margin: 0 0 8px;
  font-size: 14px;
}

.group-wall-meta a {
  color: var(--navy-light);
  font-weight: 600;
}

.ll-card {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.04), rgba(201, 168, 76, 0.08));
}

.ll-card--compact {
  margin: 0;
  background: #fff;
  color: var(--navy);
}

.ll-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ll-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ll-hint {
  position: relative;
  display: inline-flex;
}

.ll-hint-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(10, 22, 40, 0.28);
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  padding: 0;
}

.ll-hint-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 240px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 8px 20px rgba(10, 22, 40, 0.28);
}

.ll-hint:hover .ll-hint-pop,
.ll-hint:focus-within .ll-hint-pop {
  opacity: 1;
  visibility: visible;
}

.ll-card--compact .ll-hint-pop {
  bottom: auto;
  top: calc(100% + 8px);
}

.ll-lead,
.ll-mentor-steps {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.ll-mentor-steps ol {
  margin: 8px 0 0;
  padding-left: 18px;
}

.ll-mentor-steps li {
  margin: 4px 0;
}

.ll-join-row,
.ll-set-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ll-inline {
  display: inline;
  margin: 0;
}

.ll-meta {
  font-size: 12px;
  color: var(--muted);
}

.ll-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ll-set-form input[type="url"] {
  width: 100%;
  margin-bottom: 8px;
}

.ll-set-form input[type="url"]::placeholder {
  color: #9aa3b2;
  opacity: 1;
}

.ll-example {
  margin: -4px 0 10px;
  font-size: 11px;
  color: var(--muted);
}

.workspace-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.link-danger {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 0;
}

.completion-banner {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.completion-banner[hidden] {
  display: none;
}

.submitted-label {
  color: var(--gold);
  font-weight: 600;
}

.milestone-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fafafa;
}

.milestone-panel.is-complete summary {
  opacity: 0.75;
}

.milestone-panel summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.milestone-panel summary::-webkit-details-marker {
  display: none;
}

.milestone-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: var(--navy);
  color: var(--gold);
  border-radius: 4px;
  margin-right: 10px;
  font-size: 12px;
}

.milestone-body {
  padding: 0 16px 16px;
}

.milestone-desc {
  color: var(--muted);
  font-size: 14px;
}

.journal-feed {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.journal-feed li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.journal-meta {
  font-size: 12px;
  color: var(--muted);
}

.mentor-card {
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  margin: 8px 0;
  background: rgba(201, 168, 76, 0.08);
}

.mentor-meta {
  font-size: 12px;
  color: var(--muted);
}

.group-members-panel ul {
  list-style: none;
  padding: 0;
}

.group-work-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(26, 58, 107, 0.12) 0%, rgba(201, 168, 76, 0.15) 100%);
  border: 2px solid var(--gold);
  border-radius: 12px;
}

.group-work-banner-icon {
  font-size: 28px;
  line-height: 1;
}

.group-work-banner-text {
  flex: 1;
  min-width: 200px;
}

.group-work-banner-text strong {
  display: block;
  font-size: 16px;
  color: var(--navy);
}

.group-work-name {
  display: inline-block;
  margin-left: 8px;
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
}

.group-work-banner-text p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.group-work-cta {
  width: auto;
  flex-shrink: 0;
}

.group-member-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.group-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.group-member-name {
  display: block;
  font-weight: 600;
}

.group-member-pct {
  font-size: 13px;
  color: var(--gold);
}

.journal-section {
  margin-top: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.journal-hint {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.journal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy-light);
  margin-bottom: 8px;
}

.journal-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  border: 1px solid rgba(10, 22, 40, 0.15);
  border-radius: 8px;
  background: #f8fafc;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.journal-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
  background: var(--white);
}

.journal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.journal-entry {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 14px !important;
  margin-bottom: 8px;
  border-bottom: none !important;
}

.user-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-avatar--sm {
  width: 28px;
  height: 28px;
}

.user-avatar--md {
  width: 40px;
  height: 40px;
}

.user-avatar--lg {
  width: 88px;
  height: 88px;
}

.user-avatar--cover {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.user-avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f7fb;
  color: #6b7f96;
  box-sizing: border-box;
  overflow: hidden;
}

.user-avatar--placeholder .user-avatar-icon {
  width: 46%;
  height: 46%;
  flex-shrink: 0;
}

.user-avatar--logo {
  background: #0f2848;
  border: 1px solid rgba(201, 168, 76, 0.35);
}

.user-avatar--logo .user-avatar-logo {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
}

.user-avatar--lg.user-avatar--placeholder {
  background: #0f2848;
  color: #7a8fa6;
  border: 1px solid rgba(201, 168, 76, 0.4);
}

.user-avatar--lg.user-avatar--placeholder .user-avatar-icon {
  width: 42%;
  height: 42%;
}

.user-avatar--lg.user-avatar--logo .user-avatar-logo {
  width: 78%;
  height: 78%;
}

.user-avatar--cover.user-avatar--placeholder {
  background: #0f2848;
  color: #5a6f86;
}

.user-avatar--cover.user-avatar--placeholder .user-avatar-icon {
  width: 50%;
  height: 50%;
}

.user-avatar--cover.user-avatar--logo .user-avatar-logo {
  width: 70%;
  height: 70%;
}

.profile-avatar-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, #fafbfc 0%, rgba(201, 168, 76, 0.07) 100%);
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.04);
}

.profile-avatar-display {
  flex-shrink: 0;
}

.profile-avatar-frame {
  width: 104px;
  height: 104px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(201, 168, 76, 0.55), rgba(10, 22, 40, 0.18));
  box-shadow: 0 6px 22px rgba(10, 22, 40, 0.1);
}

.profile-avatar-frame .user-avatar--lg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-frame .user-avatar--placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-avatar-copy {
  flex: 1;
  min-width: 220px;
}

.profile-avatar-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.profile-avatar-lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 42rem;
}

.profile-avatar-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.profile-avatar-choose {
  width: auto;
  cursor: pointer;
}

.profile-avatar-hint {
  margin: 0;
  font-size: 13px;
}

.app-sidebar .brand-site-img {
  mix-blend-mode: lighten;
}

.sidebar-brand {
  padding: 0 16px 24px;
}

.sidebar-brand .brand-site {
  display: block;
  width: 100%;
}

.sidebar-brand .brand-site-img {
  width: 100%;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  object-position: left top;
}

.co-members-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.co-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: rgba(10, 22, 40, 0.06);
  border-radius: 999px;
  font-size: 12px;
}

.co-member-name {
  color: var(--navy);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-tag {
  font-size: 13px;
  color: var(--muted);
}

.activity-feed {
  list-style: none;
  padding: 0;
}

.activity-feed li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.activity-time {
  color: var(--muted);
  font-size: 12px;
  margin-right: 8px;
}

.ac-console {
  margin: 0 0 28px;
  background: #0a1628;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(10, 22, 40, 0.18);
}

.ac-console-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #07101c;
  border-bottom: 1px solid rgba(201, 168, 76, 0.22);
}

.ac-dots {
  display: inline-flex;
  gap: 5px;
}

.ac-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d4d63;
}

.ac-dots i:first-child { background: #c9a84c; }
.ac-dots i:nth-child(2) { background: #4ade80; }
.ac-dots i:nth-child(3) { background: #64748b; }

.ac-console-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: rgba(201, 168, 76, 0.85);
}

.ac-log {
  list-style: none;
  margin: 0;
  padding: 8px 0 10px;
  max-height: 420px;
  overflow-y: auto;
}

.ac-line {
  display: grid;
  grid-template-columns: 88px minmax(56px, auto) minmax(80px, 1fr) minmax(0, 2fr);
  gap: 8px 12px;
  align-items: baseline;
  padding: 6px 14px;
  font-size: 13px;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ac-line:hover {
  background: rgba(201, 168, 76, 0.06);
}

.ac-ts {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #7d8ba0;
  white-space: nowrap;
}

.ac-name {
  font-weight: 700;
  color: #c9a84c;
  white-space: nowrap;
}

.ac-verb {
  color: #d7deea;
}

.ac-proj {
  color: #4ade80;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-line--journal .ac-verb { color: #93c5fd; }
.ac-line--complete .ac-verb { color: #86efac; }
.ac-line--mentor .ac-name { color: #fbbf24; }
.ac-line--collab .ac-verb { color: #c4b5fd; }
.ac-line--notice .ac-proj { color: #94a3b8; grid-column: 3 / -1; }
.ac-line--notice .ac-verb { display: none; }

@media (max-width: 720px) {
  .ac-line {
    grid-template-columns: 72px 1fr;
    gap: 2px 10px;
  }
  .ac-name { grid-column: 2; }
  .ac-verb,
  .ac-proj {
    grid-column: 2;
  }
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

.nav-bell {
  position: relative;
  padding: 12px 16px;
}

.bell-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.bell-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
}

.bell-dropdown {
  position: absolute;
  left: 16px;
  bottom: 60px;
  width: 280px;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 100;
  max-height: 320px;
  overflow: auto;
}

.bell-list {
  list-style: none;
  padding: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.bell-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.bell-list li.unread {
  font-weight: 600;
}

.bell-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item.mentor-comment {
  border-left: 3px solid var(--gold);
  padding-left: 12px;
  background: rgba(201, 168, 76, 0.06);
}

.comment-item .avatar {
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 13px;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 22px 18px;
  text-align: center;
  margin-top: 12px;
  background: rgba(201, 168, 76, 0.04);
  transition: border-color 0.15s, background 0.15s;
}

.upload-dropzone.dragover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
}

.upload-dropzone-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.upload-dropzone-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.upload-browse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  margin: 0;
  cursor: pointer;
}

.file-browse-btn,
label.file-browse-btn,
.upload-browse-btn,
.profile-avatar-choose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 11rem;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--navy);
  text-decoration: none;
}

.file-browse-btn:hover,
label.file-browse-btn:hover,
.upload-browse-btn:hover,
.profile-avatar-choose:hover {
  background: var(--gold-light);
  color: var(--navy);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.browse-label {
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
}

.upload-dropzone .ws-upload-hint {
  margin: 0;
  max-width: 28rem;
  line-height: 1.4;
}

.upload-dropzone .upload-visibility-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding-top: 4px;
  border-top: 1px solid rgba(10, 22, 40, 0.08);
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
}

.upload-dropzone .upload-visibility-toggle input {
  margin: 2px 0 0;
  flex-shrink: 0;
}

.upload-dropzone .upload-visibility-toggle span {
  min-width: 0;
}

@media (max-width: 640px) {
  .upload-dropzone {
    padding: 18px 14px;
    gap: 12px;
  }

  .upload-dropzone-title {
    font-size: 14px;
  }

  .upload-browse-btn {
    width: 100%;
    max-width: 280px;
    min-height: 44px;
  }

  .upload-dropzone .upload-visibility-toggle {
    font-size: 11px;
    justify-content: flex-start;
  }
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.file-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.file-list .file-icon {
  margin-right: 6px;
}

.upload-progress {
  height: 4px;
  background: rgba(201, 168, 76, 0.2);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.1s;
}

.evidence-section h4 {
  margin: 16px 0 8px;
  font-size: 14px;
}

/* Cookie consent (EU essential-cookies notice) */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.cookie-consent-inner {
  pointer-events: auto;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: rgba(10, 22, 40, 0.94);
  color: #c8d0e0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cookie-consent-text {
  margin: 0;
  flex: 1 1 220px;
  font-size: 12px;
  line-height: 1.5;
  color: #a8b5cc;
}

.cookie-consent-text a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-consent-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 36px;
}

.cookie-consent-btn--accept {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy);
  border-color: rgba(201, 168, 76, 0.6);
}

.cookie-consent-btn--accept:hover {
  filter: brightness(1.05);
}

.cookie-consent-btn--essential {
  background: transparent;
  color: #c8d0e0;
  border-color: rgba(201, 168, 76, 0.3);
}

.cookie-consent-btn--essential:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.site-legal-footer {
  margin-top: auto;
  padding: 18px 20px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}

.site-legal-footer-links a {
  color: var(--muted, #8a94a6);
  text-decoration: none;
}

.site-legal-footer-links a:hover {
  color: var(--gold-light, #d9b95c);
  text-decoration: underline;
}

.site-legal-footer-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted, #8a94a6);
}

.privacy-page {
  min-height: 100vh;
  padding: 32px 20px 80px;
  display: flex;
  justify-content: center;
}

.privacy-card {
  max-width: 640px;
  width: 100%;
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--navy-mid);
  color: #d8dee9;
}

.privacy-card--wide {
  max-width: 820px;
}

.privacy-card h3 {
  margin: 16px 0 6px;
  font-size: 0.95rem;
  color: #e8ecf4;
}

.privacy-card .legal-updated {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 18px;
}

.privacy-card .legal-crosslinks {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.privacy-card h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  color: var(--gold-light);
}

.privacy-card h2 {
  margin: 20px 0 8px;
  font-size: 1rem;
  color: #e8ecf4;
}

.privacy-card p,
.privacy-card li {
  font-size: 14px;
  line-height: 1.6;
  color: #a8b5cc;
}

.privacy-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

@media (max-width: 600px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    width: 100%;
  }

  .cookie-consent-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
