:root {
  --gold: #d4af37;
  --gold-light: #f3d98b;
  --gold-deep: #b8860b;
  --gold-grad: linear-gradient(135deg, #f3d98b 0%, #d4af37 48%, #b8860b 100%);
  --platinum: #d8dbe2;
  --silver: #aeb2bd;
  --black: #08080b;
  --panel: #141118;
  --panel-2: #1b1822;
  --text: #ededf1;
  --muted: #aeb1bd;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.28);
}

/* Pico dark theme overrides — brand palette */
[data-theme="dark"] {
  --background-color: var(--black);
  --color: var(--text);
  --h1-color: #ffffff;
  --h2-color: #ffffff;
  --h3-color: var(--platinum);
  --h4-color: var(--platinum);
  --h5-color: var(--platinum);
  --h6-color: var(--platinum);
  --muted-color: var(--muted);
  --muted-border-color: var(--border-soft);

  --primary: var(--gold);
  --primary-hover: var(--gold-light);
  --primary-focus: rgba(212, 175, 55, 0.3);
  --primary-inverse: #0a0a0e;

  --card-background-color: var(--panel);
  --card-border-color: var(--border-soft);
  --card-sectionning-background-color: var(--panel-2);

  --form-element-background-color: #16131d;
  --form-element-border-color: rgba(255, 255, 255, 0.14);
  --form-element-color: var(--text);
  --form-element-active-border-color: var(--gold);
  --form-element-focus-color: rgba(212, 175, 55, 0.3);

  --modal-overlay-background-color: rgba(4, 4, 6, 0.7);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--black);
  background-image:
    radial-gradient(1100px 620px at 82% -8%, rgba(212, 175, 55, 0.12), transparent 60%),
    radial-gradient(900px 520px at -10% 16%, rgba(212, 175, 55, 0.06), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(108, 122, 160, 0.08), transparent 60%);
  background-attachment: fixed;
  overflow-wrap: break-word;
  overflow-x: clip;
}

/* Inner pages use a light beige canvas; the home page keeps the deep-black hero canvas */
body:not(.page-home):not(.page-navy) {
  background-color: #ece3d0;
  background-image:
    radial-gradient(1100px 620px at 82% -8%, rgba(212, 175, 55, 0.20), transparent 60%),
    radial-gradient(900px 520px at -10% 16%, rgba(184, 134, 11, 0.10), transparent 55%),
    radial-gradient(1000px 700px at 50% 120%, rgba(150, 130, 90, 0.12), transparent 60%);
}
/* Dark text for content sitting directly on the beige canvas (cards keep their own light text) */
body:not(.page-home):not(.page-navy) section > h2,
body:not(.page-home):not(.page-navy) section > h3,
body:not(.page-home):not(.page-navy) section > .section-intro,
body:not(.page-home):not(.page-navy) section > p,
body:not(.page-home):not(.page-navy) .val-context > label,
body:not(.page-home):not(.page-navy) .val-context label span,
body:not(.page-home):not(.page-navy) > footer small {
  color: #2a2333;
}
/* Section sub-headings (h3) on the beige canvas: keep dark but slightly softer than the intro copy */
body:not(.page-home):not(.page-navy) section > h3 {
  color: #1c1726;
}
body:not(.page-home):not(.page-navy) section > p {
  color: #4a4253;
}
body:not(.page-home):not(.page-navy) > footer small a { color: #6b551a; }

/* Home/landing page uses a luxurious golden canvas */
body.page-home {
  background-color: #cda33a;
  background-image: linear-gradient(180deg, #f3d98b 0%, #d4af37 46%, #b8860b 100%);
  background-attachment: fixed;
}
body.page-home #modules h2 { color: #1c1606; }
body.page-home > footer small { color: #2a2008; }
body.page-home > footer small a { color: #5b4708; }

/* Growth Agent page uses a deep navy canvas */
body.page-navy {
  background-color: #0d1830;
  background-image:
    radial-gradient(1000px 560px at 16% 6%, rgba(56, 120, 220, 0.22), transparent 60%),
    radial-gradient(900px 520px at 88% 84%, rgba(36, 80, 160, 0.18), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(20, 40, 90, 0.30), transparent 60%);
}

h1, h2, h3, h4, h5,
.hero h2, .hero h3 {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.01em;
}

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
}

/* ===== Navigation ===== */
nav {
  background: #07070a;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  align-items: center;
}

/* Top row menu fills the space next to the brand */
.nav-menu-row {
  flex: 1 1 auto;
  min-width: 0;
}

/* Second row: login + country/language controls below the main line */
.nav-actions-row {
  flex: 1 1 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

nav a {
  color: var(--silver);
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--gold);
}

nav a[role="button"] {
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
}

nav a[role="button"]:hover {
  color: #0a0a0e;
  filter: brightness(1.06);
}

nav a[role="button"].nav-pill {
  background: var(--gold-grad);
  color: #2a1d05;
  border: 1px solid rgba(255, 240, 200, 0.45);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

nav a[role="button"].nav-pill:hover {
  color: #2a1d05;
  border-color: var(--gold-light);
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(243, 217, 139, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

nav strong {
  color: #fff;
}

/* ===== Growth Agent ===== */
.growth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: start;
}

.growth-form-card,
.growth-report-card {
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.growth-form-card form {
  margin: 0;
}

.growth-form-card label {
  display: block;
  margin-bottom: 0.85rem;
}

.growth-form-card label span {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--silver);
  font-size: 0.9rem;
}

.growth-form-card input,
.growth-form-card select,
.growth-form-card textarea {
  margin-bottom: 0;
}

.growth-form-card button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
}

.growth-report {
  min-height: 280px;
  max-height: 620px;
  overflow-y: auto;
  color: var(--text);
  line-height: 1.6;
}

.growth-report .growth-placeholder,
.growth-report .growth-loading {
  color: var(--muted);
  text-align: center;
  margin: 2rem 0;
}

.growth-report .growth-loading::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  text-align: left;
  animation: growth-dots 1.2s steps(4, end) infinite;
}

@keyframes growth-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.growth-report .growth-error {
  color: #ff8d7a;
  text-align: center;
  margin: 2rem 0;
}

.growth-report h3,
.growth-report h4 {
  color: var(--gold-light);
  margin: 1.25rem 0 0.6rem;
  font-weight: 700;
}

.growth-report h3 { font-size: 1.2rem; }
.growth-report h4 { font-size: 1.05rem; }
.growth-report h3:first-child,
.growth-report h4:first-child { margin-top: 0; }

.growth-report p { margin: 0 0 0.7rem; }

.growth-report ul,
.growth-report ol {
  margin: 0 0 0.9rem;
  padding-inline-start: 1.3rem;
}

.growth-report li { margin-bottom: 0.4rem; }

.growth-report strong { color: #fff; }

@media (max-width: 820px) {
  .growth-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Lesson video ===== */
.lesson-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.4rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.lesson-video iframe,
.lesson-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 2.5rem 3rem 4rem;
  margin: 1.5rem 0 2.5rem;
  border-radius: 28px;
  border: 1px solid var(--border-gold);
  background:
    radial-gradient(620px 320px at 50% -10%, rgba(212, 175, 55, 0.16), transparent 65%),
    linear-gradient(160deg, #15131c 0%, #0c0b11 60%, #08080b 100%);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 0 calc(100% - 1px), rgba(212, 175, 55, 0.06) 100%);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.hero img {
  border-radius: 18px;
  margin-top: 1.25rem;
  border: 1px solid var(--border-gold);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.hero figure img {
  filter: saturate(0.92) brightness(0.82) contrast(1.02);
}

.hero h2 {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.05;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.4rem;
}

.hero h3 {
  color: var(--platinum);
  font-weight: 600;
}

.hero p {
  color: #c4c6cf;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}
.hero-cta a[role="button"] {
  margin: 0;
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.hero a[role="button"] {
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero a[role="button"]:hover {
  transform: translateY(-2px);
  color: #0a0a0e;
  box-shadow: 0 16px 36px rgba(212, 175, 55, 0.35);
}

.hero a[role="button"].secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  box-shadow: none;
}

.hero a[role="button"].secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
}

.hero figcaption a {
  color: var(--silver);
}

/* ===== Sections & headings ===== */
section {
  padding: 3rem 0;
}

h2 {
  text-align: center;
  margin-bottom: 1.75rem;
  color: #fff;
  font-weight: 700;
}

h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 0.85rem auto 0;
  border-radius: 2px;
  background: var(--gold-grad);
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: -0.5rem auto 2rem;
  color: var(--muted);
}

/* ===== Cards & panels ===== */
.cards article,
.panel,
.login-cards article,
.stats article {
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  height: 100%;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.cards article:hover,
.panel:hover,
.login-cards article:hover,
.stats article:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.08);
}

.cards article h4,
.login-cards article h4,
.panel h4 {
  color: #fff;
}

.cards article p,
.login-cards article p {
  color: var(--muted);
}

.panel ul li,
.stats article p {
  color: var(--muted);
}

/* ===== Dashboard feature list markers ===== */
.panel ul {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}
.panel ul li {
  position: relative;
  list-style: none;
  padding-left: 1.75rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}
.panel ul li::marker {
  content: "";
}
.panel ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.34em;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--gold-grad);
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.panel:hover ul li::before {
  box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.16);
}
.panel ul li:hover {
  color: var(--text);
}
.panel ul li:hover::before {
  transform: rotate(45deg) scale(1.15);
}

.stats article strong {
  color: var(--gold);
  font-size: 1.1rem;
  font-family: 'Playfair Display', serif;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* ===== Buttons inside cards ===== */
.cards article button,
.login-cards article button {
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.cards article button:hover,
.login-cards article button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* ===== Tags ===== */
.tag {
  display: inline-block;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

/* ===== Academy hub corners ===== */
.academy-corners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-top: 1.6rem;
}
.academy-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 2rem;
  border-radius: 18px;
  border: 1px solid var(--border-gold);
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  min-height: 220px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.academy-corner:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.12);
}
.academy-corner h4 {
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  margin: 0;
}
.academy-corner p {
  color: var(--muted);
  flex: 1;
  margin: 0;
}
.academy-corner a[role="button"],
.academy-corner button {
  margin: 0.4rem 0 0;
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
  width: auto;
}
.academy-corner a[role="button"]:hover,
.academy-corner button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
@media (max-width: 700px) {
  .academy-corners { grid-template-columns: 1fr; }
}

/* ===== Premium tag + pricing ===== */
.tag-premium {
  background: var(--gold-grad);
  color: #0a0a0e;
  border: none;
}
.price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0.2rem 0 0.9rem;
}
.price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-light);
}
.price .from {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin-right: 0.15rem;
}
.coming-soon-badge {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  background: rgba(212, 175, 55, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.cards article button.coming-soon-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid var(--border-soft);
  cursor: not-allowed;
  font-weight: 600;
}
.cards article button.coming-soon-btn:hover {
  filter: none;
  transform: none;
}

/* ===== Valuation result ===== */
.result {
  padding: 1rem 1.2rem;
  background: rgba(212, 175, 55, 0.07);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  margin-top: 1rem;
  color: var(--text);
}

/* ===== Status messages ===== */
.register-message {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(46, 160, 90, 0.16);
  color: #7ee2a8;
  border: 1px solid rgba(46, 160, 90, 0.3);
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.register-message.error {
  background: rgba(214, 60, 60, 0.16);
  color: #ff9b9b;
  border-color: rgba(214, 60, 60, 0.35);
}

.enroll-btn.enrolled {
  background: var(--gold-grad);
  border-color: var(--gold);
  color: #0a0a0e;
}

/* ===== Modals ===== */
#register-modal article,
#inquiry-modal article {
  border-radius: 20px;
  background: linear-gradient(180deg, #18151f 0%, #110f17 100%);
  border: 1px solid var(--border-gold);
}

#register-modal h3,
#inquiry-modal h3 {
  color: var(--gold);
  margin-bottom: 0.25rem;
}

#register-modal p,
#inquiry-modal p {
  color: var(--muted);
}

#inquiry-form textarea {
  resize: vertical;
}

/* ===== Footer ===== */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-soft);
  margin-top: 2rem;
}

footer small,
footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--gold);
}

/* ===== Request access section ===== */
section[aria-label="Subscribe example"] article {
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  border: 1px solid var(--border-gold);
  border-radius: 22px;
  padding: 2rem;
}

/* ===== AI Chat Widget ===== */
#ai-chat-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #0a0a0e;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.4);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
}

#ai-chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 34px rgba(212, 175, 55, 0.55);
}

#ai-chat-window {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 380px;
  max-height: 560px;
  background: #110f17;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s, opacity 0.2s;
}

#ai-chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

#chat-header {
  background: linear-gradient(135deg, #1c1822, #0f0d15);
  border-bottom: 1px solid var(--border-gold);
  color: white;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#chat-header .chat-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

#chat-header .chat-title span.dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #4ade80;
}

#chat-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

#chat-close:hover {
  color: white;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #0c0b11;
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg.user {
  background: var(--gold-grad);
  color: #0a0a0e;
  font-weight: 500;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant {
  background: #1a1722;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-soft);
}

.chat-msg.assistant.typing {
  color: var(--muted);
}

#chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: #110f17;
  border-top: 1px solid var(--border-soft);
}

#chat-input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  outline: none;
  resize: none;
  font-family: inherit;
  background: #16131d;
  color: var(--text);
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: var(--gold);
}

#chat-send {
  background: var(--gold-grad);
  color: #0a0a0e;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: filter 0.2s;
}

#chat-send:hover {
  filter: brightness(1.07);
}

#chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 500px) {
  #ai-chat-window {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 5.5rem;
  }
  #ai-chat-btn {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 2.4rem;
  }
}

/* ===== Course viewer page ===== */
.gate-card {
  max-width: 540px;
  margin: 4rem auto;
  text-align: center;
  border-top: 4px solid var(--gold);
}

.course-header {
  background:
    radial-gradient(500px 240px at 80% -20%, rgba(212, 175, 55, 0.18), transparent 65%),
    linear-gradient(160deg, #16131c, #0c0b11);
  border: 1px solid var(--border-gold);
  color: #fff;
  padding: 2rem;
  border-radius: 16px;
  margin: 1.5rem 0 2rem;
}
.course-header h1 { color: #fff; margin: 0.4rem 0; }
.course-header p { color: var(--platinum); margin-bottom: 1.2rem; }
.course-header .tag { background: var(--gold-grad); color: #0a0a0e; border: none; }

.progress-wrap { margin-top: 1rem; }
.progress-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-grad);
  transition: width 0.4s ease;
}
#progress-label { color: var(--platinum); display: block; margin-top: 0.4rem; }

.course-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.lesson-nav {
  position: sticky;
  top: 1rem;
  background: linear-gradient(180deg, #17141e, #100e16);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.2rem;
}
.lesson-nav h4 { color: var(--gold); margin-top: 0; }
.lesson-nav ol { list-style: none; padding: 0; margin: 0; counter-reset: lesson; }
.lesson-item {
  counter-increment: lesson;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--silver);
  margin-bottom: 0.3rem;
  line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease;
}
.lesson-item::before {
  content: counter(lesson) ". ";
  color: var(--gold);
  font-weight: 700;
}
.lesson-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.lesson-item.active {
  background: var(--gold-grad);
  color: #0a0a0e;
  font-weight: 600;
}
.lesson-item.active::before { color: #0a0a0e; }
.lesson-item.done { color: #7ee2a8; }
.lesson-item.done::before { content: "\2713  "; color: #7ee2a8; }
.lesson-item.active.done { color: #0a0a0e; }
.lesson-item.active.done::before { color: #0a0a0e; }

.lesson-content {
  background: linear-gradient(180deg, #17141e, #100e16);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 2rem 2.4rem;
}
.lesson-content h2 { color: #fff; margin-top: 0; text-align: left; }
.lesson-content h2::after { display: none; }
.lesson-content h4 { color: var(--gold); margin: 1.4rem 0 0.5rem; }
.lesson-content blockquote {
  border-left: 4px solid var(--gold);
  background: rgba(212, 175, 55, 0.07);
  padding: 0.8rem 1.2rem;
  margin: 1.4rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--platinum);
}
.lesson-content ul, .lesson-content ol { margin: 0.6rem 0 1rem; }
.lesson-content li { margin-bottom: 0.4rem; }

.lesson-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.lesson-actions button { width: auto; }
#complete-btn {
  background: var(--gold-grad);
  border-color: var(--gold);
  color: #0a0a0e;
  font-weight: 700;
}

.complete-banner {
  margin-top: 1.6rem;
  padding: 1.2rem;
  background: rgba(46, 160, 90, 0.14);
  border: 1px solid rgba(46, 160, 90, 0.35);
  border-radius: 10px;
  color: #7ee2a8;
  font-weight: 600;
  text-align: center;
}
.complete-banner a { margin-top: 0.8rem; display: inline-block; }

@media (max-width: 900px) {
  .course-layout { grid-template-columns: 1fr; }
  .lesson-nav { position: static; }
  .lesson-content { padding: 1.4rem; }
}

/* ===== Valuation: Simple / Advanced toggle ===== */
.val-toggle {
  display: inline-flex;
  background: #16131d;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.2rem;
  gap: 4px;
}
.val-mode {
  width: auto;
  margin: 0;
  padding: 0.5rem 1.4rem;
  border: none;
  background: transparent;
  color: var(--silver);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}
.val-mode.active {
  background: var(--gold-grad);
  color: #0a0a0e;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.4rem;
  margin-bottom: 1.2rem;
}
.adv-grid label {
  font-weight: 600;
  color: var(--platinum);
  font-size: 0.92rem;
}
#advancedForm button[type="submit"] {
  background: var(--gold-grad);
  border-color: var(--gold);
  color: #0a0a0e;
  font-weight: 700;
  width: auto;
}

#advancedResult { margin-top: 1.4rem; }
.adv-headline {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
}
.adv-range {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Playfair Display', serif;
  margin: 0.2rem 0;
}
.adv-mid { color: var(--platinum); margin-bottom: 0.8rem; }
.adv-breakdown {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0;
  border-top: 1px solid var(--border-soft);
}
.adv-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.adv-breakdown li span:last-child { font-weight: 700; color: var(--gold); }
.adv-note { display: block; margin-top: 0.6rem; color: var(--muted); }

@media (max-width: 700px) {
  .adv-grid { grid-template-columns: 1fr; }
  .adv-range { font-size: 1.5rem; }
}

/* ===== Brand logo ===== */
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-brand strong { color: #fff; }
.nav-logo {
  height: 44px;
  width: 44px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  border: 1px solid var(--border-gold);
}

.hero-logo {
  display: block;
  margin: 0 auto 1.25rem;
  max-width: 170px;
  width: 40%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-gold);
}

@media (max-width: 600px) {
  .hero-logo { width: 55%; max-width: 150px; }
}

/* ===== Mobile responsive layout ===== */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  nav ul:first-child {
    width: 100%;
    justify-content: center;
  }
  nav ul li {
    padding: 0.25rem 0.4rem;
  }

  .hero {
    padding: 2.75rem 1.4rem;
    border-radius: 20px;
  }
  .hero h2 {
    font-size: 2.1rem;
  }

  section {
    padding: 2rem 0;
  }
  h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.25rem 1.1rem;
  }
  .hero h2 {
    font-size: 1.8rem;
  }
  .hero h3 {
    font-size: 1.1rem;
  }
  .nav-logo {
    height: 36px;
    width: 36px;
  }
  .nav-brand strong {
    font-size: 1rem;
  }
  .lesson-content {
    padding: 1.2rem;
  }
  .course-header {
    padding: 1.5rem 1.2rem;
  }
}

/* ===== Language & Country selectors ===== */
#bm-locale-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.locale-controls .locale-lang,
.locale-controls .locale-country {
  appearance: auto;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  margin: 0;
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1.2;
  height: auto;
  cursor: pointer;
  max-width: 11rem;
}
.locale-controls .locale-lang {
  max-width: 7.5rem;
}
.locale-controls select:hover {
  border-color: var(--gold);
}
.locale-controls select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}
.locale-controls option {
  background: var(--panel);
  color: var(--text);
}

@media (max-width: 768px) {
  #bm-locale-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.4rem;
  }
}

/* ===== RTL (Arabic) support ===== */
[dir="rtl"] body,
[dir="rtl"] .hero,
[dir="rtl"] .section-intro,
[dir="rtl"] article,
[dir="rtl"] .panel {
  text-align: right;
}
[dir="rtl"] .hero {
  text-align: center;
}
[dir="rtl"] .panel ul {
  padding-right: 0;
  padding-left: 0;
}
[dir="rtl"] .panel ul li {
  padding-left: 0;
  padding-right: 1.75rem;
}
[dir="rtl"] .panel ul li::before {
  left: auto;
  right: 0;
}
[dir="rtl"] .adv-grid label {
  text-align: right;
}
[dir="rtl"] #ai-chat-btn {
  right: auto;
  left: 24px;
}
[dir="rtl"] #ai-chat-window {
  right: auto;
  left: 24px;
}
[dir="rtl"] .chat-msg.user {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .chat-msg.assistant {
  margin-right: 0;
  margin-left: auto;
}

/* ===== Top menu strip (manual swipe / drag scroll) ===== */
.nav-marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.nav-marquee::-webkit-scrollbar { display: none; }
.nav-marquee.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  -webkit-mask-image: none;
  mask-image: none;
}
.nav-marquee.is-dragging .nav-pill { pointer-events: none; }
.nav-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: max-content;
}
.nav-marquee-track .nav-pill {
  white-space: nowrap;
  margin: 0;
  -webkit-user-drag: none;
}
/* The bar is static — hide the duplicate set that existed only for the loop. */
.nav-marquee-track .nav-pill[aria-hidden="true"] { display: none; }
/* the second (aria-hidden) set provides a seamless loop for the gentle auto-motion */
@media (prefers-reduced-motion: reduce) {
  .nav-marquee { scroll-behavior: auto; }
}

/* ===== Lively per-section background tints ===== */
main > section { position: relative; z-index: 0; }
main > section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#growth-agent::before {
  background:
    radial-gradient(900px 480px at 14% 8%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(820px 420px at 90% 82%, rgba(56, 189, 248, 0.10), transparent 60%);
}
#modules::before {
  background:
    radial-gradient(900px 480px at 86% 6%, rgba(167, 139, 250, 0.16), transparent 60%),
    radial-gradient(820px 420px at 10% 84%, rgba(99, 102, 241, 0.10), transparent 60%);
}
#ai-courses::before {
  background:
    radial-gradient(900px 480px at 16% 10%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(820px 420px at 88% 80%, rgba(34, 211, 238, 0.11), transparent 60%);
}
#training::before {
  background:
    radial-gradient(900px 480px at 88% 8%, rgba(52, 211, 153, 0.15), transparent 60%),
    radial-gradient(820px 420px at 12% 86%, rgba(163, 230, 53, 0.10), transparent 60%);
}
#dashboard::before {
  background:
    radial-gradient(900px 480px at 14% 8%, rgba(251, 191, 36, 0.14), transparent 60%),
    radial-gradient(820px 420px at 90% 84%, rgba(251, 146, 60, 0.11), transparent 60%);
}
#consultants::before {
  background:
    radial-gradient(900px 480px at 86% 8%, rgba(244, 114, 182, 0.15), transparent 60%),
    radial-gradient(820px 420px at 10% 84%, rgba(232, 121, 249, 0.10), transparent 60%);
}
#valuation::before {
  background:
    radial-gradient(900px 480px at 16% 10%, rgba(129, 140, 248, 0.16), transparent 60%),
    radial-gradient(820px 420px at 88% 82%, rgba(96, 165, 250, 0.10), transparent 60%);
}
#marketplaces::before {
  background:
    radial-gradient(900px 480px at 88% 8%, rgba(251, 113, 133, 0.15), transparent 60%),
    radial-gradient(820px 420px at 12% 84%, rgba(251, 146, 60, 0.10), transparent 60%);
}
#admin::before {
  background:
    radial-gradient(900px 480px at 14% 10%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(820px 420px at 90% 82%, rgba(45, 212, 191, 0.10), transparent 60%);
}
#login::before {
  background:
    radial-gradient(900px 480px at 50% 6%, rgba(212, 175, 55, 0.18), transparent 62%),
    radial-gradient(820px 420px at 88% 86%, rgba(251, 191, 36, 0.10), transparent 60%);
}
section[aria-label="Subscribe example"] {
  position: relative;
  z-index: 0;
}
section[aria-label="Subscribe example"]::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 460px at 50% 10%, rgba(212, 175, 55, 0.14), transparent 62%),
    radial-gradient(800px 400px at 14% 88%, rgba(45, 212, 191, 0.08), transparent 60%);
}

/* ===== Full mobile compatibility pass ===== */
@media (max-width: 768px) {
  /* background-attachment: fixed is janky on iOS Safari */
  body { background-attachment: scroll; }
  .container, .container-fluid { padding-left: 1rem; padding-right: 1rem; }
  .growth-form-card, .growth-report-card { padding: 1.2rem; }
}

@media (max-width: 600px) {
  .hero { padding: 2.25rem 1.1rem; }
  .cards article,
  .panel,
  .login-cards article,
  .stats article { padding: 1.2rem; }
  section[aria-label="Subscribe example"] article { padding: 1.4rem; }
  .lesson-content { padding: 1.2rem; }
  .val-toggle { width: 100%; justify-content: center; }
  .lesson-actions { flex-direction: column; }
  .lesson-actions button { width: 100%; }
  .growth-report { max-height: 460px; }
}

@media (max-width: 380px) {
  .hero { padding: 1.9rem 0.9rem; }
  .hero h2 { font-size: 1.55rem; }
  .hero h3 { font-size: 1.02rem; }
  h2 { font-size: 1.45rem; }
  .nav-brand strong { font-size: 0.9rem; }
  .nav-logo { height: 32px; width: 32px; }
  .adv-range { font-size: 1.4rem; }
  .locale-controls .locale-lang,
  .locale-controls .locale-country {
    max-width: 8.5rem;
    font-size: 0.8rem;
  }
}

/* ===== Multi-page layout: keep footer down on short pages ===== */
main.container { min-height: 62vh; }

/* ===== Business valuation context controls ===== */
.val-context { margin-bottom: 1.25rem; }

/* Students & Internship hub */
.students-block { margin-top: 2.8rem; }
.students-block > h3 { margin-bottom: .35rem; }
.intern-cta { margin-top: 1.4rem; }
.intern-cta button { width: auto; display: inline-flex; }

/* ===== Admin dashboard ===== */
.admin-badge {
  color: var(--gold);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#admin-main { padding-top: 1.5rem; padding-bottom: 3rem; }
.admin-card {
  max-width: 420px;
  margin: 3rem auto;
  background: linear-gradient(160deg, #15131c 0%, #0c0b11 100%);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.admin-card h2 { margin-bottom: 0.4rem; }
.admin-card p { color: var(--muted); }
.admin-error { color: #ff6b6b; margin: 0.5rem 0; }
.admin-loading { color: var(--muted); }
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-toolbar h2 { margin: 0; }
.admin-toolbar-actions { display: flex; gap: 0.6rem; }
.admin-toolbar-actions button { width: auto; margin: 0; padding: 0.55rem 1.1rem; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: linear-gradient(160deg, #15131c 0%, #0c0b11 100%);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
}
.admin-stat-num { font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; }
.admin-stat-label { color: var(--muted); font-size: 0.9rem; }
.admin-section {
  background: linear-gradient(160deg, #15131c 0%, #0c0b11 100%);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
}
.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.admin-section-head h3 { margin: 0; }
.admin-section-head input[type="search"] {
  width: auto;
  min-width: 240px;
  margin: 0;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table-wrap table { margin: 0; font-size: 0.9rem; }
.admin-table-wrap th {
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}
.admin-table-wrap td { vertical-align: top; color: var(--text); }
.admin-table-wrap td a { color: var(--gold); }
.admin-empty { color: var(--muted); margin: 0.5rem 0 0; }

/* Admin status badges + actions */
.admin-status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.admin-status-pending { color: #e6c200; background: rgba(230, 194, 0, 0.12); border-color: rgba(230, 194, 0, 0.4); }
.admin-status-accepted { color: #4ade80; background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.4); }
.admin-status-rejected { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.4); }
.admin-actions-cell { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.admin-act {
  width: auto;
  margin: 0;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  white-space: nowrap;
}
.admin-act-accept { background: rgba(74, 222, 128, 0.15); color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }
.admin-act-reject { background: rgba(255, 107, 107, 0.15); color: #ff6b6b; border-color: rgba(255, 107, 107, 0.4); }
.admin-act-reset { background: transparent; color: var(--muted); }
.admin-act:disabled { opacity: 0.5; cursor: default; }

/* ---- Member auth (login.html) & members area (member.html) ---- */
#login { padding: 1rem 0 3rem; text-align: center; }
.auth-intro {
  max-width: 540px;
  margin: 0.5rem auto 2rem;
  color: #4a3f2c;
  font-size: 1.05rem;
  line-height: 1.6;
}
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  text-align: start;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  padding: 2rem 1.9rem 2.1rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.auth-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 999px;
  padding: 0.3rem;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--gold-light);
  opacity: 0.7;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.6rem 0.5rem;
  margin: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.auth-tab:hover { opacity: 1; }
.auth-tab.active {
  opacity: 1;
  color: #1a1407;
  background: var(--gold-grad);
  box-shadow: 0 4px 14px -6px rgba(212, 175, 55, 0.7);
}
.auth-form { margin: 0; }
.auth-form label {
  display: block;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.auth-form input {
  margin-bottom: 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 55, 0.3);
  color: #f4efe2;
}
.auth-form input::placeholder { color: rgba(244, 239, 226, 0.45); }
.auth-form input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}
.auth-hint {
  display: block;
  color: rgba(243, 217, 139, 0.75);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: -0.4rem 0 1.25rem;
}
.auth-form > button[type="submit"] {
  width: 100%;
  margin: 0;
  font-weight: 700;
}
.auth-form .register-message { margin-bottom: 1rem; }

/* Show/hide password toggle */
.pwd-wrap { position: relative; }
.pwd-wrap input { margin-bottom: 1.15rem; padding-right: 3rem; }
.pwd-toggle {
  position: absolute;
  top: calc((100% - 1.15rem) / 2);
  right: 0.65rem;
  transform: translateY(-50%);
  width: auto;
  margin: 0;
  padding: 0.3rem;
  background: none;
  border: none;
  color: rgba(243, 217, 139, 0.7);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.pwd-toggle:hover { color: var(--gold); background: none; }
.pwd-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}
[dir="rtl"] .pwd-wrap input { padding-right: 0.9rem; padding-left: 3rem; }
[dir="rtl"] .pwd-toggle { right: auto; left: 0.65rem; }

/* Members area */
.member-area { padding: 2rem 0 3rem; }
.member-loading { color: #4a3f2c; opacity: 0.9; }
.member-card {
  max-width: 720px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  padding: 2.25rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
}
.member-badge {
  display: inline-block;
  background: var(--gold-grad);
  color: #1a1407;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.member-lead { color: var(--gold-light); opacity: 0.9; max-width: 560px; }
.member-email-line { opacity: 0.75; font-size: 0.95rem; }
.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.member-actions [role="button"] { width: auto; margin: 0; }

/* ---- Ideas Data Bank (ideas-bank.html) ---- */
#ideas { padding: 1rem 0 3rem; }
.ideas-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.idea-step {
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 1.5rem 1.4rem 1.4rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.7);
}
.idea-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #1a1407;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.idea-step h4 { margin: 0 0 0.4rem; color: var(--gold-light); }
.idea-step p { margin: 0; color: rgba(244, 239, 226, 0.8); font-size: 0.95rem; }

.ideas-layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: 2rem;
  align-items: start;
}
.idea-form-card {
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  padding: 1.75rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
}
.idea-form-card h3 { margin-top: 0; color: var(--gold); }
.idea-form-card .section-intro { color: rgba(244, 239, 226, 0.8); }
.idea-form-card label span { color: var(--gold-light); font-weight: 600; font-size: 0.9rem; }
.idea-form-card input,
.idea-form-card select,
.idea-form-card textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 55, 0.3);
  color: #f4efe2;
}
.idea-form-card input:focus,
.idea-form-card select:focus,
.idea-form-card textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.idea-trending > h3 { color: #2a2333; margin-top: 0; }
.idea-trending > .section-intro { color: #4a3f2c; }
#idea-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.idea-card {
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 1.4rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 16px 40px -26px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  margin: 0;
}
.idea-card h4 { margin: 0.6rem 0 0.5rem; color: #fff; }
.idea-card p { margin: 0 0 1rem; color: rgba(244, 239, 226, 0.82); font-size: 0.95rem; }
.idea-cat-tag {
  align-self: flex-start;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.idea-by { font-size: 0.82rem; color: rgba(243, 217, 139, 0.7); margin: -0.5rem 0 0.9rem; }
.idea-select-btn { margin-top: auto; width: 100%; }
.ideas-state { color: #4a3f2c; margin-top: 1rem; }

@media (max-width: 900px) {
  .ideas-layout { grid-template-columns: 1fr; }
  .ideas-steps { grid-template-columns: 1fr; }
}

.admin-section-note {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.85rem;
  color: rgba(244, 239, 226, 0.6);
}

/* ---- Consultant CV apply + directory (consultants.html) ---- */
.cv-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.cv-apply-card .cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.cv-apply-card label { display: block; margin-bottom: 1rem; }
.cv-apply-card .cv-grid label { margin-bottom: 0; }
.cv-apply-card input,
.cv-apply-card select,
.cv-apply-card textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  font-family: inherit;
}
.cv-apply-card textarea { resize: vertical; }
.cv-file-label input[type="file"] {
  width: 100%;
  margin-top: 0.4rem;
  color: #f4efe2;
  font-size: 0.9rem;
}
.cv-apply-card button[type="submit"] { width: 100%; margin-top: 0.4rem; }

.cv-preview-panel {
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  padding: 1.5rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
}
.cv-preview-panel h3 { margin-top: 0; color: var(--gold); }
.cv-preview-note { color: rgba(244, 239, 226, 0.75); font-size: 0.9rem; }
.cv-preview-headline { color: #fff; font-weight: 700; font-size: 1.05rem; margin: 0.5rem 0; }
.cv-preview-panel p { color: rgba(244, 239, 226, 0.85); }

.cv-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0.8rem; }
.cv-skill, .cv-specialty {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}
.cv-skill {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.cv-specialty {
  background: rgba(255, 255, 255, 0.06);
  color: #f4efe2;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#consultant-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.consultant-card {
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 1.4rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 16px 40px -26px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  margin: 0;
}
.consultant-card h4 { margin: 0.6rem 0 0.3rem; color: #fff; }
.consultant-card p { color: rgba(244, 239, 226, 0.85); font-size: 0.95rem; margin: 0 0 0.7rem; }
.consultant-headline { color: var(--gold-light) !important; font-weight: 600; }
.consultant-meta { font-size: 0.82rem; color: rgba(243, 217, 139, 0.7) !important; margin-bottom: 0.7rem !important; }
.consultant-cta { margin-top: auto; width: 100%; }

@media (max-width: 800px) {
  .cv-layout { grid-template-columns: 1fr; }
  .cv-apply-card .cv-grid { grid-template-columns: 1fr; }
}

/* ===== Public dashboard card CTA ===== */
.dash-card-cta {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #15110a;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.dash-card-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ===== Authenticated dashboard shell ===== */
.dash-page {
  min-height: 100vh;
}
.dash-shell {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}
.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.6rem 1.2rem;
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  border-right: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  height: 100vh;
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
}
.dash-brand .nav-logo {
  width: 34px;
  height: 34px;
}
.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.dash-nav-link {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.dash-nav-link:hover {
  color: #fff;
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--border-gold);
}
.dash-nav-soon {
  opacity: 0.78;
}
.dash-logout {
  width: 100%;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.dash-logout:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
}
.dash-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2rem;
  border-bottom: 1px solid var(--border-soft);
}
.dash-topbar-info h1 {
  margin: 0;
  font-size: 1.6rem;
}
.dash-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
}
.dash-role-badge {
  display: inline-block;
  margin-inline-start: 0.5rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  vertical-align: middle;
}
.dash-content {
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.dash-section {
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 1.5rem;
}
.dash-section h2 {
  margin-top: 0;
  font-size: 1.25rem;
}
.dash-section-intro {
  color: var(--muted);
}
.dash-overview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}
.dash-overview-list li {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-soft);
  color: var(--muted);
}
.dash-doc-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin: 0 0 1rem;
}
.dash-doc-form input[type="file"] {
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.dash-doc-form button {
  width: auto;
  margin: 0;
}
.dash-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dash-doc-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft);
}
.dash-doc-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-doc-name {
  color: #fff;
  font-weight: 600;
  word-break: break-word;
}
.dash-doc-meta small {
  color: var(--muted);
}
.dash-doc-actions {
  display: flex;
  gap: 0.5rem;
}
.dash-doc-btn {
  width: auto;
  margin: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}
.dash-doc-del {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted);
}
.dash-doc-del:hover {
  border-color: #b3261e;
  color: #ff6b6b;
}
.dash-doc-empty {
  color: var(--muted);
}
@media (max-width: 820px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .dash-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 100%;
  }
  .dash-logout {
    width: auto;
  }
  .dash-topbar,
  .dash-content {
    padding-inline: 1.1rem;
  }
}

/* ===== Client dashboard feature sections ===== */
.cd-subhead {
  margin: 2rem 0 0.9rem;
  color: var(--platinum);
  font-size: 1.15rem;
}

.cd-consultant-grid,
.cd-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.cd-consultant-card,
.cd-course-card {
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.cd-consultant-card:hover,
.cd-course-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
}
.cd-consultant-card h4,
.cd-course-card h4 {
  color: #fff;
  margin: 0;
}
.cd-consultant-headline {
  color: var(--gold-light);
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
}
.cd-consultant-meta {
  color: var(--silver);
  font-size: 0.85rem;
  margin: 0;
}
.cd-consultant-bio,
.cd-course-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.cd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cd-tag {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
}

.cd-btn {
  margin-top: auto;
  align-self: flex-start;
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  width: auto;
}
.cd-btn:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
.cd-btn:disabled {
  cursor: default;
  opacity: 0.85;
}
.cd-btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}
.cd-btn-done {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

.cd-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.cd-form input[type="text"] {
  flex: 1 1 240px;
  margin: 0;
}
.cd-form button {
  width: auto;
  margin: 0;
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
}

.cd-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cd-item {
  background: #16131d;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.cd-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.cd-item-title {
  color: #fff;
  font-weight: 600;
}
.cd-item-sub {
  color: var(--silver);
  font-size: 0.82rem;
}
.cd-item-detail {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.cd-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  text-transform: capitalize;
  background: rgba(174, 178, 189, 0.18);
  color: var(--platinum);
  border: 1px solid var(--border-soft);
  white-space: nowrap;
}
.cd-badge-new,
.cd-badge-active { background: rgba(56, 120, 220, 0.18); color: #8fb6ff; border-color: rgba(56, 120, 220, 0.4); }
.cd-badge-confirmed { background: rgba(212, 175, 55, 0.16); color: var(--gold-light); border-color: var(--border-gold); }
.cd-badge-completed { background: rgba(76, 175, 110, 0.18); color: #86e0a6; border-color: rgba(76, 175, 110, 0.4); }
.cd-badge-on_hold { background: rgba(220, 170, 60, 0.16); color: #f0cf7a; border-color: rgba(220, 170, 60, 0.4); }
.cd-badge-cancelled,
.cd-badge-closed,
.cd-badge-declined { background: rgba(180, 90, 90, 0.16); color: #f0a0a0; border-color: rgba(180, 90, 90, 0.4); }
.cd-badge-sent { background: rgba(56, 120, 220, 0.18); color: #8fb6ff; border-color: rgba(56, 120, 220, 0.4); }
.cd-badge-accepted { background: rgba(76, 175, 110, 0.18); color: #86e0a6; border-color: rgba(76, 175, 110, 0.4); }
.cd-badge-reviewing { background: rgba(174, 178, 189, 0.18); color: var(--platinum); border-color: var(--border-soft); }
.cd-badge-contacted { background: rgba(56, 120, 220, 0.18); color: #8fb6ff; border-color: rgba(56, 120, 220, 0.4); }
.cd-badge-diligence { background: rgba(212, 175, 55, 0.16); color: var(--gold-light); border-color: var(--border-gold); }

/* Investor deal-flow board */
.iv-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: start;
}
.iv-col {
  background: linear-gradient(180deg, #15121c 0%, #100e16 100%);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.iv-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-soft);
}
.iv-col-title {
  font-weight: 600;
  color: var(--silver);
  text-transform: capitalize;
}
.iv-card {
  background: #1b1824;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.iv-card-title {
  font-weight: 600;
  color: var(--platinum);
}
.iv-card .cd-item-actions {
  flex-wrap: wrap;
}

.cd-status-select {
  width: auto;
  margin: 0;
  padding: 0.35rem 1.8rem 0.35rem 0.7rem;
  font-size: 0.85rem;
}
.cd-notes {
  margin: 0;
  font-size: 0.9rem;
}
.cd-item-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.cd-row-msg {
  font-size: 0.82rem;
  color: var(--muted);
}
.cd-row-msg.error {
  color: #ff8d7a;
}

.cd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}
.cd-stat {
  background: linear-gradient(180deg, #17141e 0%, #100e16 100%);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-start;
}
.cd-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1;
}
.cd-stat-label {
  color: var(--silver);
  font-size: 0.85rem;
}

.cd-btn-accept {
  background: rgba(76, 175, 110, 0.16);
  color: #86e0a6;
  border: 1px solid rgba(76, 175, 110, 0.45);
}
.cd-btn-del {
  background: rgba(180, 90, 90, 0.16);
  color: #f0a0a0;
  border: 1px solid rgba(180, 90, 90, 0.4);
}

.cd-profile-form {
  flex-direction: column;
  align-items: stretch;
}
.cd-profile-form label {
  font-weight: 600;
  color: var(--silver);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.cd-profile-form input,
.cd-profile-form textarea,
.cd-profile-form select {
  width: 100%;
  margin: 0 0 0.4rem;
}
.cd-profile-form button {
  align-self: flex-start;
}
.cd-form-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.cd-form-row > div {
  flex: 1 1 220px;
}

.cd-profile-status {
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  margin: 0 0 0.9rem;
  border: 1px solid var(--border-soft);
  background: rgba(174, 178, 189, 0.12);
  color: var(--platinum);
}
.cd-profile-status-pending { border-color: rgba(220, 170, 60, 0.4); color: #f0cf7a; background: rgba(220, 170, 60, 0.12); }
.cd-profile-status-accepted { border-color: rgba(76, 175, 110, 0.4); color: #86e0a6; background: rgba(76, 175, 110, 0.12); }
.cd-profile-status-rejected { border-color: rgba(180, 90, 90, 0.4); color: #f0a0a0; background: rgba(180, 90, 90, 0.12); }

#cd-book-modal article { max-width: 480px; }
#cd-book-modal label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--silver);
  font-size: 0.9rem;
}

/* ===== Franchisor dashboard status badges + inline input ===== */
.cd-badge-draft { background: rgba(174, 178, 189, 0.18); color: var(--platinum); border-color: var(--border-soft); }
.cd-badge-published { background: rgba(76, 175, 110, 0.18); color: #86e0a6; border-color: rgba(76, 175, 110, 0.4); }
.cd-badge-available { background: rgba(76, 175, 110, 0.16); color: #86e0a6; border-color: rgba(76, 175, 110, 0.4); }
.cd-badge-assigned { background: rgba(212, 175, 55, 0.16); color: var(--gold-light); border-color: var(--border-gold); }
.cd-badge-qualified { background: rgba(212, 175, 55, 0.16); color: var(--gold-light); border-color: var(--border-gold); }
.cd-badge-pending { background: rgba(174, 178, 189, 0.18); color: var(--platinum); border-color: var(--border-soft); }
.cd-badge-rejected { background: rgba(180, 90, 90, 0.16); color: #f0a0a0; border-color: rgba(180, 90, 90, 0.4); }
.cd-inline-input {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  max-width: 200px;
}
.fd-form-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: end;
}
.fd-form-row label {
  font-weight: 600;
  color: var(--silver);
  font-size: 0.9rem;
}
.fd-form-row input,
.fd-form-row select {
  margin: 0.3rem 0 0;
}

/* ===== Public franchise browse cards + dialog ===== */
.franchise-card {
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 1.4rem;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  box-shadow: 0 16px 40px -26px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  margin: 0;
}
.franchise-card h4 { margin: 0.6rem 0 0.3rem; color: #fff; }
.franchise-card p { color: rgba(244, 239, 226, 0.85); font-size: 0.95rem; margin: 0 0 0.7rem; }
.franchise-invest {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}
.franchise-category {
  align-self: flex-start;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(244, 239, 226, 0.08);
  color: rgba(244, 239, 226, 0.8);
  border: 1px solid rgba(244, 239, 226, 0.2);
}
.franchise-by { font-size: 0.82rem; color: rgba(243, 217, 139, 0.7) !important; margin-bottom: 0.7rem !important; }
.franchise-agreement { font-size: 0.88rem !important; color: rgba(244, 239, 226, 0.75) !important; }
.franchise-agreement strong { color: var(--gold-light); }
.franchise-actions {
  margin-top: auto;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.franchise-actions button {
  flex: 1 1 auto;
  margin: 0;
}
.franchise-apply {
  background: var(--gold-grad);
  color: #1a1304;
  border: none;
}
.fr-dialog {
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  background: linear-gradient(180deg, #1b1726 0%, #110f17 100%);
  color: var(--silver);
  max-width: 520px;
  width: 92%;
  padding: 0;
}
.fr-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.fr-dialog article { margin: 0; padding: 1.6rem; }
.fr-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.fr-dialog-head h3 { margin: 0; color: #fff; }
.fr-dialog-close {
  background: none;
  border: none;
  color: var(--silver);
  font-size: 1.6rem;
  line-height: 1;
  width: auto;
  padding: 0 0.3rem;
  cursor: pointer;
}
.fr-dialog-for {
  color: var(--gold-light);
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ===== Freelancer marketplace (freelancers.html) ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mkt-hero { text-align: center; max-width: 760px; margin: 0 auto 2rem; }
.mkt-hero h2 { color: #1c1726; margin-bottom: 0.6rem; }
.mkt-hero .section-intro { color: #4a4253; }
.mkt-search { position: relative; max-width: 560px; margin: 1.5rem auto 0; }
.mkt-search svg {
  position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: #9a8f74; pointer-events: none;
}
.mkt-search input {
  width: 100%; margin: 0;
  padding: 0.9rem 1.1rem 0.9rem 2.9rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #fffdf8; color: #221c14;
  box-shadow: 0 12px 32px -22px rgba(0, 0, 0, 0.55);
  font-size: 1rem;
}
.mkt-search input::placeholder { color: #9a8f74; }
.mkt-search input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}
.mkt-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.mkt-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mkt-chip {
  margin: 0; width: auto;
  font-size: 0.82rem; font-weight: 600;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.7); color: #4a4253;
  border: 1px solid rgba(28, 23, 38, 0.14);
  cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.mkt-chip:hover { border-color: var(--gold); color: #1c1726; }
.mkt-chip.active {
  background: var(--gold-grad); color: #1a1304; border-color: var(--gold-deep);
}
.mkt-chip-count { font-size: 0.72rem; opacity: 0.7; margin-left: 0.15rem; }
[dir="rtl"] .mkt-chip-count { margin-left: 0; margin-right: 0.15rem; }
.mkt-count { margin: 0; font-size: 0.85rem; color: #6a6152; white-space: nowrap; }
.mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.mkt-card {
  display: flex; flex-direction: column;
  background: #fffdf8;
  border: 1px solid rgba(28, 23, 38, 0.1);
  border-radius: 16px; padding: 1.3rem;
  box-shadow: 0 18px 44px -30px rgba(0, 0, 0, 0.5);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mkt-card:hover {
  transform: translateY(-4px); border-color: var(--gold);
  box-shadow: 0 26px 50px -28px rgba(0, 0, 0, 0.55);
}
.mkt-card-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; }
.mkt-avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-grad); color: #1a1304;
  font-weight: 700; font-size: 0.95rem;
}
.mkt-card-id { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.mkt-name { font-weight: 600; color: #1c1726; font-size: 0.92rem; }
.mkt-cat {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: #8a7635;
}
.mkt-title { margin: 0 0 0.5rem; color: #1c1726; font-size: 1.1rem; }
.mkt-desc {
  color: #5a5263; font-size: 0.9rem; margin: 0 0 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mkt-skills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.mkt-skill {
  font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px;
  background: rgba(212, 175, 55, 0.14); color: #7a6420;
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.mkt-card-foot {
  margin-top: auto; display: flex; align-items: center;
  justify-content: space-between; gap: 0.75rem;
}
.mkt-rate { font-weight: 700; color: #1c1726; font-size: 0.92rem; }
.mkt-hire {
  margin: 0; width: auto; flex: 0 0 auto;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--gold-grad); color: #1a1304; border: none;
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.mkt-hire:hover { filter: brightness(1.05); }
.mkt-state { text-align: center; color: #6a6152; margin: 2rem 0; }
[dir="rtl"] .mkt-search svg { left: auto; right: 1.1rem; }
[dir="rtl"] .mkt-search input { padding: 0.9rem 2.9rem 0.9rem 1.1rem; }
@media (max-width: 640px) {
  .mkt-toolbar { flex-direction: column; align-items: flex-start; }
  .mkt-card-foot { flex-direction: column; align-items: stretch; }
  .mkt-hire { width: 100%; }
}

/* Hub landing pages (Investor Hub, Business Tools, About Us) */
.hub-cta {
  text-align: center;
  margin-top: 2.5rem;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
}
.hub-cta h3 { margin-bottom: 0.5rem; }
.hub-cta p { margin-bottom: 1.25rem; opacity: 0.85; }
/* Module card images on the home page */
#modules article { display: flex; flex-direction: column; }
#modules article p { flex: 1 1 auto; }
.mod-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 1rem;
  border: 1px solid var(--border-gold);
}

.cards article.hub-card { display: flex; flex-direction: column; }
.cards article.hub-card p { flex: 1 1 auto; }

/* Dark blue background variant for feature cards */
.cards article.hub-card--navy {
  background: linear-gradient(180deg, #102449 0%, #0a1830 100%);
  border: 1px solid rgba(120, 160, 220, 0.28);
  box-shadow: 0 14px 30px -16px rgba(10, 24, 48, 0.7);
}

/* Golden background variant for ecosystem cards */
.cards article.hub-card--gold {
  background: var(--gold-grad);
  border: 1px solid var(--gold-deep);
  box-shadow: 0 14px 30px -16px rgba(212, 175, 55, 0.55);
}
.cards article.hub-card--gold h4 { color: #1c1606; }
.cards article.hub-card--gold p { color: #2c2208; opacity: 0.92; }
.cards article.hub-card--gold [role="button"].secondary {
  background: #0d1830;
  border-color: #0d1830;
  color: var(--gold-light);
}
.cards article.hub-card--gold [role="button"].secondary:hover {
  background: #122244;
  border-color: #122244;
  color: #fff;
}

/* Branded hero image (e.g. Investor Hub) sitting on the beige canvas */
.hub-hero {
  margin: 1.75rem auto 0;
  max-width: 760px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 55, 0.08);
}
.hub-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Branded icon badge inside hub cards */
.hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.9rem;
  border-radius: 13px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  box-shadow: 0 6px 18px -8px rgba(212, 175, 55, 0.5);
}
.hub-icon svg { width: 23px; height: 23px; }
/* Photo/illustration variant of the hub icon badge */
.hub-icon--photo {
  width: 72px;
  height: 72px;
  padding: 0;
  background: none;
  border-radius: 15px;
  overflow: hidden;
}
.hub-icon--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Business Tools page: pull cards up to fill the blank space and shrink them */
.page-tools main.container { min-height: 0; }
.page-tools main > section { padding: 1rem 0; margin: 0; }
.page-tools main > section:first-child { padding-top: 1.5rem; padding-bottom: 0.5rem; }
.page-tools main > section:first-child .section-intro { margin-bottom: 0; }
.page-tools .grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 1.1rem;
  max-width: 940px;
  margin: 0 auto;
  align-items: start;
}
.page-tools .cards article.hub-card {
  height: auto;
  padding: 1.5rem 1.4rem;
  border-radius: 16px;
}
.page-tools .cards article.hub-card h4 { margin: 0 0 0.4rem; font-size: 1.08rem; }
/* Kill the flex-grow push so the Open button sits just below the text */
.page-tools .cards article.hub-card p {
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
}
/* Polished, full-width Open button */
.page-tools .cards article.hub-card [role="button"] {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  background: var(--gold-grad);
  border: none;
  color: #0a0a0e;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  box-shadow: 0 10px 24px -10px rgba(212, 175, 55, 0.65);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.page-tools .cards article.hub-card [role="button"]:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -10px rgba(212, 175, 55, 0.8);
}

/* ---- Franchise hub: category filters + grouped sections ---- */
.franchise-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.75rem;
}
.fr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: rgba(212, 175, 55, 0.06);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.fr-chip:hover {
  background: rgba(212, 175, 55, 0.14);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.fr-chip.active {
  background: var(--gold-grad);
  border-color: var(--gold-light);
  color: #1a1206;
}
.fr-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  font-weight: 700;
}
.fr-chip.active .fr-chip-count {
  background: rgba(0, 0, 0, 0.28);
  color: var(--gold-light);
}
.franchise-cat-group {
  margin-bottom: 2.5rem;
}
.franchise-cat-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 1.25rem;
}
.franchise-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
}
html[dir="rtl"] .franchise-cat-head,
html[dir="rtl"] .fr-chip {
  letter-spacing: 0;
}
