:root {
  /* =======================================================
     T-SALFA ENTREPRENEURSHIP — SYSTEM THEME VARIABLES
     ======================================================= */

  --ts-bg: #ffffff;
  --ts-panel: #f8fafc;
  --ts-panel-2: #f1f5f9;
  --ts-border: rgba(15,23,42,.10);

  --ts-text: #0f172a;
  --ts-muted: #64748b;

  --ts-primary: #4da3ff;
  --ts-primary-2: #76c1ff;
  --ts-success: #4bd39a;

  --ts-radius: 1.2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ts-bg: #07111f;
    --ts-panel: #0c1929;
    --ts-panel-2: #101f32;
    --ts-border: rgba(255,255,255,.08);

    --ts-text: #f4f8ff;
    --ts-muted: #8fa2ba;

    --ts-primary: #4da3ff;
    --ts-primary-2: #76c1ff;
    --ts-success: #4bd39a;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ts-bg);
  color: var(--ts-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

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


/* APP */

.entrepreneur-app {
  min-height: 100vh;
  display: flex;
}


/* SIDEBAR */

.entrepreneur-sidebar {
  width: 16.5rem;
  min-height: 100vh;
  border-right: 1px solid var(--ts-border);
  background: var(--ts-panel);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
}

.entrepreneur-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .5rem 1.8rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .8rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ts-primary), var(--ts-primary-2));
  color: #03101e;
  font-weight: 900;
  font-size: 1.2rem;
}

.entrepreneur-brand strong {
  display: block;
  font-size: 1rem;
}

.entrepreneur-brand span {
  display: block;
  margin-top: .15rem;
  color: var(--ts-muted);
  font-size: .72rem;
}

.entrepreneur-nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.nav-item {
  min-height: 2.9rem;
  padding: .65rem .75rem;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ts-muted);
  font-size: .88rem;
  transition: .2s ease;
}

.nav-item:hover {
  background: rgba(255,255,255,.045);
  color: var(--ts-text);
}

.nav-item.active {
  background: rgba(77,163,255,.12);
  color: var(--ts-primary-2);
}

.nav-icon {
  width: 1.35rem;
  text-align: center;
  font-size: 1.05rem;
}

.ai-nav {
  margin-top: .5rem;
  border: 1px solid rgba(77,163,255,.18);
}

.sidebar-bottom {
  margin-top: auto;
}


/* MAIN */

.entrepreneur-main {
  width: 100%;
  margin-left: 16.5rem;
}

.entrepreneur-header {
  min-height: 5rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--ts-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--ts-bg) 90%, transparent);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.eyebrow,
.section-label,
.hero-label {
  color: var(--ts-primary-2);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.header-title h1 {
  margin: .25rem 0 0;
  font-size: 1.25rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ts-border);
  border-radius: .75rem;
  background: var(--ts-panel);
  color: var(--ts-text);
}

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

.profile-avatar {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ts-panel-2);
  color: var(--ts-primary-2);
  font-weight: 800;
}

.profile-info strong,
.profile-info span {
  display: block;
}

.profile-info strong {
  font-size: .78rem;
}

.profile-info span {
  color: var(--ts-muted);
  font-size: .68rem;
  margin-top: .15rem;
}

.mobile-menu {
  display: none;
}


/* CONTENT */

.dashboard-content {
  max-width: 90rem;
  margin: auto;
  padding: 2rem;
}


/* HERO */

.entrepreneur-hero {
  min-height: 20rem;
  padding: 2.5rem;
  border: 1px solid var(--ts-border);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 85% 30%, rgba(77,163,255,.14), transparent 25%),
    linear-gradient(135deg, #0c1d30, #091625);
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.hero-copy {
  max-width: 43rem;
}

.hero-copy h2 {
  margin: .7rem 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hero-copy h2 span {
  color: var(--ts-primary-2);
}

.hero-copy p {
  max-width: 38rem;
  color: var(--ts-muted);
  line-height: 1.7;
  font-size: .95rem;
}

.hero-actions {
  display: flex;
  gap: .7rem;
  margin-top: 1.5rem;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: .75rem;
  padding: .75rem 1rem;
  font-weight: 750;
}

.primary-button {
  background: var(--ts-primary);
  color: #03101e;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--ts-border);
  color: var(--ts-text);
}

.primary-button.small {
  padding: .65rem .9rem;
  font-size: .82rem;
}


/* ORBIT */

.hero-orbit {
  width: 16rem;
  height: 16rem;
  position: relative;
  flex: 0 0 auto;
}

.orbit-core {
  width: 4.3rem;
  height: 4.3rem;
  border-radius: 50%;
  background: var(--ts-primary);
  color: #03101e;
  font-size: 1.7rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4rem rgba(77,163,255,.35);
}

.orbit-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px solid rgba(118,193,255,.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 10rem;
  height: 10rem;
}

.ring-two {
  width: 15rem;
  height: 15rem;
}

.orbit-node {
  position: absolute;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  background: var(--ts-panel-2);
  border: 1px solid var(--ts-border);
  color: var(--ts-primary-2);
}

.node-one {
  top: 1.5rem;
  right: 1.2rem;
}

.node-two {
  bottom: 1rem;
  left: 1rem;
}

.node-three {
  top: 1rem;
  left: 1rem;
}


/* STATS */

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

.stat-card {
  padding: 1.25rem;
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  background: var(--ts-panel);
}

.stat-card span,
.stat-card small {
  display: block;
}

.stat-card span {
  color: var(--ts-muted);
  font-size: .75rem;
}

.stat-card strong {
  display: block;
  margin: .6rem 0 .25rem;
  font-size: 1.5rem;
}

.stat-card small {
  color: var(--ts-muted);
  font-size: .7rem;
}


/* PANELS */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.panel {
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  background: var(--ts-panel);
  padding: 1.4rem;
}

.panel-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.panel-heading h3,
.section-heading h3 {
  margin: .35rem 0 0;
  font-size: 1rem;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--ts-primary-2);
  font-size: .78rem;
}

.empty-business {
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: rgba(77,163,255,.08);
  color: var(--ts-primary-2);
  font-size: 1.5rem;
}

.empty-business h4 {
  margin: 1rem 0 .4rem;
}

.empty-business p {
  max-width: 25rem;
  color: var(--ts-muted);
  font-size: .8rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}


/* STEPS */

.steps {
  margin-top: 1.5rem;
}

.step {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--ts-border);
}

.step:last-child {
  border-bottom: 0;
}

.step-number {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ts-panel-2);
  color: var(--ts-muted);
  font-size: .75rem;
}

.step.completed .step-number {
  background: rgba(75,211,154,.12);
  color: var(--ts-success);
}

.step strong,
.step span {
  display: block;
}

.step strong {
  font-size: .8rem;
}

.step span {
  color: var(--ts-muted);
  font-size: .7rem;
  margin-top: .2rem;
}


/* QUICK ACTIONS */

.quick-section {
  margin-top: 1.5rem;
}

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

.quick-card {
  min-height: 8.5rem;
  text-align: left;
  padding: 1.2rem;
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  background: var(--ts-panel);
  color: var(--ts-text);
  transition: .2s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(77,163,255,.3);
}

.quick-icon {
  display: block;
  color: var(--ts-primary-2);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  font-size: .82rem;
}

.quick-card small {
  color: var(--ts-muted);
  font-size: .7rem;
  line-height: 1.5;
  margin-top: .3rem;
}


/* RESPONSIVE */

@media (max-width: 70rem) {

  .stats-grid,
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-orbit {
    width: 12rem;
    height: 12rem;
    transform: scale(.8);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 52rem) {

  .entrepreneur-sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }

  .entrepreneur-sidebar.open {
    transform: translateX(0);
  }

  .entrepreneur-main {
    margin-left: 0;
  }

  .entrepreneur-header {
    padding: 1rem;
  }

  .mobile-menu {
    display: block;
    border: 1px solid var(--ts-border);
    background: var(--ts-panel);
    color: var(--ts-text);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .7rem;
    margin-right: .7rem;
  }

  .header-title {
    margin-right: auto;
  }

  .header-title h1 {
    font-size: 1rem;
  }

  .profile-info {
    display: none;
  }

  .dashboard-content {
    padding: 1rem;
  }

  .entrepreneur-hero {
    padding: 1.5rem;
  }

  .hero-orbit {
    display: none;
  }
}


@media (max-width: 38rem) {

  .stats-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .entrepreneur-hero {
    min-height: auto;
  }

  .hero-copy h2 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions button {
    width: 100%;
  }
}

/* =========================================================
   T-SALFA ENTREPRENEURSHIP — HEADER IDENTITY
   ========================================================= */

.entrepreneur-header {
  min-height: 5.8rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--ts-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--ts-bg) 94%, transparent);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-title .eyebrow {
  margin-bottom: .2rem;
}

.header-title h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.header-title p {
  margin: .3rem 0 0;
  color: var(--ts-muted);
  font-size: .78rem;
  line-height: 1.3;
}

.header-actions {
  display: flex;
  align-items: center;
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ts-border);
  border-radius: .8rem;
  background: rgba(255,255,255,.025);
  color: var(--ts-text);
  display: grid;
  place-items: center;
  transition: .2s ease;
}

.icon-button:hover {
  background: rgba(77,163,255,.1);
  border-color: rgba(77,163,255,.25);
  color: var(--ts-primary-2);
}


/* =========================================================
   T-SALFA ENTREPRENEURSHIP — DEVICE SYSTEM BEHAVIOR
   ========================================================= */

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--ts-bg);
  color: var(--ts-text);
}

/* System-aware application surfaces */
.entrepreneur-app,
.entrepreneur-main,
.dashboard-content {
  background: var(--ts-bg);
  color: var(--ts-text);
}

/* System-aware secondary text */
.stat-card small,
.step span,
.empty-business p,
.header-title p,
.quick-card small {
  color: var(--ts-muted);
}

/* Mobile safety */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

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

/* Reduced motion follows device preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* T-SALFA ENTREPRENEURSHIP — FINAL VISUAL DEVICE THEME */

@media (prefers-color-scheme: light) {

  /* Hero / feature surfaces */
  .entrepreneur-hero {
    background:
      radial-gradient(circle at 85% 15%, rgba(77,163,255,.12), transparent 25%),
      linear-gradient(135deg, #ffffff, #f1f5f9);
    color: var(--ts-text);
  }

  /* Light-mode translucent surfaces */
  .nav-item:hover {
    background: rgba(15,23,42,.045);
  }

  .quick-card:hover,
  .stat-card:hover,
  .panel:hover {
    background: rgba(15,23,42,.025);
  }
}

@media (prefers-color-scheme: dark) {

  /* Preserve Entrepreneurship's original dark identity */
  .entrepreneur-hero {
    background:
      radial-gradient(circle at 85% 15%, rgba(77,163,255,.14), transparent 25%),
      linear-gradient(135deg, #0c1d30, #091625);
  }

  .nav-item:hover {
    background: rgba(255,255,255,.045);
  }

  .quick-card:hover,
  .stat-card:hover,
  .panel:hover {
    background: rgba(255,255,255,.025);
  }
}


/* =========================================================
   T-SALFA ENTREPRENEURSHIP — LIGHT MODE CONTRAST ENHANCEMENT
   ========================================================= */

@media (prefers-color-scheme: light) {

  :root {
    --ts-bg: #ffffff;
    --ts-panel: #f8fafc;
    --ts-panel-2: #eef4fa;

    /* Stronger readable text */
    --ts-text: #0b1220;
    --ts-muted: #475569;

    /* Stronger T-SalFa blue */
    --ts-primary: #0875d1;
    --ts-primary-2: #168fe8;

    /* Stronger success */
    --ts-success: #087f5b;

    /* Stronger borders */
    --ts-border: rgba(15,23,42,.16);

    --ts-shadow: 0 .5rem 2rem rgba(15,23,42,.10);
  }

  /* Main text */
  body,
  .entrepreneur-app,
  .entrepreneur-main,
  .dashboard-content {
    color: var(--ts-text);
  }

  /* Navigation */
  .nav-item {
    color: #334155;
    font-weight: 600;
  }

  .nav-item:hover {
    color: #075fa8;
    background: rgba(8,117,209,.08);
  }

  .nav-item.active {
    color: #075fa8;
    background: rgba(8,117,209,.12);
  }

  /* Brand secondary text */
  .entrepreneur-brand span {
    color: #475569;
  }

  /* Headings */
  .entrepreneur-hero h1,
  .entrepreneur-hero h2,
  .panel h2,
  .panel h3,
  .stat-card h3,
  .quick-card h3 {
    color: #0b1220;
  }

  /* General secondary text */
  .entrepreneur-hero p,
  .panel p,
  .stat-card p,
  .quick-card p,
  .dashboard-content small {
    color: #475569;
  }

  /* Blue labels/icons */
  .entrepreneur-hero .accent,
  .panel .accent,
  .stat-card .accent,
  .quick-card .accent {
    color: #075fa8;
  }

  /* Success */
  .success,
  .text-success,
  [class*="success"] {
    color: #087f5b;
  }

  /* Borders become clearer */
  .panel,
  .stat-card,
  .quick-card,
  .entrepreneur-header {
    border-color: rgba(15,23,42,.14);
  }

  /* Hero */
  .entrepreneur-hero {
    color: #0b1220;
    background:
      radial-gradient(
        circle at 85% 15%,
        rgba(8,117,209,.16),
        transparent 25%
      ),
      linear-gradient(
        135deg,
        #ffffff,
        #eef5fb
      );
    border-color: rgba(8,117,209,.16);
  }

  .entrepreneur-hero p {
    color: #334155;
  }

  /* Buttons */
  .primary-button {
    background: linear-gradient(
      135deg,
      #0875d1,
      #168fe8
    );
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 .5rem 1.5rem rgba(8,117,209,.22);
  }

  .secondary-button {
    color: #075fa8;
    border-color: rgba(8,117,209,.28);
    background: rgba(8,117,209,.06);
    font-weight: 700;
  }

  .secondary-button:hover {
    background: rgba(8,117,209,.12);
    border-color: rgba(8,117,209,.42);
  }

  /* Stat numbers */
  .stat-card strong,
  .stat-card .value {
    color: #075fa8;
  }

  /* Make muted labels readable */
  .muted,
  .text-muted,
  .subtitle,
  .description {
    color: #475569;
  }
}

/* Keep the original strong Entrepreneurship identity in dark mode. */
@media (prefers-color-scheme: dark) {
  :root {
    --ts-primary: #4da3ff;
    --ts-primary-2: #76c1ff;
    --ts-text: #f4f8ff;
    --ts-muted: #8fa2ba;
    --ts-success: #4bd39a;
  }
}


/* =========================================================
   T-SALFA ENTREPRENEURSHIP — FINAL TEXT CONTRAST PASS
   ========================================================= */

@media (prefers-color-scheme: light) {

  /* Strong readable headings */
  .header-title,
  .section-heading,
  .hero-copy h1,
  .hero-copy h2,
  .panel-heading,
  .quick-section h2 {
    color: #0b1220;
  }

  /* Blue identity text */
  .hero-label,
  .section-label,
  .eyebrow,
  .text-button {
    color: #075fa8;
    font-weight: 700;
  }

  /* Navigation */
  .nav-item {
    color: #334155;
  }

  .nav-item:hover,
  .nav-item.active {
    color: #075fa8;
  }

  /* Secondary / descriptive text */
  .hero-copy p,
  .hero-copy span,
  .panel p,
  .quick-card p,
  .stat-card p,
  .small {
    color: #475569;
  }

  /* Cards */
  .panel,
  .stat-card,
  .quick-card,
  .business-panel,
  .progress-panel {
    color: #0b1220;
  }

  /* Card titles */
  .stat-card strong,
  .quick-card strong,
  .quick-card h3,
  .stat-card h3 {
    color: #0b1220;
  }

  /* Strong blue values */
  .stat-card .value,
  .stat-card .number,
  .progress-panel .value {
    color: #075fa8;
  }

  /* Primary action */
  .primary-button {
    color: #ffffff;
    font-weight: 800;
  }

  /* Secondary action */
  .secondary-button {
    color: #075fa8;
    font-weight: 700;
  }

  /* Step numbers / highlighted UI */
  .step-number,
  .completed {
    color: #075fa8;
  }

  /* Empty states */
  .empty-business,
  .empty-icon {
    color: #475569;
  }

  /* Stronger visible borders */
  .panel,
  .stat-card,
  .quick-card,
  .business-panel,
  .progress-panel {
    border-color: rgba(15,23,42,.16);
  }
}

